How can I retrieve the 'platformDetails' property via the EC2 API?

0

I'm using the EC2 API's DescribeInstances method, which returns 'platform' but not 'platformDetails': https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html

I can see both 'platform' and 'platformDetails' properties for my EC2 VMs when viewing them in the admin console, and they are described in the Instance type: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Instance.html

How can I retrieve the 'platformDetails' via the web API?

Thanks

질문됨 2년 전224회 조회
1개 답변
1

I have used AWS CLI ec2 describe-instances, and successfully retreived the value of platformDetails. You may use describe-instances for platformDetails fields.

Here is what I executed.

$ aws --debug ec2 describe-instances --query 'Reservations[].Instances[].{id:InstanceId,platformDetails:PlatformDetails}'

You can get the debug output from the response body to describeInstance API.

I can find the platformDetails field in the response body XML.

AWS
답변함 2년 전
profile pictureAWS
전문가
Chris_G
검토됨 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠