We recommend using Azure Native.
Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi
azure.batch.getApplication
Explore with Pulumi AI
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);
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)
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
})
}
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),
};
});
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()));
}
}
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:
- Account
Name string - The name of the Batch account.
- Name string
- The name of the Application.
- Resource
Group stringName - The name of the Resource Group where this Batch account exists.
- Account
Name string - The name of the Batch account.
- Name string
- The name of the Application.
- Resource
Group stringName - The name of the Resource Group where this Batch account exists.
- account
Name String - The name of the Batch account.
- name String
- The name of the Application.
- resource
Group StringName - The name of the Resource Group where this Batch account exists.
- account
Name string - The name of the Batch account.
- name string
- The name of the Application.
- resource
Group stringName - 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_ strname - The name of the Resource Group where this Batch account exists.
- account
Name String - The name of the Batch account.
- name String
- The name of the Application.
- resource
Group StringName - The name of the Resource Group where this Batch account exists.
getApplication Result
The following output properties are available:
- Account
Name string - Allow
Updates bool - May packages within the application be overwritten using the same version string.
- Default
Version string - The package to use if a client requests the application but does not specify a version.
- Display
Name string - The display name for the application.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The Batch application name.
- Resource
Group stringName
- Account
Name string - Allow
Updates bool - May packages within the application be overwritten using the same version string.
- Default
Version string - The package to use if a client requests the application but does not specify a version.
- Display
Name string - The display name for the application.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The Batch application name.
- Resource
Group stringName
- account
Name String - allow
Updates Boolean - May packages within the application be overwritten using the same version string.
- default
Version String - The package to use if a client requests the application but does not specify a version.
- display
Name String - The display name for the application.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The Batch application name.
- resource
Group StringName
- account
Name string - allow
Updates boolean - May packages within the application be overwritten using the same version string.
- default
Version string - The package to use if a client requests the application but does not specify a version.
- display
Name string - The display name for the application.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The Batch application name.
- resource
Group stringName
- 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_ strname
- account
Name String - allow
Updates Boolean - May packages within the application be overwritten using the same version string.
- default
Version String - The package to use if a client requests the application but does not specify a version.
- display
Name String - The display name for the application.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The Batch application name.
- resource
Group StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.