Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
brmur authored May 26, 2020
2 parents 6a38b2b + 98451eb commit 1534e60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MainClass
// Replace smtp_username with your Amazon Pinpoint SMTP user name.
static string smtpUsername = "AKIAIOSFODNN7EXAMPLE";

// Replace smtp_password with your Amazon Pinpoint SMTP user name.
// Replace smtp_password with your Amazon Pinpoint SMTP password.
static string smtpPassword = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY";

// (Optional) the name of a configuration set to use for this message.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//snippet-sourcedescription:[DescribeRegionsAndZones.java demonstrates how to get a description of all regions and zones.]
//snippet-keyword:[Java]
//snippet-keyword:[SDK for Java 1.0]
//snippet-sourcesyntax:[java]
//snippet-keyword:[Code Sample]
//snippet-keyword:[Amazon EC2]
Expand All @@ -8,7 +8,7 @@
//snippet-sourcedate:[2018-05-22]
//snippet-sourceauthor:[soo-aws]
/*
* Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand All @@ -22,12 +22,14 @@
* permissions and limitations under the License.
*/
package aws.example.ec2;
// snippet-start:[ec2.java1.describe_region_and_zones.import]
import com.amazonaws.services.ec2.AmazonEC2;
import com.amazonaws.services.ec2.AmazonEC2ClientBuilder;
import com.amazonaws.services.ec2.model.DescribeRegionsResult;
import com.amazonaws.services.ec2.model.Region;
import com.amazonaws.services.ec2.model.AvailabilityZone;
import com.amazonaws.services.ec2.model.DescribeAvailabilityZonesResult;
// snippet-end:[ec2.java1.describe_region_and_zones.import]

/**
* Describes all regions and zones
Expand All @@ -38,6 +40,7 @@ public static void main(String[] args)
{
final AmazonEC2 ec2 = AmazonEC2ClientBuilder.defaultClient();

// snippet-start:[ec2.java1.describe_region_and_zones.regions]
DescribeRegionsResult regions_response = ec2.describeRegions();

for(Region region : regions_response.getRegions()) {
Expand All @@ -47,7 +50,9 @@ public static void main(String[] args)
region.getRegionName(),
region.getEndpoint());
}
// snippet-end:[ec2.java1.describe_region_and_zones.regions]

// snippet-start:[ec2.java1.describe_region_and_zones.zones]
DescribeAvailabilityZonesResult zones_response =
ec2.describeAvailabilityZones();

Expand All @@ -60,5 +65,6 @@ public static void main(String[] args)
zone.getState(),
zone.getRegionName());
}
// snippet-end:[ec2.java1.describe_region_and_zones.zones]
}
}

0 comments on commit 1534e60

Please sign in to comment.