本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
GetEntity
检索有关实体的信息。
请求语法
GET /workspaces/workspaceId
/entities/entityId
HTTP/1.1
URI 请求参数
请求使用以下 URI 参数。
- entityId
-
实体的 ID。
长度限制:长度下限为 1。最大长度为 128。
模式:
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|^[a-zA-Z0-9][a-zA-Z_\-0-9.:]*[a-zA-Z0-9]+
必需:是
- workspaceId
-
工作区的 ID。
长度限制:长度下限为 1。最大长度为 128。
模式:
[a-zA-Z_0-9][a-zA-Z_\-0-9]*[a-zA-Z0-9]+
必需:是
请求体
该请求没有请求正文。
响应语法
HTTP/1.1 200
Content-type: application/json
{
"areAllComponentsReturned": boolean,
"arn": "string",
"components": {
"string" : {
"areAllCompositeComponentsReturned": boolean,
"areAllPropertiesReturned": boolean,
"componentName": "string",
"componentTypeId": "string",
"compositeComponents": {
"string" : {
"componentName": "string",
"componentPath": "string",
"componentTypeId": "string",
"definedIn": "string",
"description": "string",
"propertyGroups": {
"string" : {
"groupType": "string",
"isInherited": boolean,
"propertyNames": [ "string" ]
}
},
"status": {
"error": {
"code": "string",
"message": "string"
},
"state": "string"
},
"syncSource": "string"
}
},
"definedIn": "string",
"description": "string",
"properties": {
"string" : {
"areAllPropertyValuesReturned": boolean,
"definition": {
"configuration": {
"string" : "string"
},
"dataType": {
"allowedValues": [
{
"booleanValue": boolean,
"doubleValue": number,
"expression": "string",
"integerValue": number,
"listValue": [
"DataValue"
],
"longValue": number,
"mapValue": {
"string" : "DataValue"
},
"relationshipValue": {
"targetComponentName": "string",
"targetEntityId": "string"
},
"stringValue": "string"
}
],
"nestedType": "DataType",
"relationship": {
"relationshipType": "string",
"targetComponentTypeId": "string"
},
"type": "string",
"unitOfMeasure": "string"
},
"defaultValue": {
"booleanValue": boolean,
"doubleValue": number,
"expression": "string",
"integerValue": number,
"listValue": [
"DataValue"
],
"longValue": number,
"mapValue": {
"string" : "DataValue"
},
"relationshipValue": {
"targetComponentName": "string",
"targetEntityId": "string"
},
"stringValue": "string"
},
"displayName": "string",
"isExternalId": boolean,
"isFinal": boolean,
"isImported": boolean,
"isInherited": boolean,
"isRequiredInEntity": boolean,
"isStoredExternally": boolean,
"isTimeSeries": boolean
},
"value": {
"booleanValue": boolean,
"doubleValue": number,
"expression": "string",
"integerValue": number,
"listValue": [
"DataValue"
],
"longValue": number,
"mapValue": {
"string" : "DataValue"
},
"relationshipValue": {
"targetComponentName": "string",
"targetEntityId": "string"
},
"stringValue": "string"
}
}
},
"propertyGroups": {
"string" : {
"groupType": "string",
"isInherited": boolean,
"propertyNames": [ "string" ]
}
},
"status": {
"error": {
"code": "string",
"message": "string"
},
"state": "string"
},
"syncSource": "string"
}
},
"creationDateTime": number,
"description": "string",
"entityId": "string",
"entityName": "string",
"hasChildEntities": boolean,
"parentEntityId": "string",
"status": {
"error": {
"code": "string",
"message": "string"
},
"state": "string"
},
"syncSource": "string",
"updateDateTime": number,
"workspaceId": "string"
}
响应元素
如果此操作成功,则该服务将会发送回 HTTP 200 响应。
服务以 JSON 格式返回以下数据。
- areAllComponentsReturned
-
此标记注明 API 响应中是否返回了所有组件。返回的最大组件数为 30。
类型:布尔值
- arn
-
实体的 ARN。
类型:字符串
长度约束:最小长度为 20。最大长度为 2048。
模式:
arn:((aws)|(aws-cn)|(aws-us-gov)):iottwinmaker:[a-z0-9-]+:[0-9]{12}:[\/a-zA-Z0-9_\-\.:]+
- components
-
将字符串映射到实体中的组件的对象。映射中的每个字符串对于该对象都必须是唯一的。
类型:字符串到 ComponentResponse 对象的映射
密钥长度限制:最小长度为 1。最大长度为 256。
键模式:
[a-zA-Z_\-0-9]+
- creationDateTime
-
创建实体的日期和时间。
类型:时间戳
- description
-
实体的描述。
类型:字符串
长度约束:最小长度为 0。最大长度为 2048。
模式:
.*
- entityId
-
实体的 ID。
类型:字符串
长度限制:长度下限为 1。最大长度为 128。
模式:
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|^[a-zA-Z0-9][a-zA-Z_\-0-9.:]*[a-zA-Z0-9]+
- entityName
-
实体名称。
类型:字符串
长度限制:最小长度为 1。最大长度为 256。
模式:
[^\u0000-\u001F\u007F]+
- hasChildEntities
-
指定实体是否关联了子实体的布尔值。
类型:布尔值
- parentEntityId
-
该实体的父实体的 ID。
类型:字符串
长度限制:长度下限为 1。最大长度为 128。
模式:
\$ROOT|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|^[a-zA-Z0-9][a-zA-Z_\-0-9.:]*[a-zA-Z0-9]+
- status
-
实体的当前状态。
类型:Status 对象
- syncSource
-
同步作业的 syncSource(如果该实体是由同步作业创建的)。
类型:字符串
模式:
[a-zA-Z_0-9]+
- updateDateTime
-
上次更新实体的日期和时间。
类型:时间戳
- workspaceId
-
工作区的 ID。
类型:字符串
长度限制:长度下限为 1。最大长度为 128。
模式:
[a-zA-Z_0-9][a-zA-Z_\-0-9]*[a-zA-Z0-9]+
错误
有关所有操作的常见错误的信息,请参阅常见错误。
- InternalServerException
-
出现意外错误。
HTTP 状态代码:500
- ResourceNotFoundException
-
未找到资源。
HTTP 状态代码:404
- ServiceQuotaExceededException
-
已超出服务限额。
HTTP 状态代码:402
- ThrottlingException
-
速率超过限制。
HTTP 状态代码:429
- ValidationException
-
失败
HTTP 状态代码:400
另请参阅
有关以特定语言之一使用此 API 的更多信息 AWS SDKs,请参阅以下内容: