DescribeDeviceEc2Instances - Amazon Snowball
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

DescribeDeviceEc2Instances

查看与 Amazon EC2 兼容的实例的当前状态。输出与 describeDevice 类似,但结果来自 Amazon Web Services 云 中的设备缓存,并且包括可用字段的子集。

请求语法

POST /managed-device/managedDeviceId/resources/ec2/describe HTTP/1.1 Content-type: application/json { "instanceIds": [ "string" ] }

URI 请求参数

请求使用以下 URI 参数。

managedDeviceId

托管设备的 ID。

长度限制:长度下限为 1。长度上限为 64。

必需:是

请求体

请求接受采用 JSON 格式的以下数据。

instanceIds

与托管设备关联的实例 ID 列表。

类型:字符串数组

必需:是

响应语法

HTTP/1.1 200 Content-type: application/json { "instances": [ { "instance": { "amiLaunchIndex": number, "blockDeviceMappings": [ { "deviceName": "string", "ebs": { "attachTime": number, "deleteOnTermination": boolean, "status": "string", "volumeId": "string" } } ], "cpuOptions": { "coreCount": number, "threadsPerCore": number }, "createdAt": number, "imageId": "string", "instanceId": "string", "instanceType": "string", "privateIpAddress": "string", "publicIpAddress": "string", "rootDeviceName": "string", "securityGroups": [ { "groupId": "string", "groupName": "string" } ], "state": { "code": number, "name": "string" }, "updatedAt": number }, "lastUpdatedAt": number } ] }

响应元素

如果此操作成功,则该服务将会发送回 HTTP 200 响应。

服务以 JSON 格式返回以下数据。

instances

包含每个实例相关信息的结构列表。

类型:InstanceSummary 对象数组

错误

有关所有操作返回的常见错误的信息,请参阅 常见错误

AccessDeniedException

您没有足够的访问权限,无法执行该操作。

HTTP 状态代码:403

InternalServerException

处理请求时出现意外错误。

HTTP 状态代码:500

ResourceNotFoundException

该请求引用的资源不存在。

HTTP 状态代码:404

ThrottlingException

由于请求限制而导致请求被拒绝。

HTTP 状态代码:429

ValidationException

输入无法满足 Amazon 服务指定的约束。

HTTP 状态代码:400

另请参阅

有关在特定语言的 Amazon SDK 中使用此 API 的更多信息,请参阅以下内容: