finding last snapshot using boto
Posted
by
shantanuo
on Stack Overflow
See other posts from Stack Overflow
or by shantanuo
Published on 2013-10-15T11:22:25Z
Indexed on
2013/10/18
3:54 UTC
Read the original article
Hit count: 256
boto
|amazon-redshift
I have read the explanation about "describe_cluster_snapshots" from ...
It has an option start_time and end_time but there is no way to sort it. How do I get the id of the latest snapshot using boto?
Here is what I have tried but it does not seem to return the last snapshot.
mysnap=conn.describe_cluster_snapshots()
mysnapidentifier=mysnap['DescribeClusterSnapshotsResponse']['DescribeClusterSnapshotsResult']['Snapshots'][-1]['SnapshotIdentifier']
© Stack Overflow or respective owner