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

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

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

package com.pulumi.azure.network.kotlin

import com.pulumi.azure.network.ExpressRoutePortArgs.builder
import com.pulumi.azure.network.kotlin.inputs.ExpressRoutePortIdentityArgs
import com.pulumi.azure.network.kotlin.inputs.ExpressRoutePortIdentityArgsBuilder
import com.pulumi.azure.network.kotlin.inputs.ExpressRoutePortLink1Args
import com.pulumi.azure.network.kotlin.inputs.ExpressRoutePortLink1ArgsBuilder
import com.pulumi.azure.network.kotlin.inputs.ExpressRoutePortLink2Args
import com.pulumi.azure.network.kotlin.inputs.ExpressRoutePortLink2ArgsBuilder
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Express Route Port.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West US",
 * });
 * const exampleExpressRoutePort = new azure.network.ExpressRoutePort("example", {
 *     name: "port1",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     peeringLocation: "Airtel-Chennai-CLS",
 *     bandwidthInGbps: 10,
 *     encapsulation: "Dot1Q",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West US")
 * example_express_route_port = azure.network.ExpressRoutePort("example",
 *     name="port1",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     peering_location="Airtel-Chennai-CLS",
 *     bandwidth_in_gbps=10,
 *     encapsulation="Dot1Q")
 * ```
 * ```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 = "example-resources",
 *         Location = "West US",
 *     });
 *     var exampleExpressRoutePort = new Azure.Network.ExpressRoutePort("example", new()
 *     {
 *         Name = "port1",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         PeeringLocation = "Airtel-Chennai-CLS",
 *         BandwidthInGbps = 10,
 *         Encapsulation = "Dot1Q",
 *     });
 * });
 * ```
 * ```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("example-resources"),
 * 			Location: pulumi.String("West US"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = network.NewExpressRoutePort(ctx, "example", &network.ExpressRoutePortArgs{
 * 			Name:              pulumi.String("port1"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			PeeringLocation:   pulumi.String("Airtel-Chennai-CLS"),
 * 			BandwidthInGbps:   pulumi.Int(10),
 * 			Encapsulation:     pulumi.String("Dot1Q"),
 * 		})
 * 		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.ExpressRoutePort;
 * import com.pulumi.azure.network.ExpressRoutePortArgs;
 * 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("example-resources")
 *             .location("West US")
 *             .build());
 *         var exampleExpressRoutePort = new ExpressRoutePort("exampleExpressRoutePort", ExpressRoutePortArgs.builder()
 *             .name("port1")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .peeringLocation("Airtel-Chennai-CLS")
 *             .bandwidthInGbps(10)
 *             .encapsulation("Dot1Q")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West US
 *   exampleExpressRoutePort:
 *     type: azure:network:ExpressRoutePort
 *     name: example
 *     properties:
 *       name: port1
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       peeringLocation: Airtel-Chennai-CLS
 *       bandwidthInGbps: 10
 *       encapsulation: Dot1Q
 * ```
 * 
 * ## Import
 * Express Route Ports can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:network/expressRoutePort:ExpressRoutePort example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/expressRoutePorts/port1
 * ```
 * @property bandwidthInGbps Bandwidth of the Express Route Port in Gbps. Changing this forces a new Express Route Port to be created.
 * @property billingType The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`.
 * @property encapsulation The encapsulation method used for the Express Route Port. Changing this forces a new Express Route Port to be created. Possible values are: `Dot1Q`, `QinQ`.
 * @property identity An `identity` block as defined below.
 * @property link1 A list of `link` blocks as defined below.
 * @property link2 A list of `link` blocks as defined below.
 * @property location The Azure Region where the Express Route Port should exist. Changing this forces a new Express Route Port to be created.
 * @property name The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created.
 * @property peeringLocation The name of the peering location that this Express Route Port is physically mapped to. Changing this forces a new Express Route Port to be created.
 * @property resourceGroupName The name of the Resource Group where the Express Route Port should exist. Changing this forces a new Express Route Port to be created.
 * @property tags A mapping of tags which should be assigned to the Express Route Port.
 */
public data class ExpressRoutePortArgs(
    public val bandwidthInGbps: Output? = null,
    public val billingType: Output? = null,
    public val encapsulation: Output? = null,
    public val identity: Output? = null,
    public val link1: Output? = null,
    public val link2: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val peeringLocation: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.ExpressRoutePortArgs =
        com.pulumi.azure.network.ExpressRoutePortArgs.builder()
            .bandwidthInGbps(bandwidthInGbps?.applyValue({ args0 -> args0 }))
            .billingType(billingType?.applyValue({ args0 -> args0 }))
            .encapsulation(encapsulation?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .link1(link1?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .link2(link2?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .peeringLocation(peeringLocation?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ExpressRoutePortArgs].
 */
@PulumiTagMarker
public class ExpressRoutePortArgsBuilder internal constructor() {
    private var bandwidthInGbps: Output? = null

    private var billingType: Output? = null

    private var encapsulation: Output? = null

    private var identity: Output? = null

    private var link1: Output? = null

    private var link2: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var peeringLocation: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Bandwidth of the Express Route Port in Gbps. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("hfocyfipnedumhvo")
    public suspend fun bandwidthInGbps(`value`: Output) {
        this.bandwidthInGbps = value
    }

    /**
     * @param value The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`.
     */
    @JvmName("wqjqmkvuesxdarpl")
    public suspend fun billingType(`value`: Output) {
        this.billingType = value
    }

    /**
     * @param value The encapsulation method used for the Express Route Port. Changing this forces a new Express Route Port to be created. Possible values are: `Dot1Q`, `QinQ`.
     */
    @JvmName("nljvcqnvngxfvwio")
    public suspend fun encapsulation(`value`: Output) {
        this.encapsulation = value
    }

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

    /**
     * @param value A list of `link` blocks as defined below.
     */
    @JvmName("rfknqwulrxtfsfmy")
    public suspend fun link1(`value`: Output) {
        this.link1 = value
    }

    /**
     * @param value A list of `link` blocks as defined below.
     */
    @JvmName("uswaklhpjsimbdcm")
    public suspend fun link2(`value`: Output) {
        this.link2 = value
    }

    /**
     * @param value The Azure Region where the Express Route Port should exist. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("svnljwrmjjoxbjwo")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("kjqdbysudwrkypph")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the peering location that this Express Route Port is physically mapped to. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("ssvmwvaleruocpvg")
    public suspend fun peeringLocation(`value`: Output) {
        this.peeringLocation = value
    }

    /**
     * @param value The name of the Resource Group where the Express Route Port should exist. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("msdorfpbaillkaix")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Express Route Port.
     */
    @JvmName("mcfuqkfhgqmdavsf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Bandwidth of the Express Route Port in Gbps. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("sknowhiwrrhbanlw")
    public suspend fun bandwidthInGbps(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bandwidthInGbps = mapped
    }

    /**
     * @param value The billing type of the Express Route Port. Possible values are `MeteredData` and `UnlimitedData`.
     */
    @JvmName("gdmwsybceqqmqbkc")
    public suspend fun billingType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.billingType = mapped
    }

    /**
     * @param value The encapsulation method used for the Express Route Port. Changing this forces a new Express Route Port to be created. Possible values are: `Dot1Q`, `QinQ`.
     */
    @JvmName("hurcikylwditavuh")
    public suspend fun encapsulation(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encapsulation = mapped
    }

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

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

    /**
     * @param value A list of `link` blocks as defined below.
     */
    @JvmName("ghbrocwhknspldew")
    public suspend fun link1(`value`: ExpressRoutePortLink1Args?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.link1 = mapped
    }

    /**
     * @param argument A list of `link` blocks as defined below.
     */
    @JvmName("udgtfvlxbcmfbnod")
    public suspend fun link1(argument: suspend ExpressRoutePortLink1ArgsBuilder.() -> Unit) {
        val toBeMapped = ExpressRoutePortLink1ArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.link1 = mapped
    }

    /**
     * @param value A list of `link` blocks as defined below.
     */
    @JvmName("ypfauypawusobfxd")
    public suspend fun link2(`value`: ExpressRoutePortLink2Args?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.link2 = mapped
    }

    /**
     * @param argument A list of `link` blocks as defined below.
     */
    @JvmName("lklxfykekvfgfayq")
    public suspend fun link2(argument: suspend ExpressRoutePortLink2ArgsBuilder.() -> Unit) {
        val toBeMapped = ExpressRoutePortLink2ArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.link2 = mapped
    }

    /**
     * @param value The Azure Region where the Express Route Port should exist. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("aduccrwulffftdsg")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name which should be used for this Express Route Port. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("atbetrqdonhxsylu")
    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 that this Express Route Port is physically mapped to. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("llugcvcdiraouuno")
    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 where the Express Route Port should exist. Changing this forces a new Express Route Port to be created.
     */
    @JvmName("nhodviyilnffdfyf")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Express Route Port.
     */
    @JvmName("aldqcxsrdsrwoktj")
    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 which should be assigned to the Express Route Port.
     */
    @JvmName("idpbullytbkvogjk")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ExpressRoutePortArgs = ExpressRoutePortArgs(
        bandwidthInGbps = bandwidthInGbps,
        billingType = billingType,
        encapsulation = encapsulation,
        identity = identity,
        link1 = link1,
        link2 = link2,
        location = location,
        name = name,
        peeringLocation = peeringLocation,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy