com.pulumi.azure.avs.kotlin.AvsFunctions.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.avs.kotlin
import com.pulumi.azure.avs.AvsFunctions.getPrivateCloudPlain
import com.pulumi.azure.avs.kotlin.inputs.GetPrivateCloudPlainArgs
import com.pulumi.azure.avs.kotlin.inputs.GetPrivateCloudPlainArgsBuilder
import com.pulumi.azure.avs.kotlin.outputs.GetPrivateCloudResult
import com.pulumi.azure.avs.kotlin.outputs.GetPrivateCloudResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
public object AvsFunctions {
/**
* Use this data source to access information about an existing Azure VMware Solution Private Cloud.
* ## Example Usage
* > **NOTE :** Normal `pulumi up` could ignore this note. Please disable correlation request id for continuous operations in one build (like acctest). The continuous operations like `update` or `delete` could not be triggered when it shares the same `correlation-id` with its previous operation.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.avs.getPrivateCloud({
* name: "existing-vmware-private-cloud",
* resourceGroupName: "existing-resgroup",
* });
* export const id = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.avs.get_private_cloud(name="existing-vmware-private-cloud",
* resource_group_name="existing-resgroup")
* pulumi.export("id", example.id)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Avs.GetPrivateCloud.Invoke(new()
* {
* Name = "existing-vmware-private-cloud",
* ResourceGroupName = "existing-resgroup",
* });
* return new Dictionary
* {
* ["id"] = example.Apply(getPrivateCloudResult => getPrivateCloudResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/avs"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := avs.LookupPrivateCloud(ctx, &avs.LookupPrivateCloudArgs{
* Name: "existing-vmware-private-cloud",
* ResourceGroupName: "existing-resgroup",
* }, nil)
* if err != nil {
* return err
* }
* ctx.Export("id", 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.avs.AvsFunctions;
* import com.pulumi.azure.avs.inputs.GetPrivateCloudArgs;
* 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 = AvsFunctions.getPrivateCloud(GetPrivateCloudArgs.builder()
* .name("existing-vmware-private-cloud")
* .resourceGroupName("existing-resgroup")
* .build());
* ctx.export("id", example.applyValue(getPrivateCloudResult -> getPrivateCloudResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:avs:getPrivateCloud
* Arguments:
* name: existing-vmware-private-cloud
* resourceGroupName: existing-resgroup
* outputs:
* id: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getPrivateCloud.
* @return A collection of values returned by getPrivateCloud.
*/
public suspend fun getPrivateCloud(argument: GetPrivateCloudPlainArgs): GetPrivateCloudResult =
toKotlin(getPrivateCloudPlain(argument.toJava()).await())
/**
* @see [getPrivateCloud].
* @param name The name of this Azure VMware Solution Private Cloud.
* @param resourceGroupName The name of the Resource Group where the Azure VMware Solution Private Cloud exists.
* @return A collection of values returned by getPrivateCloud.
*/
public suspend fun getPrivateCloud(name: String, resourceGroupName: String):
GetPrivateCloudResult {
val argument = GetPrivateCloudPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return toKotlin(getPrivateCloudPlain(argument.toJava()).await())
}
/**
* @see [getPrivateCloud].
* @param argument Builder for [com.pulumi.azure.avs.kotlin.inputs.GetPrivateCloudPlainArgs].
* @return A collection of values returned by getPrivateCloud.
*/
public suspend fun getPrivateCloud(argument: suspend GetPrivateCloudPlainArgsBuilder.() -> Unit):
GetPrivateCloudResult {
val builder = GetPrivateCloudPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return toKotlin(getPrivateCloudPlain(builtArgument.toJava()).await())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy