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

com.pulumi.azure.containerservice.kotlin.inputs.KubernetesClusterAciConnectorLinuxArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.containerservice.kotlin.inputs

import com.pulumi.azure.containerservice.inputs.KubernetesClusterAciConnectorLinuxArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property connectorIdentities A `connector_identity` block is exported. The exported attributes are defined below.
 * @property subnetName The subnet name for the virtual nodes to run.
 * > **Note:** At this time ACI Connectors are not supported in Azure China.
 * > **Note:** AKS will add a delegation to the subnet named here. To prevent further runs from failing you should make sure that the subnet you create for virtual nodes has a delegation, like so.
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const virtual = new azure.network.Subnet("virtual", {delegations: [{
 *     name: "aciDelegation",
 *     serviceDelegation: {
 *         name: "Microsoft.ContainerInstance/containerGroups",
 *         actions: ["Microsoft.Network/virtualNetworks/subnets/action"],
 *     },
 * }]});
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * virtual = azure.network.Subnet("virtual", delegations=[{
 *     "name": "aciDelegation",
 *     "service_delegation": {
 *         "name": "Microsoft.ContainerInstance/containerGroups",
 *         "actions": ["Microsoft.Network/virtualNetworks/subnets/action"],
 *     },
 * }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @virtual = new Azure.Network.Subnet("virtual", new()
 *     {
 *         Delegations = new[]
 *         {
 *             new Azure.Network.Inputs.SubnetDelegationArgs
 *             {
 *                 Name = "aciDelegation",
 *                 ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
 *                 {
 *                     Name = "Microsoft.ContainerInstance/containerGroups",
 *                     Actions = new[]
 *                     {
 *                         "Microsoft.Network/virtualNetworks/subnets/action",
 *                     },
 *                 },
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"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 {
 * 		_, err := network.NewSubnet(ctx, "virtual", &network.SubnetArgs{
 * 			Delegations: network.SubnetDelegationArray{
 * 				&network.SubnetDelegationArgs{
 * 					Name: pulumi.String("aciDelegation"),
 * 					ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
 * 						Name: pulumi.String("Microsoft.ContainerInstance/containerGroups"),
 * 						Actions: pulumi.StringArray{
 * 							pulumi.String("Microsoft.Network/virtualNetworks/subnets/action"),
 * 						},
 * 					},
 * 				},
 * 			},
 * 		})
 * 		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.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
 * import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
 * 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 virtual = new Subnet("virtual", SubnetArgs.builder()
 *             .delegations(SubnetDelegationArgs.builder()
 *                 .name("aciDelegation")
 *                 .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
 *                     .name("Microsoft.ContainerInstance/containerGroups")
 *                     .actions("Microsoft.Network/virtualNetworks/subnets/action")
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   virtual:
 *     type: azure:network:Subnet
 *     properties:
 *       delegations:
 *         - name: aciDelegation
 *           serviceDelegation:
 *             name: Microsoft.ContainerInstance/containerGroups
 *             actions:
 *               - Microsoft.Network/virtualNetworks/subnets/action
 * ```
 * 
 */
public data class KubernetesClusterAciConnectorLinuxArgs(
    public val connectorIdentities: Output>? = null,
    public val subnetName: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerservice.inputs.KubernetesClusterAciConnectorLinuxArgs =
        com.pulumi.azure.containerservice.inputs.KubernetesClusterAciConnectorLinuxArgs.builder()
            .connectorIdentities(
                connectorIdentities?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .subnetName(subnetName.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [KubernetesClusterAciConnectorLinuxArgs].
 */
@PulumiTagMarker
public class KubernetesClusterAciConnectorLinuxArgsBuilder internal constructor() {
    private var connectorIdentities:
        Output>? = null

    private var subnetName: Output? = null

    /**
     * @param value A `connector_identity` block is exported. The exported attributes are defined below.
     */
    @JvmName("xxlqgghfidothwll")
    public suspend fun connectorIdentities(`value`: Output>) {
        this.connectorIdentities = value
    }

    @JvmName("ddhteqwnwimkoliu")
    public suspend fun connectorIdentities(vararg values: Output) {
        this.connectorIdentities = Output.all(values.asList())
    }

    /**
     * @param values A `connector_identity` block is exported. The exported attributes are defined below.
     */
    @JvmName("tyvotuxkkwalgndp")
    public suspend fun connectorIdentities(values: List>) {
        this.connectorIdentities = Output.all(values)
    }

    /**
     * @param value The subnet name for the virtual nodes to run.
     * > **Note:** At this time ACI Connectors are not supported in Azure China.
     * > **Note:** AKS will add a delegation to the subnet named here. To prevent further runs from failing you should make sure that the subnet you create for virtual nodes has a delegation, like so.
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const virtual = new azure.network.Subnet("virtual", {delegations: [{
     *     name: "aciDelegation",
     *     serviceDelegation: {
     *         name: "Microsoft.ContainerInstance/containerGroups",
     *         actions: ["Microsoft.Network/virtualNetworks/subnets/action"],
     *     },
     * }]});
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * virtual = azure.network.Subnet("virtual", delegations=[{
     *     "name": "aciDelegation",
     *     "service_delegation": {
     *         "name": "Microsoft.ContainerInstance/containerGroups",
     *         "actions": ["Microsoft.Network/virtualNetworks/subnets/action"],
     *     },
     * }])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var @virtual = new Azure.Network.Subnet("virtual", new()
     *     {
     *         Delegations = new[]
     *         {
     *             new Azure.Network.Inputs.SubnetDelegationArgs
     *             {
     *                 Name = "aciDelegation",
     *                 ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
     *                 {
     *                     Name = "Microsoft.ContainerInstance/containerGroups",
     *                     Actions = new[]
     *                     {
     *                         "Microsoft.Network/virtualNetworks/subnets/action",
     *                     },
     *                 },
     *             },
     *         },
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"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 {
     * 		_, err := network.NewSubnet(ctx, "virtual", &network.SubnetArgs{
     * 			Delegations: network.SubnetDelegationArray{
     * 				&network.SubnetDelegationArgs{
     * 					Name: pulumi.String("aciDelegation"),
     * 					ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
     * 						Name: pulumi.String("Microsoft.ContainerInstance/containerGroups"),
     * 						Actions: pulumi.StringArray{
     * 							pulumi.String("Microsoft.Network/virtualNetworks/subnets/action"),
     * 						},
     * 					},
     * 				},
     * 			},
     * 		})
     * 		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.network.Subnet;
     * import com.pulumi.azure.network.SubnetArgs;
     * import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
     * import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
     * 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 virtual = new Subnet("virtual", SubnetArgs.builder()
     *             .delegations(SubnetDelegationArgs.builder()
     *                 .name("aciDelegation")
     *                 .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
     *                     .name("Microsoft.ContainerInstance/containerGroups")
     *                     .actions("Microsoft.Network/virtualNetworks/subnets/action")
     *                     .build())
     *                 .build())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * resources:
     *   virtual:
     *     type: azure:network:Subnet
     *     properties:
     *       delegations:
     *         - name: aciDelegation
     *           serviceDelegation:
     *             name: Microsoft.ContainerInstance/containerGroups
     *             actions:
     *               - Microsoft.Network/virtualNetworks/subnets/action
     * ```
     * 
     */
    @JvmName("rcyyegxujpifxuib")
    public suspend fun subnetName(`value`: Output) {
        this.subnetName = value
    }

    /**
     * @param value A `connector_identity` block is exported. The exported attributes are defined below.
     */
    @JvmName("krtntpvklhjwrcwm")
    public suspend fun connectorIdentities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectorIdentities = mapped
    }

    /**
     * @param argument A `connector_identity` block is exported. The exported attributes are defined below.
     */
    @JvmName("vjxqswlculoqbkuc")
    public suspend fun connectorIdentities(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            KubernetesClusterAciConnectorLinuxConnectorIdentityArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.connectorIdentities = mapped
    }

    /**
     * @param argument A `connector_identity` block is exported. The exported attributes are defined below.
     */
    @JvmName("yusoosxsqcngcxbw")
    public suspend fun connectorIdentities(vararg argument: suspend KubernetesClusterAciConnectorLinuxConnectorIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            KubernetesClusterAciConnectorLinuxConnectorIdentityArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.connectorIdentities = mapped
    }

    /**
     * @param argument A `connector_identity` block is exported. The exported attributes are defined below.
     */
    @JvmName("mrsckhajpinskbej")
    public suspend fun connectorIdentities(argument: suspend KubernetesClusterAciConnectorLinuxConnectorIdentityArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                KubernetesClusterAciConnectorLinuxConnectorIdentityArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.connectorIdentities = mapped
    }

    /**
     * @param values A `connector_identity` block is exported. The exported attributes are defined below.
     */
    @JvmName("thirxpwdwlqdyuoj")
    public suspend fun connectorIdentities(vararg values: KubernetesClusterAciConnectorLinuxConnectorIdentityArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.connectorIdentities = mapped
    }

    /**
     * @param value The subnet name for the virtual nodes to run.
     * > **Note:** At this time ACI Connectors are not supported in Azure China.
     * > **Note:** AKS will add a delegation to the subnet named here. To prevent further runs from failing you should make sure that the subnet you create for virtual nodes has a delegation, like so.
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as azure from "@pulumi/azure";
     * const virtual = new azure.network.Subnet("virtual", {delegations: [{
     *     name: "aciDelegation",
     *     serviceDelegation: {
     *         name: "Microsoft.ContainerInstance/containerGroups",
     *         actions: ["Microsoft.Network/virtualNetworks/subnets/action"],
     *     },
     * }]});
     * ```
     * ```python
     * import pulumi
     * import pulumi_azure as azure
     * virtual = azure.network.Subnet("virtual", delegations=[{
     *     "name": "aciDelegation",
     *     "service_delegation": {
     *         "name": "Microsoft.ContainerInstance/containerGroups",
     *         "actions": ["Microsoft.Network/virtualNetworks/subnets/action"],
     *     },
     * }])
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Azure = Pulumi.Azure;
     * return await Deployment.RunAsync(() =>
     * {
     *     var @virtual = new Azure.Network.Subnet("virtual", new()
     *     {
     *         Delegations = new[]
     *         {
     *             new Azure.Network.Inputs.SubnetDelegationArgs
     *             {
     *                 Name = "aciDelegation",
     *                 ServiceDelegation = new Azure.Network.Inputs.SubnetDelegationServiceDelegationArgs
     *                 {
     *                     Name = "Microsoft.ContainerInstance/containerGroups",
     *                     Actions = new[]
     *                     {
     *                         "Microsoft.Network/virtualNetworks/subnets/action",
     *                     },
     *                 },
     *             },
     *         },
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"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 {
     * 		_, err := network.NewSubnet(ctx, "virtual", &network.SubnetArgs{
     * 			Delegations: network.SubnetDelegationArray{
     * 				&network.SubnetDelegationArgs{
     * 					Name: pulumi.String("aciDelegation"),
     * 					ServiceDelegation: &network.SubnetDelegationServiceDelegationArgs{
     * 						Name: pulumi.String("Microsoft.ContainerInstance/containerGroups"),
     * 						Actions: pulumi.StringArray{
     * 							pulumi.String("Microsoft.Network/virtualNetworks/subnets/action"),
     * 						},
     * 					},
     * 				},
     * 			},
     * 		})
     * 		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.network.Subnet;
     * import com.pulumi.azure.network.SubnetArgs;
     * import com.pulumi.azure.network.inputs.SubnetDelegationArgs;
     * import com.pulumi.azure.network.inputs.SubnetDelegationServiceDelegationArgs;
     * 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 virtual = new Subnet("virtual", SubnetArgs.builder()
     *             .delegations(SubnetDelegationArgs.builder()
     *                 .name("aciDelegation")
     *                 .serviceDelegation(SubnetDelegationServiceDelegationArgs.builder()
     *                     .name("Microsoft.ContainerInstance/containerGroups")
     *                     .actions("Microsoft.Network/virtualNetworks/subnets/action")
     *                     .build())
     *                 .build())
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * resources:
     *   virtual:
     *     type: azure:network:Subnet
     *     properties:
     *       delegations:
     *         - name: aciDelegation
     *           serviceDelegation:
     *             name: Microsoft.ContainerInstance/containerGroups
     *             actions:
     *               - Microsoft.Network/virtualNetworks/subnets/action
     * ```
     * 
     */
    @JvmName("jefmdkcyvnxamdmg")
    public suspend fun subnetName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnetName = mapped
    }

    internal fun build(): KubernetesClusterAciConnectorLinuxArgs =
        KubernetesClusterAciConnectorLinuxArgs(
            connectorIdentities = connectorIdentities,
            subnetName = subnetName ?: throw PulumiNullFieldException("subnetName"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy