检查Amazon EC2 实例状态 - AWS Snowcone 用户指南

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

检查Amazon EC2 实例状态

要检查 Amazon EC2 实例的当前状态,请使用describe-ec2-instances命令。输出与describe-device命令的输出类似,但结果来自中的设备缓存AWS Cloud,包括可用字段的子集。

要查看 Amazon EC2 实例的状态,请使用以下命令。将文档user input placeholder替换为您自己的信息。

命令

aws snow-device-management describe-device-ec2-instances \ --managed-device-id smd-fictbgr3rbcje111 \ --instance-ids s.i-84fa8a27d3e15e111

例外情况

ValidationException ResourceNotFoundException InternalServerException ThrottlingException AccessDeniedException

输出

{ "instances": [ { "instance": { "amiLaunchIndex": 0, "blockDeviceMappings": [ { "deviceName": "/dev/sda", "ebs": { "attachTime": "2021-07-23T15:25:38.719000-07:00", "deleteOnTermination": true, "status": "ATTACHED", "volumeId": "s.vol-84fa8a27d3e15e111" } } ], "cpuOptions": { "coreCount": 1, "threadsPerCore": 1 }, "createdAt": "2021-07-23T15:23:22.858000-07:00", "imageId": "s.ami-03f976c3cadaa6111", "instanceId": "s.i-84fa8a27d3e15e111", "state": { "name": "RUNNING" }, "instanceType": "snc1.micro", "privateIpAddress": "34.223.14.193", "publicIpAddress": "10.111.60.160", "rootDeviceName": "/dev/sda", "securityGroups": [ { "groupId": "s.sg-890b6b4008bdb3111", "groupName": "default" } ], "updatedAt": "2021-07-23T15:29:42.163000-07:00" }, "lastUpdatedAt": "2021-07-23T15:29:58. 071000-07:00" } ] }