DescribeDBSnapshots() 공개 메소드

Returns information about DB snapshots. This API action supports pagination.
/// DBSnapshotIdentifier does not refer to an existing DB snapshot. ///
public DescribeDBSnapshots ( ) : Amazon.RDS.Model.DescribeDBSnapshotsResponse
리턴 Amazon.RDS.Model.DescribeDBSnapshotsResponse
예제 #1
0
파일: Program.cs 프로젝트: PMInova/RDSDump
        private static DBSnapshot getNewerSnapshot(string databaseNameOrigin, AmazonRDSClient rdsClient)
        {
            DescribeDBSnapshotsRequest describeSnapshotsRequest =
            new DescribeDBSnapshotsRequest()
            {
                DBInstanceIdentifier = databaseNameOrigin,
                SnapshotType = "automated"

            };
            DescribeDBSnapshotsResponse describeSnapshotsResponse =
                rdsClient.DescribeDBSnapshots(describeSnapshotsRequest);

            List<DBSnapshot> snapshots = describeSnapshotsResponse.DBSnapshots;

            IEnumerable<DBSnapshot> orderedSnapshots = snapshots.OrderByDescending(x => x.SnapshotCreateTime);

            DBSnapshot newerSnapshot = orderedSnapshots.First();
            return newerSnapshot;
        }