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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.batch.getApplication

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about an existing Batch Application instance.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.batch.getApplication({
    name: "testapplication",
    resourceGroupName: "test",
    accountName: "testbatchaccount",
});
export const batchApplicationId = example.then(example => example.id);
Copy
import pulumi
import pulumi_azure as azure

example = azure.batch.get_application(name="testapplication",
    resource_group_name="test",
    account_name="testbatchaccount")
pulumi.export("batchApplicationId", example.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/batch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := batch.LookupApplication(ctx, &batch.LookupApplicationArgs{
			Name:              "testapplication",
			ResourceGroupName: "test",
			AccountName:       "testbatchaccount",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("batchApplicationId", example.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Batch.GetApplication.Invoke(new()
    {
        Name = "testapplication",
        ResourceGroupName = "test",
        AccountName = "testbatchaccount",
    });

    return new Dictionary<string, object?>
    {
        ["batchApplicationId"] = example.Apply(getApplicationResult => getApplicationResult.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.batch.BatchFunctions;
import com.pulumi.azure.batch.inputs.GetApplicationArgs;
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) {
        final var example = BatchFunctions.getApplication(GetApplicationArgs.builder()
            .name("testapplication")
            .resourceGroupName("test")
            .accountName("testbatchaccount")
            .build());

        ctx.export("batchApplicationId", example.applyValue(getApplicationResult -> getApplicationResult.id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:batch:getApplication
      arguments:
        name: testapplication
        resourceGroupName: test
        accountName: testbatchaccount
outputs:
  batchApplicationId: ${example.id}
Copy

Using getApplication

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getApplication(args: GetApplicationArgs, opts?: InvokeOptions): Promise<GetApplicationResult>
function getApplicationOutput(args: GetApplicationOutputArgs, opts?: InvokeOptions): Output<GetApplicationResult>
Copy
def get_application(account_name: Optional[str] = None,
                    name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetApplicationResult
def get_application_output(account_name: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    resource_group_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetApplicationResult]
Copy
func LookupApplication(ctx *Context, args *LookupApplicationArgs, opts ...InvokeOption) (*LookupApplicationResult, error)
func LookupApplicationOutput(ctx *Context, args *LookupApplicationOutputArgs, opts ...InvokeOption) LookupApplicationResultOutput
Copy

> Note: This function is named LookupApplication in the Go SDK.

public static class GetApplication 
{
    public static Task<GetApplicationResult> InvokeAsync(GetApplicationArgs args, InvokeOptions? opts = null)
    public static Output<GetApplicationResult> Invoke(GetApplicationInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetApplicationResult> getApplication(GetApplicationArgs args, InvokeOptions options)
public static Output<GetApplicationResult> getApplication(GetApplicationArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:batch/getApplication:getApplication
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AccountName This property is required. string
The name of the Batch account.
Name This property is required. string
The name of the Application.
ResourceGroupName This property is required. string
The name of the Resource Group where this Batch account exists.
AccountName This property is required. string
The name of the Batch account.
Name This property is required. string
The name of the Application.
ResourceGroupName This property is required. string
The name of the Resource Group where this Batch account exists.
accountName This property is required. String
The name of the Batch account.
name This property is required. String
The name of the Application.
resourceGroupName This property is required. String
The name of the Resource Group where this Batch account exists.
accountName This property is required. string
The name of the Batch account.
name This property is required. string
The name of the Application.
resourceGroupName This property is required. string
The name of the Resource Group where this Batch account exists.
account_name This property is required. str
The name of the Batch account.
name This property is required. str
The name of the Application.
resource_group_name This property is required. str
The name of the Resource Group where this Batch account exists.
accountName This property is required. String
The name of the Batch account.
name This property is required. String
The name of the Application.
resourceGroupName This property is required. String
The name of the Resource Group where this Batch account exists.

getApplication Result

The following output properties are available:

AccountName string
AllowUpdates bool
May packages within the application be overwritten using the same version string.
DefaultVersion string
The package to use if a client requests the application but does not specify a version.
DisplayName string
The display name for the application.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The Batch application name.
ResourceGroupName string
AccountName string
AllowUpdates bool
May packages within the application be overwritten using the same version string.
DefaultVersion string
The package to use if a client requests the application but does not specify a version.
DisplayName string
The display name for the application.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The Batch application name.
ResourceGroupName string
accountName String
allowUpdates Boolean
May packages within the application be overwritten using the same version string.
defaultVersion String
The package to use if a client requests the application but does not specify a version.
displayName String
The display name for the application.
id String
The provider-assigned unique ID for this managed resource.
name String
The Batch application name.
resourceGroupName String
accountName string
allowUpdates boolean
May packages within the application be overwritten using the same version string.
defaultVersion string
The package to use if a client requests the application but does not specify a version.
displayName string
The display name for the application.
id string
The provider-assigned unique ID for this managed resource.
name string
The Batch application name.
resourceGroupName string
account_name str
allow_updates bool
May packages within the application be overwritten using the same version string.
default_version str
The package to use if a client requests the application but does not specify a version.
display_name str
The display name for the application.
id str
The provider-assigned unique ID for this managed resource.
name str
The Batch application name.
resource_group_name str
accountName String
allowUpdates Boolean
May packages within the application be overwritten using the same version string.
defaultVersion String
The package to use if a client requests the application but does not specify a version.
displayName String
The display name for the application.
id String
The provider-assigned unique ID for this managed resource.
name String
The Batch application name.
resourceGroupName String

Package Details

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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi