All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.network.kotlin.ExpressRouteCircuitPeeringArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.ExpressRouteCircuitPeeringArgs.builder
import com.pulumi.azure.network.kotlin.inputs.ExpressRouteCircuitPeeringIpv6Args
import com.pulumi.azure.network.kotlin.inputs.ExpressRouteCircuitPeeringIpv6ArgsBuilder
import com.pulumi.azure.network.kotlin.inputs.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs
import com.pulumi.azure.network.kotlin.inputs.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Manages an ExpressRoute Circuit Peering.
 * ## Example Usage
 * ### Creating A Microsoft Peering)
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "exprtTest",
 *     location: "West Europe",
 * });
 * const exampleExpressRouteCircuit = new azure.network.ExpressRouteCircuit("example", {
 *     name: "expressRoute1",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     serviceProviderName: "Equinix",
 *     peeringLocation: "Silicon Valley",
 *     bandwidthInMbps: 50,
 *     sku: {
 *         tier: "Standard",
 *         family: "MeteredData",
 *     },
 *     allowClassicOperations: false,
 *     tags: {
 *         environment: "Production",
 *     },
 * });
 * const exampleExpressRouteCircuitPeering = new azure.network.ExpressRouteCircuitPeering("example", {
 *     peeringType: "MicrosoftPeering",
 *     expressRouteCircuitName: exampleExpressRouteCircuit.name,
 *     resourceGroupName: example.name,
 *     peerAsn: 100,
 *     primaryPeerAddressPrefix: "123.0.0.0/30",
 *     secondaryPeerAddressPrefix: "123.0.0.4/30",
 *     ipv4Enabled: true,
 *     vlanId: 300,
 *     microsoftPeeringConfig: {
 *         advertisedPublicPrefixes: ["123.1.0.0/24"],
 *     },
 *     ipv6: {
 *         primaryPeerAddressPrefix: "2002:db01::/126",
 *         secondaryPeerAddressPrefix: "2003:db01::/126",
 *         enabled: true,
 *         microsoftPeering: {
 *             advertisedPublicPrefixes: ["2002:db01::/126"],
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="exprtTest",
 *     location="West Europe")
 * example_express_route_circuit = azure.network.ExpressRouteCircuit("example",
 *     name="expressRoute1",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     service_provider_name="Equinix",
 *     peering_location="Silicon Valley",
 *     bandwidth_in_mbps=50,
 *     sku={
 *         "tier": "Standard",
 *         "family": "MeteredData",
 *     },
 *     allow_classic_operations=False,
 *     tags={
 *         "environment": "Production",
 *     })
 * example_express_route_circuit_peering = azure.network.ExpressRouteCircuitPeering("example",
 *     peering_type="MicrosoftPeering",
 *     express_route_circuit_name=example_express_route_circuit.name,
 *     resource_group_name=example.name,
 *     peer_asn=100,
 *     primary_peer_address_prefix="123.0.0.0/30",
 *     secondary_peer_address_prefix="123.0.0.4/30",
 *     ipv4_enabled=True,
 *     vlan_id=300,
 *     microsoft_peering_config={
 *         "advertised_public_prefixes": ["123.1.0.0/24"],
 *     },
 *     ipv6={
 *         "primary_peer_address_prefix": "2002:db01::/126",
 *         "secondary_peer_address_prefix": "2003:db01::/126",
 *         "enabled": True,
 *         "microsoft_peering": {
 *             "advertised_public_prefixes": ["2002:db01::/126"],
 *         },
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "exprtTest",
 *         Location = "West Europe",
 *     });
 *     var exampleExpressRouteCircuit = new Azure.Network.ExpressRouteCircuit("example", new()
 *     {
 *         Name = "expressRoute1",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         ServiceProviderName = "Equinix",
 *         PeeringLocation = "Silicon Valley",
 *         BandwidthInMbps = 50,
 *         Sku = new Azure.Network.Inputs.ExpressRouteCircuitSkuArgs
 *         {
 *             Tier = "Standard",
 *             Family = "MeteredData",
 *         },
 *         AllowClassicOperations = false,
 *         Tags =
 *         {
 *             { "environment", "Production" },
 *         },
 *     });
 *     var exampleExpressRouteCircuitPeering = new Azure.Network.ExpressRouteCircuitPeering("example", new()
 *     {
 *         PeeringType = "MicrosoftPeering",
 *         ExpressRouteCircuitName = exampleExpressRouteCircuit.Name,
 *         ResourceGroupName = example.Name,
 *         PeerAsn = 100,
 *         PrimaryPeerAddressPrefix = "123.0.0.0/30",
 *         SecondaryPeerAddressPrefix = "123.0.0.4/30",
 *         Ipv4Enabled = true,
 *         VlanId = 300,
 *         MicrosoftPeeringConfig = new Azure.Network.Inputs.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs
 *         {
 *             AdvertisedPublicPrefixes = new[]
 *             {
 *                 "123.1.0.0/24",
 *             },
 *         },
 *         Ipv6 = new Azure.Network.Inputs.ExpressRouteCircuitPeeringIpv6Args
 *         {
 *             PrimaryPeerAddressPrefix = "2002:db01::/126",
 *             SecondaryPeerAddressPrefix = "2003:db01::/126",
 *             Enabled = true,
 *             MicrosoftPeering = new Azure.Network.Inputs.ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs
 *             {
 *                 AdvertisedPublicPrefixes = new[]
 *                 {
 *                     "2002:db01::/126",
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("exprtTest"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{
 * 			Name:                pulumi.String("expressRoute1"),
 * 			ResourceGroupName:   example.Name,
 * 			Location:            example.Location,
 * 			ServiceProviderName: pulumi.String("Equinix"),
 * 			PeeringLocation:     pulumi.String("Silicon Valley"),
 * 			BandwidthInMbps:     pulumi.Int(50),
 * 			Sku: &network.ExpressRouteCircuitSkuArgs{
 * 				Tier:   pulumi.String("Standard"),
 * 				Family: pulumi.String("MeteredData"),
 * 			},
 * 			AllowClassicOperations: pulumi.Bool(false),
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("Production"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewExpressRouteCircuitPeering(ctx, "example", &network.ExpressRouteCircuitPeeringArgs{
 * 			PeeringType:                pulumi.String("MicrosoftPeering"),
 * 			ExpressRouteCircuitName:    exampleExpressRouteCircuit.Name,
 * 			ResourceGroupName:          example.Name,
 * 			PeerAsn:                    pulumi.Int(100),
 * 			PrimaryPeerAddressPrefix:   pulumi.String("123.0.0.0/30"),
 * 			SecondaryPeerAddressPrefix: pulumi.String("123.0.0.4/30"),
 * 			Ipv4Enabled:                pulumi.Bool(true),
 * 			VlanId:                     pulumi.Int(300),
 * 			MicrosoftPeeringConfig: &network.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs{
 * 				AdvertisedPublicPrefixes: pulumi.StringArray{
 * 					pulumi.String("123.1.0.0/24"),
 * 				},
 * 			},
 * 			Ipv6: &network.ExpressRouteCircuitPeeringIpv6Args{
 * 				PrimaryPeerAddressPrefix:   pulumi.String("2002:db01::/126"),
 * 				SecondaryPeerAddressPrefix: pulumi.String("2003:db01::/126"),
 * 				Enabled:                    pulumi.Bool(true),
 * 				MicrosoftPeering: &network.ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs{
 * 					AdvertisedPublicPrefixes: pulumi.StringArray{
 * 						pulumi.String("2002:db01::/126"),
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.ExpressRouteCircuit;
 * import com.pulumi.azure.network.ExpressRouteCircuitArgs;
 * import com.pulumi.azure.network.inputs.ExpressRouteCircuitSkuArgs;
 * import com.pulumi.azure.network.ExpressRouteCircuitPeering;
 * import com.pulumi.azure.network.ExpressRouteCircuitPeeringArgs;
 * import com.pulumi.azure.network.inputs.ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs;
 * import com.pulumi.azure.network.inputs.ExpressRouteCircuitPeeringIpv6Args;
 * import com.pulumi.azure.network.inputs.ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("exprtTest")
 *             .location("West Europe")
 *             .build());
 *         var exampleExpressRouteCircuit = new ExpressRouteCircuit("exampleExpressRouteCircuit", ExpressRouteCircuitArgs.builder()
 *             .name("expressRoute1")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .serviceProviderName("Equinix")
 *             .peeringLocation("Silicon Valley")
 *             .bandwidthInMbps(50)
 *             .sku(ExpressRouteCircuitSkuArgs.builder()
 *                 .tier("Standard")
 *                 .family("MeteredData")
 *                 .build())
 *             .allowClassicOperations(false)
 *             .tags(Map.of("environment", "Production"))
 *             .build());
 *         var exampleExpressRouteCircuitPeering = new ExpressRouteCircuitPeering("exampleExpressRouteCircuitPeering", ExpressRouteCircuitPeeringArgs.builder()
 *             .peeringType("MicrosoftPeering")
 *             .expressRouteCircuitName(exampleExpressRouteCircuit.name())
 *             .resourceGroupName(example.name())
 *             .peerAsn(100)
 *             .primaryPeerAddressPrefix("123.0.0.0/30")
 *             .secondaryPeerAddressPrefix("123.0.0.4/30")
 *             .ipv4Enabled(true)
 *             .vlanId(300)
 *             .microsoftPeeringConfig(ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs.builder()
 *                 .advertisedPublicPrefixes("123.1.0.0/24")
 *                 .build())
 *             .ipv6(ExpressRouteCircuitPeeringIpv6Args.builder()
 *                 .primaryPeerAddressPrefix("2002:db01::/126")
 *                 .secondaryPeerAddressPrefix("2003:db01::/126")
 *                 .enabled(true)
 *                 .microsoftPeering(ExpressRouteCircuitPeeringIpv6MicrosoftPeeringArgs.builder()
 *                     .advertisedPublicPrefixes("2002:db01::/126")
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: exprtTest
 *       location: West Europe
 *   exampleExpressRouteCircuit:
 *     type: azure:network:ExpressRouteCircuit
 *     name: example
 *     properties:
 *       name: expressRoute1
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       serviceProviderName: Equinix
 *       peeringLocation: Silicon Valley
 *       bandwidthInMbps: 50
 *       sku:
 *         tier: Standard
 *         family: MeteredData
 *       allowClassicOperations: false
 *       tags:
 *         environment: Production
 *   exampleExpressRouteCircuitPeering:
 *     type: azure:network:ExpressRouteCircuitPeering
 *     name: example
 *     properties:
 *       peeringType: MicrosoftPeering
 *       expressRouteCircuitName: ${exampleExpressRouteCircuit.name}
 *       resourceGroupName: ${example.name}
 *       peerAsn: 100
 *       primaryPeerAddressPrefix: 123.0.0.0/30
 *       secondaryPeerAddressPrefix: 123.0.0.4/30
 *       ipv4Enabled: true
 *       vlanId: 300
 *       microsoftPeeringConfig:
 *         advertisedPublicPrefixes:
 *           - 123.1.0.0/24
 *       ipv6:
 *         primaryPeerAddressPrefix: 2002:db01::/126
 *         secondaryPeerAddressPrefix: 2003:db01::/126
 *         enabled: true
 *         microsoftPeering:
 *           advertisedPublicPrefixes:
 *             - 2002:db01::/126
 * ```
 * 
 * ### Creating Azure Private Peering)
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "exprtTest",
 *     location: "West Europe",
 * });
 * const exampleExpressRouteCircuit = new azure.network.ExpressRouteCircuit("example", {
 *     name: "expressRoute1",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     serviceProviderName: "Equinix",
 *     peeringLocation: "Silicon Valley",
 *     bandwidthInMbps: 50,
 *     sku: {
 *         tier: "Standard",
 *         family: "MeteredData",
 *     },
 *     allowClassicOperations: false,
 *     tags: {
 *         environment: "Production",
 *     },
 * });
 * const exampleExpressRouteCircuitPeering = new azure.network.ExpressRouteCircuitPeering("example", {
 *     peeringType: "AzurePrivatePeering",
 *     expressRouteCircuitName: exampleExpressRouteCircuit.name,
 *     resourceGroupName: example.name,
 *     peerAsn: 100,
 *     primaryPeerAddressPrefix: "123.0.0.0/30",
 *     secondaryPeerAddressPrefix: "123.0.0.4/30",
 *     ipv4Enabled: true,
 *     vlanId: 300,
 *     ipv6: {
 *         primaryPeerAddressPrefix: "2002:db01::/126",
 *         secondaryPeerAddressPrefix: "2003:db01::/126",
 *         enabled: true,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="exprtTest",
 *     location="West Europe")
 * example_express_route_circuit = azure.network.ExpressRouteCircuit("example",
 *     name="expressRoute1",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     service_provider_name="Equinix",
 *     peering_location="Silicon Valley",
 *     bandwidth_in_mbps=50,
 *     sku={
 *         "tier": "Standard",
 *         "family": "MeteredData",
 *     },
 *     allow_classic_operations=False,
 *     tags={
 *         "environment": "Production",
 *     })
 * example_express_route_circuit_peering = azure.network.ExpressRouteCircuitPeering("example",
 *     peering_type="AzurePrivatePeering",
 *     express_route_circuit_name=example_express_route_circuit.name,
 *     resource_group_name=example.name,
 *     peer_asn=100,
 *     primary_peer_address_prefix="123.0.0.0/30",
 *     secondary_peer_address_prefix="123.0.0.4/30",
 *     ipv4_enabled=True,
 *     vlan_id=300,
 *     ipv6={
 *         "primary_peer_address_prefix": "2002:db01::/126",
 *         "secondary_peer_address_prefix": "2003:db01::/126",
 *         "enabled": True,
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "exprtTest",
 *         Location = "West Europe",
 *     });
 *     var exampleExpressRouteCircuit = new Azure.Network.ExpressRouteCircuit("example", new()
 *     {
 *         Name = "expressRoute1",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         ServiceProviderName = "Equinix",
 *         PeeringLocation = "Silicon Valley",
 *         BandwidthInMbps = 50,
 *         Sku = new Azure.Network.Inputs.ExpressRouteCircuitSkuArgs
 *         {
 *             Tier = "Standard",
 *             Family = "MeteredData",
 *         },
 *         AllowClassicOperations = false,
 *         Tags =
 *         {
 *             { "environment", "Production" },
 *         },
 *     });
 *     var exampleExpressRouteCircuitPeering = new Azure.Network.ExpressRouteCircuitPeering("example", new()
 *     {
 *         PeeringType = "AzurePrivatePeering",
 *         ExpressRouteCircuitName = exampleExpressRouteCircuit.Name,
 *         ResourceGroupName = example.Name,
 *         PeerAsn = 100,
 *         PrimaryPeerAddressPrefix = "123.0.0.0/30",
 *         SecondaryPeerAddressPrefix = "123.0.0.4/30",
 *         Ipv4Enabled = true,
 *         VlanId = 300,
 *         Ipv6 = new Azure.Network.Inputs.ExpressRouteCircuitPeeringIpv6Args
 *         {
 *             PrimaryPeerAddressPrefix = "2002:db01::/126",
 *             SecondaryPeerAddressPrefix = "2003:db01::/126",
 *             Enabled = true,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("exprtTest"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleExpressRouteCircuit, err := network.NewExpressRouteCircuit(ctx, "example", &network.ExpressRouteCircuitArgs{
 * 			Name:                pulumi.String("expressRoute1"),
 * 			ResourceGroupName:   example.Name,
 * 			Location:            example.Location,
 * 			ServiceProviderName: pulumi.String("Equinix"),
 * 			PeeringLocation:     pulumi.String("Silicon Valley"),
 * 			BandwidthInMbps:     pulumi.Int(50),
 * 			Sku: &network.ExpressRouteCircuitSkuArgs{
 * 				Tier:   pulumi.String("Standard"),
 * 				Family: pulumi.String("MeteredData"),
 * 			},
 * 			AllowClassicOperations: pulumi.Bool(false),
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("Production"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewExpressRouteCircuitPeering(ctx, "example", &network.ExpressRouteCircuitPeeringArgs{
 * 			PeeringType:                pulumi.String("AzurePrivatePeering"),
 * 			ExpressRouteCircuitName:    exampleExpressRouteCircuit.Name,
 * 			ResourceGroupName:          example.Name,
 * 			PeerAsn:                    pulumi.Int(100),
 * 			PrimaryPeerAddressPrefix:   pulumi.String("123.0.0.0/30"),
 * 			SecondaryPeerAddressPrefix: pulumi.String("123.0.0.4/30"),
 * 			Ipv4Enabled:                pulumi.Bool(true),
 * 			VlanId:                     pulumi.Int(300),
 * 			Ipv6: &network.ExpressRouteCircuitPeeringIpv6Args{
 * 				PrimaryPeerAddressPrefix:   pulumi.String("2002:db01::/126"),
 * 				SecondaryPeerAddressPrefix: pulumi.String("2003:db01::/126"),
 * 				Enabled:                    pulumi.Bool(true),
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.ExpressRouteCircuit;
 * import com.pulumi.azure.network.ExpressRouteCircuitArgs;
 * import com.pulumi.azure.network.inputs.ExpressRouteCircuitSkuArgs;
 * import com.pulumi.azure.network.ExpressRouteCircuitPeering;
 * import com.pulumi.azure.network.ExpressRouteCircuitPeeringArgs;
 * import com.pulumi.azure.network.inputs.ExpressRouteCircuitPeeringIpv6Args;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("exprtTest")
 *             .location("West Europe")
 *             .build());
 *         var exampleExpressRouteCircuit = new ExpressRouteCircuit("exampleExpressRouteCircuit", ExpressRouteCircuitArgs.builder()
 *             .name("expressRoute1")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .serviceProviderName("Equinix")
 *             .peeringLocation("Silicon Valley")
 *             .bandwidthInMbps(50)
 *             .sku(ExpressRouteCircuitSkuArgs.builder()
 *                 .tier("Standard")
 *                 .family("MeteredData")
 *                 .build())
 *             .allowClassicOperations(false)
 *             .tags(Map.of("environment", "Production"))
 *             .build());
 *         var exampleExpressRouteCircuitPeering = new ExpressRouteCircuitPeering("exampleExpressRouteCircuitPeering", ExpressRouteCircuitPeeringArgs.builder()
 *             .peeringType("AzurePrivatePeering")
 *             .expressRouteCircuitName(exampleExpressRouteCircuit.name())
 *             .resourceGroupName(example.name())
 *             .peerAsn(100)
 *             .primaryPeerAddressPrefix("123.0.0.0/30")
 *             .secondaryPeerAddressPrefix("123.0.0.4/30")
 *             .ipv4Enabled(true)
 *             .vlanId(300)
 *             .ipv6(ExpressRouteCircuitPeeringIpv6Args.builder()
 *                 .primaryPeerAddressPrefix("2002:db01::/126")
 *                 .secondaryPeerAddressPrefix("2003:db01::/126")
 *                 .enabled(true)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: exprtTest
 *       location: West Europe
 *   exampleExpressRouteCircuit:
 *     type: azure:network:ExpressRouteCircuit
 *     name: example
 *     properties:
 *       name: expressRoute1
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       serviceProviderName: Equinix
 *       peeringLocation: Silicon Valley
 *       bandwidthInMbps: 50
 *       sku:
 *         tier: Standard
 *         family: MeteredData
 *       allowClassicOperations: false
 *       tags:
 *         environment: Production
 *   exampleExpressRouteCircuitPeering:
 *     type: azure:network:ExpressRouteCircuitPeering
 *     name: example
 *     properties:
 *       peeringType: AzurePrivatePeering
 *       expressRouteCircuitName: ${exampleExpressRouteCircuit.name}
 *       resourceGroupName: ${example.name}
 *       peerAsn: 100
 *       primaryPeerAddressPrefix: 123.0.0.0/30
 *       secondaryPeerAddressPrefix: 123.0.0.4/30
 *       ipv4Enabled: true
 *       vlanId: 300
 *       ipv6:
 *         primaryPeerAddressPrefix: 2002:db01::/126
 *         secondaryPeerAddressPrefix: 2003:db01::/126
 *         enabled: true
 * ```
 * 
 * ## Import
 * ExpressRoute Circuit Peerings can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/expressRouteCircuitPeering:ExpressRouteCircuitPeering peering1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRouteCircuits/myExpressRoute/peerings/peering1
 * ```
 * @property expressRouteCircuitName The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created.
 * @property ipv4Enabled A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`.
 * @property ipv6 A `ipv6` block as defined below.
 * @property microsoftPeeringConfig A `microsoft_peering_config` block as defined below. Required when `peering_type` is set to `MicrosoftPeering` and config for IPv4.
 * @property peerAsn The Either a 16-bit or a 32-bit ASN. Can either be public or private.
 * @property peeringType The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`.
 * > **NOTE:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering.
 * @property primaryPeerAddressPrefix A subnet for the primary link.
 * @property resourceGroupName The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created.
 * @property routeFilterId The ID of the Route Filter. Only available when `peering_type` is set to `MicrosoftPeering`.
 * > **NOTE:** `ipv6` can be specified when `peering_type` is `MicrosoftPeering` or `AzurePrivatePeering`
 * @property secondaryPeerAddressPrefix A subnet for the secondary link.
 * @property sharedKey The shared key. Can be a maximum of 25 characters.
 * @property vlanId A valid VLAN ID to establish this peering on.
 */
public data class ExpressRouteCircuitPeeringArgs(
    public val expressRouteCircuitName: Output? = null,
    public val ipv4Enabled: Output? = null,
    public val ipv6: Output? = null,
    public val microsoftPeeringConfig: Output? =
        null,
    public val peerAsn: Output? = null,
    public val peeringType: Output? = null,
    public val primaryPeerAddressPrefix: Output? = null,
    public val resourceGroupName: Output? = null,
    public val routeFilterId: Output? = null,
    public val secondaryPeerAddressPrefix: Output? = null,
    public val sharedKey: Output? = null,
    public val vlanId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.ExpressRouteCircuitPeeringArgs =
        com.pulumi.azure.network.ExpressRouteCircuitPeeringArgs.builder()
            .expressRouteCircuitName(expressRouteCircuitName?.applyValue({ args0 -> args0 }))
            .ipv4Enabled(ipv4Enabled?.applyValue({ args0 -> args0 }))
            .ipv6(ipv6?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .microsoftPeeringConfig(
                microsoftPeeringConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .peerAsn(peerAsn?.applyValue({ args0 -> args0 }))
            .peeringType(peeringType?.applyValue({ args0 -> args0 }))
            .primaryPeerAddressPrefix(primaryPeerAddressPrefix?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .routeFilterId(routeFilterId?.applyValue({ args0 -> args0 }))
            .secondaryPeerAddressPrefix(secondaryPeerAddressPrefix?.applyValue({ args0 -> args0 }))
            .sharedKey(sharedKey?.applyValue({ args0 -> args0 }))
            .vlanId(vlanId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ExpressRouteCircuitPeeringArgs].
 */
@PulumiTagMarker
public class ExpressRouteCircuitPeeringArgsBuilder internal constructor() {
    private var expressRouteCircuitName: Output? = null

    private var ipv4Enabled: Output? = null

    private var ipv6: Output? = null

    private var microsoftPeeringConfig: Output? =
        null

    private var peerAsn: Output? = null

    private var peeringType: Output? = null

    private var primaryPeerAddressPrefix: Output? = null

    private var resourceGroupName: Output? = null

    private var routeFilterId: Output? = null

    private var secondaryPeerAddressPrefix: Output? = null

    private var sharedKey: Output? = null

    private var vlanId: Output? = null

    /**
     * @param value The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created.
     */
    @JvmName("mojvictfvfoirsul")
    public suspend fun expressRouteCircuitName(`value`: Output) {
        this.expressRouteCircuitName = value
    }

    /**
     * @param value A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`.
     */
    @JvmName("ihyeyebsdvomnwpc")
    public suspend fun ipv4Enabled(`value`: Output) {
        this.ipv4Enabled = value
    }

    /**
     * @param value A `ipv6` block as defined below.
     */
    @JvmName("cuqsgshqvdpvubla")
    public suspend fun ipv6(`value`: Output) {
        this.ipv6 = value
    }

    /**
     * @param value A `microsoft_peering_config` block as defined below. Required when `peering_type` is set to `MicrosoftPeering` and config for IPv4.
     */
    @JvmName("bubkpawyjjxkoepn")
    public suspend fun microsoftPeeringConfig(`value`: Output) {
        this.microsoftPeeringConfig = value
    }

    /**
     * @param value The Either a 16-bit or a 32-bit ASN. Can either be public or private.
     */
    @JvmName("wgltqglnescwjegf")
    public suspend fun peerAsn(`value`: Output) {
        this.peerAsn = value
    }

    /**
     * @param value The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`.
     * > **NOTE:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering.
     */
    @JvmName("nscymjuganesnuol")
    public suspend fun peeringType(`value`: Output) {
        this.peeringType = value
    }

    /**
     * @param value A subnet for the primary link.
     */
    @JvmName("agkjxtclfoqxdavv")
    public suspend fun primaryPeerAddressPrefix(`value`: Output) {
        this.primaryPeerAddressPrefix = value
    }

    /**
     * @param value The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created.
     */
    @JvmName("oahvxraftqkepauc")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The ID of the Route Filter. Only available when `peering_type` is set to `MicrosoftPeering`.
     * > **NOTE:** `ipv6` can be specified when `peering_type` is `MicrosoftPeering` or `AzurePrivatePeering`
     */
    @JvmName("cswhpaxdbpoubpib")
    public suspend fun routeFilterId(`value`: Output) {
        this.routeFilterId = value
    }

    /**
     * @param value A subnet for the secondary link.
     */
    @JvmName("pmbkxmuakyheatcy")
    public suspend fun secondaryPeerAddressPrefix(`value`: Output) {
        this.secondaryPeerAddressPrefix = value
    }

    /**
     * @param value The shared key. Can be a maximum of 25 characters.
     */
    @JvmName("uybvexeyirgpbdwu")
    public suspend fun sharedKey(`value`: Output) {
        this.sharedKey = value
    }

    /**
     * @param value A valid VLAN ID to establish this peering on.
     */
    @JvmName("amfiyfvsdwngdfyk")
    public suspend fun vlanId(`value`: Output) {
        this.vlanId = value
    }

    /**
     * @param value The name of the ExpressRoute Circuit in which to create the Peering. Changing this forces a new resource to be created.
     */
    @JvmName("lowcwkkhqubrxxov")
    public suspend fun expressRouteCircuitName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expressRouteCircuitName = mapped
    }

    /**
     * @param value A boolean value indicating whether the IPv4 peering is enabled. Defaults to `true`.
     */
    @JvmName("lmoifjbkqqwfbgys")
    public suspend fun ipv4Enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv4Enabled = mapped
    }

    /**
     * @param value A `ipv6` block as defined below.
     */
    @JvmName("nbxqbqmijtfbyclr")
    public suspend fun ipv6(`value`: ExpressRouteCircuitPeeringIpv6Args?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv6 = mapped
    }

    /**
     * @param argument A `ipv6` block as defined below.
     */
    @JvmName("bxcktavsciqumscs")
    public suspend fun ipv6(argument: suspend ExpressRouteCircuitPeeringIpv6ArgsBuilder.() -> Unit) {
        val toBeMapped = ExpressRouteCircuitPeeringIpv6ArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ipv6 = mapped
    }

    /**
     * @param value A `microsoft_peering_config` block as defined below. Required when `peering_type` is set to `MicrosoftPeering` and config for IPv4.
     */
    @JvmName("yvremlwstlvfndyt")
    public suspend fun microsoftPeeringConfig(`value`: ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.microsoftPeeringConfig = mapped
    }

    /**
     * @param argument A `microsoft_peering_config` block as defined below. Required when `peering_type` is set to `MicrosoftPeering` and config for IPv4.
     */
    @JvmName("rjrbxpqiugwctbov")
    public suspend fun microsoftPeeringConfig(argument: suspend ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ExpressRouteCircuitPeeringMicrosoftPeeringConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.microsoftPeeringConfig = mapped
    }

    /**
     * @param value The Either a 16-bit or a 32-bit ASN. Can either be public or private.
     */
    @JvmName("uyutlxpkydsaxxdd")
    public suspend fun peerAsn(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.peerAsn = mapped
    }

    /**
     * @param value The type of the ExpressRoute Circuit Peering. Acceptable values include `AzurePrivatePeering`, `AzurePublicPeering` and `MicrosoftPeering`.
     * > **NOTE:** only one Peering of each Type can be created. Attempting to create multiple peerings of the same type will overwrite the original peering.
     */
    @JvmName("sauhlibiqirkpxdb")
    public suspend fun peeringType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.peeringType = mapped
    }

    /**
     * @param value A subnet for the primary link.
     */
    @JvmName("bhspcjcxpiocxffx")
    public suspend fun primaryPeerAddressPrefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primaryPeerAddressPrefix = mapped
    }

    /**
     * @param value The name of the resource group in which to create the Express Route Circuit Peering. Changing this forces a new resource to be created.
     */
    @JvmName("rgbpnstuinhkisnb")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The ID of the Route Filter. Only available when `peering_type` is set to `MicrosoftPeering`.
     * > **NOTE:** `ipv6` can be specified when `peering_type` is `MicrosoftPeering` or `AzurePrivatePeering`
     */
    @JvmName("wnybcwwekskhfvpd")
    public suspend fun routeFilterId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routeFilterId = mapped
    }

    /**
     * @param value A subnet for the secondary link.
     */
    @JvmName("dckhehwnevyyetbv")
    public suspend fun secondaryPeerAddressPrefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secondaryPeerAddressPrefix = mapped
    }

    /**
     * @param value The shared key. Can be a maximum of 25 characters.
     */
    @JvmName("ovgydctvnrbnkmyc")
    public suspend fun sharedKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sharedKey = mapped
    }

    /**
     * @param value A valid VLAN ID to establish this peering on.
     */
    @JvmName("hjqjrdgxdiplmojq")
    public suspend fun vlanId(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vlanId = mapped
    }

    internal fun build(): ExpressRouteCircuitPeeringArgs = ExpressRouteCircuitPeeringArgs(
        expressRouteCircuitName = expressRouteCircuitName,
        ipv4Enabled = ipv4Enabled,
        ipv6 = ipv6,
        microsoftPeeringConfig = microsoftPeeringConfig,
        peerAsn = peerAsn,
        peeringType = peeringType,
        primaryPeerAddressPrefix = primaryPeerAddressPrefix,
        resourceGroupName = resourceGroupName,
        routeFilterId = routeFilterId,
        secondaryPeerAddressPrefix = secondaryPeerAddressPrefix,
        sharedKey = sharedKey,
        vlanId = vlanId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy