SharedAccessPolicyArgs

data class SharedAccessPolicyArgs(val deviceConnect: Output<Boolean>? = null, val iothubName: Output<String>? = null, val name: Output<String>? = null, val registryRead: Output<Boolean>? = null, val registryWrite: Output<Boolean>? = null, val resourceGroupName: Output<String>? = null, val serviceConnect: Output<Boolean>? = null) : ConvertibleToJava<SharedAccessPolicyArgs>

Manages an IotHub Shared Access Policy

Example Usage

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.IoTHub;
import com.pulumi.azure.iot.IoTHubArgs;
import com.pulumi.azure.iot.inputs.IoTHubSkuArgs;
import com.pulumi.azure.iot.SharedAccessPolicy;
import com.pulumi.azure.iot.SharedAccessPolicyArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleIoTHub = new IoTHub("exampleIoTHub", IoTHubArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.sku(IoTHubSkuArgs.builder()
.name("S1")
.capacity("1")
.build())
.build());
var exampleSharedAccessPolicy = new SharedAccessPolicy("exampleSharedAccessPolicy", SharedAccessPolicyArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.iothubName(exampleIoTHub.name())
.registryRead(true)
.registryWrite(true)
.build());
}
}

Import

IoTHub Shared Access Policies can be imported using the resource id, e.g.

$ pulumi import azure:iot/sharedAccessPolicy:SharedAccessPolicy shared_access_policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Devices/iotHubs/hub1/iotHubKeys/shared_access_policy1

Constructors

Link copied to clipboard
fun SharedAccessPolicyArgs(deviceConnect: Output<Boolean>? = null, iothubName: Output<String>? = null, name: Output<String>? = null, registryRead: Output<Boolean>? = null, registryWrite: Output<Boolean>? = null, resourceGroupName: Output<String>? = null, serviceConnect: Output<Boolean>? = null)

Functions

Link copied to clipboard
open override fun toJava(): SharedAccessPolicyArgs

Properties

Link copied to clipboard
val deviceConnect: Output<Boolean>? = null

Adds DeviceConnect permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.

Link copied to clipboard
val iothubName: Output<String>? = null

The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.

Link copied to clipboard
val registryRead: Output<Boolean>? = null

Adds RegistryRead permission to this Shared Access Account. It allows read access to the identity registry.

Link copied to clipboard
val registryWrite: Output<Boolean>? = null

Adds RegistryWrite permission to this Shared Access Account. It allows write access to the identity registry.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group under which the IotHub Shared Access Policy resource has to be created. Changing this forces a new resource to be created.

Link copied to clipboard
val serviceConnect: Output<Boolean>? = null

Adds ServiceConnect permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.