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

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

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.ExpressRouteCircuitArgs.builder
import com.pulumi.azure.network.kotlin.inputs.ExpressRouteCircuitSkuArgs
import com.pulumi.azure.network.kotlin.inputs.ExpressRouteCircuitSkuArgsBuilder
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.Double
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an ExpressRoute circuit.
 * ## Example Usage
 * 
 * ```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",
 *     },
 *     tags: {
 *         environment: "Production",
 *     },
 * });
 * ```
 * ```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=azure.network.ExpressRouteCircuitSkuArgs(
 *         tier="Standard",
 *         family="MeteredData",
 *     ),
 *     tags={
 *         "environment": "Production",
 *     })
 * ```
 * ```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",
 *         },
 *         Tags =
 *         {
 *             { "environment", "Production" },
 *         },
 *     });
 * });
 * ```
 * ```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
 * 		}
 * 		_, 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"),
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("Production"),
 * 			},
 * 		})
 * 		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 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())
 *             .tags(Map.of("environment", "Production"))
 *             .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
 *       tags:
 *         environment: Production
 * ```
 * 
 * ## Import
 * ExpressRoute circuits can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/expressRouteCircuit:ExpressRouteCircuit myExpressRoute /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/expressRouteCircuits/myExpressRoute
 * ```
 * @property allowClassicOperations Allow the circuit to interact with classic (RDFE) resources. Defaults to `false`.
 * @property authorizationKey The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription.
 * @property bandwidthInGbps The bandwidth in Gbps of the circuit being created on the Express Route Port.
 * > **NOTE:** The `express_route_port_id` and the `bandwidth_in_gbps` should be set together and they conflict with `service_provider_name`, `peering_location` and `bandwidth_in_mbps`.
 * @property bandwidthInMbps The bandwidth in Mbps of the circuit being created on the Service Provider.
 * > **NOTE:** Once you increase your bandwidth, you will not be able to decrease it to its previous value.
 * > **NOTE:** The `service_provider_name`, the `peering_location` and the `bandwidth_in_mbps` should be set together and they conflict with `express_route_port_id` and `bandwidth_in_gbps`.
 * @property expressRoutePortId The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created.
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property name The name of the ExpressRoute circuit. Changing this forces a new resource to be created.
 * @property peeringLocation The name of the peering location and **not** the Azure resource location. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the resource group in which to create the ExpressRoute circuit. Changing this forces a new resource to be created.
 * @property serviceProviderName The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created.
 * @property sku A `sku` block for the ExpressRoute circuit as documented below.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class ExpressRouteCircuitArgs(
    public val allowClassicOperations: Output? = null,
    public val authorizationKey: Output? = null,
    public val bandwidthInGbps: Output? = null,
    public val bandwidthInMbps: Output? = null,
    public val expressRoutePortId: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val peeringLocation: Output? = null,
    public val resourceGroupName: Output? = null,
    public val serviceProviderName: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.ExpressRouteCircuitArgs =
        com.pulumi.azure.network.ExpressRouteCircuitArgs.builder()
            .allowClassicOperations(allowClassicOperations?.applyValue({ args0 -> args0 }))
            .authorizationKey(authorizationKey?.applyValue({ args0 -> args0 }))
            .bandwidthInGbps(bandwidthInGbps?.applyValue({ args0 -> args0 }))
            .bandwidthInMbps(bandwidthInMbps?.applyValue({ args0 -> args0 }))
            .expressRoutePortId(expressRoutePortId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .peeringLocation(peeringLocation?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .serviceProviderName(serviceProviderName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ExpressRouteCircuitArgs].
 */
@PulumiTagMarker
public class ExpressRouteCircuitArgsBuilder internal constructor() {
    private var allowClassicOperations: Output? = null

    private var authorizationKey: Output? = null

    private var bandwidthInGbps: Output? = null

    private var bandwidthInMbps: Output? = null

    private var expressRoutePortId: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var peeringLocation: Output? = null

    private var resourceGroupName: Output? = null

    private var serviceProviderName: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Allow the circuit to interact with classic (RDFE) resources. Defaults to `false`.
     */
    @JvmName("wgggkhqdavbwjsnn")
    public suspend fun allowClassicOperations(`value`: Output) {
        this.allowClassicOperations = value
    }

    /**
     * @param value The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription.
     */
    @JvmName("ilqkcwgvfhpntqcq")
    public suspend fun authorizationKey(`value`: Output) {
        this.authorizationKey = value
    }

    /**
     * @param value The bandwidth in Gbps of the circuit being created on the Express Route Port.
     * > **NOTE:** The `express_route_port_id` and the `bandwidth_in_gbps` should be set together and they conflict with `service_provider_name`, `peering_location` and `bandwidth_in_mbps`.
     */
    @JvmName("imuivwbwupkyneyi")
    public suspend fun bandwidthInGbps(`value`: Output) {
        this.bandwidthInGbps = value
    }

    /**
     * @param value The bandwidth in Mbps of the circuit being created on the Service Provider.
     * > **NOTE:** Once you increase your bandwidth, you will not be able to decrease it to its previous value.
     * > **NOTE:** The `service_provider_name`, the `peering_location` and the `bandwidth_in_mbps` should be set together and they conflict with `express_route_port_id` and `bandwidth_in_gbps`.
     */
    @JvmName("qrycyepihssuhvtg")
    public suspend fun bandwidthInMbps(`value`: Output) {
        this.bandwidthInMbps = value
    }

    /**
     * @param value The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created.
     */
    @JvmName("absviuyaxhckdkyf")
    public suspend fun expressRoutePortId(`value`: Output) {
        this.expressRoutePortId = value
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("yhkyawkjmufqxddj")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the ExpressRoute circuit. Changing this forces a new resource to be created.
     */
    @JvmName("fjfxnrkxgkajrmdw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the peering location and **not** the Azure resource location. Changing this forces a new resource to be created.
     */
    @JvmName("iuacsaokyatkfjyl")
    public suspend fun peeringLocation(`value`: Output) {
        this.peeringLocation = value
    }

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

    /**
     * @param value The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created.
     */
    @JvmName("vhcmuiknhupcccaw")
    public suspend fun serviceProviderName(`value`: Output) {
        this.serviceProviderName = value
    }

    /**
     * @param value A `sku` block for the ExpressRoute circuit as documented below.
     */
    @JvmName("mqesnwbvolsbvwdk")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("oehpmfyduaksitlu")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Allow the circuit to interact with classic (RDFE) resources. Defaults to `false`.
     */
    @JvmName("eldolefbdfiqpmxt")
    public suspend fun allowClassicOperations(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowClassicOperations = mapped
    }

    /**
     * @param value The authorization key. This can be used to set up an ExpressRoute Circuit with an ExpressRoute Port from another subscription.
     */
    @JvmName("pjumcyqkplgwfuth")
    public suspend fun authorizationKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizationKey = mapped
    }

    /**
     * @param value The bandwidth in Gbps of the circuit being created on the Express Route Port.
     * > **NOTE:** The `express_route_port_id` and the `bandwidth_in_gbps` should be set together and they conflict with `service_provider_name`, `peering_location` and `bandwidth_in_mbps`.
     */
    @JvmName("afcoinygeeqeguvk")
    public suspend fun bandwidthInGbps(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bandwidthInGbps = mapped
    }

    /**
     * @param value The bandwidth in Mbps of the circuit being created on the Service Provider.
     * > **NOTE:** Once you increase your bandwidth, you will not be able to decrease it to its previous value.
     * > **NOTE:** The `service_provider_name`, the `peering_location` and the `bandwidth_in_mbps` should be set together and they conflict with `express_route_port_id` and `bandwidth_in_gbps`.
     */
    @JvmName("sfxtmutxlyadclxg")
    public suspend fun bandwidthInMbps(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bandwidthInMbps = mapped
    }

    /**
     * @param value The ID of the Express Route Port this Express Route Circuit is based on. Changing this forces a new resource to be created.
     */
    @JvmName("nmuncfwlcpwsilci")
    public suspend fun expressRoutePortId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expressRoutePortId = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("cnjmrkieoqikecey")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

    /**
     * @param value The name of the peering location and **not** the Azure resource location. Changing this forces a new resource to be created.
     */
    @JvmName("bewmpfchjcgivkcc")
    public suspend fun peeringLocation(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.peeringLocation = mapped
    }

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

    /**
     * @param value The name of the ExpressRoute Service Provider. Changing this forces a new resource to be created.
     */
    @JvmName("hhuinfrmotgjogbl")
    public suspend fun serviceProviderName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceProviderName = mapped
    }

    /**
     * @param value A `sku` block for the ExpressRoute circuit as documented below.
     */
    @JvmName("pifxxcfvltdqrwni")
    public suspend fun sku(`value`: ExpressRouteCircuitSkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument A `sku` block for the ExpressRoute circuit as documented below.
     */
    @JvmName("kbftrghklnhgmfyf")
    public suspend fun sku(argument: suspend ExpressRouteCircuitSkuArgsBuilder.() -> Unit) {
        val toBeMapped = ExpressRouteCircuitSkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("cercxaumeibpiedr")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("wjppjrvxvhjofehg")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ExpressRouteCircuitArgs = ExpressRouteCircuitArgs(
        allowClassicOperations = allowClassicOperations,
        authorizationKey = authorizationKey,
        bandwidthInGbps = bandwidthInGbps,
        bandwidthInMbps = bandwidthInMbps,
        expressRoutePortId = expressRoutePortId,
        location = location,
        name = name,
        peeringLocation = peeringLocation,
        resourceGroupName = resourceGroupName,
        serviceProviderName = serviceProviderName,
        sku = sku,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy