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

com.pulumi.azure.batch.kotlin.AccountArgs.kt Maven / Gradle / Ivy

Go to download

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

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

package com.pulumi.azure.batch.kotlin

import com.pulumi.azure.batch.AccountArgs.builder
import com.pulumi.azure.batch.kotlin.inputs.AccountEncryptionArgs
import com.pulumi.azure.batch.kotlin.inputs.AccountEncryptionArgsBuilder
import com.pulumi.azure.batch.kotlin.inputs.AccountIdentityArgs
import com.pulumi.azure.batch.kotlin.inputs.AccountIdentityArgsBuilder
import com.pulumi.azure.batch.kotlin.inputs.AccountKeyVaultReferenceArgs
import com.pulumi.azure.batch.kotlin.inputs.AccountKeyVaultReferenceArgsBuilder
import com.pulumi.azure.batch.kotlin.inputs.AccountNetworkProfileArgs
import com.pulumi.azure.batch.kotlin.inputs.AccountNetworkProfileArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an Azure Batch account.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "testbatch",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "teststorage",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleAccount2 = new azure.batch.Account("example", {
 *     name: "testbatchaccount",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     poolAllocationMode: "BatchService",
 *     storageAccountId: exampleAccount.id,
 *     storageAccountAuthenticationMode: "StorageKeys",
 *     tags: {
 *         env: "test",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="testbatch",
 *     location="West Europe")
 * example_account = azure.storage.Account("example",
 *     name="teststorage",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     account_tier="Standard",
 *     account_replication_type="LRS")
 * example_account2 = azure.batch.Account("example",
 *     name="testbatchaccount",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     pool_allocation_mode="BatchService",
 *     storage_account_id=example_account.id,
 *     storage_account_authentication_mode="StorageKeys",
 *     tags={
 *         "env": "test",
 *     })
 * ```
 * ```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 = "testbatch",
 *         Location = "West Europe",
 *     });
 *     var exampleAccount = new Azure.Storage.Account("example", new()
 *     {
 *         Name = "teststorage",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AccountTier = "Standard",
 *         AccountReplicationType = "LRS",
 *     });
 *     var exampleAccount2 = new Azure.Batch.Account("example", new()
 *     {
 *         Name = "testbatchaccount",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         PoolAllocationMode = "BatchService",
 *         StorageAccountId = exampleAccount.Id,
 *         StorageAccountAuthenticationMode = "StorageKeys",
 *         Tags =
 *         {
 *             { "env", "test" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/batch"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
 * 	"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("testbatch"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
 * 			Name:                   pulumi.String("teststorage"),
 * 			ResourceGroupName:      example.Name,
 * 			Location:               example.Location,
 * 			AccountTier:            pulumi.String("Standard"),
 * 			AccountReplicationType: pulumi.String("LRS"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = batch.NewAccount(ctx, "example", &batch.AccountArgs{
 * 			Name:                             pulumi.String("testbatchaccount"),
 * 			ResourceGroupName:                example.Name,
 * 			Location:                         example.Location,
 * 			PoolAllocationMode:               pulumi.String("BatchService"),
 * 			StorageAccountId:                 exampleAccount.ID(),
 * 			StorageAccountAuthenticationMode: pulumi.String("StorageKeys"),
 * 			Tags: pulumi.StringMap{
 * 				"env": pulumi.String("test"),
 * 			},
 * 		})
 * 		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.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.batch.Account;
 * import com.pulumi.azure.batch.AccountArgs;
 * 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("testbatch")
 *             .location("West Europe")
 *             .build());
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("teststorage")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 *         var exampleAccount2 = new Account("exampleAccount2", AccountArgs.builder()
 *             .name("testbatchaccount")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .poolAllocationMode("BatchService")
 *             .storageAccountId(exampleAccount.id())
 *             .storageAccountAuthenticationMode("StorageKeys")
 *             .tags(Map.of("env", "test"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: testbatch
 *       location: West Europe
 *   exampleAccount:
 *     type: azure:storage:Account
 *     name: example
 *     properties:
 *       name: teststorage
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       accountTier: Standard
 *       accountReplicationType: LRS
 *   exampleAccount2:
 *     type: azure:batch:Account
 *     name: example
 *     properties:
 *       name: testbatchaccount
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       poolAllocationMode: BatchService
 *       storageAccountId: ${exampleAccount.id}
 *       storageAccountAuthenticationMode: StorageKeys
 *       tags:
 *         env: test
 * ```
 * 
 * ## Import
 * Batch Account can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:batch/account:Account example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Batch/batchAccounts/account1
 * ```
 * @property allowedAuthenticationModes Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
 * @property encryption Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
 * @property identity An `identity` block as defined below.
 * @property keyVaultReference A `key_vault_reference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
 * @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 Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
 * @property networkProfile A `network_profile` block as defined below.
 * @property poolAllocationMode Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`.
 * @property publicNetworkAccessEnabled Whether public network access is allowed for this server. Defaults to `true`.
 * > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `key_vault_reference` below.
 * > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode).
 * @property resourceGroupName The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
 * > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct.
 * @property storageAccountAuthenticationMode Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`.
 * > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`.
 * @property storageAccountId Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
 * > **NOTE:** When using `storage_account_id`, the `storage_account_authentication_mode` must be specified as well.
 * @property storageAccountNodeIdentity Specifies the user assigned identity for the storage account.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class AccountArgs(
    public val allowedAuthenticationModes: Output>? = null,
    public val encryption: Output? = null,
    public val identity: Output? = null,
    public val keyVaultReference: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val networkProfile: Output? = null,
    public val poolAllocationMode: Output? = null,
    public val publicNetworkAccessEnabled: Output? = null,
    public val resourceGroupName: Output? = null,
    public val storageAccountAuthenticationMode: Output? = null,
    public val storageAccountId: Output? = null,
    public val storageAccountNodeIdentity: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.batch.AccountArgs =
        com.pulumi.azure.batch.AccountArgs.builder()
            .allowedAuthenticationModes(
                allowedAuthenticationModes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .encryption(encryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .keyVaultReference(keyVaultReference?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkProfile(networkProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .poolAllocationMode(poolAllocationMode?.applyValue({ args0 -> args0 }))
            .publicNetworkAccessEnabled(publicNetworkAccessEnabled?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .storageAccountAuthenticationMode(storageAccountAuthenticationMode?.applyValue({ args0 -> args0 }))
            .storageAccountId(storageAccountId?.applyValue({ args0 -> args0 }))
            .storageAccountNodeIdentity(storageAccountNodeIdentity?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var encryption: Output? = null

    private var identity: Output? = null

    private var keyVaultReference: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var networkProfile: Output? = null

    private var poolAllocationMode: Output? = null

    private var publicNetworkAccessEnabled: Output? = null

    private var resourceGroupName: Output? = null

    private var storageAccountAuthenticationMode: Output? = null

    private var storageAccountId: Output? = null

    private var storageAccountNodeIdentity: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
     */
    @JvmName("pkhnjaeypwltlhcg")
    public suspend fun allowedAuthenticationModes(`value`: Output>) {
        this.allowedAuthenticationModes = value
    }

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

    /**
     * @param values Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
     */
    @JvmName("cgtphsstekkglewx")
    public suspend fun allowedAuthenticationModes(values: List>) {
        this.allowedAuthenticationModes = Output.all(values)
    }

    /**
     * @param value Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
     */
    @JvmName("echwljdesjsncqwt")
    public suspend fun encryption(`value`: Output) {
        this.encryption = value
    }

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

    /**
     * @param value A `key_vault_reference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
     */
    @JvmName("dvfmhkijrwxthssd")
    public suspend fun keyVaultReference(`value`: Output) {
        this.keyVaultReference = value
    }

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

    /**
     * @param value Specifies the name of the Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
     */
    @JvmName("mgmwarcfeyjxgipi")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    /**
     * @param value Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`.
     */
    @JvmName("usfjpmgcbqgmiqxo")
    public suspend fun poolAllocationMode(`value`: Output) {
        this.poolAllocationMode = value
    }

    /**
     * @param value Whether public network access is allowed for this server. Defaults to `true`.
     * > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `key_vault_reference` below.
     * > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode).
     */
    @JvmName("saokjyivyunobgjw")
    public suspend fun publicNetworkAccessEnabled(`value`: Output) {
        this.publicNetworkAccessEnabled = value
    }

    /**
     * @param value The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
     * > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct.
     */
    @JvmName("nxshxjuycufvqjip")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`.
     * > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`.
     */
    @JvmName("ujxtqoxukarmhwfm")
    public suspend fun storageAccountAuthenticationMode(`value`: Output) {
        this.storageAccountAuthenticationMode = value
    }

    /**
     * @param value Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
     * > **NOTE:** When using `storage_account_id`, the `storage_account_authentication_mode` must be specified as well.
     */
    @JvmName("dytnokktpqsesiwc")
    public suspend fun storageAccountId(`value`: Output) {
        this.storageAccountId = value
    }

    /**
     * @param value Specifies the user assigned identity for the storage account.
     */
    @JvmName("vtxtckrptotseely")
    public suspend fun storageAccountNodeIdentity(`value`: Output) {
        this.storageAccountNodeIdentity = value
    }

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

    /**
     * @param value Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
     */
    @JvmName("etsdjsulpeemfhae")
    public suspend fun allowedAuthenticationModes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedAuthenticationModes = mapped
    }

    /**
     * @param values Specifies the allowed authentication mode for the Batch account. Possible values include `AAD`, `SharedKey` or `TaskAuthenticationToken`.
     */
    @JvmName("veinyxexbjuqdxqn")
    public suspend fun allowedAuthenticationModes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedAuthenticationModes = mapped
    }

    /**
     * @param value Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
     */
    @JvmName("brrbmdqeswbdnhng")
    public suspend fun encryption(`value`: AccountEncryptionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryption = mapped
    }

    /**
     * @param argument Specifies if customer managed key encryption should be used to encrypt batch account data. One `encryption` block as defined below.
     */
    @JvmName("jqvkvtyyssycrqrj")
    public suspend fun encryption(argument: suspend AccountEncryptionArgsBuilder.() -> Unit) {
        val toBeMapped = AccountEncryptionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.encryption = mapped
    }

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

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

    /**
     * @param value A `key_vault_reference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
     */
    @JvmName("xrugbdsamonslnwc")
    public suspend fun keyVaultReference(`value`: AccountKeyVaultReferenceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultReference = mapped
    }

    /**
     * @param argument A `key_vault_reference` block, as defined below, that describes the Azure KeyVault reference to use when deploying the Azure Batch account using the `UserSubscription` pool allocation mode.
     */
    @JvmName("ntqisgfwbwcptxok")
    public suspend
    fun keyVaultReference(argument: suspend AccountKeyVaultReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = AccountKeyVaultReferenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.keyVaultReference = mapped
    }

    /**
     * @param value Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    @JvmName("ychppbolilkbaecc")
    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 Batch account. Only lowercase Alphanumeric characters allowed. Changing this forces a new resource to be created.
     */
    @JvmName("dfgyjkjfybocwaei")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

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

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

    /**
     * @param value Specifies the mode to use for pool allocation. Possible values are `BatchService` or `UserSubscription`. Defaults to `BatchService`.
     */
    @JvmName("vurpqcesxcnacqnd")
    public suspend fun poolAllocationMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.poolAllocationMode = mapped
    }

    /**
     * @param value Whether public network access is allowed for this server. Defaults to `true`.
     * > **NOTE:** When using `UserSubscription` mode, an Azure KeyVault reference has to be specified. See `key_vault_reference` below.
     * > **NOTE:** When using `UserSubscription` mode, the `Microsoft Azure Batch` service principal has to have `Contributor` role on your subscription scope, as documented [here](https://docs.microsoft.com/azure/batch/batch-account-create-portal#additional-configuration-for-user-subscription-mode).
     */
    @JvmName("etbquwggmdgpyrpe")
    public suspend fun publicNetworkAccessEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.publicNetworkAccessEnabled = mapped
    }

    /**
     * @param value The name of the resource group in which to create the Batch account. Changing this forces a new resource to be created.
     * > **NOTE:** To work around [a bug in the Azure API](https://github.com/Azure/azure-rest-api-specs/issues/5574) this property is currently treated as case-insensitive. A future version of this provider will require that the casing is correct.
     */
    @JvmName("xqntgtxklvmbufty")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Specifies the storage account authentication mode. Possible values include `StorageKeys`, `BatchAccountManagedIdentity`.
     * > **NOTE:** When using `BatchAccountManagedIdentity` mod, the `identity.type` must set to `UserAssigned` or `SystemAssigned`.
     */
    @JvmName("vvfasvayqyhdwoxp")
    public suspend fun storageAccountAuthenticationMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountAuthenticationMode = mapped
    }

    /**
     * @param value Specifies the storage account to use for the Batch account. If not specified, Azure Batch will manage the storage.
     * > **NOTE:** When using `storage_account_id`, the `storage_account_authentication_mode` must be specified as well.
     */
    @JvmName("rtpjhraxvibypfao")
    public suspend fun storageAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountId = mapped
    }

    /**
     * @param value Specifies the user assigned identity for the storage account.
     */
    @JvmName("gkuchntwoosidcjq")
    public suspend fun storageAccountNodeIdentity(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountNodeIdentity = mapped
    }

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

    internal fun build(): AccountArgs = AccountArgs(
        allowedAuthenticationModes = allowedAuthenticationModes,
        encryption = encryption,
        identity = identity,
        keyVaultReference = keyVaultReference,
        location = location,
        name = name,
        networkProfile = networkProfile,
        poolAllocationMode = poolAllocationMode,
        publicNetworkAccessEnabled = publicNetworkAccessEnabled,
        resourceGroupName = resourceGroupName,
        storageAccountAuthenticationMode = storageAccountAuthenticationMode,
        storageAccountId = storageAccountId,
        storageAccountNodeIdentity = storageAccountNodeIdentity,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy