![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.managednetworkfabric.kotlin.RoutePolicy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.managednetworkfabric.kotlin
import com.pulumi.azurenative.managednetworkfabric.kotlin.outputs.RoutePolicyStatementPropertiesResponse
import com.pulumi.azurenative.managednetworkfabric.kotlin.outputs.SystemDataResponse
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azurenative.managednetworkfabric.kotlin.outputs.RoutePolicyStatementPropertiesResponse.Companion.toKotlin as routePolicyStatementPropertiesResponseToKotlin
import com.pulumi.azurenative.managednetworkfabric.kotlin.outputs.SystemDataResponse.Companion.toKotlin as systemDataResponseToKotlin
/**
* Builder for [RoutePolicy].
*/
@PulumiTagMarker
public class RoutePolicyResourceBuilder internal constructor() {
public var name: String? = null
public var args: RoutePolicyArgs = RoutePolicyArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend RoutePolicyArgsBuilder.() -> Unit) {
val builder = RoutePolicyArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): RoutePolicy {
val builtJavaResource =
com.pulumi.azurenative.managednetworkfabric.RoutePolicy(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return RoutePolicy(builtJavaResource)
}
}
/**
* The RoutePolicy resource definition.
* Azure REST API version: 2023-02-01-preview. Prior API version in Azure Native 1.x: 2023-02-01-preview.
* Other available API versions: 2023-06-15.
* ## Example Usage
* ### RoutePolicies_Create_MaximumSet_Gen
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var routePolicy = new AzureNative.ManagedNetworkFabric.RoutePolicy("routePolicy", new()
* {
* Annotation = "annotationValue",
* Location = "EastUS",
* ResourceGroupName = "rgRoutePolicies",
* RoutePolicyName = "routePolicyName",
* Statements = new[]
* {
* new AzureNative.ManagedNetworkFabric.Inputs.RoutePolicyStatementPropertiesArgs
* {
* Action = new AzureNative.ManagedNetworkFabric.Inputs.StatementActionPropertiesArgs
* {
* ActionType = AzureNative.ManagedNetworkFabric.CommunityActionTypes.Permit,
* IpCommunityProperties = new AzureNative.ManagedNetworkFabric.Inputs.ActionIpCommunityPropertiesArgs
* {
* Add = new AzureNative.ManagedNetworkFabric.Inputs.IpCommunityIdListArgs
* {
* IpCommunityIds = new[]
* {
* "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName",
* },
* },
* Delete = new AzureNative.ManagedNetworkFabric.Inputs.IpCommunityIdListArgs
* {
* IpCommunityIds = new[]
* {
* "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName",
* },
* },
* Set = new AzureNative.ManagedNetworkFabric.Inputs.IpCommunityIdListArgs
* {
* IpCommunityIds = new[]
* {
* "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName",
* },
* },
* },
* IpExtendedCommunityProperties = new AzureNative.ManagedNetworkFabric.Inputs.ActionIpExtendedCommunityPropertiesArgs
* {
* Add = new AzureNative.ManagedNetworkFabric.Inputs.IpExtendedCommunityIdListArgs
* {
* IpExtendedCommunityIds = new[]
* {
* "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName",
* },
* },
* Delete = new AzureNative.ManagedNetworkFabric.Inputs.IpExtendedCommunityIdListArgs
* {
* IpExtendedCommunityIds = new[]
* {
* "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName",
* },
* },
* Set = new AzureNative.ManagedNetworkFabric.Inputs.IpExtendedCommunityIdListArgs
* {
* IpExtendedCommunityIds = new[]
* {
* "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName",
* },
* },
* },
* LocalPreference = 20,
* },
* Annotation = "annotationValue",
* Condition = new AzureNative.ManagedNetworkFabric.Inputs.StatementConditionPropertiesArgs
* {
* IpCommunityIds = new[]
* {
* "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName",
* },
* IpExtendedCommunityIds = new[]
* {
* "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName",
* },
* IpPrefixId = "subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix",
* },
* SequenceNumber = 7,
* },
* },
* Tags =
* {
* { "key8254", "" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* managednetworkfabric "github.com/pulumi/pulumi-azure-native-sdk/managednetworkfabric/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := managednetworkfabric.NewRoutePolicy(ctx, "routePolicy", &managednetworkfabric.RoutePolicyArgs{
* Annotation: pulumi.String("annotationValue"),
* Location: pulumi.String("EastUS"),
* ResourceGroupName: pulumi.String("rgRoutePolicies"),
* RoutePolicyName: pulumi.String("routePolicyName"),
* Statements: managednetworkfabric.RoutePolicyStatementPropertiesArray{
* &managednetworkfabric.RoutePolicyStatementPropertiesArgs{
* Action: &managednetworkfabric.StatementActionPropertiesArgs{
* ActionType: pulumi.String(managednetworkfabric.CommunityActionTypesPermit),
* IpCommunityProperties: &managednetworkfabric.ActionIpCommunityPropertiesArgs{
* Add: &managednetworkfabric.IpCommunityIdListArgs{
* IpCommunityIds: pulumi.StringArray{
* pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName"),
* },
* },
* Delete: &managednetworkfabric.IpCommunityIdListArgs{
* IpCommunityIds: pulumi.StringArray{
* pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName"),
* },
* },
* Set: &managednetworkfabric.IpCommunityIdListArgs{
* IpCommunityIds: pulumi.StringArray{
* pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName"),
* },
* },
* },
* IpExtendedCommunityProperties: &managednetworkfabric.ActionIpExtendedCommunityPropertiesArgs{
* Add: &managednetworkfabric.IpExtendedCommunityIdListArgs{
* IpExtendedCommunityIds: pulumi.StringArray{
* pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"),
* },
* },
* Delete: &managednetworkfabric.IpExtendedCommunityIdListArgs{
* IpExtendedCommunityIds: pulumi.StringArray{
* pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"),
* },
* },
* Set: &managednetworkfabric.IpExtendedCommunityIdListArgs{
* IpExtendedCommunityIds: pulumi.StringArray{
* pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"),
* },
* },
* },
* LocalPreference: pulumi.Float64(20),
* },
* Annotation: pulumi.String("annotationValue"),
* Condition: &managednetworkfabric.StatementConditionPropertiesArgs{
* IpCommunityIds: pulumi.StringArray{
* pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName"),
* },
* IpExtendedCommunityIds: pulumi.StringArray{
* pulumi.String("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName"),
* },
* IpPrefixId: pulumi.String("subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix"),
* },
* SequenceNumber: pulumi.Float64(7),
* },
* },
* Tags: pulumi.StringMap{
* "key8254": pulumi.String(""),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.managednetworkfabric.RoutePolicy;
* import com.pulumi.azurenative.managednetworkfabric.RoutePolicyArgs;
* import com.pulumi.azurenative.managednetworkfabric.inputs.RoutePolicyStatementPropertiesArgs;
* import com.pulumi.azurenative.managednetworkfabric.inputs.StatementActionPropertiesArgs;
* import com.pulumi.azurenative.managednetworkfabric.inputs.ActionIpCommunityPropertiesArgs;
* import com.pulumi.azurenative.managednetworkfabric.inputs.IpCommunityIdListArgs;
* import com.pulumi.azurenative.managednetworkfabric.inputs.ActionIpExtendedCommunityPropertiesArgs;
* import com.pulumi.azurenative.managednetworkfabric.inputs.IpExtendedCommunityIdListArgs;
* import com.pulumi.azurenative.managednetworkfabric.inputs.StatementConditionPropertiesArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var routePolicy = new RoutePolicy("routePolicy", RoutePolicyArgs.builder()
* .annotation("annotationValue")
* .location("EastUS")
* .resourceGroupName("rgRoutePolicies")
* .routePolicyName("routePolicyName")
* .statements(RoutePolicyStatementPropertiesArgs.builder()
* .action(StatementActionPropertiesArgs.builder()
* .actionType("Permit")
* .ipCommunityProperties(ActionIpCommunityPropertiesArgs.builder()
* .add(IpCommunityIdListArgs.builder()
* .ipCommunityIds("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName")
* .build())
* .delete(IpCommunityIdListArgs.builder()
* .ipCommunityIds("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName")
* .build())
* .set(IpCommunityIdListArgs.builder()
* .ipCommunityIds("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName")
* .build())
* .build())
* .ipExtendedCommunityProperties(ActionIpExtendedCommunityPropertiesArgs.builder()
* .add(IpExtendedCommunityIdListArgs.builder()
* .ipExtendedCommunityIds("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName")
* .build())
* .delete(IpExtendedCommunityIdListArgs.builder()
* .ipExtendedCommunityIds("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName")
* .build())
* .set(IpExtendedCommunityIdListArgs.builder()
* .ipExtendedCommunityIds("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName")
* .build())
* .build())
* .localPreference(20)
* .build())
* .annotation("annotationValue")
* .condition(StatementConditionPropertiesArgs.builder()
* .ipCommunityIds("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipCommunities/ipCommunityName")
* .ipExtendedCommunityIds("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedNetworkFabric/ipExtendedCommunities/ipExtendedCommunityName")
* .ipPrefixId("subscriptions/xxxxxx/resourceGroups/resourcegroupname/providers/Microsoft.ManagedNetworkFabric/ipPrefixes/example-ipPrefix")
* .build())
* .sequenceNumber(7)
* .build())
* .tags(Map.of("key8254", ""))
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:managednetworkfabric:RoutePolicy routePolicyName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedNetworkFabric/routePolicies/{routePolicyName}
* ```
*/
public class RoutePolicy internal constructor(
override val javaResource: com.pulumi.azurenative.managednetworkfabric.RoutePolicy,
) : KotlinCustomResource(javaResource, RoutePolicyMapper) {
/**
* Switch configuration description.
*/
public val `annotation`: Output?
get() = javaResource.`annotation`().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The geo-location where the resource lives
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* The name of the resource
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Gets the provisioning state of the resource.
*/
public val provisioningState: Output
get() = javaResource.provisioningState().applyValue({ args0 -> args0 })
/**
* Route Policy statements.
*/
public val statements: Output>
get() = javaResource.statements().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
routePolicyStatementPropertiesResponseToKotlin(args0)
})
})
})
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
public val systemData: Output
get() = javaResource.systemData().applyValue({ args0 ->
args0.let({ args0 ->
systemDataResponseToKotlin(args0)
})
})
/**
* Resource tags.
*/
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy