
com.pulumi.azure.databoxedge.kotlin.DataboxedgeFunctions.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.databoxedge.kotlin
import com.pulumi.azure.databoxedge.DataboxedgeFunctions.getDevicePlain
import com.pulumi.azure.databoxedge.kotlin.inputs.GetDevicePlainArgs
import com.pulumi.azure.databoxedge.kotlin.inputs.GetDevicePlainArgsBuilder
import com.pulumi.azure.databoxedge.kotlin.outputs.GetDeviceResult
import com.pulumi.azure.databoxedge.kotlin.outputs.GetDeviceResult.Companion.toKotlin
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
public object DataboxedgeFunctions {
/**
* Get information about a Databox Edge Device.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.databoxedge.getDevice({
* name: "example-device",
* resourceGroupName: "example-rg",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.databoxedge.get_device(name="example-device",
* resource_group_name="example-rg")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.DataboxEdge.GetDevice.Invoke(new()
* {
* Name = "example-device",
* ResourceGroupName = "example-rg",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/databoxedge"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := databoxedge.LookupDevice(ctx, &databoxedge.LookupDeviceArgs{
* Name: "example-device",
* ResourceGroupName: "example-rg",
* }, 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.databoxedge.DataboxedgeFunctions;
* import com.pulumi.azure.databoxedge.inputs.GetDeviceArgs;
* 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 = DataboxedgeFunctions.getDevice(GetDeviceArgs.builder()
* .name("example-device")
* .resourceGroupName("example-rg")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:databoxedge:getDevice
* Arguments:
* name: example-device
* resourceGroupName: example-rg
* ```
*
* @param argument A collection of arguments for invoking getDevice.
* @return A collection of values returned by getDevice.
*/
public suspend fun getDevice(argument: GetDevicePlainArgs): GetDeviceResult =
toKotlin(getDevicePlain(argument.toJava()).await())
/**
* @see [getDevice].
* @param name The name which should be used for this Databox Edge Device. Changing this forces a new Databox Edge Device to be created.
* @param resourceGroupName The name of the Resource Group where the Databox Edge Device should exist. Changing this forces a new Databox Edge Device to be created.
* @return A collection of values returned by getDevice.
*/
public suspend fun getDevice(name: String, resourceGroupName: String): GetDeviceResult {
val argument = GetDevicePlainArgs(
name = name,
resourceGroupName = resourceGroupName,
)
return toKotlin(getDevicePlain(argument.toJava()).await())
}
/**
* @see [getDevice].
* @param argument Builder for [com.pulumi.azure.databoxedge.kotlin.inputs.GetDevicePlainArgs].
* @return A collection of values returned by getDevice.
*/
public suspend fun getDevice(argument: suspend GetDevicePlainArgsBuilder.() -> Unit):
GetDeviceResult {
val builder = GetDevicePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return toKotlin(getDevicePlain(builtArgument.toJava()).await())
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy