com.pulumi.azure.batch.kotlin.BatchFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.batch.kotlin
import com.pulumi.azure.batch.BatchFunctions.getAccountPlain
import com.pulumi.azure.batch.BatchFunctions.getApplicationPlain
import com.pulumi.azure.batch.BatchFunctions.getCertificatePlain
import com.pulumi.azure.batch.BatchFunctions.getPoolPlain
import com.pulumi.azure.batch.kotlin.inputs.GetAccountPlainArgs
import com.pulumi.azure.batch.kotlin.inputs.GetAccountPlainArgsBuilder
import com.pulumi.azure.batch.kotlin.inputs.GetApplicationPlainArgs
import com.pulumi.azure.batch.kotlin.inputs.GetApplicationPlainArgsBuilder
import com.pulumi.azure.batch.kotlin.inputs.GetCertificatePlainArgs
import com.pulumi.azure.batch.kotlin.inputs.GetCertificatePlainArgsBuilder
import com.pulumi.azure.batch.kotlin.inputs.GetPoolPlainArgs
import com.pulumi.azure.batch.kotlin.inputs.GetPoolPlainArgsBuilder
import com.pulumi.azure.batch.kotlin.outputs.GetAccountResult
import com.pulumi.azure.batch.kotlin.outputs.GetApplicationResult
import com.pulumi.azure.batch.kotlin.outputs.GetCertificateResult
import com.pulumi.azure.batch.kotlin.outputs.GetPoolResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.batch.kotlin.outputs.GetAccountResult.Companion.toKotlin as getAccountResultToKotlin
import com.pulumi.azure.batch.kotlin.outputs.GetApplicationResult.Companion.toKotlin as getApplicationResultToKotlin
import com.pulumi.azure.batch.kotlin.outputs.GetCertificateResult.Companion.toKotlin as getCertificateResultToKotlin
import com.pulumi.azure.batch.kotlin.outputs.GetPoolResult.Companion.toKotlin as getPoolResultToKotlin
public object BatchFunctions {
/**
* Use this data source to access information about an existing Batch Account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.batch.getAccount({
* name: "testbatchaccount",
* resourceGroupName: "test",
* });
* export const poolAllocationMode = example.then(example => example.poolAllocationMode);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.batch.get_account(name="testbatchaccount",
* resource_group_name="test")
* pulumi.export("poolAllocationMode", example.pool_allocation_mode)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Batch.GetAccount.Invoke(new()
* {
* Name = "testbatchaccount",
* ResourceGroupName = "test",
* });
* return new Dictionary
* {
* ["poolAllocationMode"] = example.Apply(getAccountResult => getAccountResult.PoolAllocationMode),
* };
* });
* ```
* ```go
* 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.LookupAccount(ctx, &batch.LookupAccountArgs{
* Name: "testbatchaccount",
* ResourceGroupName: "test",
* }, nil)
* if err != nil {
* return err
* }
* ctx.Export("poolAllocationMode", example.PoolAllocationMode)
* return nil
* })
* }
* ```
* ```java
* 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.GetAccountArgs;
* 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.getAccount(GetAccountArgs.builder()
* .name("testbatchaccount")
* .resourceGroupName("test")
* .build());
* ctx.export("poolAllocationMode", example.applyValue(getAccountResult -> getAccountResult.poolAllocationMode()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:batch:getAccount
* Arguments:
* name: testbatchaccount
* resourceGroupName: test
* outputs:
* poolAllocationMode: ${example.poolAllocationMode}
* ```
*
* @param argument A collection of arguments for invoking getAccount.
* @return A collection of values returned by getAccount.
*/
public suspend fun getAccount(argument: GetAccountPlainArgs): GetAccountResult =
getAccountResultToKotlin(getAccountPlain(argument.toJava()).await())
/**
* @see [getAccount].
* @param name The name of the Batch account.
* @param resourceGroupName The Name of the Resource Group where this Batch account exists.
* @return A collection of values returned by getAccount.
*/
public suspend fun getAccount(name: String, resourceGroupName: String): GetAccountResult {
val argument = GetAccountPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return getAccountResultToKotlin(getAccountPlain(argument.toJava()).await())
}
/**
* @see [getAccount].
* @param argument Builder for [com.pulumi.azure.batch.kotlin.inputs.GetAccountPlainArgs].
* @return A collection of values returned by getAccount.
*/
public suspend fun getAccount(argument: suspend GetAccountPlainArgsBuilder.() -> Unit):
GetAccountResult {
val builder = GetAccountPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccountResultToKotlin(getAccountPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing Batch Application instance.
* ## Example Usage
*
* ```typescript
* 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);
* ```
* ```python
* 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)
* ```
* ```csharp
* 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
* {
* ["batchApplicationId"] = example.Apply(getApplicationResult => getApplicationResult.Id),
* };
* });
* ```
* ```go
* 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
* })
* }
* ```
* ```java
* 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()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:batch:getApplication
* Arguments:
* name: testapplication
* resourceGroupName: test
* accountName: testbatchaccount
* outputs:
* batchApplicationId: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getApplication.
* @return A collection of values returned by getApplication.
*/
public suspend fun getApplication(argument: GetApplicationPlainArgs): GetApplicationResult =
getApplicationResultToKotlin(getApplicationPlain(argument.toJava()).await())
/**
* @see [getApplication].
* @param accountName The name of the Batch account.
* @param name The name of the Application.
* @param resourceGroupName The name of the Resource Group where this Batch account exists.
* @return A collection of values returned by getApplication.
*/
public suspend fun getApplication(
accountName: String,
name: String,
resourceGroupName: String,
): GetApplicationResult {
val argument = GetApplicationPlainArgs(
accountName = accountName,
name = name,
resourceGroupName = resourceGroupName,
)
return getApplicationResultToKotlin(getApplicationPlain(argument.toJava()).await())
}
/**
* @see [getApplication].
* @param argument Builder for [com.pulumi.azure.batch.kotlin.inputs.GetApplicationPlainArgs].
* @return A collection of values returned by getApplication.
*/
public suspend fun getApplication(argument: suspend GetApplicationPlainArgsBuilder.() -> Unit):
GetApplicationResult {
val builder = GetApplicationPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getApplicationResultToKotlin(getApplicationPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing certificate in a Batch Account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.batch.getCertificate({
* name: "SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
* accountName: "examplebatchaccount",
* resourceGroupName: "example",
* });
* export const thumbprint = example.then(example => example.thumbprint);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.batch.get_certificate(name="SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
* account_name="examplebatchaccount",
* resource_group_name="example")
* pulumi.export("thumbprint", example.thumbprint)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Batch.GetCertificate.Invoke(new()
* {
* Name = "SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
* AccountName = "examplebatchaccount",
* ResourceGroupName = "example",
* });
* return new Dictionary
* {
* ["thumbprint"] = example.Apply(getCertificateResult => getCertificateResult.Thumbprint),
* };
* });
* ```
* ```go
* 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.LookupCertificate(ctx, &batch.LookupCertificateArgs{
* Name: "SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA",
* AccountName: "examplebatchaccount",
* ResourceGroupName: "example",
* }, nil)
* if err != nil {
* return err
* }
* ctx.Export("thumbprint", example.Thumbprint)
* return nil
* })
* }
* ```
* ```java
* 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.GetCertificateArgs;
* 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.getCertificate(GetCertificateArgs.builder()
* .name("SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA")
* .accountName("examplebatchaccount")
* .resourceGroupName("example")
* .build());
* ctx.export("thumbprint", example.applyValue(getCertificateResult -> getCertificateResult.thumbprint()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:batch:getCertificate
* Arguments:
* name: SHA1-42C107874FD0E4A9583292A2F1098E8FE4B2EDDA
* accountName: examplebatchaccount
* resourceGroupName: example
* outputs:
* thumbprint: ${example.thumbprint}
* ```
*
* @param argument A collection of arguments for invoking getCertificate.
* @return A collection of values returned by getCertificate.
*/
public suspend fun getCertificate(argument: GetCertificatePlainArgs): GetCertificateResult =
getCertificateResultToKotlin(getCertificatePlain(argument.toJava()).await())
/**
* @see [getCertificate].
* @param accountName The name of the Batch account.
* @param name The name of the Batch certificate.
* @param resourceGroupName The Name of the Resource Group where this Batch account exists.
* @return A collection of values returned by getCertificate.
*/
public suspend fun getCertificate(
accountName: String,
name: String,
resourceGroupName: String,
): GetCertificateResult {
val argument = GetCertificatePlainArgs(
accountName = accountName,
name = name,
resourceGroupName = resourceGroupName,
)
return getCertificateResultToKotlin(getCertificatePlain(argument.toJava()).await())
}
/**
* @see [getCertificate].
* @param argument Builder for [com.pulumi.azure.batch.kotlin.inputs.GetCertificatePlainArgs].
* @return A collection of values returned by getCertificate.
*/
public suspend fun getCertificate(argument: suspend GetCertificatePlainArgsBuilder.() -> Unit):
GetCertificateResult {
val builder = GetCertificatePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getCertificateResultToKotlin(getCertificatePlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing Batch pool
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.batch.getPool({
* name: "testbatchpool",
* accountName: "testbatchaccount",
* resourceGroupName: "test",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.batch.get_pool(name="testbatchpool",
* account_name="testbatchaccount",
* resource_group_name="test")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Batch.GetPool.Invoke(new()
* {
* Name = "testbatchpool",
* AccountName = "testbatchaccount",
* ResourceGroupName = "test",
* });
* });
* ```
* ```go
* 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 {
* _, err := batch.LookupPool(ctx, &batch.LookupPoolArgs{
* Name: "testbatchpool",
* AccountName: "testbatchaccount",
* ResourceGroupName: "test",
* }, nil)
* 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.batch.BatchFunctions;
* import com.pulumi.azure.batch.inputs.GetPoolArgs;
* 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.getPool(GetPoolArgs.builder()
* .name("testbatchpool")
* .accountName("testbatchaccount")
* .resourceGroupName("test")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:batch:getPool
* Arguments:
* name: testbatchpool
* accountName: testbatchaccount
* resourceGroupName: test
* ```
*
* @param argument A collection of arguments for invoking getPool.
* @return A collection of values returned by getPool.
*/
public suspend fun getPool(argument: GetPoolPlainArgs): GetPoolResult =
getPoolResultToKotlin(getPoolPlain(argument.toJava()).await())
/**
* @see [getPool].
* @param accountName The Azure Storage Account name.
* @param name The name of the user account.
* @param resourceGroupName
* @return A collection of values returned by getPool.
*/
public suspend fun getPool(
accountName: String,
name: String,
resourceGroupName: String,
): GetPoolResult {
val argument = GetPoolPlainArgs(
accountName = accountName,
name = name,
resourceGroupName = resourceGroupName,
)
return getPoolResultToKotlin(getPoolPlain(argument.toJava()).await())
}
/**
* @see [getPool].
* @param argument Builder for [com.pulumi.azure.batch.kotlin.inputs.GetPoolPlainArgs].
* @return A collection of values returned by getPool.
*/
public suspend fun getPool(argument: suspend GetPoolPlainArgsBuilder.() -> Unit): GetPoolResult {
val builder = GetPoolPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getPoolResultToKotlin(getPoolPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy