Skip to content

Commit

Permalink
AWS SDK for Java 1.11.116
Browse files Browse the repository at this point in the history
  • Loading branch information
AWS committed Apr 6, 2017
1 parent 729830b commit 6486b8a
Show file tree
Hide file tree
Showing 154 changed files with 4,395 additions and 837 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# __1.11.116__ __2017-04-05__
## __Amazon ElastiCache__
- ### Features
- ElastiCache added support for testing the Elasticache Multi-AZ feature with Automatic Failover.

# __1.11.115__ __2017-04-04__
## __Amazon CloudWatch__
- ### Features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>1.11.115</version>
<version>1.11.116</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-acm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-acm</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-api-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-api-gateway</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-applicationautoscaling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-applicationautoscaling</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-appstream/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-appstream</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-autoscaling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-autoscaling</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-batch</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-budgets/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-budgets</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions aws-java-sdk-bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bundle</artifactId>
Expand All @@ -24,7 +24,7 @@
<artifactId>aws-java-sdk</artifactId>
<groupId>com.amazonaws</groupId>
<optional>false</optional>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-clouddirectory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-clouddirectory</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cloudformation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cloudformation</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cloudfront/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cloudfront</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cloudhsm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cloudhsm</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cloudsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cloudsearch</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cloudtrail/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cloudtrail</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cloudwatch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cloudwatch</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cloudwatchmetrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cloudwatchmetrics</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-code-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-code-generator</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-codebuild/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-codebuild</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-codecommit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-codecommit</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-codedeploy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-codedeploy</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-codepipeline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-codepipeline</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cognitoidentity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cognitoidentity</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cognitoidp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cognitoidp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-cognitosync/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-cognitosync</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-config</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aws-java-sdk-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-pom</artifactId>
<version>1.11.116-SNAPSHOT</version>
<version>1.11.116</version>
</parent>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@
*/
package com.amazonaws.auth.policy;

import com.amazonaws.auth.policy.internal.JsonPolicyReader;
import com.amazonaws.auth.policy.internal.JsonPolicyWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.amazonaws.auth.policy.internal.JsonPolicyReader;
import com.amazonaws.auth.policy.internal.JsonPolicyWriter;

/**
* An AWS access control policy is a object that acts as a container for one or
* more statements, which specify fine grained rules for allowing or denying
Expand Down Expand Up @@ -214,7 +213,10 @@ public String toJson() {
}

/**
* Returns an AWS access control policy object generated from JSON string.
* Returns an AWS access control policy object generated from JSON string. This will automatically strip all dashes from
* AWS principal IDs, because AWS account IDs must not contain dashes. If this behavior isn't desirable (eg. because you are
* using IAM AWS principal IDs with dashes in the name), you may disable this behavior by specifying custom JSON policy reader
* options in {@link #fromJson(String, PolicyReaderOptions)}.
*
* @param jsonString
* The JSON string representation of this AWS access control policy.
Expand All @@ -226,7 +228,26 @@ public String toJson() {
* converted to an AWS policy object.
*/
public static Policy fromJson(String jsonString) {
return new JsonPolicyReader().createPolicyFromJsonString(jsonString);
return fromJson(jsonString, new PolicyReaderOptions());
}

/**
* Returns an AWS access control policy object generated from JSON string. Allows configuring options for the JSON policy
* reader (for example, to disable the stripping of dashes in the principal ID).
*
* @param jsonString
* The JSON string representation of this AWS access control policy.
* @param options
* Configuration for the JSON policy reader that affects the way in which it converts the JSON configuration.
*
* @return An AWS access control policy object.
*
* @throws IllegalArgumentException
* If the specified JSON string is null or invalid and cannot be
* converted to an AWS policy object.
*/
public static Policy fromJson(String jsonString, PolicyReaderOptions options) {
return new JsonPolicyReader(options).createPolicyFromJsonString(jsonString);
}

private void assignUniqueStatementIds() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright 2010-2017 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

package com.amazonaws.auth.policy;

/**
* Options that affect the way in which {@link Policy#fromJson(String, PolicyReaderOptions)} will generate a Policy.
*/
public class PolicyReaderOptions {
private boolean stripAwsPrincipalIdHyphensEnabled = true;

/**
* Whether AWS account IDs should have hyphens removed in their name.
*/
public boolean isStripAwsPrincipalIdHyphensEnabled() {
return stripAwsPrincipalIdHyphensEnabled;
}

/**
* Configure whether hyphens should be stripped from the AWS principal IDs that are read from the JSON-formatted
* policy document. This is useful because AWS account IDs must be specified without hyphens, but the user may not be
* aware that hyphens should not be used when configuring their policy.
*
* This behavior may be undesirable when using IAM AWS principal IDs, which may contain hyphens. In that case, this
* option may be explicitly disabled. If this is set to false, you must remove hyphens from your AWS principal IDs
* manually.
*
* By default, this is enabled (true).
*/
public void setStripAwsPrincipalIdHyphensEnabled(boolean stripAwsPrincipalIdHyphensEnabled) {
this.stripAwsPrincipalIdHyphensEnabled = stripAwsPrincipalIdHyphensEnabled;
}

/**
* Fluent-style setter for {@link #setStripAwsPrincipalIdHyphensEnabled(boolean)} that returns "this" for chaining.
*/
public PolicyReaderOptions withStripAwsPrincipalIdHyphensEnabled(boolean stripAwsPrincipalIdHyphensEnabled) {
setStripAwsPrincipalIdHyphensEnabled(stripAwsPrincipalIdHyphensEnabled);
return this;
}
}
Loading

0 comments on commit 6486b8a

Please sign in to comment.