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

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

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

package com.pulumi.azure.batch.kotlin

import com.pulumi.azure.batch.ApplicationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Manages Azure Batch Application instance.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-rg",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplesa",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleAccount2 = new azure.batch.Account("example", {
 *     name: "exampleba",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     poolAllocationMode: "BatchService",
 *     storageAccountId: exampleAccount.id,
 *     storageAccountAuthenticationMode: "StorageKeys",
 * });
 * const exampleApplication = new azure.batch.Application("example", {
 *     name: "example-batch-application",
 *     resourceGroupName: example.name,
 *     accountName: exampleAccount2.name,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-rg",
 *     location="West Europe")
 * example_account = azure.storage.Account("example",
 *     name="examplesa",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     account_tier="Standard",
 *     account_replication_type="LRS")
 * example_account2 = azure.batch.Account("example",
 *     name="exampleba",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     pool_allocation_mode="BatchService",
 *     storage_account_id=example_account.id,
 *     storage_account_authentication_mode="StorageKeys")
 * example_application = azure.batch.Application("example",
 *     name="example-batch-application",
 *     resource_group_name=example.name,
 *     account_name=example_account2.name)
 * ```
 * ```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-rg",
 *         Location = "West Europe",
 *     });
 *     var exampleAccount = new Azure.Storage.Account("example", new()
 *     {
 *         Name = "examplesa",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AccountTier = "Standard",
 *         AccountReplicationType = "LRS",
 *     });
 *     var exampleAccount2 = new Azure.Batch.Account("example", new()
 *     {
 *         Name = "exampleba",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         PoolAllocationMode = "BatchService",
 *         StorageAccountId = exampleAccount.Id,
 *         StorageAccountAuthenticationMode = "StorageKeys",
 *     });
 *     var exampleApplication = new Azure.Batch.Application("example", new()
 *     {
 *         Name = "example-batch-application",
 *         ResourceGroupName = example.Name,
 *         AccountName = exampleAccount2.Name,
 *     });
 * });
 * ```
 * ```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("example-rg"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
 * 			Name:                   pulumi.String("examplesa"),
 * 			ResourceGroupName:      example.Name,
 * 			Location:               example.Location,
 * 			AccountTier:            pulumi.String("Standard"),
 * 			AccountReplicationType: pulumi.String("LRS"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAccount2, err := batch.NewAccount(ctx, "example", &batch.AccountArgs{
 * 			Name:                             pulumi.String("exampleba"),
 * 			ResourceGroupName:                example.Name,
 * 			Location:                         example.Location,
 * 			PoolAllocationMode:               pulumi.String("BatchService"),
 * 			StorageAccountId:                 exampleAccount.ID(),
 * 			StorageAccountAuthenticationMode: pulumi.String("StorageKeys"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = batch.NewApplication(ctx, "example", &batch.ApplicationArgs{
 * 			Name:              pulumi.String("example-batch-application"),
 * 			ResourceGroupName: example.Name,
 * 			AccountName:       exampleAccount2.Name,
 * 		})
 * 		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 com.pulumi.azure.batch.Application;
 * import com.pulumi.azure.batch.ApplicationArgs;
 * 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-rg")
 *             .location("West Europe")
 *             .build());
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("examplesa")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 *         var exampleAccount2 = new Account("exampleAccount2", AccountArgs.builder()
 *             .name("exampleba")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .poolAllocationMode("BatchService")
 *             .storageAccountId(exampleAccount.id())
 *             .storageAccountAuthenticationMode("StorageKeys")
 *             .build());
 *         var exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()
 *             .name("example-batch-application")
 *             .resourceGroupName(example.name())
 *             .accountName(exampleAccount2.name())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-rg
 *       location: West Europe
 *   exampleAccount:
 *     type: azure:storage:Account
 *     name: example
 *     properties:
 *       name: examplesa
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       accountTier: Standard
 *       accountReplicationType: LRS
 *   exampleAccount2:
 *     type: azure:batch:Account
 *     name: example
 *     properties:
 *       name: exampleba
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       poolAllocationMode: BatchService
 *       storageAccountId: ${exampleAccount.id}
 *       storageAccountAuthenticationMode: StorageKeys
 *   exampleApplication:
 *     type: azure:batch:Application
 *     name: example
 *     properties:
 *       name: example-batch-application
 *       resourceGroupName: ${example.name}
 *       accountName: ${exampleAccount2.name}
 * ```
 * 
 * ## Import
 * Batch Applications can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:batch/application:Application example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.Batch/batchAccounts/exampleba/applications/example-batch-application
 * ```
 * @property accountName The name of the Batch account. Changing this forces a new resource to be created.
 * @property allowUpdates A value indicating whether packages within the application may be overwritten using the same version string. Defaults to `true`.
 * @property defaultVersion The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
 * @property displayName The display name for the application.
 * @property name The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
 */
public data class ApplicationArgs(
    public val accountName: Output? = null,
    public val allowUpdates: Output? = null,
    public val defaultVersion: Output? = null,
    public val displayName: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.batch.ApplicationArgs =
        com.pulumi.azure.batch.ApplicationArgs.builder()
            .accountName(accountName?.applyValue({ args0 -> args0 }))
            .allowUpdates(allowUpdates?.applyValue({ args0 -> args0 }))
            .defaultVersion(defaultVersion?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ApplicationArgs].
 */
@PulumiTagMarker
public class ApplicationArgsBuilder internal constructor() {
    private var accountName: Output? = null

    private var allowUpdates: Output? = null

    private var defaultVersion: Output? = null

    private var displayName: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

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

    /**
     * @param value A value indicating whether packages within the application may be overwritten using the same version string. Defaults to `true`.
     */
    @JvmName("hhmrxianweffgyuw")
    public suspend fun allowUpdates(`value`: Output) {
        this.allowUpdates = value
    }

    /**
     * @param value The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
     */
    @JvmName("stifqrhciesihium")
    public suspend fun defaultVersion(`value`: Output) {
        this.defaultVersion = value
    }

    /**
     * @param value The display name for the application.
     */
    @JvmName("nfgepgfwuutqaenp")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
     */
    @JvmName("yqmearmbdscvopyc")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
     */
    @JvmName("kxsftfjwwolrgqcw")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

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

    /**
     * @param value A value indicating whether packages within the application may be overwritten using the same version string. Defaults to `true`.
     */
    @JvmName("xvcppdrxohkpnfyy")
    public suspend fun allowUpdates(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowUpdates = mapped
    }

    /**
     * @param value The package to use if a client requests the application but does not specify a version. This property can only be set to the name of an existing package.
     */
    @JvmName("gmwpfbrfmhfasrwd")
    public suspend fun defaultVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultVersion = mapped
    }

    /**
     * @param value The display name for the application.
     */
    @JvmName("isddmihvxwtqnldg")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

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

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

    internal fun build(): ApplicationArgs = ApplicationArgs(
        accountName = accountName,
        allowUpdates = allowUpdates,
        defaultVersion = defaultVersion,
        displayName = displayName,
        name = name,
        resourceGroupName = resourceGroupName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy