Examples of DescribeSnapshotsRequest


Examples of com.amazonaws.services.ec2.model.DescribeSnapshotsRequest

            CreateSnapshotResult createSnapshotResult = ec2Client.createSnapshot(new CreateSnapshotRequest().
                    withVolumeId(volumeId));

            log.info("SnapshotId = " + createSnapshotResult.getSnapshot().getSnapshotId());

            DescribeSnapshotsRequest describeSnapshotsRequest = new DescribeSnapshotsRequest().
                    withSnapshotIds(createSnapshotResult.getSnapshot().getSnapshotId());

            Snapshot snapshot;

            while (true)
View Full Code Here

Examples of com.amazonaws.services.ec2.model.DescribeSnapshotsRequest

        } else {
            LOGGER.info(String.format("Getting EBS snapshotIds for %d ids in region %s.", snapshotIds.length, region));
        }

        AmazonEC2 ec2Client = ec2Client();
        DescribeSnapshotsRequest request = new DescribeSnapshotsRequest();
        // Set the owner id to self to avoid getting snapshots from other accounts.
        request.withOwnerIds(Arrays.<String>asList("self"));
        if (snapshotIds != null) {
            request.setSnapshotIds(Arrays.asList(snapshotIds));
        }
        DescribeSnapshotsResult result = ec2Client.describeSnapshots(request);
        List<Snapshot> snapshots = result.getSnapshots();

        LOGGER.info(String.format("Got %d EBS snapshots in region %s.", snapshots.size(), region));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.