com.pulumi.azure.arc.kotlin.ArcFunctions.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.arc.kotlin
import com.pulumi.azure.arc.ArcFunctions.getResourceBridgeAppliancePlain
import com.pulumi.azure.arc.kotlin.inputs.GetResourceBridgeAppliancePlainArgs
import com.pulumi.azure.arc.kotlin.inputs.GetResourceBridgeAppliancePlainArgsBuilder
import com.pulumi.azure.arc.kotlin.outputs.GetResourceBridgeApplianceResult
import com.pulumi.azure.arc.kotlin.outputs.GetResourceBridgeApplianceResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
public object ArcFunctions {
/**
* Use this data source to access information about an existing Arc Resource Bridge Appliance.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.arc.getResourceBridgeAppliance({
* name: "existing",
* resourceGroupName: "existing",
* });
* export const id = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.arc.get_resource_bridge_appliance(name="existing",
* resource_group_name="existing")
* 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.Arc.GetResourceBridgeAppliance.Invoke(new()
* {
* Name = "existing",
* ResourceGroupName = "existing",
* });
* return new Dictionary
* {
* ["id"] = example.Apply(getResourceBridgeApplianceResult => getResourceBridgeApplianceResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/arc"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := arc.LookupResourceBridgeAppliance(ctx, &arc.LookupResourceBridgeApplianceArgs{
* Name: "existing",
* ResourceGroupName: "existing",
* }, 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.arc.ArcFunctions;
* import com.pulumi.azure.arc.inputs.GetResourceBridgeApplianceArgs;
* 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 = ArcFunctions.getResourceBridgeAppliance(GetResourceBridgeApplianceArgs.builder()
* .name("existing")
* .resourceGroupName("existing")
* .build());
* ctx.export("id", example.applyValue(getResourceBridgeApplianceResult -> getResourceBridgeApplianceResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:arc:getResourceBridgeAppliance
* Arguments:
* name: existing
* resourceGroupName: existing
* outputs:
* id: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getResourceBridgeAppliance.
* @return A collection of values returned by getResourceBridgeAppliance.
*/
public suspend fun getResourceBridgeAppliance(argument: GetResourceBridgeAppliancePlainArgs): GetResourceBridgeApplianceResult =
toKotlin(getResourceBridgeAppliancePlain(argument.toJava()).await())
/**
* @see [getResourceBridgeAppliance].
* @param name The name of this Arc Resource Bridge Appliance.
* @param resourceGroupName The name of the Resource Group where the Arc Resource Bridge Appliance exists.
* @return A collection of values returned by getResourceBridgeAppliance.
*/
public suspend fun getResourceBridgeAppliance(name: String, resourceGroupName: String): GetResourceBridgeApplianceResult {
val argument = GetResourceBridgeAppliancePlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return toKotlin(getResourceBridgeAppliancePlain(argument.toJava()).await())
}
/**
* @see [getResourceBridgeAppliance].
* @param argument Builder for [com.pulumi.azure.arc.kotlin.inputs.GetResourceBridgeAppliancePlainArgs].
* @return A collection of values returned by getResourceBridgeAppliance.
*/
public suspend fun getResourceBridgeAppliance(argument: suspend GetResourceBridgeAppliancePlainArgsBuilder.() -> Unit): GetResourceBridgeApplianceResult {
val builder = GetResourceBridgeAppliancePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return toKotlin(getResourceBridgeAppliancePlain(builtArgument.toJava()).await())
}
}