Search in sources :

Example 16 with Region

use of com.amazonaws.services.s3.model.Region in project aws-doc-sdk-examples by awsdocs.

the class DescribeRegionsAndZones method main.

public static void main(String[] args) {
    final AmazonEC2 ec2 = AmazonEC2ClientBuilder.defaultClient();
    DescribeRegionsResult regions_response = ec2.describeRegions();
    for (Region region : regions_response.getRegions()) {
        System.out.printf("Found region %s " + "with endpoint %s", region.getRegionName(), region.getEndpoint());
    }
    DescribeAvailabilityZonesResult zones_response = ec2.describeAvailabilityZones();
    for (AvailabilityZone zone : zones_response.getAvailabilityZones()) {
        System.out.printf("Found availability zone %s " + "with status %s " + "in region %s", zone.getZoneName(), zone.getState(), zone.getRegionName());
    }
}
Also used : DescribeRegionsResult(com.amazonaws.services.ec2.model.DescribeRegionsResult) Region(com.amazonaws.services.ec2.model.Region) AvailabilityZone(com.amazonaws.services.ec2.model.AvailabilityZone) AmazonEC2(com.amazonaws.services.ec2.AmazonEC2) DescribeAvailabilityZonesResult(com.amazonaws.services.ec2.model.DescribeAvailabilityZonesResult)

Aggregations

AmazonS3Client (com.amazonaws.services.s3.AmazonS3Client)6 AmazonClientException (com.amazonaws.AmazonClientException)5 AmazonServiceException (com.amazonaws.AmazonServiceException)5 ClientConfiguration (com.amazonaws.ClientConfiguration)3 BasicAWSCredentials (com.amazonaws.auth.BasicAWSCredentials)3 Region (com.amazonaws.services.s3.model.Region)3 TransferManager (com.amazonaws.services.s3.transfer.TransferManager)3 IOException (java.io.IOException)3 Date (java.util.Date)3 Map (java.util.Map)3 DataStoreException (org.apache.jackrabbit.core.data.DataStoreException)3 NamedThreadFactory (org.apache.jackrabbit.core.data.util.NamedThreadFactory)3 AWSCredentials (com.amazonaws.auth.AWSCredentials)2 AmazonEC2 (com.amazonaws.services.ec2.AmazonEC2)2 DescribeRegionsResult (com.amazonaws.services.ec2.model.DescribeRegionsResult)2 Region (com.amazonaws.services.ec2.model.Region)2 AmazonS3 (com.amazonaws.services.s3.AmazonS3)2 S3ClientOptions (com.amazonaws.services.s3.S3ClientOptions)2 ListObjectsRequest (com.amazonaws.services.s3.model.ListObjectsRequest)2 ArrayList (java.util.ArrayList)2