All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.backupdisasterrecovery.kotlin.BackupdisasterrecoveryFunctions.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.13.1.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.backupdisasterrecovery.kotlin

import com.pulumi.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions.getBackupPlain
import com.pulumi.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions.getBackupPlanAssociationPlain
import com.pulumi.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions.getBackupPlanPlain
import com.pulumi.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions.getBackupVaultPlain
import com.pulumi.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions.getDataSourcePlain
import com.pulumi.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions.getManagementServerPlain
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupPlainArgs
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupPlainArgsBuilder
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupPlanAssociationPlainArgs
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupPlanAssociationPlainArgsBuilder
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupPlanPlainArgs
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupPlanPlainArgsBuilder
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupVaultPlainArgs
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupVaultPlainArgsBuilder
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetDataSourcePlainArgs
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetDataSourcePlainArgsBuilder
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetManagementServerPlainArgs
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetManagementServerPlainArgsBuilder
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetBackupPlanAssociationResult
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetBackupPlanResult
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetBackupResult
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetBackupVaultResult
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetDataSourceResult
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetManagementServerResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetBackupPlanAssociationResult.Companion.toKotlin as getBackupPlanAssociationResultToKotlin
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetBackupPlanResult.Companion.toKotlin as getBackupPlanResultToKotlin
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetBackupResult.Companion.toKotlin as getBackupResultToKotlin
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetBackupVaultResult.Companion.toKotlin as getBackupVaultResultToKotlin
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetDataSourceResult.Companion.toKotlin as getDataSourceResultToKotlin
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetManagementServerResult.Companion.toKotlin as getManagementServerResultToKotlin

public object BackupdisasterrecoveryFunctions {
    /**
     *
     * @param argument A collection of arguments for invoking getBackup.
     * @return A collection of values returned by getBackup.
     */
    public suspend fun getBackup(argument: GetBackupPlainArgs): GetBackupResult =
        getBackupResultToKotlin(getBackupPlain(argument.toJava()).await())

    /**
     * @see [getBackup].
     * @param backupVaultId
     * @param dataSourceId
     * @param location
     * @param project
     * @return A collection of values returned by getBackup.
     */
    public suspend fun getBackup(
        backupVaultId: String,
        dataSourceId: String,
        location: String,
        project: String,
    ): GetBackupResult {
        val argument = GetBackupPlainArgs(
            backupVaultId = backupVaultId,
            dataSourceId = dataSourceId,
            location = location,
            project = project,
        )
        return getBackupResultToKotlin(getBackupPlain(argument.toJava()).await())
    }

    /**
     * @see [getBackup].
     * @param argument Builder for [com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupPlainArgs].
     * @return A collection of values returned by getBackup.
     */
    public suspend fun getBackup(argument: suspend GetBackupPlainArgsBuilder.() -> Unit): GetBackupResult {
        val builder = GetBackupPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getBackupResultToKotlin(getBackupPlain(builtArgument.toJava()).await())
    }

    /**
     *
     * @param argument A collection of arguments for invoking getBackupPlan.
     * @return A collection of values returned by getBackupPlan.
     */
    public suspend fun getBackupPlan(argument: GetBackupPlanPlainArgs): GetBackupPlanResult =
        getBackupPlanResultToKotlin(getBackupPlanPlain(argument.toJava()).await())

    /**
     * @see [getBackupPlan].
     * @param backupPlanId
     * @param location
     * @param project
     * @return A collection of values returned by getBackupPlan.
     */
    public suspend fun getBackupPlan(
        backupPlanId: String,
        location: String,
        project: String? = null,
    ): GetBackupPlanResult {
        val argument = GetBackupPlanPlainArgs(
            backupPlanId = backupPlanId,
            location = location,
            project = project,
        )
        return getBackupPlanResultToKotlin(getBackupPlanPlain(argument.toJava()).await())
    }

    /**
     * @see [getBackupPlan].
     * @param argument Builder for [com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupPlanPlainArgs].
     * @return A collection of values returned by getBackupPlan.
     */
    public suspend fun getBackupPlan(argument: suspend GetBackupPlanPlainArgsBuilder.() -> Unit): GetBackupPlanResult {
        val builder = GetBackupPlanPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getBackupPlanResultToKotlin(getBackupPlanPlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const my-backupplan-association = gcp.backupdisasterrecovery.getBackupPlanAssociation({
     *     location: "us-central1",
     *     backupPlanAssociationId: "bpa-id",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * my_backupplan_association = gcp.backupdisasterrecovery.get_backup_plan_association(location="us-central1",
     *     backup_plan_association_id="bpa-id")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var my_backupplan_association = Gcp.BackupDisasterRecovery.GetBackupPlanAssociation.Invoke(new()
     *     {
     *         Location = "us-central1",
     *         BackupPlanAssociationId = "bpa-id",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/backupdisasterrecovery"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := backupdisasterrecovery.LookupBackupPlanAssociation(ctx, &backupdisasterrecovery.LookupBackupPlanAssociationArgs{
     * 			Location:                "us-central1",
     * 			BackupPlanAssociationId: "bpa-id",
     * 		}, 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.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions;
     * import com.pulumi.gcp.backupdisasterrecovery.inputs.GetBackupPlanAssociationArgs;
     * 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 my-backupplan-association = BackupdisasterrecoveryFunctions.getBackupPlanAssociation(GetBackupPlanAssociationArgs.builder()
     *             .location("us-central1")
     *             .backupPlanAssociationId("bpa-id")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   my-backupplan-association:
     *     fn::invoke:
     *       function: gcp:backupdisasterrecovery:getBackupPlanAssociation
     *       arguments:
     *         location: us-central1
     *         backupPlanAssociationId: bpa-id
     * ```
     * 
     * @param argument A collection of arguments for invoking getBackupPlanAssociation.
     * @return A collection of values returned by getBackupPlanAssociation.
     */
    public suspend fun getBackupPlanAssociation(argument: GetBackupPlanAssociationPlainArgs): GetBackupPlanAssociationResult =
        getBackupPlanAssociationResultToKotlin(getBackupPlanAssociationPlain(argument.toJava()).await())

    /**
     * @see [getBackupPlanAssociation].
     * @param backupPlanAssociationId The id of Backupplan association resource.
     * - - -
     * @param location The location in which the Backupplan association resource belongs.
     * @param project
     * @return A collection of values returned by getBackupPlanAssociation.
     */
    public suspend fun getBackupPlanAssociation(
        backupPlanAssociationId: String,
        location: String,
        project: String? = null,
    ): GetBackupPlanAssociationResult {
        val argument = GetBackupPlanAssociationPlainArgs(
            backupPlanAssociationId = backupPlanAssociationId,
            location = location,
            project = project,
        )
        return getBackupPlanAssociationResultToKotlin(getBackupPlanAssociationPlain(argument.toJava()).await())
    }

    /**
     * @see [getBackupPlanAssociation].
     * @param argument Builder for [com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupPlanAssociationPlainArgs].
     * @return A collection of values returned by getBackupPlanAssociation.
     */
    public suspend fun getBackupPlanAssociation(argument: suspend GetBackupPlanAssociationPlainArgsBuilder.() -> Unit): GetBackupPlanAssociationResult {
        val builder = GetBackupPlanAssociationPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getBackupPlanAssociationResultToKotlin(getBackupPlanAssociationPlain(builtArgument.toJava()).await())
    }

    /**
     * A Backup and DRBackupVault.
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const my-backup-vault = gcp.backupdisasterrecovery.getBackupVault({
     *     location: "us-central1",
     *     backupVaultId: "bv-1",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * my_backup_vault = gcp.backupdisasterrecovery.get_backup_vault(location="us-central1",
     *     backup_vault_id="bv-1")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var my_backup_vault = Gcp.BackupDisasterRecovery.GetBackupVault.Invoke(new()
     *     {
     *         Location = "us-central1",
     *         BackupVaultId = "bv-1",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/backupdisasterrecovery"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := backupdisasterrecovery.LookupBackupVault(ctx, &backupdisasterrecovery.LookupBackupVaultArgs{
     * 			Location:      "us-central1",
     * 			BackupVaultId: "bv-1",
     * 		}, 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.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions;
     * import com.pulumi.gcp.backupdisasterrecovery.inputs.GetBackupVaultArgs;
     * 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 my-backup-vault = BackupdisasterrecoveryFunctions.getBackupVault(GetBackupVaultArgs.builder()
     *             .location("us-central1")
     *             .backupVaultId("bv-1")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   my-backup-vault:
     *     fn::invoke:
     *       function: gcp:backupdisasterrecovery:getBackupVault
     *       arguments:
     *         location: us-central1
     *         backupVaultId: bv-1
     * ```
     * 
     * @param argument A collection of arguments for invoking getBackupVault.
     * @return A collection of values returned by getBackupVault.
     */
    public suspend fun getBackupVault(argument: GetBackupVaultPlainArgs): GetBackupVaultResult =
        getBackupVaultResultToKotlin(getBackupVaultPlain(argument.toJava()).await())

    /**
     * @see [getBackupVault].
     * @param backupVaultId The id of Backup Vault resource.
     * - - -
     * @param location The location in which the Backup Vault resource belongs.
     * @param project The project in which the resource belongs. If it
     * is not provided, the provider project is used.
     * @return A collection of values returned by getBackupVault.
     */
    public suspend fun getBackupVault(
        backupVaultId: String,
        location: String,
        project: String? = null,
    ): GetBackupVaultResult {
        val argument = GetBackupVaultPlainArgs(
            backupVaultId = backupVaultId,
            location = location,
            project = project,
        )
        return getBackupVaultResultToKotlin(getBackupVaultPlain(argument.toJava()).await())
    }

    /**
     * @see [getBackupVault].
     * @param argument Builder for [com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetBackupVaultPlainArgs].
     * @return A collection of values returned by getBackupVault.
     */
    public suspend fun getBackupVault(argument: suspend GetBackupVaultPlainArgsBuilder.() -> Unit): GetBackupVaultResult {
        val builder = GetBackupVaultPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getBackupVaultResultToKotlin(getBackupVaultPlain(builtArgument.toJava()).await())
    }

    /**
     *
     * @param argument A collection of arguments for invoking getDataSource.
     * @return A collection of values returned by getDataSource.
     */
    public suspend fun getDataSource(argument: GetDataSourcePlainArgs): GetDataSourceResult =
        getDataSourceResultToKotlin(getDataSourcePlain(argument.toJava()).await())

    /**
     * @see [getDataSource].
     * @param backupVaultId
     * @param dataSourceId
     * @param location
     * @param project
     * @return A collection of values returned by getDataSource.
     */
    public suspend fun getDataSource(
        backupVaultId: String,
        dataSourceId: String,
        location: String,
        project: String,
    ): GetDataSourceResult {
        val argument = GetDataSourcePlainArgs(
            backupVaultId = backupVaultId,
            dataSourceId = dataSourceId,
            location = location,
            project = project,
        )
        return getDataSourceResultToKotlin(getDataSourcePlain(argument.toJava()).await())
    }

    /**
     * @see [getDataSource].
     * @param argument Builder for [com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetDataSourcePlainArgs].
     * @return A collection of values returned by getDataSource.
     */
    public suspend fun getDataSource(argument: suspend GetDataSourcePlainArgsBuilder.() -> Unit): GetDataSourceResult {
        val builder = GetDataSourcePlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getDataSourceResultToKotlin(getDataSourcePlain(builtArgument.toJava()).await())
    }

    /**
     * ## Example Usage
     * 
     * ```typescript
     * import * as pulumi from "@pulumi/pulumi";
     * import * as gcp from "@pulumi/gcp";
     * const my-backup-dr-management-server = gcp.backupdisasterrecovery.getManagementServer({
     *     location: "us-central1",
     * });
     * ```
     * ```python
     * import pulumi
     * import pulumi_gcp as gcp
     * my_backup_dr_management_server = gcp.backupdisasterrecovery.get_management_server(location="us-central1")
     * ```
     * ```csharp
     * using System.Collections.Generic;
     * using System.Linq;
     * using Pulumi;
     * using Gcp = Pulumi.Gcp;
     * return await Deployment.RunAsync(() =>
     * {
     *     var my_backup_dr_management_server = Gcp.BackupDisasterRecovery.GetManagementServer.Invoke(new()
     *     {
     *         Location = "us-central1",
     *     });
     * });
     * ```
     * ```go
     * package main
     * import (
     * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/backupdisasterrecovery"
     * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
     * )
     * func main() {
     * 	pulumi.Run(func(ctx *pulumi.Context) error {
     * 		_, err := backupdisasterrecovery.LookupManagementServer(ctx, &backupdisasterrecovery.LookupManagementServerArgs{
     * 			Location: "us-central1",
     * 		}, 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.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions;
     * import com.pulumi.gcp.backupdisasterrecovery.inputs.GetManagementServerArgs;
     * 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 my-backup-dr-management-server = BackupdisasterrecoveryFunctions.getManagementServer(GetManagementServerArgs.builder()
     *             .location("us-central1")
     *             .build());
     *     }
     * }
     * ```
     * ```yaml
     * variables:
     *   my-backup-dr-management-server:
     *     fn::invoke:
     *       function: gcp:backupdisasterrecovery:getManagementServer
     *       arguments:
     *         location: us-central1
     * ```
     * 
     * @param argument A collection of arguments for invoking getManagementServer.
     * @return A collection of values returned by getManagementServer.
     */
    public suspend fun getManagementServer(argument: GetManagementServerPlainArgs): GetManagementServerResult =
        getManagementServerResultToKotlin(getManagementServerPlain(argument.toJava()).await())

    /**
     * @see [getManagementServer].
     * @param location
     * @return A collection of values returned by getManagementServer.
     */
    public suspend fun getManagementServer(location: String): GetManagementServerResult {
        val argument = GetManagementServerPlainArgs(
            location = location,
        )
        return getManagementServerResultToKotlin(getManagementServerPlain(argument.toJava()).await())
    }

    /**
     * @see [getManagementServer].
     * @param argument Builder for [com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetManagementServerPlainArgs].
     * @return A collection of values returned by getManagementServer.
     */
    public suspend fun getManagementServer(argument: suspend GetManagementServerPlainArgsBuilder.() -> Unit): GetManagementServerResult {
        val builder = GetManagementServerPlainArgsBuilder()
        builder.argument()
        val builtArgument = builder.build()
        return getManagementServerResultToKotlin(getManagementServerPlain(builtArgument.toJava()).await())
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy