DpsSharedAccessPolicy

Manages an IotHub Device Provisioning Service Shared Access Policy

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var exampleIotHubDps = new Azure.Iot.IotHubDps("exampleIotHubDps", new Azure.Iot.IotHubDpsArgs
        {
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            Sku = new Azure.Iot.Inputs.IotHubDpsSkuArgs
            {
                Name = "S1",
                Capacity = 1,
            },
        });
        var exampleDpsSharedAccessPolicy = new Azure.Iot.DpsSharedAccessPolicy("exampleDpsSharedAccessPolicy", new Azure.Iot.DpsSharedAccessPolicyArgs
        {
            ResourceGroupName = exampleResourceGroup.Name,
            IothubDpsName = exampleIotHubDps.Name,
            EnrollmentWrite = true,
            EnrollmentRead = true,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/iot"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
            Location: pulumi.String("West Europe"),
        })
        if err != nil {
            return err
        }
        exampleIotHubDps, err := iot.NewIotHubDps(ctx, "exampleIotHubDps", &iot.IotHubDpsArgs{
            ResourceGroupName: exampleResourceGroup.Name,
            Location:          exampleResourceGroup.Location,
            Sku: &iot.IotHubDpsSkuArgs{
                Name:     pulumi.String("S1"),
                Capacity: pulumi.Int(1),
            },
        })
        if err != nil {
            return err
        }
        _, err = iot.NewDpsSharedAccessPolicy(ctx, "exampleDpsSharedAccessPolicy", &iot.DpsSharedAccessPolicyArgs{
            ResourceGroupName: exampleResourceGroup.Name,
            IothubDpsName:     exampleIotHubDps.Name,
            EnrollmentWrite:   pulumi.Bool(true),
            EnrollmentRead:    pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_iot_hub_dps = azure.iot.IotHubDps("exampleIotHubDps",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    sku={
        "name": "S1",
        "capacity": "1",
    })
example_dps_shared_access_policy = azure.iot.DpsSharedAccessPolicy("exampleDpsSharedAccessPolicy",
    resource_group_name=example_resource_group.name,
    iothub_dps_name=example_iot_hub_dps.name,
    enrollment_write=True,
    enrollment_read=True)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleIotHubDps = new azure.iot.IotHubDps("exampleIotHubDps", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    sku: {
        name: "S1",
        capacity: "1",
    },
});
const exampleDpsSharedAccessPolicy = new azure.iot.DpsSharedAccessPolicy("exampleDpsSharedAccessPolicy", {
    resourceGroupName: exampleResourceGroup.name,
    iothubDpsName: exampleIotHubDps.name,
    enrollmentWrite: true,
    enrollmentRead: true,
});

Create a DpsSharedAccessPolicy Resource

def DpsSharedAccessPolicy(resource_name, opts=None, enrollment_read=None, enrollment_write=None, iothub_dps_name=None, name=None, registration_read=None, registration_write=None, resource_group_name=None, service_config=None, __props__=None);
name string
The unique name of the resource.
args DpsSharedAccessPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DpsSharedAccessPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DpsSharedAccessPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DpsSharedAccessPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The DpsSharedAccessPolicy resource accepts the following input properties:

IothubDpsName string

The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

ResourceGroupName string

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.

EnrollmentRead bool

Adds EnrollmentRead permission to this Shared Access Account. It allows read access to enrollment data.

EnrollmentWrite bool

Adds EnrollmentWrite permission to this Shared Access Account. It allows write access to enrollment data.

Name string

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

RegistrationRead bool

Adds RegistrationStatusRead permission to this Shared Access Account. It allows read access to device registrations.

RegistrationWrite bool

Adds RegistrationStatusWrite permission to this Shared Access Account. It allows write access to device registrations.

ServiceConfig bool

Adds ServiceConfig permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.

IothubDpsName string

The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

ResourceGroupName string

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.

EnrollmentRead bool

Adds EnrollmentRead permission to this Shared Access Account. It allows read access to enrollment data.

EnrollmentWrite bool

Adds EnrollmentWrite permission to this Shared Access Account. It allows write access to enrollment data.

Name string

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

RegistrationRead bool

Adds RegistrationStatusRead permission to this Shared Access Account. It allows read access to device registrations.

RegistrationWrite bool

Adds RegistrationStatusWrite permission to this Shared Access Account. It allows write access to device registrations.

ServiceConfig bool

Adds ServiceConfig permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.

iothubDpsName string

The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

resourceGroupName string

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.

enrollmentRead boolean

Adds EnrollmentRead permission to this Shared Access Account. It allows read access to enrollment data.

enrollmentWrite boolean

Adds EnrollmentWrite permission to this Shared Access Account. It allows write access to enrollment data.

name string

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

registrationRead boolean

Adds RegistrationStatusRead permission to this Shared Access Account. It allows read access to device registrations.

registrationWrite boolean

Adds RegistrationStatusWrite permission to this Shared Access Account. It allows write access to device registrations.

serviceConfig boolean

Adds ServiceConfig permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.

iothub_dps_name str

The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

resource_group_name str

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.

enrollment_read bool

Adds EnrollmentRead permission to this Shared Access Account. It allows read access to enrollment data.

enrollment_write bool

Adds EnrollmentWrite permission to this Shared Access Account. It allows write access to enrollment data.

name str

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

registration_read bool

Adds RegistrationStatusRead permission to this Shared Access Account. It allows read access to device registrations.

registration_write bool

Adds RegistrationStatusWrite permission to this Shared Access Account. It allows write access to device registrations.

service_config bool

Adds ServiceConfig permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.

Outputs

All input properties are implicitly available as output properties. Additionally, the DpsSharedAccessPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
PrimaryConnectionString string

The primary connection string of the Shared Access Policy.

PrimaryKey string

The primary key used to create the authentication token.

SecondaryConnectionString string

The secondary connection string of the Shared Access Policy.

SecondaryKey string

The secondary key used to create the authentication token.

Id string
The provider-assigned unique ID for this managed resource.
PrimaryConnectionString string

The primary connection string of the Shared Access Policy.

PrimaryKey string

The primary key used to create the authentication token.

SecondaryConnectionString string

The secondary connection string of the Shared Access Policy.

SecondaryKey string

The secondary key used to create the authentication token.

id string
The provider-assigned unique ID for this managed resource.
primaryConnectionString string

The primary connection string of the Shared Access Policy.

primaryKey string

The primary key used to create the authentication token.

secondaryConnectionString string

The secondary connection string of the Shared Access Policy.

secondaryKey string

The secondary key used to create the authentication token.

id str
The provider-assigned unique ID for this managed resource.
primary_connection_string str

The primary connection string of the Shared Access Policy.

primary_key str

The primary key used to create the authentication token.

secondary_connection_string str

The secondary connection string of the Shared Access Policy.

secondary_key str

The secondary key used to create the authentication token.

Look up an Existing DpsSharedAccessPolicy Resource

Get an existing DpsSharedAccessPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, enrollment_read=None, enrollment_write=None, iothub_dps_name=None, name=None, primary_connection_string=None, primary_key=None, registration_read=None, registration_write=None, resource_group_name=None, secondary_connection_string=None, secondary_key=None, service_config=None, __props__=None);
func GetDpsSharedAccessPolicy(ctx *Context, name string, id IDInput, state *DpsSharedAccessPolicyState, opts ...ResourceOption) (*DpsSharedAccessPolicy, error)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

EnrollmentRead bool

Adds EnrollmentRead permission to this Shared Access Account. It allows read access to enrollment data.

EnrollmentWrite bool

Adds EnrollmentWrite permission to this Shared Access Account. It allows write access to enrollment data.

IothubDpsName string

The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

Name string

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

PrimaryConnectionString string

The primary connection string of the Shared Access Policy.

PrimaryKey string

The primary key used to create the authentication token.

RegistrationRead bool

Adds RegistrationStatusRead permission to this Shared Access Account. It allows read access to device registrations.

RegistrationWrite bool

Adds RegistrationStatusWrite permission to this Shared Access Account. It allows write access to device registrations.

ResourceGroupName string

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.

SecondaryConnectionString string

The secondary connection string of the Shared Access Policy.

SecondaryKey string

The secondary key used to create the authentication token.

ServiceConfig bool

Adds ServiceConfig permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.

EnrollmentRead bool

Adds EnrollmentRead permission to this Shared Access Account. It allows read access to enrollment data.

EnrollmentWrite bool

Adds EnrollmentWrite permission to this Shared Access Account. It allows write access to enrollment data.

IothubDpsName string

The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

Name string

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

PrimaryConnectionString string

The primary connection string of the Shared Access Policy.

PrimaryKey string

The primary key used to create the authentication token.

RegistrationRead bool

Adds RegistrationStatusRead permission to this Shared Access Account. It allows read access to device registrations.

RegistrationWrite bool

Adds RegistrationStatusWrite permission to this Shared Access Account. It allows write access to device registrations.

ResourceGroupName string

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.

SecondaryConnectionString string

The secondary connection string of the Shared Access Policy.

SecondaryKey string

The secondary key used to create the authentication token.

ServiceConfig bool

Adds ServiceConfig permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.

enrollmentRead boolean

Adds EnrollmentRead permission to this Shared Access Account. It allows read access to enrollment data.

enrollmentWrite boolean

Adds EnrollmentWrite permission to this Shared Access Account. It allows write access to enrollment data.

iothubDpsName string

The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

name string

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

primaryConnectionString string

The primary connection string of the Shared Access Policy.

primaryKey string

The primary key used to create the authentication token.

registrationRead boolean

Adds RegistrationStatusRead permission to this Shared Access Account. It allows read access to device registrations.

registrationWrite boolean

Adds RegistrationStatusWrite permission to this Shared Access Account. It allows write access to device registrations.

resourceGroupName string

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.

secondaryConnectionString string

The secondary connection string of the Shared Access Policy.

secondaryKey string

The secondary key used to create the authentication token.

serviceConfig boolean

Adds ServiceConfig permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.

enrollment_read bool

Adds EnrollmentRead permission to this Shared Access Account. It allows read access to enrollment data.

enrollment_write bool

Adds EnrollmentWrite permission to this Shared Access Account. It allows write access to enrollment data.

iothub_dps_name str

The name of the IoT Hub Device Provisioning service to which this Shared Access Policy belongs. Changing this forces a new resource to be created.

name str

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

primary_connection_string str

The primary connection string of the Shared Access Policy.

primary_key str

The primary key used to create the authentication token.

registration_read bool

Adds RegistrationStatusRead permission to this Shared Access Account. It allows read access to device registrations.

registration_write bool

Adds RegistrationStatusWrite permission to this Shared Access Account. It allows write access to device registrations.

resource_group_name str

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.

secondary_connection_string str

The secondary connection string of the Shared Access Policy.

secondary_key str

The secondary key used to create the authentication token.

service_config bool

Adds ServiceConfig permission to this Shared Access Account. It allows configuration of the Device Provisioning Service.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.