From 485bb96ae6917c0f1c28771cdbb70116a79b9cb3 Mon Sep 17 00:00:00 2001 From: Leslie Wittig Quintanilla Date: Thu, 4 Apr 2013 21:21:30 -0300 Subject: [PATCH] Two last modifications for the new region sa-east-1. --- README.md | 2 +- src/main/java/org/elasticsearch/gateway/s3/S3Gateway.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 713c75882db9c..040de50d9f833 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ The plugin will automatically use the instance level security credentials (as of ### Region -The `cloud.aws.region` can be set to a region and will automatically use the relevant settings for both `ec2` and `s3`. The available values are: `us-east` (`us-east-1`), `us-west` (`us-west-1`), `us-west-1`, `us-west-2` `ap-southeast` (`ap-southeast-1`), `ap-southeast-1`, `ap-southeast-2`, `ap-northeast` (`ap-northeast-1`) `eu-west` (`eu-west-1`). +The `cloud.aws.region` can be set to a region and will automatically use the relevant settings for both `ec2` and `s3`. The available values are: `us-east` (`us-east-1`), `us-west` (`us-west-1`), `us-west-1`, `us-west-2` `ap-southeast` (`ap-southeast-1`), `ap-southeast-1`, `ap-southeast-2`, `ap-northeast` (`ap-northeast-1`) `eu-west` (`eu-west-1`), `sa-east` (`sa-east-1`). ## EC2 Discovery diff --git a/src/main/java/org/elasticsearch/gateway/s3/S3Gateway.java b/src/main/java/org/elasticsearch/gateway/s3/S3Gateway.java index 905bc6ef617d3..ce143d174c8ef 100644 --- a/src/main/java/org/elasticsearch/gateway/s3/S3Gateway.java +++ b/src/main/java/org/elasticsearch/gateway/s3/S3Gateway.java @@ -80,6 +80,10 @@ public S3Gateway(Settings settings, ThreadPool threadPool, ClusterService cluste region = "EU"; } else if ("eu-west-1".equals(regionSetting.toLowerCase())) { region = "EU"; + } else if ("sa-east".equals(regionSetting.toLowerCase())) { + region = "sa-east-1"; + } else if ("sa-east-1".equals(regionSetting.toLowerCase())) { + region = "sa-east-1"; } } }