com.pulumi.azure.recoveryservices.kotlin.RecoveryservicesFunctions.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.recoveryservices.kotlin
import com.pulumi.azure.recoveryservices.RecoveryservicesFunctions.getVaultPlain
import com.pulumi.azure.recoveryservices.kotlin.inputs.GetVaultPlainArgs
import com.pulumi.azure.recoveryservices.kotlin.inputs.GetVaultPlainArgsBuilder
import com.pulumi.azure.recoveryservices.kotlin.outputs.GetVaultResult
import com.pulumi.azure.recoveryservices.kotlin.outputs.GetVaultResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
public object RecoveryservicesFunctions {
/**
* Use this data source to access information about an existing Recovery Services Vault.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const vault = azure.recoveryservices.getVault({
* name: "tfex-recovery_vault",
* resourceGroupName: "tfex-resource_group",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* vault = azure.recoveryservices.get_vault(name="tfex-recovery_vault",
* resource_group_name="tfex-resource_group")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var vault = Azure.RecoveryServices.GetVault.Invoke(new()
* {
* Name = "tfex-recovery_vault",
* ResourceGroupName = "tfex-resource_group",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/recoveryservices"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := recoveryservices.LookupVault(ctx, &recoveryservices.LookupVaultArgs{
* Name: "tfex-recovery_vault",
* ResourceGroupName: "tfex-resource_group",
* }, 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.recoveryservices.RecoveryservicesFunctions;
* import com.pulumi.azure.recoveryservices.inputs.GetVaultArgs;
* 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 vault = RecoveryservicesFunctions.getVault(GetVaultArgs.builder()
* .name("tfex-recovery_vault")
* .resourceGroupName("tfex-resource_group")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* vault:
* fn::invoke:
* Function: azure:recoveryservices:getVault
* Arguments:
* name: tfex-recovery_vault
* resourceGroupName: tfex-resource_group
* ```
*
* @param argument A collection of arguments for invoking getVault.
* @return A collection of values returned by getVault.
*/
public suspend fun getVault(argument: GetVaultPlainArgs): GetVaultResult =
toKotlin(getVaultPlain(argument.toJava()).await())
/**
* @see [getVault].
* @param name Specifies the name of the Recovery Services Vault.
* @param resourceGroupName The name of the resource group in which the Recovery Services Vault resides.
* @return A collection of values returned by getVault.
*/
public suspend fun getVault(name: String, resourceGroupName: String): GetVaultResult {
val argument = GetVaultPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return toKotlin(getVaultPlain(argument.toJava()).await())
}
/**
* @see [getVault].
* @param argument Builder for [com.pulumi.azure.recoveryservices.kotlin.inputs.GetVaultPlainArgs].
* @return A collection of values returned by getVault.
*/
public suspend fun getVault(argument: suspend GetVaultPlainArgsBuilder.() -> Unit):
GetVaultResult {
val builder = GetVaultPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return toKotlin(getVaultPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy