1. Packages
  2. Azure Classic
  3. API Docs
  4. batch
  5. Application

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.batch.Application

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages Azure Batch Application instance.

    Example Usage

    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,
    });
    
    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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    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}
    

    Create Application Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Application(name: string, args: ApplicationArgs, opts?: CustomResourceOptions);
    @overload
    def Application(resource_name: str,
                    args: ApplicationArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Application(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    account_name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    allow_updates: Optional[bool] = None,
                    default_version: Optional[str] = None,
                    display_name: Optional[str] = None,
                    name: Optional[str] = None)
    func NewApplication(ctx *Context, name string, args ApplicationArgs, opts ...ResourceOption) (*Application, error)
    public Application(string name, ApplicationArgs args, CustomResourceOptions? opts = null)
    public Application(String name, ApplicationArgs args)
    public Application(String name, ApplicationArgs args, CustomResourceOptions options)
    
    type: azure:batch:Application
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApplicationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var applicationResource = new Azure.Batch.Application("applicationResource", new()
    {
        AccountName = "string",
        ResourceGroupName = "string",
        AllowUpdates = false,
        DefaultVersion = "string",
        DisplayName = "string",
        Name = "string",
    });
    
    example, err := batch.NewApplication(ctx, "applicationResource", &batch.ApplicationArgs{
    	AccountName:       pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	AllowUpdates:      pulumi.Bool(false),
    	DefaultVersion:    pulumi.String("string"),
    	DisplayName:       pulumi.String("string"),
    	Name:              pulumi.String("string"),
    })
    
    var applicationResource = new Application("applicationResource", ApplicationArgs.builder()
        .accountName("string")
        .resourceGroupName("string")
        .allowUpdates(false)
        .defaultVersion("string")
        .displayName("string")
        .name("string")
        .build());
    
    application_resource = azure.batch.Application("applicationResource",
        account_name="string",
        resource_group_name="string",
        allow_updates=False,
        default_version="string",
        display_name="string",
        name="string")
    
    const applicationResource = new azure.batch.Application("applicationResource", {
        accountName: "string",
        resourceGroupName: "string",
        allowUpdates: false,
        defaultVersion: "string",
        displayName: "string",
        name: "string",
    });
    
    type: azure:batch:Application
    properties:
        accountName: string
        allowUpdates: false
        defaultVersion: string
        displayName: string
        name: string
        resourceGroupName: string
    

    Application Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Application resource accepts the following input properties:

    AccountName string
    The name of the Batch account. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    AllowUpdates bool
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    DefaultVersion string
    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.
    DisplayName string
    The display name for the application.
    Name string
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    AccountName string
    The name of the Batch account. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    AllowUpdates bool
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    DefaultVersion string
    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.
    DisplayName string
    The display name for the application.
    Name string
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    accountName String
    The name of the Batch account. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    allowUpdates Boolean
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    defaultVersion String
    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.
    displayName String
    The display name for the application.
    name String
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    accountName string
    The name of the Batch account. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    allowUpdates boolean
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    defaultVersion string
    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.
    displayName string
    The display name for the application.
    name string
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    account_name str
    The name of the Batch account. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    allow_updates bool
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    default_version str
    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.
    display_name str
    The display name for the application.
    name str
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    accountName String
    The name of the Batch account. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    allowUpdates Boolean
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    defaultVersion String
    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.
    displayName String
    The display name for the application.
    name String
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Application resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Application Resource

    Get an existing Application resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ApplicationState, opts?: CustomResourceOptions): Application
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_name: Optional[str] = None,
            allow_updates: Optional[bool] = None,
            default_version: Optional[str] = None,
            display_name: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None) -> Application
    func GetApplication(ctx *Context, name string, id IDInput, state *ApplicationState, opts ...ResourceOption) (*Application, error)
    public static Application Get(string name, Input<string> id, ApplicationState? state, CustomResourceOptions? opts = null)
    public static Application get(String name, Output<String> id, ApplicationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountName string
    The name of the Batch account. Changing this forces a new resource to be created.
    AllowUpdates bool
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    DefaultVersion string
    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.
    DisplayName string
    The display name for the application.
    Name string
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    AccountName string
    The name of the Batch account. Changing this forces a new resource to be created.
    AllowUpdates bool
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    DefaultVersion string
    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.
    DisplayName string
    The display name for the application.
    Name string
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    accountName String
    The name of the Batch account. Changing this forces a new resource to be created.
    allowUpdates Boolean
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    defaultVersion String
    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.
    displayName String
    The display name for the application.
    name String
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    accountName string
    The name of the Batch account. Changing this forces a new resource to be created.
    allowUpdates boolean
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    defaultVersion string
    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.
    displayName string
    The display name for the application.
    name string
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    account_name str
    The name of the Batch account. Changing this forces a new resource to be created.
    allow_updates bool
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    default_version str
    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.
    display_name str
    The display name for the application.
    name str
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.
    accountName String
    The name of the Batch account. Changing this forces a new resource to be created.
    allowUpdates Boolean
    A value indicating whether packages within the application may be overwritten using the same version string. Defaults to true.
    defaultVersion String
    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.
    displayName String
    The display name for the application.
    name String
    The name of the application. This must be unique within the account. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the resource group that contains the Batch account. Changing this forces a new resource to be created.

    Import

    Batch Applications can be imported using the resource id, e.g.

    $ 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
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi