你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Bicep 资源定义
可以使用目标操作部署 provisioningServices 资源类型:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.Devices/provisioningServices 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.Devices/provisioningServices@2025-02-01-preview' = {
etag: 'string'
identity: {
type: 'string'
userAssignedIdentities: {
{customized property}: {}
}
}
location: 'string'
name: 'string'
properties: {
allocationPolicy: 'string'
authorizationPolicies: [
{
keyName: 'string'
primaryKey: 'string'
rights: 'string'
secondaryKey: 'string'
}
]
deviceRegistryNamespace: {
authenticationType: 'string'
resourceId: 'string'
selectedUserAssignedIdentityResourceId: 'string'
}
enableDataResidency: bool
iotHubs: [
{
allocationWeight: int
applyAllocationPolicy: bool
connectionString: 'string'
location: 'string'
}
]
ipFilterRules: [
{
action: 'string'
filterName: 'string'
ipMask: 'string'
target: 'string'
}
]
portalOperationsHostName: 'string'
privateEndpointConnections: [
{
properties: {
privateEndpoint: {}
privateLinkServiceConnectionState: {
actionsRequired: 'string'
description: 'string'
status: 'string'
}
}
}
]
provisioningState: 'string'
publicNetworkAccess: 'string'
state: 'string'
}
resourcegroup: 'string'
sku: {
capacity: int
name: 'string'
}
subscriptionid: 'string'
tags: {
{customized property}: 'string'
}
}
属性值
Microsoft.Devices/provisioningServices
| Name | Description | Value |
|---|---|---|
| etag | Etag 字段 不需要。 如果在响应正文中提供,则还必须根据正常的 ETag 约定将其作为标头提供。 | 字符串 |
| 标识 | 分配给此资源的托管服务标识。 | ManagedServiceIdentity |
| 位置 | 资源所在的地理位置 | 字符串(必填) |
| name | 资源名称 | 字符串(必填) |
| properties | 预配服务的服务特定属性 | IotDpsPropertiesDescription (必需) |
| resourcegroup | 资源的资源组。 | 字符串 |
| sku | 预配服务的 SKU 信息。 | IotDpsSkuInfo (必填) |
| subscriptionid | 资源的订阅 ID。 | 字符串 |
| tags | 资源标记 | 标记名称和值的字典。 请参阅模板 中的 |
DeviceRegistryNamespace描述
| Name | Description | Value |
|---|---|---|
| authenticationType | 设备注册表命名空间 MI 身份验证类型:UserAssigned、SystemAssigned。 | 'SystemAssigned' “UserAssigned”(必需) |
| 资源ID | 设备注册表命名空间的 ARM 资源 ID。 | 字符串(必填) |
| selectedUserAssignedIdentityResourceId | 与设备注册表命名空间关联的选定用户分配的标识资源 ID。 当 authenticationType 为 UserAssigned 时,这是必需的。 | 字符串 |
IotDpsPropertiesDescription
| Name | Description | Value |
|---|---|---|
| allocationPolicy | 此预配服务要使用的分配策略。 | 'GeoLatency' 'Hashed' 'Static' |
| authorizationPolicies | 预配服务的授权密钥列表。 | SharedAccessSignatureAuthorizationRuleAccessRightsDescription[] |
| deviceRegistry命名空间 | 链接到预配服务的设备注册表命名空间。 | DeviceRegistryNamespace描述 |
| enableDataResidency | Optional. 指示 DPS 实例是否启用了数据驻留,从而删除跨异地对灾难恢复。 |
bool |
| iotHubs | 与此预配服务关联的 IoT 中心列表。 | IotHubDefinitionDescription[] |
| ipFilterRules | IP 筛选器规则。 | IpFilterRule[] |
| portalOperationsHostName | 用于为此预配服务启用 CORS 的门户终结点。 | 字符串 |
| privateEndpointConnections | 在此 IotHub 上创建的专用终结点连接 | PrivateEndpointConnection[] |
| provisioningState | 预配服务的 ARM 预配状态。 | 字符串 |
| publicNetworkAccess | 是否允许来自公用网络的请求 | 'Disabled' 'Enabled' |
| 状态 | 预配服务的当前状态。 | 'Activating' 'ActivationFailed' 'Active' 'Deleted' 'Deleting' 'DeletionFailed' 'FailingOver' 'FailoverFailed' 'Resuming' 'Suspended' 'Suspending' 'Transitioning' |
IotDpsSkuInfo
| Name | Description | Value |
|---|---|---|
| 产能 | 要预配的单位数 | int |
| name | Sku 名称。 | 'S1' |
IotHubDefinitionDescription
| Name | Description | Value |
|---|---|---|
| allocationWeight | 要申请给定 iot h 的权重。 | int |
| applyAllocationPolicy | 用于应用 allocationPolicy 或不应用于给定 iot 中心的标志。 | bool |
| connectionString | IoT 中心的连接字符串。 | 字符串(必填) |
| 位置 | IoT 中心的 ARM 区域。 | 字符串(必填) |
IpFilterRule
| Name | Description | Value |
|---|---|---|
| 操作 | 此规则捕获的请求的所需操作。 | 'Accept' “拒绝”(必填) |
| filterName | IP 筛选器规则的名称。 | 字符串(必填) |
| ipMask | 一个字符串,其中包含规则的 CIDR 表示法中的 IP 地址范围。 | 字符串(必填) |
| 目标 | 此规则捕获的请求的目标。 | 'all' 'deviceApi' 'serviceApi' |
ManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| 类型 | 托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。 | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' “UserAssigned”(必需) |
| userAssignedIdentities | 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 | UserAssignedIdentities |
PrivateEndpoint
| Name | Description | Value |
|---|
PrivateEndpointConnection
| Name | Description | Value |
|---|---|---|
| properties | 专用终结点连接的属性 | PrivateEndpointConnectionProperties (必需) |
PrivateEndpointConnectionProperties
| Name | Description | Value |
|---|---|---|
| privateEndpoint | 专用终结点连接的专用终结点属性 | PrivateEndpoint |
| privateLinkServiceConnectionState | 专用终结点连接的当前状态 | PrivateLinkServiceConnectionState (必需) |
PrivateLinkServiceConnectionState
| Name | Description | Value |
|---|---|---|
| actionsRequired | 专用终结点连接所需的操作 | 字符串 |
| description | 专用终结点连接的当前状态说明 | 字符串(必填) |
| 状态 | 专用终结点连接的状态 | 'Approved' 'Disconnected' 'Pending' “已拒绝”(必填) |
SharedAccessSignatureAuthorizationRuleAccessRightsDescription
| Name | Description | Value |
|---|---|---|
| keyName | 密钥的名称。 | 字符串(必填) |
| primaryKey | 主 SAS 密钥值。 | 字符串 |
| rights | 此密钥具有的权限。 | 'DeviceConnect' 'EnrollmentRead' 'EnrollmentWrite' 'RegistrationStatusRead' 'RegistrationStatusWrite' 'ServiceConfig'(必填) |
| secondaryKey | 辅助 SAS 密钥值。 | 字符串 |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentities
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|
用法示例
Bicep 示例
部署 IoT 设备配置服务的基本示例。
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource provisioningService 'Microsoft.Devices/provisioningServices@2022-02-05' = {
name: resourceName
location: location
properties: {
allocationPolicy: 'Hashed'
enableDataResidency: false
iotHubs: []
publicNetworkAccess: 'Enabled'
}
sku: {
capacity: 1
name: 'S1'
}
}
Azure 快速入门示例
以下 Azure 快速入门模板 包含用于部署此资源类型的 Bicep 示例。
| Bicep 文件 | Description |
|---|---|
| 创建 IoT 中心设备预配服务 | 使用此模板可以创建 IoT 中心和 IoT 中心设备预配服务,并将这两个服务链接在一起。 |
ARM 模板资源定义
可以使用目标操作部署 provisioningServices 资源类型:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.Devices/provisioningServices 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.Devices/provisioningServices",
"apiVersion": "2025-02-01-preview",
"name": "string",
"etag": "string",
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
}
}
},
"location": "string",
"properties": {
"allocationPolicy": "string",
"authorizationPolicies": [
{
"keyName": "string",
"primaryKey": "string",
"rights": "string",
"secondaryKey": "string"
}
],
"deviceRegistryNamespace": {
"authenticationType": "string",
"resourceId": "string",
"selectedUserAssignedIdentityResourceId": "string"
},
"enableDataResidency": "bool",
"iotHubs": [
{
"allocationWeight": "int",
"applyAllocationPolicy": "bool",
"connectionString": "string",
"location": "string"
}
],
"ipFilterRules": [
{
"action": "string",
"filterName": "string",
"ipMask": "string",
"target": "string"
}
],
"portalOperationsHostName": "string",
"privateEndpointConnections": [
{
"properties": {
"privateEndpoint": {
},
"privateLinkServiceConnectionState": {
"actionsRequired": "string",
"description": "string",
"status": "string"
}
}
}
],
"provisioningState": "string",
"publicNetworkAccess": "string",
"state": "string"
},
"resourcegroup": "string",
"sku": {
"capacity": "int",
"name": "string"
},
"subscriptionid": "string",
"tags": {
"{customized property}": "string"
}
}
属性值
Microsoft.Devices/provisioningServices
| Name | Description | Value |
|---|---|---|
| apiVersion | API 版本 | '2025-02-01-preview' |
| etag | Etag 字段 不需要。 如果在响应正文中提供,则还必须根据正常的 ETag 约定将其作为标头提供。 | 字符串 |
| 标识 | 分配给此资源的托管服务标识。 | ManagedServiceIdentity |
| 位置 | 资源所在的地理位置 | 字符串(必填) |
| name | 资源名称 | 字符串(必填) |
| properties | 预配服务的服务特定属性 | IotDpsPropertiesDescription (必需) |
| resourcegroup | 资源的资源组。 | 字符串 |
| sku | 预配服务的 SKU 信息。 | IotDpsSkuInfo (必填) |
| subscriptionid | 资源的订阅 ID。 | 字符串 |
| tags | 资源标记 | 标记名称和值的字典。 请参阅模板 中的 |
| 类型 | 资源类型 | 'Microsoft.Devices/provisioningServices' |
DeviceRegistryNamespace描述
| Name | Description | Value |
|---|---|---|
| authenticationType | 设备注册表命名空间 MI 身份验证类型:UserAssigned、SystemAssigned。 | 'SystemAssigned' “UserAssigned”(必需) |
| 资源ID | 设备注册表命名空间的 ARM 资源 ID。 | 字符串(必填) |
| selectedUserAssignedIdentityResourceId | 与设备注册表命名空间关联的选定用户分配的标识资源 ID。 当 authenticationType 为 UserAssigned 时,这是必需的。 | 字符串 |
IotDpsPropertiesDescription
| Name | Description | Value |
|---|---|---|
| allocationPolicy | 此预配服务要使用的分配策略。 | 'GeoLatency' 'Hashed' 'Static' |
| authorizationPolicies | 预配服务的授权密钥列表。 | SharedAccessSignatureAuthorizationRuleAccessRightsDescription[] |
| deviceRegistry命名空间 | 链接到预配服务的设备注册表命名空间。 | DeviceRegistryNamespace描述 |
| enableDataResidency | Optional. 指示 DPS 实例是否启用了数据驻留,从而删除跨异地对灾难恢复。 |
bool |
| iotHubs | 与此预配服务关联的 IoT 中心列表。 | IotHubDefinitionDescription[] |
| ipFilterRules | IP 筛选器规则。 | IpFilterRule[] |
| portalOperationsHostName | 用于为此预配服务启用 CORS 的门户终结点。 | 字符串 |
| privateEndpointConnections | 在此 IotHub 上创建的专用终结点连接 | PrivateEndpointConnection[] |
| provisioningState | 预配服务的 ARM 预配状态。 | 字符串 |
| publicNetworkAccess | 是否允许来自公用网络的请求 | 'Disabled' 'Enabled' |
| 状态 | 预配服务的当前状态。 | 'Activating' 'ActivationFailed' 'Active' 'Deleted' 'Deleting' 'DeletionFailed' 'FailingOver' 'FailoverFailed' 'Resuming' 'Suspended' 'Suspending' 'Transitioning' |
IotDpsSkuInfo
| Name | Description | Value |
|---|---|---|
| 产能 | 要预配的单位数 | int |
| name | Sku 名称。 | 'S1' |
IotHubDefinitionDescription
| Name | Description | Value |
|---|---|---|
| allocationWeight | 要申请给定 iot h 的权重。 | int |
| applyAllocationPolicy | 用于应用 allocationPolicy 或不应用于给定 iot 中心的标志。 | bool |
| connectionString | IoT 中心的连接字符串。 | 字符串(必填) |
| 位置 | IoT 中心的 ARM 区域。 | 字符串(必填) |
IpFilterRule
| Name | Description | Value |
|---|---|---|
| 操作 | 此规则捕获的请求的所需操作。 | 'Accept' “拒绝”(必填) |
| filterName | IP 筛选器规则的名称。 | 字符串(必填) |
| ipMask | 一个字符串,其中包含规则的 CIDR 表示法中的 IP 地址范围。 | 字符串(必填) |
| 目标 | 此规则捕获的请求的目标。 | 'all' 'deviceApi' 'serviceApi' |
ManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| 类型 | 托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。 | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' “UserAssigned”(必需) |
| userAssignedIdentities | 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 | UserAssignedIdentities |
PrivateEndpoint
| Name | Description | Value |
|---|
PrivateEndpointConnection
| Name | Description | Value |
|---|---|---|
| properties | 专用终结点连接的属性 | PrivateEndpointConnectionProperties (必需) |
PrivateEndpointConnectionProperties
| Name | Description | Value |
|---|---|---|
| privateEndpoint | 专用终结点连接的专用终结点属性 | PrivateEndpoint |
| privateLinkServiceConnectionState | 专用终结点连接的当前状态 | PrivateLinkServiceConnectionState (必需) |
PrivateLinkServiceConnectionState
| Name | Description | Value |
|---|---|---|
| actionsRequired | 专用终结点连接所需的操作 | 字符串 |
| description | 专用终结点连接的当前状态说明 | 字符串(必填) |
| 状态 | 专用终结点连接的状态 | 'Approved' 'Disconnected' 'Pending' “已拒绝”(必填) |
SharedAccessSignatureAuthorizationRuleAccessRightsDescription
| Name | Description | Value |
|---|---|---|
| keyName | 密钥的名称。 | 字符串(必填) |
| primaryKey | 主 SAS 密钥值。 | 字符串 |
| rights | 此密钥具有的权限。 | 'DeviceConnect' 'EnrollmentRead' 'EnrollmentWrite' 'RegistrationStatusRead' 'RegistrationStatusWrite' 'ServiceConfig'(必填) |
| secondaryKey | 辅助 SAS 密钥值。 | 字符串 |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentities
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|
用法示例
Azure 快速入门模板
以下 Azure 快速入门模板 部署此资源类型。
| Template | Description |
|---|---|
|
创建 IOT 中心和 Ubuntu 边缘模拟器 |
此模板创建 IOT 中心和虚拟机 Ubuntu 边缘模拟器。 |
|
创建 IoT 中心设备预配服务 |
使用此模板可以创建 IoT 中心和 IoT 中心设备预配服务,并将这两个服务链接在一起。 |
Terraform (AzAPI 提供程序)资源定义
可以使用目标操作部署 provisioningServices 资源类型:
- 资源组
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.Devices/provisioningServices 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Devices/provisioningServices@2025-02-01-preview"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
etag = "string"
properties = {
allocationPolicy = "string"
authorizationPolicies = [
{
keyName = "string"
primaryKey = "string"
rights = "string"
secondaryKey = "string"
}
]
deviceRegistryNamespace = {
authenticationType = "string"
resourceId = "string"
selectedUserAssignedIdentityResourceId = "string"
}
enableDataResidency = bool
iotHubs = [
{
allocationWeight = int
applyAllocationPolicy = bool
connectionString = "string"
location = "string"
}
]
ipFilterRules = [
{
action = "string"
filterName = "string"
ipMask = "string"
target = "string"
}
]
portalOperationsHostName = "string"
privateEndpointConnections = [
{
properties = {
privateEndpoint = {
}
privateLinkServiceConnectionState = {
actionsRequired = "string"
description = "string"
status = "string"
}
}
}
]
provisioningState = "string"
publicNetworkAccess = "string"
state = "string"
}
resourcegroup = "string"
sku = {
capacity = int
name = "string"
}
subscriptionid = "string"
}
}
属性值
Microsoft.Devices/provisioningServices
| Name | Description | Value |
|---|---|---|
| etag | Etag 字段 不需要。 如果在响应正文中提供,则还必须根据正常的 ETag 约定将其作为标头提供。 | 字符串 |
| 标识 | 分配给此资源的托管服务标识。 | ManagedServiceIdentity |
| 位置 | 资源所在的地理位置 | 字符串(必填) |
| name | 资源名称 | 字符串(必填) |
| properties | 预配服务的服务特定属性 | IotDpsPropertiesDescription (必需) |
| resourcegroup | 资源的资源组。 | 字符串 |
| sku | 预配服务的 SKU 信息。 | IotDpsSkuInfo (必填) |
| subscriptionid | 资源的订阅 ID。 | 字符串 |
| tags | 资源标记 | 标记名称和值的字典。 |
| 类型 | 资源类型 | "Microsoft.Devices/provisioningServices@2025-02-01-preview" |
DeviceRegistryNamespace描述
| Name | Description | Value |
|---|---|---|
| authenticationType | 设备注册表命名空间 MI 身份验证类型:UserAssigned、SystemAssigned。 | 'SystemAssigned' “UserAssigned”(必需) |
| 资源ID | 设备注册表命名空间的 ARM 资源 ID。 | 字符串(必填) |
| selectedUserAssignedIdentityResourceId | 与设备注册表命名空间关联的选定用户分配的标识资源 ID。 当 authenticationType 为 UserAssigned 时,这是必需的。 | 字符串 |
IotDpsPropertiesDescription
| Name | Description | Value |
|---|---|---|
| allocationPolicy | 此预配服务要使用的分配策略。 | 'GeoLatency' 'Hashed' 'Static' |
| authorizationPolicies | 预配服务的授权密钥列表。 | SharedAccessSignatureAuthorizationRuleAccessRightsDescription[] |
| deviceRegistry命名空间 | 链接到预配服务的设备注册表命名空间。 | DeviceRegistryNamespace描述 |
| enableDataResidency | Optional. 指示 DPS 实例是否启用了数据驻留,从而删除跨异地对灾难恢复。 |
bool |
| iotHubs | 与此预配服务关联的 IoT 中心列表。 | IotHubDefinitionDescription[] |
| ipFilterRules | IP 筛选器规则。 | IpFilterRule[] |
| portalOperationsHostName | 用于为此预配服务启用 CORS 的门户终结点。 | 字符串 |
| privateEndpointConnections | 在此 IotHub 上创建的专用终结点连接 | PrivateEndpointConnection[] |
| provisioningState | 预配服务的 ARM 预配状态。 | 字符串 |
| publicNetworkAccess | 是否允许来自公用网络的请求 | 'Disabled' 'Enabled' |
| 状态 | 预配服务的当前状态。 | 'Activating' 'ActivationFailed' 'Active' 'Deleted' 'Deleting' 'DeletionFailed' 'FailingOver' 'FailoverFailed' 'Resuming' 'Suspended' 'Suspending' 'Transitioning' |
IotDpsSkuInfo
| Name | Description | Value |
|---|---|---|
| 产能 | 要预配的单位数 | int |
| name | Sku 名称。 | 'S1' |
IotHubDefinitionDescription
| Name | Description | Value |
|---|---|---|
| allocationWeight | 要申请给定 iot h 的权重。 | int |
| applyAllocationPolicy | 用于应用 allocationPolicy 或不应用于给定 iot 中心的标志。 | bool |
| connectionString | IoT 中心的连接字符串。 | 字符串(必填) |
| 位置 | IoT 中心的 ARM 区域。 | 字符串(必填) |
IpFilterRule
| Name | Description | Value |
|---|---|---|
| 操作 | 此规则捕获的请求的所需操作。 | 'Accept' “拒绝”(必填) |
| filterName | IP 筛选器规则的名称。 | 字符串(必填) |
| ipMask | 一个字符串,其中包含规则的 CIDR 表示法中的 IP 地址范围。 | 字符串(必填) |
| 目标 | 此规则捕获的请求的目标。 | 'all' 'deviceApi' 'serviceApi' |
ManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| 类型 | 托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。 | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' “UserAssigned”(必需) |
| userAssignedIdentities | 与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。 | UserAssignedIdentities |
PrivateEndpoint
| Name | Description | Value |
|---|
PrivateEndpointConnection
| Name | Description | Value |
|---|---|---|
| properties | 专用终结点连接的属性 | PrivateEndpointConnectionProperties (必需) |
PrivateEndpointConnectionProperties
| Name | Description | Value |
|---|---|---|
| privateEndpoint | 专用终结点连接的专用终结点属性 | PrivateEndpoint |
| privateLinkServiceConnectionState | 专用终结点连接的当前状态 | PrivateLinkServiceConnectionState (必需) |
PrivateLinkServiceConnectionState
| Name | Description | Value |
|---|---|---|
| actionsRequired | 专用终结点连接所需的操作 | 字符串 |
| description | 专用终结点连接的当前状态说明 | 字符串(必填) |
| 状态 | 专用终结点连接的状态 | 'Approved' 'Disconnected' 'Pending' “已拒绝”(必填) |
SharedAccessSignatureAuthorizationRuleAccessRightsDescription
| Name | Description | Value |
|---|---|---|
| keyName | 密钥的名称。 | 字符串(必填) |
| primaryKey | 主 SAS 密钥值。 | 字符串 |
| rights | 此密钥具有的权限。 | 'DeviceConnect' 'EnrollmentRead' 'EnrollmentWrite' 'RegistrationStatusRead' 'RegistrationStatusWrite' 'ServiceConfig'(必填) |
| secondaryKey | 辅助 SAS 密钥值。 | 字符串 |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentities
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|
用法示例
Terraform 示例
部署 IoT 设备配置服务的基本示例。
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "provisioningService" {
type = "Microsoft.Devices/provisioningServices@2022-02-05"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
allocationPolicy = "Hashed"
enableDataResidency = false
iotHubs = [
]
publicNetworkAccess = "Enabled"
}
sku = {
capacity = 1
name = "S1"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}