azure logo
Azure Classic v5.38.0, Mar 21 23

azure.batch.getApplication

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

Example Usage

using System.Collections.Generic;
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),
    };
});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/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
	})
}
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()));
    }
}
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)
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);
variables:
  example:
    fn::invoke:
      Function: azure:batch:getApplication
      Arguments:
        name: testapplication
        resourceGroupName: test
        accountName: testbatchaccount
outputs:
  batchApplicationId: ${example.id}

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>
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]
func LookupApplication(ctx *Context, args *LookupApplicationArgs, opts ...InvokeOption) (*LookupApplicationResult, error)
func LookupApplicationOutput(ctx *Context, args *LookupApplicationOutputArgs, opts ...InvokeOption) LookupApplicationResultOutput

> 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)
}
public static CompletableFuture<GetApplicationResult> getApplication(GetApplicationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:batch/getApplication:getApplication
  arguments:
    # arguments dictionary

The following arguments are supported:

AccountName string

The name of the Batch account.

Name string

The name of the Application.

ResourceGroupName string

The name of the Resource Group where this Batch account exists.

AccountName string

The name of the Batch account.

Name string

The name of the Application.

ResourceGroupName string

The name of the Resource Group where this Batch account exists.

accountName String

The name of the Batch account.

name String

The name of the Application.

resourceGroupName String

The name of the Resource Group where this Batch account exists.

accountName string

The name of the Batch account.

name string

The name of the Application.

resourceGroupName string

The name of the Resource Group where this Batch account exists.

account_name str

The name of the Batch account.

name str

The name of the Application.

resource_group_name str

The name of the Resource Group where this Batch account exists.

accountName String

The name of the Batch account.

name String

The name of the Application.

resourceGroupName 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.