How to get list aws snapshot filtered by description string

146 Views Asked by At

How to retrieve snapshot list filtering by description of snapshot with a common string through AWS-SDK(Ruby).

Here is ex

 1. snapshot-id        description
 2. 1xxvfs         snapdesp100
 3. 2xxhgso        snapdesp150
 4. 3##sfsj        snapdesp240

I want to filter with description "snapdesp1" and the output need like below. output :

 1. 1xxvfs
 2. 2xxhgso

Thanks in advance.

1

There are 1 best solutions below

0
John Rotenstein On

The DescribeSnapshots() command can filter on description, but I don't think it will accept wildcards.

You should simply call DescribeSnapshots() to retrieve a complete list of snapshots, then filter the results within your Ruby code.