We recommend using Azure Native.
azure.iot.SharedAccessPolicy
Explore with Pulumi AI
Manages an IotHub Shared Access Policy
Example Usage
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 exampleIoTHub = new azure.iot.IoTHub("example", {
name: "example",
resourceGroupName: example.name,
location: example.location,
sku: {
name: "S1",
capacity: 1,
},
});
const exampleSharedAccessPolicy = new azure.iot.SharedAccessPolicy("example", {
name: "example",
resourceGroupName: example.name,
iothubName: exampleIoTHub.name,
registryRead: true,
registryWrite: true,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_io_t_hub = azure.iot.IoTHub("example",
name="example",
resource_group_name=example.name,
location=example.location,
sku={
"name": "S1",
"capacity": 1,
})
example_shared_access_policy = azure.iot.SharedAccessPolicy("example",
name="example",
resource_group_name=example.name,
iothub_name=example_io_t_hub.name,
registry_read=True,
registry_write=True)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/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
}
exampleIoTHub, err := iot.NewIoTHub(ctx, "example", &iot.IoTHubArgs{
Name: pulumi.String("example"),
ResourceGroupName: example.Name,
Location: example.Location,
Sku: &iot.IoTHubSkuArgs{
Name: pulumi.String("S1"),
Capacity: pulumi.Int(1),
},
})
if err != nil {
return err
}
_, err = iot.NewSharedAccessPolicy(ctx, "example", &iot.SharedAccessPolicyArgs{
Name: pulumi.String("example"),
ResourceGroupName: example.Name,
IothubName: exampleIoTHub.Name,
RegistryRead: pulumi.Bool(true),
RegistryWrite: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
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 exampleIoTHub = new Azure.Iot.IoTHub("example", new()
{
Name = "example",
ResourceGroupName = example.Name,
Location = example.Location,
Sku = new Azure.Iot.Inputs.IoTHubSkuArgs
{
Name = "S1",
Capacity = 1,
},
});
var exampleSharedAccessPolicy = new Azure.Iot.SharedAccessPolicy("example", new()
{
Name = "example",
ResourceGroupName = example.Name,
IothubName = exampleIoTHub.Name,
RegistryRead = true,
RegistryWrite = true,
});
});
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleIoTHub = new IoTHub("exampleIoTHub", IoTHubArgs.builder()
.name("example")
.resourceGroupName(example.name())
.location(example.location())
.sku(IoTHubSkuArgs.builder()
.name("S1")
.capacity("1")
.build())
.build());
var exampleSharedAccessPolicy = new SharedAccessPolicy("exampleSharedAccessPolicy", SharedAccessPolicyArgs.builder()
.name("example")
.resourceGroupName(example.name())
.iothubName(exampleIoTHub.name())
.registryRead(true)
.registryWrite(true)
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleIoTHub:
type: azure:iot:IoTHub
name: example
properties:
name: example
resourceGroupName: ${example.name}
location: ${example.location}
sku:
name: S1
capacity: '1'
exampleSharedAccessPolicy:
type: azure:iot:SharedAccessPolicy
name: example
properties:
name: example
resourceGroupName: ${example.name}
iothubName: ${exampleIoTHub.name}
registryRead: true
registryWrite: true
Create SharedAccessPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SharedAccessPolicy(name: string, args: SharedAccessPolicyArgs, opts?: CustomResourceOptions);
@overload
def SharedAccessPolicy(resource_name: str,
args: SharedAccessPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SharedAccessPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
iothub_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
device_connect: Optional[bool] = None,
name: Optional[str] = None,
registry_read: Optional[bool] = None,
registry_write: Optional[bool] = None,
service_connect: Optional[bool] = None)
func NewSharedAccessPolicy(ctx *Context, name string, args SharedAccessPolicyArgs, opts ...ResourceOption) (*SharedAccessPolicy, error)
public SharedAccessPolicy(string name, SharedAccessPolicyArgs args, CustomResourceOptions? opts = null)
public SharedAccessPolicy(String name, SharedAccessPolicyArgs args)
public SharedAccessPolicy(String name, SharedAccessPolicyArgs args, CustomResourceOptions options)
type: azure:iot:SharedAccessPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SharedAccessPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SharedAccessPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SharedAccessPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SharedAccessPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SharedAccessPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var sharedAccessPolicyResource = new Azure.Iot.SharedAccessPolicy("sharedAccessPolicyResource", new()
{
IothubName = "string",
ResourceGroupName = "string",
DeviceConnect = false,
Name = "string",
RegistryRead = false,
RegistryWrite = false,
ServiceConnect = false,
});
example, err := iot.NewSharedAccessPolicy(ctx, "sharedAccessPolicyResource", &iot.SharedAccessPolicyArgs{
IothubName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
DeviceConnect: pulumi.Bool(false),
Name: pulumi.String("string"),
RegistryRead: pulumi.Bool(false),
RegistryWrite: pulumi.Bool(false),
ServiceConnect: pulumi.Bool(false),
})
var sharedAccessPolicyResource = new SharedAccessPolicy("sharedAccessPolicyResource", SharedAccessPolicyArgs.builder()
.iothubName("string")
.resourceGroupName("string")
.deviceConnect(false)
.name("string")
.registryRead(false)
.registryWrite(false)
.serviceConnect(false)
.build());
shared_access_policy_resource = azure.iot.SharedAccessPolicy("sharedAccessPolicyResource",
iothub_name="string",
resource_group_name="string",
device_connect=False,
name="string",
registry_read=False,
registry_write=False,
service_connect=False)
const sharedAccessPolicyResource = new azure.iot.SharedAccessPolicy("sharedAccessPolicyResource", {
iothubName: "string",
resourceGroupName: "string",
deviceConnect: false,
name: "string",
registryRead: false,
registryWrite: false,
serviceConnect: false,
});
type: azure:iot:SharedAccessPolicy
properties:
deviceConnect: false
iothubName: string
name: string
registryRead: false
registryWrite: false
resourceGroupName: string
serviceConnect: false
SharedAccessPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SharedAccessPolicy resource accepts the following input properties:
- Iothub
Name string - The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
- Resource
Group stringName - 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.
- Device
Connect bool Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- Name string
- Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
- Registry
Read bool - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - Registry
Write bool Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- Service
Connect bool - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- Iothub
Name string - The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
- Resource
Group stringName - 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.
- Device
Connect bool Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- Name string
- Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
- Registry
Read bool - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - Registry
Write bool Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- Service
Connect bool - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- iothub
Name String - The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
- resource
Group StringName - 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.
- device
Connect Boolean Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- name String
- Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
- registry
Read Boolean - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - registry
Write Boolean Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- service
Connect Boolean - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- iothub
Name string - The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
- resource
Group stringName - 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.
- device
Connect boolean Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- name string
- Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
- registry
Read boolean - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - registry
Write boolean Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- service
Connect boolean - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- iothub_
name str - The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
- resource_
group_ strname - 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.
- device_
connect bool Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- name str
- Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
- registry_
read bool - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - registry_
write bool Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- service_
connect bool - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- iothub
Name String - The name of the IoTHub to which this Shared Access Policy belongs. Changing this forces a new resource to be created.
- resource
Group StringName - 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.
- device
Connect Boolean Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- name String
- Specifies the name of the IotHub Shared Access Policy resource. Changing this forces a new resource to be created.
- registry
Read Boolean - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - registry
Write Boolean Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- service
Connect Boolean - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
Outputs
All input properties are implicitly available as output properties. Additionally, the SharedAccessPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Connection stringString - The primary connection string of the Shared Access Policy.
- Primary
Key string - The primary key used to create the authentication token.
- Secondary
Connection stringString - The secondary connection string of the Shared Access Policy.
- Secondary
Key string - The secondary key used to create the authentication token.
- Id string
- The provider-assigned unique ID for this managed resource.
- Primary
Connection stringString - The primary connection string of the Shared Access Policy.
- Primary
Key string - The primary key used to create the authentication token.
- Secondary
Connection stringString - The secondary connection string of the Shared Access Policy.
- Secondary
Key string - The secondary key used to create the authentication token.
- id String
- The provider-assigned unique ID for this managed resource.
- primary
Connection StringString - The primary connection string of the Shared Access Policy.
- primary
Key String - The primary key used to create the authentication token.
- secondary
Connection StringString - The secondary connection string of the Shared Access Policy.
- secondary
Key String - The secondary key used to create the authentication token.
- id string
- The provider-assigned unique ID for this managed resource.
- primary
Connection stringString - The primary connection string of the Shared Access Policy.
- primary
Key string - The primary key used to create the authentication token.
- secondary
Connection stringString - The secondary connection string of the Shared Access Policy.
- secondary
Key string - The secondary key used to create the authentication token.
- id str
- The provider-assigned unique ID for this managed resource.
- primary_
connection_ strstring - The primary connection string of the Shared Access Policy.
- primary_
key str - The primary key used to create the authentication token.
- secondary_
connection_ strstring - The secondary connection string of the Shared Access Policy.
- secondary_
key str - The secondary key used to create the authentication token.
- id String
- The provider-assigned unique ID for this managed resource.
- primary
Connection StringString - The primary connection string of the Shared Access Policy.
- primary
Key String - The primary key used to create the authentication token.
- secondary
Connection StringString - The secondary connection string of the Shared Access Policy.
- secondary
Key String - The secondary key used to create the authentication token.
Look up Existing SharedAccessPolicy Resource
Get an existing SharedAccessPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SharedAccessPolicyState, opts?: CustomResourceOptions): SharedAccessPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
device_connect: Optional[bool] = None,
iothub_name: Optional[str] = None,
name: Optional[str] = None,
primary_connection_string: Optional[str] = None,
primary_key: Optional[str] = None,
registry_read: Optional[bool] = None,
registry_write: Optional[bool] = None,
resource_group_name: Optional[str] = None,
secondary_connection_string: Optional[str] = None,
secondary_key: Optional[str] = None,
service_connect: Optional[bool] = None) -> SharedAccessPolicy
func GetSharedAccessPolicy(ctx *Context, name string, id IDInput, state *SharedAccessPolicyState, opts ...ResourceOption) (*SharedAccessPolicy, error)
public static SharedAccessPolicy Get(string name, Input<string> id, SharedAccessPolicyState? state, CustomResourceOptions? opts = null)
public static SharedAccessPolicy get(String name, Output<String> id, SharedAccessPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Device
Connect bool Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- Iothub
Name string - The name of the IoTHub 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.
- Primary
Connection stringString - The primary connection string of the Shared Access Policy.
- Primary
Key string - The primary key used to create the authentication token.
- Registry
Read bool - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - Registry
Write bool Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- Resource
Group stringName - 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 stringString - The secondary connection string of the Shared Access Policy.
- Secondary
Key string - The secondary key used to create the authentication token.
- Service
Connect bool - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- Device
Connect bool Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- Iothub
Name string - The name of the IoTHub 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.
- Primary
Connection stringString - The primary connection string of the Shared Access Policy.
- Primary
Key string - The primary key used to create the authentication token.
- Registry
Read bool - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - Registry
Write bool Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- Resource
Group stringName - 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 stringString - The secondary connection string of the Shared Access Policy.
- Secondary
Key string - The secondary key used to create the authentication token.
- Service
Connect bool - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- device
Connect Boolean Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- iothub
Name String - The name of the IoTHub 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.
- primary
Connection StringString - The primary connection string of the Shared Access Policy.
- primary
Key String - The primary key used to create the authentication token.
- registry
Read Boolean - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - registry
Write Boolean Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- resource
Group StringName - 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 StringString - The secondary connection string of the Shared Access Policy.
- secondary
Key String - The secondary key used to create the authentication token.
- service
Connect Boolean - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- device
Connect boolean Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- iothub
Name string - The name of the IoTHub 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.
- primary
Connection stringString - The primary connection string of the Shared Access Policy.
- primary
Key string - The primary key used to create the authentication token.
- registry
Read boolean - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - registry
Write boolean Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- resource
Group stringName - 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 stringString - The secondary connection string of the Shared Access Policy.
- secondary
Key string - The secondary key used to create the authentication token.
- service
Connect boolean - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- device_
connect bool Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- iothub_
name str - The name of the IoTHub 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_ strstring - The primary connection string of the Shared Access Policy.
- primary_
key str - The primary key used to create the authentication token.
- registry_
read bool - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - registry_
write bool Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- resource_
group_ strname - 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_ strstring - The secondary connection string of the Shared Access Policy.
- secondary_
key str - The secondary key used to create the authentication token.
- service_
connect bool - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
- device
Connect Boolean Adds
DeviceConnect
permission to this Shared Access Account. It allows sending and receiving on the device-side endpoints.NOTE At least one of
registry_read
,registry_write
,service_connect
,device_connect
permissions must be set totrue
.- iothub
Name String - The name of the IoTHub 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.
- primary
Connection StringString - The primary connection string of the Shared Access Policy.
- primary
Key String - The primary key used to create the authentication token.
- registry
Read Boolean - Adds
RegistryRead
permission to this Shared Access Account. It allows read access to the identity registry. - registry
Write Boolean Adds
RegistryWrite
permission to this Shared Access Account. It allows write access to the identity registry.NOTE When
registry_write
is set totrue
,registry_read
must also be set to true. This is a limitation of the Azure REST API- resource
Group StringName - 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 StringString - The secondary connection string of the Shared Access Policy.
- secondary
Key String - The secondary key used to create the authentication token.
- service
Connect Boolean - Adds
ServiceConnect
permission to this Shared Access Account. It allows sending and receiving on the cloud-side endpoints.
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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.