3

How can I get the attached Volumes list for a particular instance\VM using the REST API?

IE: What is the REST API equivalent for this AWS CLI command:

aws ec2 describe-volumes --region us-west --filters Name=attachment.instance-id,values=i-eeh33heue3
asktyagi
  • 2,860
  • 2
  • 8
  • 25
alok tanna
  • 31
  • 2

1 Answers1

5

The API command is typically the CLI command without punctuation. It's documented here.

Sample request (you can add parameters for instance ID)

https://ec2.amazonaws.com/?Action=DescribeVolumes&AUTHPARAMS
Tim
  • 31,888
  • 7
  • 52
  • 78
  • Thank you. so below request is working request_parameters = 'Action=DescribeVolumes&Version=2013-10-15' but when I try this with filter it is not working . request_parameters = 'Action=DescribeVolumes&Version=2013-10-15&Filter.1.Name=attachment.instance-id&Filter.1.value=i-019c4383c4e0d670e' – alok tanna Jun 04 '19 at 17:47
  • I don't know the answer to that sorry. Your question has been answered, if you have another question around filtering please ask a new question, someone else will be able to help. – Tim Jun 04 '19 at 18:44