-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
329 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ain/java/software/amazon/smithy/rulesengine/aws/language/functions/EndpointAuthUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package software.amazon.smithy.rulesengine.aws.language.functions; | ||
|
||
import java.util.List; | ||
import software.amazon.smithy.rulesengine.language.Endpoint; | ||
import software.amazon.smithy.rulesengine.language.syntax.expressions.literal.Literal; | ||
import software.amazon.smithy.utils.MapUtils; | ||
|
||
public final class EndpointAuthUtils { | ||
private static final String SIGV_4 = "sigv4"; | ||
private static final String SIG_V4A = "sigv4a"; | ||
private static final String SIGNING_NAME = "signingName"; | ||
private static final String SIGNING_REGION = "signingRegion"; | ||
private static final String SIGNING_REGION_SET = "signingRegionSet"; | ||
|
||
private EndpointAuthUtils() {} | ||
|
||
public static Endpoint.Builder sigv4(Endpoint.Builder builder, Literal signingRegion, Literal signingService) { | ||
return builder.addAuthScheme(SIGV_4, MapUtils.of(SIGNING_REGION, signingRegion, SIGNING_NAME, signingService)); | ||
} | ||
|
||
public static Endpoint.Builder sigv4a( | ||
Endpoint.Builder builder, | ||
List<Literal> signingRegionSet, | ||
Literal signingService | ||
) { | ||
return builder.addAuthScheme(SIG_V4A, MapUtils.of(SIGNING_REGION_SET, Literal.tupleLiteral(signingRegionSet), | ||
SIGNING_NAME, signingService)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...software.amazon.smithy.aws.rulesengine.language.functions.partition.PartitionDataProvider
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...software.amazon.smithy.rulesengine.aws.language.functions.partition.PartitionDataProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
software.amazon.smithy.rulesengine.aws.language.functions.partition.DefaultPartitionDataProvider |
6 changes: 3 additions & 3 deletions
6
...ftware.amazon.smithy.rulesengine.language.syntax.expressions.functions.FunctionDefinition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
software.amazon.smithy.aws.rulesengine.language.functions.AwsIsVirtualHostableS3Bucket$Definition | ||
software.amazon.smithy.aws.rulesengine.language.functions.AwsPartition$Definition | ||
software.amazon.smithy.aws.rulesengine.language.functions.ParseArn$Definition | ||
software.amazon.smithy.rulesengine.aws.language.functions.IsVirtualHostableS3Bucket$Definition | ||
software.amazon.smithy.rulesengine.aws.language.functions.AwsPartition$Definition | ||
software.amazon.smithy.rulesengine.aws.language.functions.ParseArn$Definition |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...engine/language/functions/AwsArnTest.java → ...ne/aws/language/functions/AwsArnTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/functions/AwsPartitionFunctionTest.java → ...e/functions/AwsPartitionFunctionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/language/functions/IntegrationTest.java → ...s/language/functions/IntegrationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ne/language/functions/TestRunnerTest.java → ...ws/language/functions/TestRunnerTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e/functions/partition/PartitionsTest.java → ...e/functions/partition/PartitionsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...alid/eventbridge-rules-extra-param.errors → ...alid/eventbridge-rules-extra-param.errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#endpointRuleSet | UnstableTrait | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#endpointTests | UnstableTrait | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#clientContextParams | UnstableTrait | ||
[DANGER] example#FizzBuzz: Parameter 'useDualStackEndpoint' is never used in test cases | RuleSetParameter.Unused | ||
[DANGER] example#FizzBuzz: Parameter `useDualStackEndpoint` is never used in an `EndpointTests` test case | RuleSetParameter.TestCase.Unused |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ventbridge-tests-param-not-defined.errors → ...ventbridge-tests-param-not-defined.errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#endpointRuleSet | UnstableTrait | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#endpointTests | UnstableTrait | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#clientContextParams | UnstableTrait | ||
[ERROR] example#FizzBuzz: Test parameter 'notDefined' is not defined in ruleset | RuleSetParameter.Undefined | ||
[ERROR] example#FizzBuzz: Test parameter `notDefined` is not defined in ruleset | RuleSetParameter.TestCase.Undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ntbridge-tests-param-type-mismatch.errors → ...ntbridge-tests-param-type-mismatch.errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#endpointRuleSet | UnstableTrait | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#endpointTests | UnstableTrait | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#clientContextParams | UnstableTrait | ||
[ERROR] example#FizzBuzz: Type mismatch for parameter 'useFIPSEndpoint', 'Boolean' expected | RuleSetParameter.TypeMismatch | ||
[ERROR] example#FizzBuzz: Type mismatch for parameter `useFIPSEndpoint`, `Boolean` expected | RuleSetParameter.TestCase.TypeMismatch | ||
[ERROR] example#FizzBuzz: Expected bool but was: true | RuleSetTestCase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...entbridge-tests-req-params-missing.errors → ...entbridge-tests-req-params-missing.errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#endpointRuleSet | UnstableTrait | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#endpointTests | UnstableTrait | ||
[WARNING] example#FizzBuzz: This shape applies a trait that is unstable: smithy.rules#clientContextParams | UnstableTrait | ||
[ERROR] example#FizzBuzz: Required parameter 'region' is missing in at least one test case | RuleSetParameter.RequiredMissing | ||
[ERROR] example#FizzBuzz: Required parameter `region` is missing in at least one test case | RuleSetParameter.TestCase.RequiredMissing | ||
[ERROR] example#FizzBuzz: Expected string but was: <empty> | RuleSetTestCase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.