Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 36 additions & 11 deletions apis/sts/src/main/java/org/jclouds/aws/domain/Region.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,26 @@ public class Region {
*/
public static final String EU_WEST_3 = "eu-west-3";

/**
* EU (Milan)
*/
public static final String EU_SOUTH_1 = "eu-south-1";

/**
* EU (Spain)
*/
public static final String EU_SOUTH_2 = "eu-south-2";

/**
* EU (Frankfurt)
*/
public static final String EU_CENTRAL_1 = "eu-central-1";

/**
* EU (Zurich)
*/
public static final String EU_CENTRAL_2 = "eu-central-2";

/**
* EU (Stockholm)
*/
Expand Down Expand Up @@ -167,48 +182,58 @@ public class Region {


public static final Set<String> DEFAULT_S3 = ImmutableSet.of(US_STANDARD, US_EAST_2, US_WEST_1, US_WEST_2,
CA_CENTRAL_1, EU_WEST_1, EU_WEST_2, EU_WEST_3, EU_CENTRAL_1, EU_NORTH_1, SA_EAST_1, AP_SOUTHEAST_1,
AP_SOUTHEAST_2,
AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1, CN_NORTHWEST_1, ME_SOUTH_1);
CA_CENTRAL_1, SA_EAST_1,
EU_SOUTH_1, EU_SOUTH_2, EU_WEST_1, EU_WEST_2, EU_WEST_3, EU_CENTRAL_1, EU_CENTRAL_2, EU_NORTH_1,
AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2,
CN_NORTH_1, CN_NORTHWEST_1, ME_SOUTH_1);

public static final Set<String> DEFAULT_REGIONS = ImmutableSet.of(US_EAST_1, US_EAST_2, US_WEST_1, US_WEST_2,
CA_CENTRAL_1, SA_EAST_1, EU_WEST_1, EU_WEST_2, EU_WEST_3, EU_CENTRAL_1, EU_NORTH_1, AP_SOUTHEAST_1,
AP_SOUTHEAST_2,
AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2, CN_NORTH_1, CN_NORTHWEST_1, ME_SOUTH_1);
CA_CENTRAL_1, SA_EAST_1,
EU_SOUTH_1, EU_SOUTH_2, EU_WEST_1, EU_WEST_2, EU_WEST_3, EU_CENTRAL_1, EU_CENTRAL_2, EU_NORTH_1,
AP_SOUTHEAST_1, AP_SOUTHEAST_2, AP_SOUTH_1, AP_NORTHEAST_1, AP_NORTHEAST_2,
CN_NORTH_1, CN_NORTHWEST_1, ME_SOUTH_1);

public static Properties regionPropertiesS3() {

Properties properties = regionProperties();
properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(DEFAULT_S3));
// note that due to US_STANDARD the codes include US instead of US-VA
properties.setProperty(PROPERTY_ISO3166_CODES, "US,US-OH,US-CA,US-OR,CA,BR-SP,IE,GB-LND,FR-IDF,DE-HE,SE-AB,SG,"
+ "AU-NSW,"
+ "IN-MH,JP-13,KR-11,CN-BJ,CN-NX,BH");
properties.setProperty(PROPERTY_ISO3166_CODES, "US,US-OH,US-CA,US-OR,CA,BR-SP,"
+ "IE,GB-LND,FR-IDF,IT-MI,ES,DE-HE,CH-ZH,SE-AB,"
+ "SG,AU-NSW,IN-MH,JP-13,KR-11,CN-BJ,CN-NX,BH");
properties.setProperty(PROPERTY_REGION + "." + US_STANDARD + "." + ISO3166_CODES, "US");
return properties;
}

public static Properties regionProperties() {
Properties properties = new Properties();
properties.setProperty(PROPERTY_REGIONS, Joiner.on(',').join(DEFAULT_REGIONS));
properties.setProperty(PROPERTY_ISO3166_CODES, "US-VA,US-OH,US-CA,US-OR,CA,BR-SP,IE,GB-LND,FR-IDF,DE-HE,SG,"
+ "AU-NSW,IN-MH,JP-13,KR-11,CN-BJ,CN-NX,BH");
properties.setProperty(PROPERTY_ISO3166_CODES, "US-VA,US-OH,US-CA,US-OR,CA,BR-SP,"
+ "IE,GB-LND,FR-IDF,IT-MI,ES,DE-HE,CH-ZH,SE-AB"
+ "SG,AU-NSW,IN-MH,JP-13,KR-11,"
+ "CN-BJ,CN-NX,BH");
properties.setProperty(PROPERTY_REGION + "." + US_EAST_1 + "." + ISO3166_CODES, "US-VA");
properties.setProperty(PROPERTY_REGION + "." + US_EAST_2 + "." + ISO3166_CODES, "US-OH");
properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + "." + ISO3166_CODES, "US-CA");
properties.setProperty(PROPERTY_REGION + "." + US_WEST_2 + "." + ISO3166_CODES, "US-OR");
properties.setProperty(PROPERTY_REGION + "." + CA_CENTRAL_1 + "." + ISO3166_CODES, "CA");
properties.setProperty(PROPERTY_REGION + "." + SA_EAST_1 + "." + ISO3166_CODES, "BR-SP");

properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + "." + ISO3166_CODES, "IE");
properties.setProperty(PROPERTY_REGION + "." + EU_WEST_2 + "." + ISO3166_CODES, "GB-LND");
properties.setProperty(PROPERTY_REGION + "." + EU_WEST_3 + "." + ISO3166_CODES, "FR-IDF");
properties.setProperty(PROPERTY_REGION + "." + EU_SOUTH_1 + "." + ISO3166_CODES, "IT-MI");
properties.setProperty(PROPERTY_REGION + "." + EU_SOUTH_2 + "." + ISO3166_CODES, "ES");
properties.setProperty(PROPERTY_REGION + "." + EU_CENTRAL_1 + "." + ISO3166_CODES, "DE-HE");
properties.setProperty(PROPERTY_REGION + "." + EU_CENTRAL_2 + "." + ISO3166_CODES, "CH-ZH");
properties.setProperty(PROPERTY_REGION + "." + EU_NORTH_1 + "." + ISO3166_CODES, "SE-AB");

properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ISO3166_CODES, "SG");
properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_2 + "." + ISO3166_CODES, "AU-NSW");
properties.setProperty(PROPERTY_REGION + "." + AP_SOUTH_1 + "." + ISO3166_CODES, "IN-MH");
properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_1 + "." + ISO3166_CODES, "JP-13");
properties.setProperty(PROPERTY_REGION + "." + AP_NORTHEAST_2 + "." + ISO3166_CODES, "KR-11");

properties.setProperty(PROPERTY_REGION + "." + CN_NORTH_1 + "." + ISO3166_CODES, "CN-BJ");
properties.setProperty(PROPERTY_REGION + "." + CN_NORTHWEST_1 + "." + ISO3166_CODES, "CN-NX");
properties.setProperty(PROPERTY_REGION + "." + ME_SOUTH_1 + "." + ISO3166_CODES, "BH");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,10 @@ public void testAssignability() {

@Override
protected Set<String> getIso3166Codes() {
return ImmutableSet.of("US-VA", "US-OH", "US-CA", "US-OR", "CA", "BR-SP", "IE", "GB-LND", "FR-IDF", "DE-HE",
"SE-AB", "SG", "AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-BJ", "CN-NX", "BH");
return ImmutableSet.of("US-VA", "US-OH", "US-CA", "US-OR", "CA", "BR-SP",
"IE", "GB-LND", "FR-IDF", "IT-MI", "ES", "DE-HE", "CH-ZH", "SE-AB",
"SG", "AU-NSW", "IN-MH", "JP-13", "KR-11",
"CN-BJ", "CN-NX", "BH");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
import static org.jclouds.aws.domain.Region.CN_NORTHWEST_1;
import static org.jclouds.aws.domain.Region.CN_NORTH_1;
import static org.jclouds.aws.domain.Region.EU_CENTRAL_1;
import static org.jclouds.aws.domain.Region.EU_CENTRAL_2;
import static org.jclouds.aws.domain.Region.EU_NORTH_1;
import static org.jclouds.aws.domain.Region.EU_SOUTH_1;
import static org.jclouds.aws.domain.Region.EU_SOUTH_2;
import static org.jclouds.aws.domain.Region.EU_WEST_1;
import static org.jclouds.aws.domain.Region.EU_WEST_2;
import static org.jclouds.aws.domain.Region.EU_WEST_3;
Expand Down Expand Up @@ -81,14 +84,17 @@ public static Properties defaultProperties() {
properties.setProperty(PROPERTY_REGION + "." + US_WEST_1 + "." + ENDPOINT, "https://s3-us-west-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + US_WEST_2 + "." + ENDPOINT, "https://s3-us-west-2.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + CA_CENTRAL_1 + "." + ENDPOINT, "https://s3-ca-central-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + ME_SOUTH_1 + "." + ENDPOINT, "https://s3.me-south-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + SA_EAST_1 + "." + ENDPOINT, "https://s3-sa-east-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + EU_CENTRAL_1 + "." + ENDPOINT,
"https://s3-eu-central-1.amazonaws.com");

properties.setProperty(PROPERTY_REGION + "." + EU_WEST_1 + "." + ENDPOINT, "https://s3-eu-west-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + EU_WEST_2 + "." + ENDPOINT, "https://s3-eu-west-2.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + EU_WEST_3 + "." + ENDPOINT, "https://s3-eu-west-3.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + EU_SOUTH_1 + "." + ENDPOINT, "https://s3-eu-south-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + EU_SOUTH_2 + "." + ENDPOINT, "https://s3-eu-south-2.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + EU_CENTRAL_1 + "." + ENDPOINT, "https://s3-eu-central-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + EU_CENTRAL_2 + "." + ENDPOINT, "https://s3-eu-central-2.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + EU_NORTH_1 + "." + ENDPOINT, "https://s3-eu-north-1.amazonaws.com");

properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_1 + "." + ENDPOINT,
"https://s3-ap-southeast-1.amazonaws.com");
properties.setProperty(PROPERTY_REGION + "." + AP_SOUTHEAST_2 + "." + ENDPOINT,
Expand All @@ -103,6 +109,7 @@ public static Properties defaultProperties() {
"https://s3.cn-north-1.amazonaws.com.cn");
properties.setProperty(PROPERTY_REGION + "." + CN_NORTHWEST_1 + "." + ENDPOINT,
"https://s3.cn-north-s3.cn-northwest-1.amazonaws.com.cn");
properties.setProperty(PROPERTY_REGION + "." + ME_SOUTH_1 + "." + ENDPOINT, "https://s3.me-south-1.amazonaws.com");
return properties;
}

Expand All @@ -115,9 +122,10 @@ protected Builder() {
.homepage(URI.create("http://aws.amazon.com/s3"))
.console(URI.create("https://console.aws.amazon.com/s3/home"))
.linkedServices("aws-ec2", "aws-elb", "aws-cloudwatch", "aws-s3", "aws-simpledb")
.iso3166Codes("US", "US-OH", "US-CA", "US-OR", "CA", "BR-SP", "IE", "GB-LND", "FR-IDF", "DE-HE", "SE"
+ "-AB", "SG",
"AU-NSW", "IN-MH", "JP-13", "KR-11", "CN-BJ", "CN-NX", "BH")
.iso3166Codes("US", "US-OH", "US-CA", "US-OR", "CA", "BR-SP",
"IE", "GB-LND", "FR-IDF", "IT-MI", "ES", "DE-HE", "CH-ZH", "SE-AB",
"SG", "AU-NSW", "IN-MH", "JP-13", "KR-11",
"CN-BJ", "CN-NX", "BH")
.defaultProperties(AWSS3ProviderMetadata.defaultProperties());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,19 @@ protected Set<String> getIso3166Codes() {
"BH",
"BR-SP",
"CA",
"CH-ZH",
"CN-BJ",
"CN-NX",
"DE-HE",
"SE-AB",
"GB-LND",
"ES",
"FR-IDF",
"GB-LND",
"IE",
"IN-MH",
"IT-MI",
"JP-13",
"KR-11",
"SE-AB",
"SG",
"US",
"US-CA",
Expand Down