Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.iot.kotlin.IotFunctions.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.iot.kotlin
import com.pulumi.azure.iot.IotFunctions.getDpsPlain
import com.pulumi.azure.iot.IotFunctions.getDpsSharedAccessPolicyPlain
import com.pulumi.azure.iot.IotFunctions.getIotHubPlain
import com.pulumi.azure.iot.IotFunctions.getSharedAccessPolicyPlain
import com.pulumi.azure.iot.kotlin.inputs.GetDpsPlainArgs
import com.pulumi.azure.iot.kotlin.inputs.GetDpsPlainArgsBuilder
import com.pulumi.azure.iot.kotlin.inputs.GetDpsSharedAccessPolicyPlainArgs
import com.pulumi.azure.iot.kotlin.inputs.GetDpsSharedAccessPolicyPlainArgsBuilder
import com.pulumi.azure.iot.kotlin.inputs.GetIotHubPlainArgs
import com.pulumi.azure.iot.kotlin.inputs.GetIotHubPlainArgsBuilder
import com.pulumi.azure.iot.kotlin.inputs.GetSharedAccessPolicyPlainArgs
import com.pulumi.azure.iot.kotlin.inputs.GetSharedAccessPolicyPlainArgsBuilder
import com.pulumi.azure.iot.kotlin.outputs.GetDpsResult
import com.pulumi.azure.iot.kotlin.outputs.GetDpsSharedAccessPolicyResult
import com.pulumi.azure.iot.kotlin.outputs.GetIotHubResult
import com.pulumi.azure.iot.kotlin.outputs.GetSharedAccessPolicyResult
import kotlinx.coroutines.future.await
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.azure.iot.kotlin.outputs.GetDpsResult.Companion.toKotlin as getDpsResultToKotlin
import com.pulumi.azure.iot.kotlin.outputs.GetDpsSharedAccessPolicyResult.Companion.toKotlin as getDpsSharedAccessPolicyResultToKotlin
import com.pulumi.azure.iot.kotlin.outputs.GetIotHubResult.Companion.toKotlin as getIotHubResultToKotlin
import com.pulumi.azure.iot.kotlin.outputs.GetSharedAccessPolicyResult.Companion.toKotlin as getSharedAccessPolicyResultToKotlin
public object IotFunctions {
/**
* Use this data source to access information about an existing IotHub Device Provisioning Service.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.iot.getDps({
* name: "iot_hub_dps_test",
* resourceGroupName: "iothub_dps_rg",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.iot.get_dps(name="iot_hub_dps_test",
* resource_group_name="iothub_dps_rg")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Iot.GetDps.Invoke(new()
* {
* Name = "iot_hub_dps_test",
* ResourceGroupName = "iothub_dps_rg",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iot"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := iot.GetDps(ctx, &iot.GetDpsArgs{
* Name: "iot_hub_dps_test",
* ResourceGroupName: "iothub_dps_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.iot.IotFunctions;
* import com.pulumi.azure.iot.inputs.GetDpsArgs;
* 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 = IotFunctions.getDps(GetDpsArgs.builder()
* .name("iot_hub_dps_test")
* .resourceGroupName("iothub_dps_rg")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:iot:getDps
* Arguments:
* name: iot_hub_dps_test
* resourceGroupName: iothub_dps_rg
* ```
*
* @param argument A collection of arguments for invoking getDps.
* @return A collection of values returned by getDps.
*/
public suspend fun getDps(argument: GetDpsPlainArgs): GetDpsResult =
getDpsResultToKotlin(getDpsPlain(argument.toJava()).await())
/**
* @see [getDps].
* @param name Specifies the name of the Iot Device Provisioning Service resource.
* @param resourceGroupName The name of the resource group under which the Iot Device Provisioning Service is located in.
* @param tags
* @return A collection of values returned by getDps.
*/
public suspend fun getDps(
name: String,
resourceGroupName: String,
tags: Map? = null,
): GetDpsResult {
val argument = GetDpsPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
tags = tags,
)
return getDpsResultToKotlin(getDpsPlain(argument.toJava()).await())
}
/**
* @see [getDps].
* @param argument Builder for [com.pulumi.azure.iot.kotlin.inputs.GetDpsPlainArgs].
* @return A collection of values returned by getDps.
*/
public suspend fun getDps(argument: suspend GetDpsPlainArgsBuilder.() -> Unit): GetDpsResult {
val builder = GetDpsPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDpsResultToKotlin(getDpsPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing IotHub Device Provisioning Service Shared Access Policy
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.iot.getDpsSharedAccessPolicy({
* name: "example",
* resourceGroupName: exampleAzurermResourceGroup.name,
* iothubDpsName: exampleAzurermIothubDps.name,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.iot.get_dps_shared_access_policy(name="example",
* resource_group_name=example_azurerm_resource_group["name"],
* iothub_dps_name=example_azurerm_iothub_dps["name"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Iot.GetDpsSharedAccessPolicy.Invoke(new()
* {
* Name = "example",
* ResourceGroupName = exampleAzurermResourceGroup.Name,
* IothubDpsName = exampleAzurermIothubDps.Name,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iot"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := iot.LookupDpsSharedAccessPolicy(ctx, &iot.LookupDpsSharedAccessPolicyArgs{
* Name: "example",
* ResourceGroupName: exampleAzurermResourceGroup.Name,
* IothubDpsName: exampleAzurermIothubDps.Name,
* }, 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.iot.IotFunctions;
* import com.pulumi.azure.iot.inputs.GetDpsSharedAccessPolicyArgs;
* 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 = IotFunctions.getDpsSharedAccessPolicy(GetDpsSharedAccessPolicyArgs.builder()
* .name("example")
* .resourceGroupName(exampleAzurermResourceGroup.name())
* .iothubDpsName(exampleAzurermIothubDps.name())
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:iot:getDpsSharedAccessPolicy
* Arguments:
* name: example
* resourceGroupName: ${exampleAzurermResourceGroup.name}
* iothubDpsName: ${exampleAzurermIothubDps.name}
* ```
*
* @param argument A collection of arguments for invoking getDpsSharedAccessPolicy.
* @return A collection of values returned by getDpsSharedAccessPolicy.
*/
public suspend fun getDpsSharedAccessPolicy(argument: GetDpsSharedAccessPolicyPlainArgs): GetDpsSharedAccessPolicyResult =
getDpsSharedAccessPolicyResultToKotlin(getDpsSharedAccessPolicyPlain(argument.toJava()).await())
/**
* @see [getDpsSharedAccessPolicy].
* @param iothubDpsName Specifies the name of the IoT Hub Device Provisioning service to which the Shared Access Policy belongs.
* @param name Specifies the name of the IotHub Shared Access Policy.
* @param resourceGroupName Specifies the name of the resource group under which the IotHub Shared Access Policy resource exists.
* @return A collection of values returned by getDpsSharedAccessPolicy.
*/
public suspend fun getDpsSharedAccessPolicy(
iothubDpsName: String,
name: String,
resourceGroupName: String,
): GetDpsSharedAccessPolicyResult {
val argument = GetDpsSharedAccessPolicyPlainArgs(
iothubDpsName = iothubDpsName,
name = name,
resourceGroupName = resourceGroupName,
)
return getDpsSharedAccessPolicyResultToKotlin(getDpsSharedAccessPolicyPlain(argument.toJava()).await())
}
/**
* @see [getDpsSharedAccessPolicy].
* @param argument Builder for [com.pulumi.azure.iot.kotlin.inputs.GetDpsSharedAccessPolicyPlainArgs].
* @return A collection of values returned by getDpsSharedAccessPolicy.
*/
public suspend fun getDpsSharedAccessPolicy(argument: suspend GetDpsSharedAccessPolicyPlainArgsBuilder.() -> Unit): GetDpsSharedAccessPolicyResult {
val builder = GetDpsSharedAccessPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDpsSharedAccessPolicyResultToKotlin(getDpsSharedAccessPolicyPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing IoTHub.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.iot.getIotHub({
* name: "existing",
* resourceGroupName: "existing",
* });
* export const id = example.then(example => example.id);
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.iot.get_iot_hub(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.Iot.GetIotHub.Invoke(new()
* {
* Name = "existing",
* ResourceGroupName = "existing",
* });
* return new Dictionary
* {
* ["id"] = example.Apply(getIotHubResult => getIotHubResult.Id),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iot"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := iot.GetIotHub(ctx, &iot.GetIotHubArgs{
* 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.iot.IotFunctions;
* import com.pulumi.azure.iot.inputs.GetIotHubArgs;
* 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 = IotFunctions.getIotHub(GetIotHubArgs.builder()
* .name("existing")
* .resourceGroupName("existing")
* .build());
* ctx.export("id", example.applyValue(getIotHubResult -> getIotHubResult.id()));
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:iot:getIotHub
* Arguments:
* name: existing
* resourceGroupName: existing
* outputs:
* id: ${example.id}
* ```
*
* @param argument A collection of arguments for invoking getIotHub.
* @return A collection of values returned by getIotHub.
*/
public suspend fun getIotHub(argument: GetIotHubPlainArgs): GetIotHubResult =
getIotHubResultToKotlin(getIotHubPlain(argument.toJava()).await())
/**
* @see [getIotHub].
* @param name The name of this IoTHub.
* @param resourceGroupName The name of the Resource Group where the IoTHub exists.
* @param tags A mapping of tags which should be assigned to the IoTHub.
* @return A collection of values returned by getIotHub.
*/
public suspend fun getIotHub(
name: String,
resourceGroupName: String,
tags: Map? = null,
): GetIotHubResult {
val argument = GetIotHubPlainArgs(
name = name,
resourceGroupName = resourceGroupName,
tags = tags,
)
return getIotHubResultToKotlin(getIotHubPlain(argument.toJava()).await())
}
/**
* @see [getIotHub].
* @param argument Builder for [com.pulumi.azure.iot.kotlin.inputs.GetIotHubPlainArgs].
* @return A collection of values returned by getIotHub.
*/
public suspend fun getIotHub(argument: suspend GetIotHubPlainArgsBuilder.() -> Unit): GetIotHubResult {
val builder = GetIotHubPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getIotHubResultToKotlin(getIotHubPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to access information about an existing IotHub Shared Access Policy
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = azure.iot.getSharedAccessPolicy({
* name: "example",
* resourceGroupName: exampleAzurermResourceGroup.name,
* iothubName: exampleAzurermIothub.name,
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.iot.get_shared_access_policy(name="example",
* resource_group_name=example_azurerm_resource_group["name"],
* iothub_name=example_azurerm_iothub["name"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = Azure.Iot.GetSharedAccessPolicy.Invoke(new()
* {
* Name = "example",
* ResourceGroupName = exampleAzurermResourceGroup.Name,
* IothubName = exampleAzurermIothub.Name,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/iot"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := iot.LookupSharedAccessPolicy(ctx, &iot.LookupSharedAccessPolicyArgs{
* Name: "example",
* ResourceGroupName: exampleAzurermResourceGroup.Name,
* IothubName: exampleAzurermIothub.Name,
* }, 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.iot.IotFunctions;
* import com.pulumi.azure.iot.inputs.GetSharedAccessPolicyArgs;
* 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 = IotFunctions.getSharedAccessPolicy(GetSharedAccessPolicyArgs.builder()
* .name("example")
* .resourceGroupName(exampleAzurermResourceGroup.name())
* .iothubName(exampleAzurermIothub.name())
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: azure:iot:getSharedAccessPolicy
* Arguments:
* name: example
* resourceGroupName: ${exampleAzurermResourceGroup.name}
* iothubName: ${exampleAzurermIothub.name}
* ```
*
* @param argument A collection of arguments for invoking getSharedAccessPolicy.
* @return A collection of values returned by getSharedAccessPolicy.
*/
public suspend fun getSharedAccessPolicy(argument: GetSharedAccessPolicyPlainArgs): GetSharedAccessPolicyResult =
getSharedAccessPolicyResultToKotlin(getSharedAccessPolicyPlain(argument.toJava()).await())
/**
* @see [getSharedAccessPolicy].
* @param iothubName The name of the IoTHub to which this Shared Access Policy belongs.
* @param name Specifies the name of the IotHub Shared Access Policy resource.
* @param resourceGroupName The name of the resource group under which the IotHub Shared Access Policy resource has to be created.
* @return A collection of values returned by getSharedAccessPolicy.
*/
public suspend fun getSharedAccessPolicy(
iothubName: String,
name: String,
resourceGroupName: String,
): GetSharedAccessPolicyResult {
val argument = GetSharedAccessPolicyPlainArgs(
iothubName = iothubName,
name = name,
resourceGroupName = resourceGroupName,
)
return getSharedAccessPolicyResultToKotlin(getSharedAccessPolicyPlain(argument.toJava()).await())
}
/**
* @see [getSharedAccessPolicy].
* @param argument Builder for [com.pulumi.azure.iot.kotlin.inputs.GetSharedAccessPolicyPlainArgs].
* @return A collection of values returned by getSharedAccessPolicy.
*/
public suspend fun getSharedAccessPolicy(argument: suspend GetSharedAccessPolicyPlainArgsBuilder.() -> Unit): GetSharedAccessPolicyResult {
val builder = GetSharedAccessPolicyPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getSharedAccessPolicyResultToKotlin(getSharedAccessPolicyPlain(builtArgument.toJava()).await())
}
}