com.pulumi.gcp.backupdisasterrecovery.kotlin.BackupdisasterrecoveryFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.gcp.backupdisasterrecovery.kotlin
import com.pulumi.gcp.backupdisasterrecovery.BackupdisasterrecoveryFunctions.getManagementServerPlain
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetManagementServerPlainArgs
import com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.GetManagementServerPlainArgsBuilder
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetManagementServerResult
import com.pulumi.gcp.backupdisasterrecovery.kotlin.outputs.GetManagementServerResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
public object BackupdisasterrecoveryFunctions {
/**
* ## 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/v7/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 = toKotlin(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 toKotlin(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 toKotlin(getManagementServerPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy