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.IotHubDps.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.iot.kotlin
import com.pulumi.azure.iot.kotlin.outputs.IotHubDpsIpFilterRule
import com.pulumi.azure.iot.kotlin.outputs.IotHubDpsLinkedHub
import com.pulumi.azure.iot.kotlin.outputs.IotHubDpsSku
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azure.iot.kotlin.outputs.IotHubDpsIpFilterRule.Companion.toKotlin as iotHubDpsIpFilterRuleToKotlin
import com.pulumi.azure.iot.kotlin.outputs.IotHubDpsLinkedHub.Companion.toKotlin as iotHubDpsLinkedHubToKotlin
import com.pulumi.azure.iot.kotlin.outputs.IotHubDpsSku.Companion.toKotlin as iotHubDpsSkuToKotlin
/**
* Builder for [IotHubDps].
*/
@PulumiTagMarker
public class IotHubDpsResourceBuilder internal constructor() {
public var name: String? = null
public var args: IotHubDpsArgs = IotHubDpsArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend IotHubDpsArgsBuilder.() -> Unit) {
val builder = IotHubDpsArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): IotHubDps {
val builtJavaResource = com.pulumi.azure.iot.IotHubDps(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return IotHubDps(builtJavaResource)
}
}
/**
* Manages an IotHub Device Provisioning Service.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleIotHubDps = new azure.iot.IotHubDps("example", {
* name: "example",
* resourceGroupName: example.name,
* location: example.location,
* allocationPolicy: "Hashed",
* sku: {
* name: "S1",
* capacity: 1,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_iot_hub_dps = azure.iot.IotHubDps("example",
* name="example",
* resource_group_name=example.name,
* location=example.location,
* allocation_policy="Hashed",
* sku={
* "name": "S1",
* "capacity": 1,
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleIotHubDps = new Azure.Iot.IotHubDps("example", new()
* {
* Name = "example",
* ResourceGroupName = example.Name,
* Location = example.Location,
* AllocationPolicy = "Hashed",
* Sku = new Azure.Iot.Inputs.IotHubDpsSkuArgs
* {
* Name = "S1",
* Capacity = 1,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "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 := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = iot.NewIotHubDps(ctx, "example", &iot.IotHubDpsArgs{
* Name: pulumi.String("example"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* AllocationPolicy: pulumi.String("Hashed"),
* Sku: &iot.IotHubDpsSkuArgs{
* Name: pulumi.String("S1"),
* Capacity: pulumi.Int(1),
* },
* })
* 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.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.iot.IotHubDps;
* import com.pulumi.azure.iot.IotHubDpsArgs;
* import com.pulumi.azure.iot.inputs.IotHubDpsSkuArgs;
* 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) {
* var example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleIotHubDps = new IotHubDps("exampleIotHubDps", IotHubDpsArgs.builder()
* .name("example")
* .resourceGroupName(example.name())
* .location(example.location())
* .allocationPolicy("Hashed")
* .sku(IotHubDpsSkuArgs.builder()
* .name("S1")
* .capacity("1")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleIotHubDps:
* type: azure:iot:IotHubDps
* name: example
* properties:
* name: example
* resourceGroupName: ${example.name}
* location: ${example.location}
* allocationPolicy: Hashed
* sku:
* name: S1
* capacity: '1'
* ```
*
* ## Import
* IoT Device Provisioning Service can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:iot/iotHubDps:IotHubDps example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/provisioningServices/example
* ```
*/
public class IotHubDps internal constructor(
override val javaResource: com.pulumi.azure.iot.IotHubDps,
) : KotlinCustomResource(javaResource, IotHubDpsMapper) {
/**
* The allocation policy of the IoT Device Provisioning Service (`Hashed`, `GeoLatency` or `Static`). Defaults to `Hashed`.
*/
public val allocationPolicy: Output?
get() = javaResource.allocationPolicy().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies if the IoT Device Provisioning Service has data residency and disaster recovery enabled. Defaults to `false`. Changing this forces a new resource to be created.
*/
public val dataResidencyEnabled: Output?
get() = javaResource.dataResidencyEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The device endpoint of the IoT Device Provisioning Service.
*/
public val deviceProvisioningHostName: Output
get() = javaResource.deviceProvisioningHostName().applyValue({ args0 -> args0 })
/**
* The unique identifier of the IoT Device Provisioning Service.
*/
public val idScope: Output
get() = javaResource.idScope().applyValue({ args0 -> args0 })
/**
* An `ip_filter_rule` block as defined below.
*/
public val ipFilterRules: Output>?
get() = javaResource.ipFilterRules().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
iotHubDpsIpFilterRuleToKotlin(args0)
})
})
}).orElse(null)
})
/**
* A `linked_hub` block as defined below.
*/
public val linkedHubs: Output>?
get() = javaResource.linkedHubs().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> iotHubDpsLinkedHubToKotlin(args0) })
})
}).orElse(null)
})
/**
* Specifies the supported Azure location where the resource has to be created. Changing this forces a new resource to be created.
*/
public val location: Output
get() = javaResource.location().applyValue({ args0 -> args0 })
/**
* Specifies the name of the Iot Device Provisioning Service resource. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Whether requests from Public Network are allowed. Defaults to `true`.
*/
public val publicNetworkAccessEnabled: Output?
get() = javaResource.publicNetworkAccessEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the resource group under which the Iot Device Provisioning Service resource has to be created. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* The service endpoint of the IoT Device Provisioning Service.
*/
public val serviceOperationsHostName: Output
get() = javaResource.serviceOperationsHostName().applyValue({ args0 -> args0 })
/**
* A `sku` block as defined below.
*/
public val sku: Output
get() = javaResource.sku().applyValue({ args0 ->
args0.let({ args0 ->
iotHubDpsSkuToKotlin(args0)
})
})
/**
* A mapping of tags to assign to the resource.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
}
public object IotHubDpsMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.iot.IotHubDps::class == javaResource::class
override fun map(javaResource: Resource): IotHubDps = IotHubDps(
javaResource as
com.pulumi.azure.iot.IotHubDps,
)
}
/**
* @see [IotHubDps].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [IotHubDps].
*/
public suspend fun iotHubDps(name: String, block: suspend IotHubDpsResourceBuilder.() -> Unit): IotHubDps {
val builder = IotHubDpsResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [IotHubDps].
* @param name The _unique_ name of the resulting resource.
*/
public fun iotHubDps(name: String): IotHubDps {
val builder = IotHubDpsResourceBuilder()
builder.name(name)
return builder.build()
}