Discovered Asset Endpoint Profiles - Create Or Replace
创建 DiscoveredAssetEndpointProfile
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/{discoveredAssetEndpointProfileName}?api-version=2024-09-01-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
discovered
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$ |
发现的资产终结点配置文件名称参数。 |
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 名称不区分大小写。 |
subscription
|
path | True |
string (uuid) |
目标订阅的 ID。 该值必须是 UUID。 |
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
extendedLocation | True |
扩展位置。 |
|
location | True |
string |
资源所在的地理位置 |
properties.discoveryId | True |
string |
用于检测资产终结点配置文件中的更改的标识符。 |
properties.endpointProfileType | True |
string |
定义与终结点配置文件一起使用的连接器类型的配置。 |
properties.targetAddress | True |
string (uri) |
指定南行设备的网络地址/DNS 名称的本地有效 URI。 targetAddress URI 的方案部分指定设备的类型。 additionalConfiguration 字段包含其他连接器类型特定的配置。 |
properties.version | True |
integer (int64) |
每次修改资源时递增的整数。 |
properties.additionalConfiguration |
string |
字符串化 JSON,其中包含特定于连接类型的进一步配置(例如 OPC UA、Modbus、ONVIF)。 |
|
properties.supportedAuthenticationMethods |
目标服务器支持的身份验证方法列表。 |
||
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
资源“DiscoveredAssetEndpointProfile”更新操作成功 |
|
201 Created |
资源“DiscoveredAssetEndpointProfile”创建操作成功 标头
|
|
Other Status Codes |
意外的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Create_DiscoveredAssetEndpointProfile
示例请求
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/my-discoveredassetendpointprofile?api-version=2024-09-01-preview
{
"location": "West Europe",
"extendedLocation": {
"type": "CustomLocation",
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"
},
"tags": {
"site": "building-1"
},
"properties": {
"targetAddress": "https://www.example.com/myTargetAddress",
"additionalConfiguration": "{\"foo\": \"bar\"}",
"discoveryId": "11111111-1111-1111-1111-111111111111",
"version": 73766,
"endpointProfileType": "myEndpointProfileType",
"supportedAuthenticationMethods": [
"Anonymous",
"Certificate",
"UsernamePassword"
]
}
}
示例响应
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/my-discoveredassetendpointprofile",
"name": "my-assetendpointprofile",
"type": "Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles",
"location": "West Europe",
"extendedLocation": {
"type": "CustomLocation",
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"
},
"tags": {
"site": "building-1"
},
"systemData": {
"createdBy": "2ta23112-4596-44ff-b773-19405922bfc1",
"createdByType": "Application",
"createdAt": "2022-11-16T00:36:43.2516899Z",
"lastModifiedBy": "2ta23112-4596-44ff-b773-19405922bfc1",
"lastModifiedByType": "Application",
"lastModifiedAt": "2022-11-16T01:37:16.0922793Z"
},
"properties": {
"targetAddress": "https://www.example.com/myTargetAddress",
"additionalConfiguration": "{\"foo\": \"bar\"}",
"discoveryId": "11111111-1111-1111-1111-111111111111",
"version": 73766,
"endpointProfileType": "myEndpointProfileType",
"supportedAuthenticationMethods": [
"Anonymous",
"Certificate",
"UsernamePassword"
],
"provisioningState": "Succeeded"
}
}
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles/my-discoveredassetendpointprofile",
"name": "my-assetendpointprofile",
"type": "Microsoft.DeviceRegistry/discoveredAssetEndpointProfiles",
"location": "West Europe",
"extendedLocation": {
"type": "CustomLocation",
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.extendedlocation/customlocations/location1"
},
"tags": {
"site": "building-1"
},
"systemData": {
"createdBy": "2ta23112-4596-44ff-b773-19405922bfc1",
"createdByType": "Application",
"createdAt": "2022-11-16T00:36:43.2516899Z",
"lastModifiedBy": "2ta23112-4596-44ff-b773-19405922bfc1",
"lastModifiedByType": "Application",
"lastModifiedAt": "2022-11-16T01:37:16.0922793Z"
},
"properties": {
"targetAddress": "https://www.example.com/myTargetAddress",
"additionalConfiguration": "{\"foo\": \"bar\"}",
"discoveryId": "11111111-1111-1111-1111-111111111111",
"version": 73766,
"endpointProfileType": "myEndpointProfileType",
"supportedAuthenticationMethods": [
"Anonymous",
"Certificate",
"UsernamePassword"
],
"provisioningState": "Accepted"
}
}
定义
名称 | 说明 |
---|---|
Authentication |
在服务器上对客户端的用户进行身份验证的方法。 |
created |
创建资源的标识的类型。 |
Discovered |
已发现资产终结点配置文件定义。 |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
Extended |
扩展位置。 |
Provisioning |
资源的预配状态。 |
system |
与创建和上次修改资源相关的元数据。 |
AuthenticationMethod
在服务器上对客户端的用户进行身份验证的方法。
值 | 说明 |
---|---|
Anonymous |
用户身份验证方法是匿名的。 |
Certificate |
用户身份验证方法是 x509 证书。 |
UsernamePassword |
用户身份验证方法是用户名和密码。 |
createdByType
创建资源的标识的类型。
值 | 说明 |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
DiscoveredAssetEndpointProfile
已发现资产终结点配置文件定义。
名称 | 类型 | 说明 |
---|---|---|
extendedLocation |
扩展位置。 |
|
id |
string (arm-id) |
资源的完全限定资源 ID。 例如“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
location |
string |
资源所在的地理位置 |
name |
string |
资源的名称 |
properties.additionalConfiguration |
string |
字符串化 JSON,其中包含特定于连接类型的进一步配置(例如 OPC UA、Modbus、ONVIF)。 |
properties.discoveryId |
string |
用于检测资产终结点配置文件中的更改的标识符。 |
properties.endpointProfileType |
string |
定义与终结点配置文件一起使用的连接器类型的配置。 |
properties.provisioningState |
资源的预配状态。 |
|
properties.supportedAuthenticationMethods |
目标服务器支持的身份验证方法列表。 |
|
properties.targetAddress |
string (uri) |
指定南行设备的网络地址/DNS 名称的本地有效 URI。 targetAddress URI 的方案部分指定设备的类型。 additionalConfiguration 字段包含其他连接器类型特定的配置。 |
properties.version |
integer (int64) |
每次修改资源时递增的整数。 |
systemData |
包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。 |
|
tags |
object |
资源标记。 |
type |
string |
资源的类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
ExtendedLocation
扩展位置。
名称 | 类型 | 说明 |
---|---|---|
name |
string |
扩展位置名称。 |
type |
string |
扩展位置类型。 |
ProvisioningState
资源的预配状态。
值 | 说明 |
---|---|
Accepted |
服务器已接受资源。 |
Canceled |
资源创建已取消。 |
Deleting |
正在删除资源。 |
Failed |
资源创建失败。 |
Succeeded |
已创建资源。 |
systemData
与创建和上次修改资源相关的元数据。
名称 | 类型 | 说明 |
---|---|---|
createdAt |
string (date-time) |
资源创建时间戳(UTC)。 |
createdBy |
string |
创建资源的标识。 |
createdByType |
创建资源的标识的类型。 |
|
lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
lastModifiedBy |
string |
上次修改资源的标识。 |
lastModifiedByType |
上次修改资源的标识的类型。 |