Iot Connectors - Create Or Update
使用指定的参数创建或更新 IoT 连接器资源。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis/workspaces/{workspaceName}/iotconnectors/{iotConnectorName}?api-version=2022-06-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
iot
|
path | True |
string minLength: 3maxLength: 24 |
IoT 连接器资源的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+$ |
包含服务实例的资源组的名称。 |
|
subscription
|
path | True |
string |
订阅标识符。 |
|
workspace
|
path | True |
string minLength: 3maxLength: 24 |
工作区资源的名称。 |
|
api-version
|
query | True |
string |
客户端 API 版本。 |
请求正文
| 名称 | 类型 | 说明 |
|---|---|---|
| etag |
string |
与资源关联的 etag,在编辑资源时用于乐观并发。 |
| identity |
指示服务是否具有与之关联的托管标识的设置。 |
|
| location |
string |
资源位置。 |
| properties.deviceMapping |
设备映射。 |
|
| properties.ingestionEndpointConfiguration |
源配置。 |
|
| tags |
object |
资源标记。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
已更新 - 接受放置请求并更新现有资源。 |
|
| 201 Created |
创建 - 接受放置请求并异步创建现有资源。 |
|
| 202 Accepted |
已接受 - 接受请求,现有资源正在异步更新。 |
|
| Other Status Codes |
描述作失败的原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Create an IoT Connector
示例请求
PUT https://management.azure.com/subscriptions/subid/resourceGroups/testRG/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotconnectors/blue?api-version=2022-06-01
{
"location": "westus",
"tags": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"identity": {
"type": "SystemAssigned"
},
"properties": {
"ingestionEndpointConfiguration": {
"eventHubName": "MyEventHubName",
"consumerGroup": "ConsumerGroupA",
"fullyQualifiedEventHubNamespace": "myeventhub.servicesbus.windows.net"
},
"deviceMapping": {
"content": {
"templateType": "CollectionContent",
"template": [
{
"templateType": "JsonPathContent",
"template": {
"typeName": "heartrate",
"typeMatchExpression": "$..[?(@heartrate)]",
"deviceIdExpression": "$.deviceid",
"timestampExpression": "$.measurementdatetime",
"values": [
{
"required": "true",
"valueExpression": "$.heartrate",
"valueName": "hr"
}
]
}
}
]
}
}
}
}
示例响应
{
"name": "blue",
"id": "/subscriptions/subid/resourceGroups/testRG/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotconnectors/blue",
"type": "Microsoft.HealthcareApis/workspaces/iotconnectors",
"location": "westus",
"etag": "00000000-0000-0000-f5ac-912ca49e01d6",
"tags": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"identity": {
"type": "SystemAssigned"
},
"properties": {
"provisioningState": "Succeeded",
"ingestionEndpointConfiguration": {
"eventHubName": "MyEventHubName",
"consumerGroup": "ConsumerGroupA",
"fullyQualifiedEventHubNamespace": "myeventhub.servicesbus.windows.net"
},
"deviceMapping": {
"content": {
"templateType": "CollectionContent",
"template": [
{
"templateType": "JsonPathContent",
"template": {
"typeName": "heartrate",
"typeMatchExpression": "$..[?(@heartrate)]",
"deviceIdExpression": "$.deviceid",
"timestampExpression": "$.measurementdatetime",
"values": [
{
"required": "true",
"valueExpression": "$.heartrate",
"valueName": "hr"
}
]
}
}
]
}
}
},
"systemData": {
"createdBy": "string",
"createdAt": "2021-01-28T19:26:24.072Z",
"lastModifiedBy": "string",
"lastModifiedAt": "2021-01-28T19:26:24.072Z"
}
}
{
"name": "blue",
"id": "/subscriptions/subid/resourceGroups/testRG/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotconnectors/blue",
"type": "Microsoft.HealthcareApis/workspaces/iotconnectors",
"location": "westus",
"etag": "00000000-0000-0000-f5ac-912ca49e01d6",
"tags": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"identity": {
"type": "SystemAssigned"
},
"properties": {
"provisioningState": "Creating",
"ingestionEndpointConfiguration": {
"eventHubName": "MyEventHubName",
"consumerGroup": "ConsumerGroupA",
"fullyQualifiedEventHubNamespace": "myeventhub.servicesbus.windows.net"
},
"deviceMapping": {
"content": {
"templateType": "CollectionContent",
"template": [
{
"templateType": "JsonPathContent",
"template": {
"typeName": "heartrate",
"typeMatchExpression": "$..[?(@heartrate)]",
"deviceIdExpression": "$.deviceid",
"timestampExpression": "$.measurementdatetime",
"values": [
{
"required": "true",
"valueExpression": "$.heartrate",
"valueName": "hr"
}
]
}
}
]
}
}
},
"systemData": {
"createdBy": "string",
"createdAt": "2021-01-28T19:26:24.072Z",
"lastModifiedBy": "string",
"lastModifiedAt": "2021-01-28T19:26:24.072Z"
}
}
{
"name": "blue",
"id": "/subscriptions/subid/resourceGroups/testRG/providers/Microsoft.HealthcareApis/workspaces/workspace1/iotconnectors/blue",
"type": "Microsoft.HealthcareApis/workspaces/iotconnectors",
"location": "westus",
"etag": "00000000-0000-0000-f5ac-912ca49e01d6",
"tags": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"identity": {
"type": "SystemAssigned"
},
"properties": {
"provisioningState": "Accepted",
"ingestionEndpointConfiguration": {
"eventHubName": "MyEventHubName",
"consumerGroup": "ConsumerGroupA",
"fullyQualifiedEventHubNamespace": "myeventhub.servicesbus.windows.net"
},
"deviceMapping": {
"content": {
"templateType": "CollectionContent",
"template": [
{
"templateType": "JsonPathContent",
"template": {
"typeName": "heartrate",
"typeMatchExpression": "$..[?(@heartrate)]",
"deviceIdExpression": "$.deviceid",
"timestampExpression": "$.measurementdatetime",
"values": [
{
"required": "true",
"valueExpression": "$.heartrate",
"valueName": "hr"
}
]
}
}
]
}
}
},
"systemData": {
"createdBy": "string",
"createdAt": "2021-01-28T19:26:24.072Z",
"lastModifiedBy": "string",
"lastModifiedAt": "2021-01-28T19:26:24.072Z"
}
}
定义
| 名称 | 说明 |
|---|---|
|
created |
创建资源的标识的类型。 |
|
Error |
错误详细信息。 |
|
Error |
错误详细信息。 |
| Identity |
指示服务是否具有与之关联的托管标识的设置。 |
|
Iot |
IoT 连接器定义。 |
|
Iot |
事件中心引入终结点配置 |
|
Iot |
映射内容。 |
|
provisioning |
预配状态。 |
|
Service |
指定的标识类型,当前允许 SystemAssigned 和 None。 |
|
system |
与创建和上次修改资源相关的元数据。 |
|
User |
用户分配的标识属性 |
createdByType
创建资源的标识的类型。
| 值 | 说明 |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
ErrorDetails
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误详细信息 |
ErrorDetailsInternal
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
错误代码。 |
| message |
string |
错误消息。 |
| target |
string |
特定错误的目标。 |
Identity
指示服务是否具有与之关联的托管标识的设置。
| 名称 | 类型 | 说明 |
|---|---|---|
| principalId |
string (uuid) |
系统分配标识的服务主体 ID。 此属性仅针对系统分配的标识提供。 |
| tenantId |
string (uuid) |
系统分配标识的租户 ID。 此属性仅针对系统分配的标识提供。 |
| type |
指定的标识类型,当前允许 SystemAssigned 和 None。 |
|
| userAssignedIdentities |
<string,
User |
User-Assigned 标识 |
IotConnector
IoT 连接器定义。
| 名称 | 类型 | 说明 |
|---|---|---|
| etag |
string |
与资源关联的 etag,在编辑资源时用于乐观并发。 |
| id |
string |
资源标识符。 |
| identity |
指示服务是否具有与之关联的托管标识的设置。 |
|
| location |
string |
资源位置。 |
| name |
string pattern: ^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$ |
资源名称。 |
| properties.deviceMapping |
设备映射。 |
|
| properties.ingestionEndpointConfiguration |
源配置。 |
|
| properties.provisioningState |
预配状态。 |
|
| systemData |
与创建和上次修改资源相关的元数据。 |
|
| tags |
object |
资源标记。 |
| type |
string |
资源类型。 |
IotEventHubIngestionEndpointConfiguration
事件中心引入终结点配置
| 名称 | 类型 | 说明 |
|---|---|---|
| consumerGroup |
string |
要连接到的事件中心的使用者组。 |
| eventHubName |
string |
要连接到的事件中心名称。 |
| fullyQualifiedEventHubNamespace |
string |
要连接到的事件中心的完全限定命名空间。 |
IotMappingProperties
映射内容。
| 名称 | 类型 | 说明 |
|---|---|---|
| content |
object |
映射。 |
provisioningState
预配状态。
| 值 | 说明 |
|---|---|
| Deleting | |
| Succeeded | |
| Creating | |
| Accepted | |
| Verifying | |
| Updating | |
| Failed | |
| Canceled | |
| Deprovisioned | |
| Moving | |
| Suspended | |
| Warned | |
| SystemMaintenance |
ServiceManagedIdentityType
指定的标识类型,当前允许 SystemAssigned 和 None。
| 值 | 说明 |
|---|---|
| None | |
| SystemAssigned | |
| UserAssigned | |
| SystemAssigned,UserAssigned |
systemData
与创建和上次修改资源相关的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
| createdBy |
string |
创建资源的标识。 |
| createdByType |
创建资源的标识的类型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识。 |
| lastModifiedByType |
上次修改资源的标识的类型。 |
UserAssignedIdentity
用户分配的标识属性
| 名称 | 类型 | 说明 |
|---|---|---|
| clientId |
string (uuid) |
分配的标识的客户端 ID。 |
| principalId |
string (uuid) |
已分配标识的主体 ID。 |