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

com.pulumi.azure.containerservice.kotlin.GroupArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.containerservice.kotlin

import com.pulumi.azure.containerservice.GroupArgs.builder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupContainerArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupContainerArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupDiagnosticsArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupDiagnosticsArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupDnsConfigArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupDnsConfigArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupExposedPortArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupExposedPortArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupIdentityArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupIdentityArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupImageRegistryCredentialArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupImageRegistryCredentialArgsBuilder
import com.pulumi.azure.containerservice.kotlin.inputs.GroupInitContainerArgs
import com.pulumi.azure.containerservice.kotlin.inputs.GroupInitContainerArgsBuilder
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.Deprecated
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages as an Azure Container Group instance.
 * > **Note** `network_profile_id` is [deprecated](https://docs.microsoft.com/en-us/azure/container-instances/container-instances-vnet) by Azure. For users who want to continue to manage existing `azure.containerservice.Group` that rely on `network_profile_id`, please stay on provider versions prior to v3.16.0. Otherwise, use `subnet_ids` instead.
 * ## Example Usage
 * This example provisions a Basic Container.
 * 
 * ```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 Europe",
 * });
 * const exampleGroup = new azure.containerservice.Group("example", {
 *     name: "example-continst",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     ipAddressType: "Public",
 *     dnsNameLabel: "aci-label",
 *     osType: "Linux",
 *     containers: [
 *         {
 *             name: "hello-world",
 *             image: "mcr.microsoft.com/azuredocs/aci-helloworld:latest",
 *             cpu: 0.5,
 *             memory: 1.5,
 *             ports: [{
 *                 port: 443,
 *                 protocol: "TCP",
 *             }],
 *         },
 *         {
 *             name: "sidecar",
 *             image: "mcr.microsoft.com/azuredocs/aci-tutorial-sidecar",
 *             cpu: 0.5,
 *             memory: 1.5,
 *         },
 *     ],
 *     tags: {
 *         environment: "testing",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_group = azure.containerservice.Group("example",
 *     name="example-continst",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     ip_address_type="Public",
 *     dns_name_label="aci-label",
 *     os_type="Linux",
 *     containers=[
 *         {
 *             "name": "hello-world",
 *             "image": "mcr.microsoft.com/azuredocs/aci-helloworld:latest",
 *             "cpu": 0.5,
 *             "memory": 1.5,
 *             "ports": [{
 *                 "port": 443,
 *                 "protocol": "TCP",
 *             }],
 *         },
 *         {
 *             "name": "sidecar",
 *             "image": "mcr.microsoft.com/azuredocs/aci-tutorial-sidecar",
 *             "cpu": 0.5,
 *             "memory": 1.5,
 *         },
 *     ],
 *     tags={
 *         "environment": "testing",
 *     })
 * ```
 * ```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 Europe",
 *     });
 *     var exampleGroup = new Azure.ContainerService.Group("example", new()
 *     {
 *         Name = "example-continst",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         IpAddressType = "Public",
 *         DnsNameLabel = "aci-label",
 *         OsType = "Linux",
 *         Containers = new[]
 *         {
 *             new Azure.ContainerService.Inputs.GroupContainerArgs
 *             {
 *                 Name = "hello-world",
 *                 Image = "mcr.microsoft.com/azuredocs/aci-helloworld:latest",
 *                 Cpu = 0.5,
 *                 Memory = 1.5,
 *                 Ports = new[]
 *                 {
 *                     new Azure.ContainerService.Inputs.GroupContainerPortArgs
 *                     {
 *                         Port = 443,
 *                         Protocol = "TCP",
 *                     },
 *                 },
 *             },
 *             new Azure.ContainerService.Inputs.GroupContainerArgs
 *             {
 *                 Name = "sidecar",
 *                 Image = "mcr.microsoft.com/azuredocs/aci-tutorial-sidecar",
 *                 Cpu = 0.5,
 *                 Memory = 1.5,
 *             },
 *         },
 *         Tags =
 *         {
 *             { "environment", "testing" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerservice"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"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 Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = containerservice.NewGroup(ctx, "example", &containerservice.GroupArgs{
 * 			Name:              pulumi.String("example-continst"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			IpAddressType:     pulumi.String("Public"),
 * 			DnsNameLabel:      pulumi.String("aci-label"),
 * 			OsType:            pulumi.String("Linux"),
 * 			Containers: containerservice.GroupContainerArray{
 * 				&containerservice.GroupContainerArgs{
 * 					Name:   pulumi.String("hello-world"),
 * 					Image:  pulumi.String("mcr.microsoft.com/azuredocs/aci-helloworld:latest"),
 * 					Cpu:    pulumi.Float64(0.5),
 * 					Memory: pulumi.Float64(1.5),
 * 					Ports: containerservice.GroupContainerPortArray{
 * 						&containerservice.GroupContainerPortArgs{
 * 							Port:     pulumi.Int(443),
 * 							Protocol: pulumi.String("TCP"),
 * 						},
 * 					},
 * 				},
 * 				&containerservice.GroupContainerArgs{
 * 					Name:   pulumi.String("sidecar"),
 * 					Image:  pulumi.String("mcr.microsoft.com/azuredocs/aci-tutorial-sidecar"),
 * 					Cpu:    pulumi.Float64(0.5),
 * 					Memory: pulumi.Float64(1.5),
 * 				},
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"environment": pulumi.String("testing"),
 * 			},
 * 		})
 * 		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.containerservice.Group;
 * import com.pulumi.azure.containerservice.GroupArgs;
 * import com.pulumi.azure.containerservice.inputs.GroupContainerArgs;
 * 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 Europe")
 *             .build());
 *         var exampleGroup = new Group("exampleGroup", GroupArgs.builder()
 *             .name("example-continst")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .ipAddressType("Public")
 *             .dnsNameLabel("aci-label")
 *             .osType("Linux")
 *             .containers(
 *                 GroupContainerArgs.builder()
 *                     .name("hello-world")
 *                     .image("mcr.microsoft.com/azuredocs/aci-helloworld:latest")
 *                     .cpu("0.5")
 *                     .memory("1.5")
 *                     .ports(GroupContainerPortArgs.builder()
 *                         .port(443)
 *                         .protocol("TCP")
 *                         .build())
 *                     .build(),
 *                 GroupContainerArgs.builder()
 *                     .name("sidecar")
 *                     .image("mcr.microsoft.com/azuredocs/aci-tutorial-sidecar")
 *                     .cpu("0.5")
 *                     .memory("1.5")
 *                     .build())
 *             .tags(Map.of("environment", "testing"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleGroup:
 *     type: azure:containerservice:Group
 *     name: example
 *     properties:
 *       name: example-continst
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       ipAddressType: Public
 *       dnsNameLabel: aci-label
 *       osType: Linux
 *       containers:
 *         - name: hello-world
 *           image: mcr.microsoft.com/azuredocs/aci-helloworld:latest
 *           cpu: '0.5'
 *           memory: '1.5'
 *           ports:
 *             - port: 443
 *               protocol: TCP
 *         - name: sidecar
 *           image: mcr.microsoft.com/azuredocs/aci-tutorial-sidecar
 *           cpu: '0.5'
 *           memory: '1.5'
 *       tags:
 *         environment: testing
 * ```
 * 
 * ## Import
 * Container Group's can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:containerservice/group:Group containerGroup1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.ContainerInstance/containerGroups/myContainerGroup1
 * ```
 * @property containers The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
 * @property diagnostics A `diagnostics` block as documented below. Changing this forces a new resource to be created.
 * @property dnsConfig A `dns_config` block as documented below. Changing this forces a new resource to be created.
 * @property dnsNameLabel The DNS label/name for the container group's IP. Changing this forces a new resource to be created.
 * > **Note:** DNS label/name is not supported when deploying to virtual networks.
 * @property dnsNameLabelReusePolicy The value representing the security enum. `Noreuse`, `ResourceGroupReuse`, `SubscriptionReuse`, `TenantReuse` or `Unsecure`. Defaults to `Unsecure`.
 * @property exposedPorts Zero or more `exposed_port` blocks as defined below. Changing this forces a new resource to be created.
 * > **Note:** The `exposed_port` can only contain ports that are also exposed on one or more containers in the group.
 * @property identity An `identity` block as defined below.
 * @property imageRegistryCredentials An `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
 * @property initContainers The definition of an init container that is part of the group as documented in the `init_container` block below. Changing this forces a new resource to be created.
 * @property ipAddressType Specifies the IP address type of the container. `Public`, `Private` or `None`. Changing this forces a new resource to be created. If set to `Private`, `subnet_ids` also needs to be set. Defaults to `Public`.
 * > **Note:** `dns_name_label` and `os_type` set to `windows` are not compatible with `Private` `ip_address_type`
 * @property keyVaultKeyId The Key Vault key URI for CMK encryption. Changing this forces a new resource to be created.
 * @property keyVaultUserAssignedIdentityId The user assigned identity that has access to the Key Vault Key. If not specified, the RP principal named "Azure Container Instance Service" will be used instead. Make sure the identity has the proper `key_permissions` set, at least with `Get`, `UnwrapKey`, `WrapKey` and `GetRotationPolicy`.
 * @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
 * @property name Specifies the name of the Container Group. Changing this forces a new resource to be created.
 * @property networkProfileId
 * @property osType The OS for the container group. Allowed values are `Linux` and `Windows`. Changing this forces a new resource to be created.
 * > **Note:** if `os_type` is set to `Windows` currently only a single `container` block is supported. Windows containers are not supported in virtual networks.
 * @property priority The priority of the Container Group. Possible values are `Regular` and `Spot`. Changing this forces a new resource to be created.
 * > **NOTE:** When `priority` is set to `Spot`, the `ip_address_type` has to be `None`.
 * @property resourceGroupName The name of the resource group in which to create the Container Group. Changing this forces a new resource to be created.
 * @property restartPolicy Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`. Changing this forces a new resource to be created.
 * @property sku Specifies the sku of the Container Group. Possible values are `Confidential`, `Dedicated` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created.
 * @property subnetIds The subnet resource IDs for a container group. Changing this forces a new resource to be created.
 * @property tags A mapping of tags to assign to the resource.
 * @property zones A list of Availability Zones in which this Container Group is located. Changing this forces a new resource to be created.
 */
public data class GroupArgs(
    public val containers: Output>? = null,
    public val diagnostics: Output? = null,
    public val dnsConfig: Output? = null,
    public val dnsNameLabel: Output? = null,
    public val dnsNameLabelReusePolicy: Output? = null,
    public val exposedPorts: Output>? = null,
    public val identity: Output? = null,
    public val imageRegistryCredentials: Output>? = null,
    public val initContainers: Output>? = null,
    public val ipAddressType: Output? = null,
    public val keyVaultKeyId: Output? = null,
    public val keyVaultUserAssignedIdentityId: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    @Deprecated(
        message = """
  the 'network_profile_id' has been removed from the latest versions of the container instance API
      and has been deprecated. It no longer functions and will be removed from the 4.0 AzureRM
      provider. Please use the 'subnet_ids' field instead
  """,
    )
    public val networkProfileId: Output? = null,
    public val osType: Output? = null,
    public val priority: Output? = null,
    public val resourceGroupName: Output? = null,
    public val restartPolicy: Output? = null,
    public val sku: Output? = null,
    public val subnetIds: Output? = null,
    public val tags: Output>? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerservice.GroupArgs =
        com.pulumi.azure.containerservice.GroupArgs.builder()
            .containers(
                containers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .diagnostics(diagnostics?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dnsConfig(dnsConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dnsNameLabel(dnsNameLabel?.applyValue({ args0 -> args0 }))
            .dnsNameLabelReusePolicy(dnsNameLabelReusePolicy?.applyValue({ args0 -> args0 }))
            .exposedPorts(
                exposedPorts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .imageRegistryCredentials(
                imageRegistryCredentials?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .initContainers(
                initContainers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .ipAddressType(ipAddressType?.applyValue({ args0 -> args0 }))
            .keyVaultKeyId(keyVaultKeyId?.applyValue({ args0 -> args0 }))
            .keyVaultUserAssignedIdentityId(keyVaultUserAssignedIdentityId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkProfileId(networkProfileId?.applyValue({ args0 -> args0 }))
            .osType(osType?.applyValue({ args0 -> args0 }))
            .priority(priority?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .restartPolicy(restartPolicy?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0 }))
            .subnetIds(subnetIds?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var diagnostics: Output? = null

    private var dnsConfig: Output? = null

    private var dnsNameLabel: Output? = null

    private var dnsNameLabelReusePolicy: Output? = null

    private var exposedPorts: Output>? = null

    private var identity: Output? = null

    private var imageRegistryCredentials: Output>? = null

    private var initContainers: Output>? = null

    private var ipAddressType: Output? = null

    private var keyVaultKeyId: Output? = null

    private var keyVaultUserAssignedIdentityId: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var networkProfileId: Output? = null

    private var osType: Output? = null

    private var priority: Output? = null

    private var resourceGroupName: Output? = null

    private var restartPolicy: Output? = null

    private var sku: Output? = null

    private var subnetIds: Output? = null

    private var tags: Output>? = null

    private var zones: Output>? = null

    /**
     * @param value The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("vwngmvdaefghawkc")
    public suspend fun containers(`value`: Output>) {
        this.containers = value
    }

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

    /**
     * @param values The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("jjqxchgansxoahny")
    public suspend fun containers(values: List>) {
        this.containers = Output.all(values)
    }

    /**
     * @param value A `diagnostics` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("kiofojapvfgtwxdo")
    public suspend fun diagnostics(`value`: Output) {
        this.diagnostics = value
    }

    /**
     * @param value A `dns_config` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("pfodjersxfytaguk")
    public suspend fun dnsConfig(`value`: Output) {
        this.dnsConfig = value
    }

    /**
     * @param value The DNS label/name for the container group's IP. Changing this forces a new resource to be created.
     * > **Note:** DNS label/name is not supported when deploying to virtual networks.
     */
    @JvmName("hqnrrbieupaasjai")
    public suspend fun dnsNameLabel(`value`: Output) {
        this.dnsNameLabel = value
    }

    /**
     * @param value The value representing the security enum. `Noreuse`, `ResourceGroupReuse`, `SubscriptionReuse`, `TenantReuse` or `Unsecure`. Defaults to `Unsecure`.
     */
    @JvmName("fusbilkckgdjoyuk")
    public suspend fun dnsNameLabelReusePolicy(`value`: Output) {
        this.dnsNameLabelReusePolicy = value
    }

    /**
     * @param value Zero or more `exposed_port` blocks as defined below. Changing this forces a new resource to be created.
     * > **Note:** The `exposed_port` can only contain ports that are also exposed on one or more containers in the group.
     */
    @JvmName("wjefngnslsmydcro")
    public suspend fun exposedPorts(`value`: Output>) {
        this.exposedPorts = value
    }

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

    /**
     * @param values Zero or more `exposed_port` blocks as defined below. Changing this forces a new resource to be created.
     * > **Note:** The `exposed_port` can only contain ports that are also exposed on one or more containers in the group.
     */
    @JvmName("oerxghglsapfofch")
    public suspend fun exposedPorts(values: List>) {
        this.exposedPorts = Output.all(values)
    }

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

    /**
     * @param value An `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("gpipcxelrxdsbxkw")
    public suspend fun imageRegistryCredentials(`value`: Output>) {
        this.imageRegistryCredentials = value
    }

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

    /**
     * @param values An `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("tbgaietwgalkjooq")
    public suspend fun imageRegistryCredentials(values: List>) {
        this.imageRegistryCredentials = Output.all(values)
    }

    /**
     * @param value The definition of an init container that is part of the group as documented in the `init_container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("mflgsjxfmqerhlsn")
    public suspend fun initContainers(`value`: Output>) {
        this.initContainers = value
    }

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

    /**
     * @param values The definition of an init container that is part of the group as documented in the `init_container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("lqqsrebrpmjmxnfn")
    public suspend fun initContainers(values: List>) {
        this.initContainers = Output.all(values)
    }

    /**
     * @param value Specifies the IP address type of the container. `Public`, `Private` or `None`. Changing this forces a new resource to be created. If set to `Private`, `subnet_ids` also needs to be set. Defaults to `Public`.
     * > **Note:** `dns_name_label` and `os_type` set to `windows` are not compatible with `Private` `ip_address_type`
     */
    @JvmName("bjmuiscabhxaahsw")
    public suspend fun ipAddressType(`value`: Output) {
        this.ipAddressType = value
    }

    /**
     * @param value The Key Vault key URI for CMK encryption. Changing this forces a new resource to be created.
     */
    @JvmName("bwoimmbilfbjtlly")
    public suspend fun keyVaultKeyId(`value`: Output) {
        this.keyVaultKeyId = value
    }

    /**
     * @param value The user assigned identity that has access to the Key Vault Key. If not specified, the RP principal named "Azure Container Instance Service" will be used instead. Make sure the identity has the proper `key_permissions` set, at least with `Get`, `UnwrapKey`, `WrapKey` and `GetRotationPolicy`.
     */
    @JvmName("vorvxdjnwdtxgejh")
    public suspend fun keyVaultUserAssignedIdentityId(`value`: Output) {
        this.keyVaultUserAssignedIdentityId = value
    }

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

    /**
     * @param value Specifies the name of the Container Group. Changing this forces a new resource to be created.
     */
    @JvmName("eqcsemaaifaobjpf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  the 'network_profile_id' has been removed from the latest versions of the container instance API
      and has been deprecated. It no longer functions and will be removed from the 4.0 AzureRM
      provider. Please use the 'subnet_ids' field instead
  """,
    )
    @JvmName("lbdegplngnryiqrk")
    public suspend fun networkProfileId(`value`: Output) {
        this.networkProfileId = value
    }

    /**
     * @param value The OS for the container group. Allowed values are `Linux` and `Windows`. Changing this forces a new resource to be created.
     * > **Note:** if `os_type` is set to `Windows` currently only a single `container` block is supported. Windows containers are not supported in virtual networks.
     */
    @JvmName("itfkcfxwnvbqmwhj")
    public suspend fun osType(`value`: Output) {
        this.osType = value
    }

    /**
     * @param value The priority of the Container Group. Possible values are `Regular` and `Spot`. Changing this forces a new resource to be created.
     * > **NOTE:** When `priority` is set to `Spot`, the `ip_address_type` has to be `None`.
     */
    @JvmName("rdvlsrdphjsskogg")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

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

    /**
     * @param value Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`. Changing this forces a new resource to be created.
     */
    @JvmName("ijqlbjmojrnxmtmn")
    public suspend fun restartPolicy(`value`: Output) {
        this.restartPolicy = value
    }

    /**
     * @param value Specifies the sku of the Container Group. Possible values are `Confidential`, `Dedicated` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created.
     */
    @JvmName("wwxyctfeevbbhtqg")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value The subnet resource IDs for a container group. Changing this forces a new resource to be created.
     */
    @JvmName("mfyrypdkobhcjrso")
    public suspend fun subnetIds(`value`: Output) {
        this.subnetIds = value
    }

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

    /**
     * @param value A list of Availability Zones in which this Container Group is located. Changing this forces a new resource to be created.
     */
    @JvmName("uiuqaybikbruugxn")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

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

    /**
     * @param values A list of Availability Zones in which this Container Group is located. Changing this forces a new resource to be created.
     */
    @JvmName("okuwotaowhafkajb")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("htnkfnenvwdnsevp")
    public suspend fun containers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param argument The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("yswighdnulaneoph")
    public suspend fun containers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GroupContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("btvedbymnwldsmok")
    public suspend fun containers(vararg argument: suspend GroupContainerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GroupContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("qgyrjrliegfomwgi")
    public suspend fun containers(argument: suspend GroupContainerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(GroupContainerArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param values The definition of a container that is part of the group as documented in the `container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("bnpesusjnkjsefoo")
    public suspend fun containers(vararg values: GroupContainerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param value A `diagnostics` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("rgencwsmneyhirxx")
    public suspend fun diagnostics(`value`: GroupDiagnosticsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diagnostics = mapped
    }

    /**
     * @param argument A `diagnostics` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("ibtlapbrchpidmas")
    public suspend fun diagnostics(argument: suspend GroupDiagnosticsArgsBuilder.() -> Unit) {
        val toBeMapped = GroupDiagnosticsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.diagnostics = mapped
    }

    /**
     * @param value A `dns_config` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("jumhwyxalagffjgu")
    public suspend fun dnsConfig(`value`: GroupDnsConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dnsConfig = mapped
    }

    /**
     * @param argument A `dns_config` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("eqjthfepniaejaww")
    public suspend fun dnsConfig(argument: suspend GroupDnsConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GroupDnsConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dnsConfig = mapped
    }

    /**
     * @param value The DNS label/name for the container group's IP. Changing this forces a new resource to be created.
     * > **Note:** DNS label/name is not supported when deploying to virtual networks.
     */
    @JvmName("slcmhqmmjaoxnwca")
    public suspend fun dnsNameLabel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dnsNameLabel = mapped
    }

    /**
     * @param value The value representing the security enum. `Noreuse`, `ResourceGroupReuse`, `SubscriptionReuse`, `TenantReuse` or `Unsecure`. Defaults to `Unsecure`.
     */
    @JvmName("yyhaofbtsygxcgwm")
    public suspend fun dnsNameLabelReusePolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dnsNameLabelReusePolicy = mapped
    }

    /**
     * @param value Zero or more `exposed_port` blocks as defined below. Changing this forces a new resource to be created.
     * > **Note:** The `exposed_port` can only contain ports that are also exposed on one or more containers in the group.
     */
    @JvmName("xbklkkaftybcghht")
    public suspend fun exposedPorts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.exposedPorts = mapped
    }

    /**
     * @param argument Zero or more `exposed_port` blocks as defined below. Changing this forces a new resource to be created.
     * > **Note:** The `exposed_port` can only contain ports that are also exposed on one or more containers in the group.
     */
    @JvmName("keuhtofpbawssbog")
    public suspend fun exposedPorts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GroupExposedPortArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.exposedPorts = mapped
    }

    /**
     * @param argument Zero or more `exposed_port` blocks as defined below. Changing this forces a new resource to be created.
     * > **Note:** The `exposed_port` can only contain ports that are also exposed on one or more containers in the group.
     */
    @JvmName("wkirhkqmgtgbeveq")
    public suspend fun exposedPorts(vararg argument: suspend GroupExposedPortArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GroupExposedPortArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.exposedPorts = mapped
    }

    /**
     * @param argument Zero or more `exposed_port` blocks as defined below. Changing this forces a new resource to be created.
     * > **Note:** The `exposed_port` can only contain ports that are also exposed on one or more containers in the group.
     */
    @JvmName("rjpvlwhwdhkyutip")
    public suspend fun exposedPorts(argument: suspend GroupExposedPortArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(GroupExposedPortArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.exposedPorts = mapped
    }

    /**
     * @param values Zero or more `exposed_port` blocks as defined below. Changing this forces a new resource to be created.
     * > **Note:** The `exposed_port` can only contain ports that are also exposed on one or more containers in the group.
     */
    @JvmName("unlabalxljsgdbvu")
    public suspend fun exposedPorts(vararg values: GroupExposedPortArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.exposedPorts = mapped
    }

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

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

    /**
     * @param value An `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("hrnxgmrlccsfymbd")
    public suspend fun imageRegistryCredentials(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageRegistryCredentials = mapped
    }

    /**
     * @param argument An `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("yfdejbbkrqkqicdl")
    public suspend fun imageRegistryCredentials(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GroupImageRegistryCredentialArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.imageRegistryCredentials = mapped
    }

    /**
     * @param argument An `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("loqiyjfsxawrfbsp")
    public suspend fun imageRegistryCredentials(vararg argument: suspend GroupImageRegistryCredentialArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GroupImageRegistryCredentialArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.imageRegistryCredentials = mapped
    }

    /**
     * @param argument An `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("rndesamowrhluwvt")
    public suspend fun imageRegistryCredentials(argument: suspend GroupImageRegistryCredentialArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GroupImageRegistryCredentialArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.imageRegistryCredentials = mapped
    }

    /**
     * @param values An `image_registry_credential` block as documented below. Changing this forces a new resource to be created.
     */
    @JvmName("xlqlmdycksljqwva")
    public suspend fun imageRegistryCredentials(vararg values: GroupImageRegistryCredentialArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.imageRegistryCredentials = mapped
    }

    /**
     * @param value The definition of an init container that is part of the group as documented in the `init_container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("vauxuilotmtntrwu")
    public suspend fun initContainers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.initContainers = mapped
    }

    /**
     * @param argument The definition of an init container that is part of the group as documented in the `init_container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("anxoerfkamfdxpup")
    public suspend fun initContainers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GroupInitContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.initContainers = mapped
    }

    /**
     * @param argument The definition of an init container that is part of the group as documented in the `init_container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("ndqqwkpqddjguynv")
    public suspend fun initContainers(vararg argument: suspend GroupInitContainerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GroupInitContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.initContainers = mapped
    }

    /**
     * @param argument The definition of an init container that is part of the group as documented in the `init_container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("sxsvmuvtionhpstt")
    public suspend fun initContainers(argument: suspend GroupInitContainerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(GroupInitContainerArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.initContainers = mapped
    }

    /**
     * @param values The definition of an init container that is part of the group as documented in the `init_container` block below. Changing this forces a new resource to be created.
     */
    @JvmName("ftibmlsmfaqdnfib")
    public suspend fun initContainers(vararg values: GroupInitContainerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.initContainers = mapped
    }

    /**
     * @param value Specifies the IP address type of the container. `Public`, `Private` or `None`. Changing this forces a new resource to be created. If set to `Private`, `subnet_ids` also needs to be set. Defaults to `Public`.
     * > **Note:** `dns_name_label` and `os_type` set to `windows` are not compatible with `Private` `ip_address_type`
     */
    @JvmName("qihhysepqidpvdjq")
    public suspend fun ipAddressType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipAddressType = mapped
    }

    /**
     * @param value The Key Vault key URI for CMK encryption. Changing this forces a new resource to be created.
     */
    @JvmName("dmvmqmdksaymques")
    public suspend fun keyVaultKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultKeyId = mapped
    }

    /**
     * @param value The user assigned identity that has access to the Key Vault Key. If not specified, the RP principal named "Azure Container Instance Service" will be used instead. Make sure the identity has the proper `key_permissions` set, at least with `Get`, `UnwrapKey`, `WrapKey` and `GetRotationPolicy`.
     */
    @JvmName("qijyqpyipjnbpdvk")
    public suspend fun keyVaultUserAssignedIdentityId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultUserAssignedIdentityId = mapped
    }

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

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

    /**
     * @param value
     */
    @Deprecated(
        message = """
  the 'network_profile_id' has been removed from the latest versions of the container instance API
      and has been deprecated. It no longer functions and will be removed from the 4.0 AzureRM
      provider. Please use the 'subnet_ids' field instead
  """,
    )
    @JvmName("yqjkelqhqgnayegl")
    public suspend fun networkProfileId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkProfileId = mapped
    }

    /**
     * @param value The OS for the container group. Allowed values are `Linux` and `Windows`. Changing this forces a new resource to be created.
     * > **Note:** if `os_type` is set to `Windows` currently only a single `container` block is supported. Windows containers are not supported in virtual networks.
     */
    @JvmName("hobmppkvvotelmey")
    public suspend fun osType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.osType = mapped
    }

    /**
     * @param value The priority of the Container Group. Possible values are `Regular` and `Spot`. Changing this forces a new resource to be created.
     * > **NOTE:** When `priority` is set to `Spot`, the `ip_address_type` has to be `None`.
     */
    @JvmName("ecclmdphdbiklpti")
    public suspend fun priority(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

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

    /**
     * @param value Restart policy for the container group. Allowed values are `Always`, `Never`, `OnFailure`. Defaults to `Always`. Changing this forces a new resource to be created.
     */
    @JvmName("pqdhclbggpfyctbv")
    public suspend fun restartPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restartPolicy = mapped
    }

    /**
     * @param value Specifies the sku of the Container Group. Possible values are `Confidential`, `Dedicated` and `Standard`. Defaults to `Standard`. Changing this forces a new resource to be created.
     */
    @JvmName("vygryfkmrxnwrird")
    public suspend fun sku(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param value The subnet resource IDs for a container group. Changing this forces a new resource to be created.
     */
    @JvmName("swaslxaoxkuchedf")
    public suspend fun subnetIds(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("qjdcnirjfxrgwwat")
    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("iesxnadjqeksidob")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A list of Availability Zones in which this Container Group is located. Changing this forces a new resource to be created.
     */
    @JvmName("tafyemqkiwpdedsg")
    public suspend fun zones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    /**
     * @param values A list of Availability Zones in which this Container Group is located. Changing this forces a new resource to be created.
     */
    @JvmName("bhkpqohaasjukllq")
    public suspend fun zones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    internal fun build(): GroupArgs = GroupArgs(
        containers = containers,
        diagnostics = diagnostics,
        dnsConfig = dnsConfig,
        dnsNameLabel = dnsNameLabel,
        dnsNameLabelReusePolicy = dnsNameLabelReusePolicy,
        exposedPorts = exposedPorts,
        identity = identity,
        imageRegistryCredentials = imageRegistryCredentials,
        initContainers = initContainers,
        ipAddressType = ipAddressType,
        keyVaultKeyId = keyVaultKeyId,
        keyVaultUserAssignedIdentityId = keyVaultUserAssignedIdentityId,
        location = location,
        name = name,
        networkProfileId = networkProfileId,
        osType = osType,
        priority = priority,
        resourceGroupName = resourceGroupName,
        restartPolicy = restartPolicy,
        sku = sku,
        subnetIds = subnetIds,
        tags = tags,
        zones = zones,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy