Show / Hide Table of Contents

Class SharedAccessPolicy

Manages an IotHub 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 US",
    });
    var exampleIoTHub = new Azure.Iot.IoTHub("exampleIoTHub", new Azure.Iot.IoTHubArgs
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        Sku = new Azure.Iot.Inputs.IoTHubSkuArgs
        {
            Name = "S1",
            Capacity = "1",
        },
    });
    var exampleSharedAccessPolicy = new Azure.Iot.SharedAccessPolicy("exampleSharedAccessPolicy", new Azure.Iot.SharedAccessPolicyArgs
    {
        ResourceGroupName = exampleResourceGroup.Name,
        IothubName = exampleIoTHub.Name,
        RegistryRead = true,
        RegistryWrite = true,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
SharedAccessPolicy
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Azure.Iot
Assembly: Pulumi.Azure.dll
Syntax
public class SharedAccessPolicy : CustomResource

Constructors

View Source

SharedAccessPolicy(String, SharedAccessPolicyArgs, CustomResourceOptions)

Create a SharedAccessPolicy resource with the given unique name, arguments, and options.

Declaration
public SharedAccessPolicy(string name, SharedAccessPolicyArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

SharedAccessPolicyArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

DeviceConnect

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

Declaration
public Output<bool?> DeviceConnect { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

IothubName

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

Declaration
public Output<string> IothubName { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

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

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

PrimaryConnectionString

The primary connection string of the Shared Access Policy.

Declaration
public Output<string> PrimaryConnectionString { get; }
Property Value
Type Description
Output<System.String>
View Source

PrimaryKey

The primary key used to create the authentication token.

Declaration
public Output<string> PrimaryKey { get; }
Property Value
Type Description
Output<System.String>
View Source

RegistryRead

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

Declaration
public Output<bool?> RegistryRead { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

RegistryWrite

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

Declaration
public Output<bool?> RegistryWrite { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

ResourceGroupName

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.

Declaration
public Output<string> ResourceGroupName { get; }
Property Value
Type Description
Output<System.String>
View Source

SecondaryConnectionString

The secondary connection string of the Shared Access Policy.

Declaration
public Output<string> SecondaryConnectionString { get; }
Property Value
Type Description
Output<System.String>
View Source

SecondaryKey

The secondary key used to create the authentication token.

Declaration
public Output<string> SecondaryKey { get; }
Property Value
Type Description
Output<System.String>
View Source

ServiceConnect

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

Declaration
public Output<bool?> ServiceConnect { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>

Methods

View Source

Get(String, Input<String>, SharedAccessPolicyState, CustomResourceOptions)

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

Declaration
public static SharedAccessPolicy Get(string name, Input<string> id, SharedAccessPolicyState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

SharedAccessPolicyState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
SharedAccessPolicy
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.