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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南