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,
});
}
}
Inherited Members
Namespace: Pulumi.Azure.Iot
Assembly: Pulumi.Azure.dll
Syntax
public class SharedAccessPolicy : CustomResource
Constructors
View SourceSharedAccessPolicy(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 SourceDeviceConnect
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>> |
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> |
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> |
PrimaryConnectionString
The primary connection string of the Shared Access Policy.
Declaration
public Output<string> PrimaryConnectionString { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PrimaryKey
The primary key used to create the authentication token.
Declaration
public Output<string> PrimaryKey { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
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>> |
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> |
SecondaryConnectionString
The secondary connection string of the Shared Access Policy.
Declaration
public Output<string> SecondaryConnectionString { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SecondaryKey
The secondary key used to create the authentication token.
Declaration
public Output<string> SecondaryKey { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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 SourceGet(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 |