com.pulumi.azure.backup.kotlin.BackupFunctions.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.backup.kotlin
import com.pulumi.azure.backup.BackupFunctions.getPolicyFilesharePlain
import com.pulumi.azure.backup.BackupFunctions.getPolicyVMPlain
import com.pulumi.azure.backup.kotlin.inputs.GetPolicyFilesharePlainArgs
import com.pulumi.azure.backup.kotlin.inputs.GetPolicyFilesharePlainArgsBuilder
import com.pulumi.azure.backup.kotlin.inputs.GetPolicyVMPlainArgs
import com.pulumi.azure.backup.kotlin.inputs.GetPolicyVMPlainArgsBuilder
import com.pulumi.azure.backup.kotlin.outputs.GetPolicyFileshareResult
import com.pulumi.azure.backup.kotlin.outputs.GetPolicyVMResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.azure.backup.kotlin.outputs.GetPolicyFileshareResult.Companion.toKotlin as getPolicyFileshareResultToKotlin
import com.pulumi.azure.backup.kotlin.outputs.GetPolicyVMResult.Companion.toKotlin as getPolicyVMResultToKotlin
public object BackupFunctions {
/**
* Use this data source to access information about an existing File Share Backup Policy.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const policy = azure.backup.getPolicyFileshare({
* name: "policy",
* recoveryVaultName: "recovery_vault",
* resourceGroupName: "resource_group",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* policy = azure.backup.get_policy_fileshare(name="policy",
* recovery_vault_name="recovery_vault",
* resource_group_name="resource_group")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var policy = Azure.Backup.GetPolicyFileshare.Invoke(new()
* {
* Name = "policy",
* RecoveryVaultName = "recovery_vault",
* ResourceGroupName = "resource_group",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/backup"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := backup.GetPolicyFileshare(ctx, &backup.GetPolicyFileshareArgs{
* Name: "policy",
* RecoveryVaultName: "recovery_vault",
* ResourceGroupName: "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.backup.BackupFunctions;
* import com.pulumi.azure.backup.inputs.GetPolicyFileshareArgs;
* 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 policy = BackupFunctions.getPolicyFileshare(GetPolicyFileshareArgs.builder()
* .name("policy")
* .recoveryVaultName("recovery_vault")
* .resourceGroupName("resource_group")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* policy:
* fn::invoke:
* Function: azure:backup:getPolicyFileshare
* Arguments:
* name: policy
* recoveryVaultName: recovery_vault
* resourceGroupName: resource_group
* ```
*
* @param argument A collection of arguments for invoking getPolicyFileshare.
* @return A collection of values returned by getPolicyFileshare.
*/
public suspend fun getPolicyFileshare(argument: GetPolicyFilesharePlainArgs):
GetPolicyFileshareResult =
getPolicyFileshareResultToKotlin(getPolicyFilesharePlain(argument.toJava()).await())
/**
* @see [getPolicyFileshare].
* @param name Specifies the name of the File Share Backup Policy.
* @param recoveryVaultName Specifies the name of the Recovery Services Vault.
* @param resourceGroupName The name of the resource group in which the File Share Backup Policy resides.
* @return A collection of values returned by getPolicyFileshare.
*/
public suspend fun getPolicyFileshare(
name: String,
recoveryVaultName: String,
resourceGroupName: String,
): GetPolicyFileshareResult {
val argument = GetPolicyFilesharePlainArgs(
name = name,
recoveryVaultName = recoveryVaultName,
resourceGroupName = resourceGroupName,
)
return getPolicyFileshareResultToKotlin(getPolicyFilesharePlain(argument.toJava()).await())
}
/**
* @see [getPolicyFileshare].
* @param argument Builder for [com.pulumi.azure.backup.kotlin.inputs.GetPolicyFilesharePlainArgs].
* @return A collection of values returned by getPolicyFileshare.
*/
public suspend
fun getPolicyFileshare(argument: suspend GetPolicyFilesharePlainArgsBuilder.() -> Unit):
GetPolicyFileshareResult {
val builder = GetPolicyFilesharePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getPolicyFileshareResultToKotlin(getPolicyFilesharePlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing VM Backup Policy.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const policy = azure.backup.getPolicyVM({
* name: "policy",
* recoveryVaultName: "recovery_vault",
* resourceGroupName: "resource_group",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* policy = azure.backup.get_policy_vm(name="policy",
* recovery_vault_name="recovery_vault",
* resource_group_name="resource_group")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var policy = Azure.Backup.GetPolicyVM.Invoke(new()
* {
* Name = "policy",
* RecoveryVaultName = "recovery_vault",
* ResourceGroupName = "resource_group",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/backup"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := backup.LookupPolicyVM(ctx, &backup.LookupPolicyVMArgs{
* Name: "policy",
* RecoveryVaultName: "recovery_vault",
* ResourceGroupName: "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.backup.BackupFunctions;
* import com.pulumi.azure.backup.inputs.GetPolicyVMArgs;
* 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 policy = BackupFunctions.getPolicyVM(GetPolicyVMArgs.builder()
* .name("policy")
* .recoveryVaultName("recovery_vault")
* .resourceGroupName("resource_group")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* policy:
* fn::invoke:
* Function: azure:backup:getPolicyVM
* Arguments:
* name: policy
* recoveryVaultName: recovery_vault
* resourceGroupName: resource_group
* ```
*
* @param argument A collection of arguments for invoking getPolicyVM.
* @return A collection of values returned by getPolicyVM.
*/
public suspend fun getPolicyVM(argument: GetPolicyVMPlainArgs): GetPolicyVMResult =
getPolicyVMResultToKotlin(getPolicyVMPlain(argument.toJava()).await())
/**
* @see [getPolicyVM].
* @param name Specifies the name of the VM Backup Policy.
* @param recoveryVaultName Specifies the name of the Recovery Services Vault.
* @param resourceGroupName The name of the resource group in which the VM Backup Policy resides.
* @return A collection of values returned by getPolicyVM.
*/
public suspend fun getPolicyVM(
name: String,
recoveryVaultName: String,
resourceGroupName: String,
): GetPolicyVMResult {
val argument = GetPolicyVMPlainArgs(
name = name,
recoveryVaultName = recoveryVaultName,
resourceGroupName = resourceGroupName,
)
return getPolicyVMResultToKotlin(getPolicyVMPlain(argument.toJava()).await())
}
/**
* @see [getPolicyVM].
* @param argument Builder for [com.pulumi.azure.backup.kotlin.inputs.GetPolicyVMPlainArgs].
* @return A collection of values returned by getPolicyVM.
*/
public suspend fun getPolicyVM(argument: suspend GetPolicyVMPlainArgsBuilder.() -> Unit):
GetPolicyVMResult {
val builder = GetPolicyVMPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getPolicyVMResultToKotlin(getPolicyVMPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy