From ff7139abafce8cfd6be3b8ae02fad11a362effe5 Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Tue, 13 Aug 2024 23:24:42 +0000
Subject: [PATCH 01/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 8
---
aws-sdk-java/pom.xml | 5 +
bom/pom.xml | 5 +
feature.metadata | 1 +
services/axdbfrontend/pom.xml | 60 ++
.../codegen-resources/endpoint-rule-set.json | 350 +++++++
.../codegen-resources/endpoint-tests.json | 314 ++++++
.../codegen-resources/paginators-1.json | 16 +
.../codegen-resources/service-2.json | 921 ++++++++++++++++++
.../codegen-resources/waiters-2.json | 28 +
services/pom.xml | 1 +
10 files changed, 1701 insertions(+)
create mode 100644 feature.metadata
create mode 100644 services/axdbfrontend/pom.xml
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json
diff --git a/aws-sdk-java/pom.xml b/aws-sdk-java/pom.xml
index 1c9e4734ee80..eb2dd7c4e19b 100644
--- a/aws-sdk-java/pom.xml
+++ b/aws-sdk-java/pom.xml
@@ -1973,6 +1973,11 @@ Amazon AutoScaling, etc).
ssmquicksetup
${awsjavasdk.version}
+
+ software.amazon.awssdk
+ axdbfrontend
+ ${awsjavasdk.version}
+
${project.artifactId}-${project.version}
diff --git a/bom/pom.xml b/bom/pom.xml
index 064ebd4de6b6..3761148a3767 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -2168,6 +2168,11 @@
ssmquicksetup
${awsjavasdk.version}
+
+ software.amazon.awssdk
+ axdbfrontend
+ ${awsjavasdk.version}
+
diff --git a/feature.metadata b/feature.metadata
new file mode 100644
index 000000000000..8402480589c7
--- /dev/null
+++ b/feature.metadata
@@ -0,0 +1 @@
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":8,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
diff --git a/services/axdbfrontend/pom.xml b/services/axdbfrontend/pom.xml
new file mode 100644
index 000000000000..9c7d30b70697
--- /dev/null
+++ b/services/axdbfrontend/pom.xml
@@ -0,0 +1,60 @@
+
+
+ 4.0.0
+
+ software.amazon.awssdk
+ services
+ 2.27.5-SNAPSHOT
+
+ axdbfrontend
+ AWS Java SDK :: Services :: Axdb Frontend
+ The AWS Java SDK for Axdb Frontend module holds the client classes that are used for
+ communicating with Axdb Frontend.
+
+ https://aws.amazon.com/sdkforjava
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ software.amazon.awssdk.services.axdbfrontend
+
+
+
+
+
+
+
+
+ software.amazon.awssdk
+ protocol-core
+ ${awsjavasdk.version}
+
+
+ software.amazon.awssdk
+ aws-json-protocol
+ ${awsjavasdk.version}
+
+
+ software.amazon.awssdk
+ http-auth-aws
+ ${awsjavasdk.version}
+
+
+
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json
new file mode 100644
index 000000000000..e1f87bcc4afb
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json
@@ -0,0 +1,350 @@
+{
+ "version": "1.0",
+ "parameters": {
+ "Region": {
+ "builtIn": "AWS::Region",
+ "required": false,
+ "documentation": "The AWS region used to dispatch the request.",
+ "type": "String"
+ },
+ "UseDualStack": {
+ "builtIn": "AWS::UseDualStack",
+ "required": true,
+ "default": false,
+ "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
+ "type": "Boolean"
+ },
+ "UseFIPS": {
+ "builtIn": "AWS::UseFIPS",
+ "required": true,
+ "default": false,
+ "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
+ "type": "Boolean"
+ },
+ "Endpoint": {
+ "builtIn": "SDK::Endpoint",
+ "required": false,
+ "documentation": "Override the endpoint used to send this request",
+ "type": "String"
+ }
+ },
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "isSet",
+ "argv": [
+ {
+ "ref": "Endpoint"
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseFIPS"
+ },
+ true
+ ]
+ }
+ ],
+ "error": "Invalid Configuration: FIPS and custom endpoint are not supported",
+ "type": "error"
+ },
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseDualStack"
+ },
+ true
+ ]
+ }
+ ],
+ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported",
+ "type": "error"
+ },
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": {
+ "ref": "Endpoint"
+ },
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "isSet",
+ "argv": [
+ {
+ "ref": "Region"
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "aws.partition",
+ "argv": [
+ {
+ "ref": "Region"
+ }
+ ],
+ "assign": "PartitionResult"
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseFIPS"
+ },
+ true
+ ]
+ },
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseDualStack"
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ true,
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsFIPS"
+ ]
+ }
+ ]
+ },
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ true,
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsDualStack"
+ ]
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://xanadu-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "FIPS and DualStack are enabled, but this partition does not support one or both",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseFIPS"
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsFIPS"
+ ]
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://xanadu-fips.{Region}.{PartitionResult#dnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "FIPS is enabled but this partition does not support FIPS",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseDualStack"
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ true,
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsDualStack"
+ ]
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://xanadu.{Region}.{PartitionResult#dualStackDnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "DualStack is enabled but this partition does not support DualStack",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://xanadu.{Region}.{PartitionResult#dnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "Invalid Configuration: Missing Region",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json
new file mode 100644
index 000000000000..d7a6824425c4
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json
@@ -0,0 +1,314 @@
+{
+ "testCases": [
+ {
+ "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.cn-north-1.api.amazonwebservices.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.cn-north-1.amazonaws.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.cn-north-1.api.amazonwebservices.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.cn-north-1.amazonaws.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-gov-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-gov-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-gov-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-gov-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-iso-east-1.c2s.ic.gov"
+ }
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "error": "DualStack is enabled but this partition does not support DualStack"
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-iso-east-1.c2s.ic.gov"
+ }
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-isob-east-1.sc2s.sgov.gov"
+ }
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "error": "DualStack is enabled but this partition does not support DualStack"
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-isob-east-1.sc2s.sgov.gov"
+ }
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://example.com"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://example.com"
+ }
+ },
+ "params": {
+ "UseFIPS": false,
+ "UseDualStack": false,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "For custom endpoint with fips enabled and dualstack disabled",
+ "expect": {
+ "error": "Invalid Configuration: FIPS and custom endpoint are not supported"
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "For custom endpoint with fips disabled and dualstack enabled",
+ "expect": {
+ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported"
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "Missing region",
+ "expect": {
+ "error": "Invalid Configuration: Missing Region"
+ }
+ }
+ ],
+ "version": "1.0"
+}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json b/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
new file mode 100644
index 000000000000..7903f3b4ee13
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
@@ -0,0 +1,16 @@
+{
+ "pagination": {
+ "ListClusterGroups": {
+ "input_token": "nextToken",
+ "output_token": "nextToken",
+ "limit_key": "maxResults",
+ "result_key": "clusterGroups"
+ },
+ "ListClusters": {
+ "input_token": "nextToken",
+ "output_token": "nextToken",
+ "limit_key": "maxResults",
+ "result_key": "clusters"
+ }
+ }
+}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
new file mode 100644
index 000000000000..842a40b13b84
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
@@ -0,0 +1,921 @@
+{
+ "version":"2.0",
+ "metadata":{
+ "apiVersion":"2018-05-10",
+ "auth":["aws.auth#sigv4"],
+ "endpointPrefix":"xanadu",
+ "protocol":"rest-json",
+ "protocols":["rest-json"],
+ "serviceFullName":"A beautiful and amazing AxdbFrontend",
+ "serviceId":"AxdbFrontend",
+ "signatureVersion":"v4",
+ "signingName":"xanadu",
+ "uid":"axdbfrontend-2018-05-10"
+ },
+ "operations":{
+ "CreateCluster":{
+ "name":"CreateCluster",
+ "http":{
+ "method":"POST",
+ "requestUri":"/cluster",
+ "responseCode":200
+ },
+ "input":{"shape":"CreateClusterInput"},
+ "output":{"shape":"CreateClusterOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Create a cluster
"
+ },
+ "CreateMultiRegionClusters":{
+ "name":"CreateMultiRegionClusters",
+ "http":{
+ "method":"POST",
+ "requestUri":"/multi-region-clusters",
+ "responseCode":200
+ },
+ "input":{"shape":"CreateMultiRegionClustersInput"},
+ "output":{"shape":"CreateMultiRegionClustersOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Create clusters in multiple regions
"
+ },
+ "DeleteCluster":{
+ "name":"DeleteCluster",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/cluster/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"DeleteClusterInput"},
+ "output":{"shape":"DeleteClusterOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Delete a cluster
",
+ "idempotent":true
+ },
+ "DeleteMultiRegionClusters":{
+ "name":"DeleteMultiRegionClusters",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/multi-region-clusters",
+ "responseCode":200
+ },
+ "input":{"shape":"DeleteMultiRegionClustersInput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Delete clusters in mutiple regions
",
+ "idempotent":true
+ },
+ "GetCluster":{
+ "name":"GetCluster",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"GetClusterInput"},
+ "output":{"shape":"GetClusterOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Get a cluster
"
+ },
+ "GetClusterGroup":{
+ "name":"GetClusterGroup",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster-group/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"GetClusterGroupInput"},
+ "output":{"shape":"GetClusterGroupOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Get a cluster group
"
+ },
+ "ListClusterGroups":{
+ "name":"ListClusterGroups",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster-group",
+ "responseCode":200
+ },
+ "input":{"shape":"ListClusterGroupsInput"},
+ "output":{"shape":"ListClusterGroupsOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"List cluster groups
"
+ },
+ "ListClusters":{
+ "name":"ListClusters",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster",
+ "responseCode":200
+ },
+ "input":{"shape":"ListClustersInput"},
+ "output":{"shape":"ListClustersOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"List clusters
"
+ },
+ "ListTagsForResource":{
+ "name":"ListTagsForResource",
+ "http":{
+ "method":"GET",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"ListTagsForResourceInput"},
+ "output":{"shape":"ListTagsForResourceOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"List all Tags on an ARN
"
+ },
+ "TagResource":{
+ "name":"TagResource",
+ "http":{
+ "method":"POST",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"TagResourceInput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Add Tags to an ARN
",
+ "idempotent":true
+ },
+ "UntagResource":{
+ "name":"UntagResource",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"UntagResourceInput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Remove Tags from an ARN
",
+ "idempotent":true
+ },
+ "UpdateCluster":{
+ "name":"UpdateCluster",
+ "http":{
+ "method":"POST",
+ "requestUri":"/cluster/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"UpdateClusterInput"},
+ "output":{"shape":"UpdateClusterOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Update a cluster
"
+ }
+ },
+ "shapes":{
+ "AccessDeniedException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{"shape":"String"}
+ },
+ "documentation":"User does not have sufficient access to perform this action
",
+ "error":{
+ "httpStatusCode":403,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "Arn":{
+ "type":"string",
+ "documentation":"Amazon Resource Name
",
+ "max":1011,
+ "min":1,
+ "pattern":"arn:.+"
+ },
+ "ClientToken":{
+ "type":"string",
+ "documentation":"Idempotency Token
",
+ "max":128,
+ "min":1,
+ "pattern":"[!-~]+"
+ },
+ "ClusterArn":{
+ "type":"string",
+ "documentation":"Cluster ARN
"
+ },
+ "ClusterArnList":{
+ "type":"list",
+ "member":{"shape":"ClusterArn"},
+ "documentation":"List of cluster arns
"
+ },
+ "ClusterCreationTime":{
+ "type":"timestamp",
+ "documentation":"Timestamp when the Cluster was created
"
+ },
+ "ClusterEncryptionKey":{
+ "type":"string",
+ "documentation":"The server-side encryption key used for this Cluster
"
+ },
+ "ClusterGroupArn":{
+ "type":"string",
+ "documentation":"ClusterGroup ARN
"
+ },
+ "ClusterGroupCreationTime":{
+ "type":"timestamp",
+ "documentation":"Timestamp when the Cluster Group was created
"
+ },
+ "ClusterGroupId":{
+ "type":"string",
+ "documentation":"ClusterGroup ID
"
+ },
+ "ClusterGroupList":{
+ "type":"list",
+ "member":{"shape":"ClusterGroupSummary"},
+ "documentation":"List of cluster groups
"
+ },
+ "ClusterGroupSummary":{
+ "type":"structure",
+ "members":{
+ "identifier":{"shape":"ClusterGroupId"},
+ "arn":{"shape":"ClusterGroupArn"}
+ },
+ "documentation":"Cluster Group Summary
"
+ },
+ "ClusterId":{
+ "type":"string",
+ "documentation":"Cluster ID
"
+ },
+ "ClusterList":{
+ "type":"list",
+ "member":{"shape":"ClusterSummary"},
+ "documentation":"List of clusters
"
+ },
+ "ClusterName":{
+ "type":"string",
+ "documentation":"Cluster Name
",
+ "max":64,
+ "min":1,
+ "pattern":"[a-zA-Z](-?[a-zA-Z0-9]+)*"
+ },
+ "ClusterPassword":{
+ "type":"string",
+ "documentation":"temporary cluster password for Pandora
",
+ "sensitive":true
+ },
+ "ClusterStatus":{
+ "type":"string",
+ "documentation":"Cluster Status
",
+ "enum":[
+ "CREATING",
+ "ACTIVE",
+ "UPDATING",
+ "DELETING",
+ "DELETED",
+ "FAILED"
+ ]
+ },
+ "ClusterSummary":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"}
+ },
+ "documentation":"Cluster Summary
"
+ },
+ "ConflictException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "resourceId":{
+ "shape":"String",
+ "documentation":"Identifier of the resource affected
"
+ },
+ "resourceType":{
+ "shape":"String",
+ "documentation":"Type of the resource affected
"
+ }
+ },
+ "documentation":"Updating or deleting a resource can cause an inconsistent state
",
+ "error":{
+ "httpStatusCode":409,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "CreateClusterInput":{
+ "type":"structure",
+ "members":{
+ "name":{"shape":"ClusterName"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "groupWitnessRegion":{"shape":"Region"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "tags":{"shape":"TagMap"},
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true
+ }
+ }
+ },
+ "CreateClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "quorumRegion":{"shape":"Region"},
+ "multiRegionClusterArns":{"shape":"ClusterArnList"},
+ "superuserPassword":{"shape":"ClusterPassword"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "CreateMultiRegionClustersInput":{
+ "type":"structure",
+ "required":[
+ "clusterRegionList",
+ "quorumRegion"
+ ],
+ "members":{
+ "clusterRegionList":{"shape":"RegionList"},
+ "quorumRegion":{"shape":"Region"},
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true
+ }
+ }
+ },
+ "CreateMultiRegionClustersOutput":{
+ "type":"structure",
+ "required":["multiRegionClusterArns"],
+ "members":{
+ "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ }
+ },
+ "DeleteClusterInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterId",
+ "location":"uri",
+ "locationName":"identifier"
+ },
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true,
+ "location":"querystring",
+ "locationName":"client-token"
+ }
+ }
+ },
+ "DeleteClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "quorumRegion":{"shape":"Region"},
+ "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "DeleteMultiRegionClustersInput":{
+ "type":"structure",
+ "required":["multiRegionClusterArns"],
+ "members":{
+ "multiRegionClusterArns":{
+ "shape":"ClusterArnList",
+ "location":"querystring",
+ "locationName":"multi-region-cluster-arns"
+ },
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true,
+ "location":"querystring",
+ "locationName":"client-token"
+ }
+ }
+ },
+ "DeletionProtectionEnabled":{
+ "type":"boolean",
+ "documentation":"Deletion Protection
",
+ "box":true
+ },
+ "GetClusterGroupInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterGroupId",
+ "location":"uri",
+ "locationName":"identifier"
+ }
+ }
+ },
+ "GetClusterGroupOutput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{"shape":"ClusterGroupId"},
+ "arn":{"shape":"ClusterGroupArn"},
+ "witnessRegion":{"shape":"Region"},
+ "clusters":{"shape":"ClusterArnList"},
+ "creationTime":{"shape":"ClusterGroupCreationTime"}
+ },
+ "documentation":"Cluster Group Output Mixin
"
+ },
+ "GetClusterInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterId",
+ "location":"uri",
+ "locationName":"identifier"
+ }
+ }
+ },
+ "GetClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "quorumRegion":{"shape":"Region"},
+ "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "Integer":{
+ "type":"integer",
+ "box":true
+ },
+ "InternalServerException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "retryAfterSeconds":{
+ "shape":"Integer",
+ "documentation":"Advice to clients on when the call can be safely retried
",
+ "location":"header",
+ "locationName":"Retry-After"
+ }
+ },
+ "documentation":"Unexpected error during processing of request
",
+ "error":{"httpStatusCode":500},
+ "exception":true,
+ "fault":true,
+ "retryable":{"throttling":false}
+ },
+ "ListClusterGroupsInput":{
+ "type":"structure",
+ "members":{
+ "maxResults":{
+ "shape":"MaxResults",
+ "location":"querystring",
+ "locationName":"max-results"
+ },
+ "nextToken":{
+ "shape":"NextToken",
+ "location":"querystring",
+ "locationName":"next-token"
+ }
+ }
+ },
+ "ListClusterGroupsOutput":{
+ "type":"structure",
+ "required":["clusterGroups"],
+ "members":{
+ "nextToken":{"shape":"NextToken"},
+ "clusterGroups":{"shape":"ClusterGroupList"}
+ }
+ },
+ "ListClustersInput":{
+ "type":"structure",
+ "members":{
+ "maxResults":{
+ "shape":"MaxResults",
+ "location":"querystring",
+ "locationName":"max-results"
+ },
+ "nextToken":{
+ "shape":"NextToken",
+ "location":"querystring",
+ "locationName":"next-token"
+ }
+ }
+ },
+ "ListClustersOutput":{
+ "type":"structure",
+ "required":["clusters"],
+ "members":{
+ "nextToken":{"shape":"NextToken"},
+ "clusters":{"shape":"ClusterList"}
+ }
+ },
+ "ListTagsForResourceInput":{
+ "type":"structure",
+ "required":["resourceArn"],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ }
+ }
+ },
+ "ListTagsForResourceOutput":{
+ "type":"structure",
+ "members":{
+ "tags":{"shape":"TagMap"}
+ }
+ },
+ "MaxResults":{
+ "type":"integer",
+ "documentation":"Max results that will be returned per page
",
+ "box":true,
+ "max":100,
+ "min":1
+ },
+ "NextToken":{
+ "type":"string",
+ "documentation":"Opaque token used to retrieve next page
"
+ },
+ "Region":{
+ "type":"string",
+ "documentation":"AWS Region name (e.g.: 'us-east-1')
",
+ "max":20,
+ "min":0
+ },
+ "RegionList":{
+ "type":"list",
+ "member":{"shape":"Region"},
+ "documentation":"List of regions
"
+ },
+ "ResourceNotFoundException":{
+ "type":"structure",
+ "required":[
+ "message",
+ "resourceId",
+ "resourceType"
+ ],
+ "members":{
+ "message":{"shape":"String"},
+ "resourceId":{
+ "shape":"String",
+ "documentation":"Hypothetical identifier of the resource which does not exist
"
+ },
+ "resourceType":{
+ "shape":"String",
+ "documentation":"Hypothetical type of the resource which does not exist
"
+ }
+ },
+ "documentation":"Request references a resource which does not exist
",
+ "error":{
+ "httpStatusCode":404,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "ServiceQuotaExceededException":{
+ "type":"structure",
+ "required":[
+ "message",
+ "resourceId",
+ "resourceType",
+ "serviceCode",
+ "quotaCode"
+ ],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "resourceId":{
+ "shape":"String",
+ "documentation":"Identifier of the resource affected
"
+ },
+ "resourceType":{
+ "shape":"String",
+ "documentation":"Type of the resource affected
"
+ },
+ "serviceCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating service
"
+ },
+ "quotaCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating quota
"
+ }
+ },
+ "documentation":"Request would cause a service quota to be exceeded
",
+ "error":{
+ "httpStatusCode":402,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "String":{"type":"string"},
+ "TagKey":{
+ "type":"string",
+ "documentation":"Tag Key
",
+ "max":128,
+ "min":1
+ },
+ "TagKeyList":{
+ "type":"list",
+ "member":{"shape":"TagKey"},
+ "documentation":"List of tag keys
",
+ "max":200,
+ "min":0
+ },
+ "TagMap":{
+ "type":"map",
+ "key":{"shape":"TagKey"},
+ "value":{"shape":"TagValue"},
+ "documentation":"Map of tags
",
+ "max":200,
+ "min":0
+ },
+ "TagResourceInput":{
+ "type":"structure",
+ "required":[
+ "resourceArn",
+ "tags"
+ ],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ },
+ "tags":{"shape":"TagMap"}
+ }
+ },
+ "TagValue":{
+ "type":"string",
+ "documentation":"Tag Value
",
+ "max":256,
+ "min":0
+ },
+ "ThrottlingException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "serviceCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating service
"
+ },
+ "quotaCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating quota
"
+ },
+ "retryAfterSeconds":{
+ "shape":"Integer",
+ "documentation":"Advice to clients on when the call can be safely retried
",
+ "location":"header",
+ "locationName":"Retry-After"
+ }
+ },
+ "documentation":"Request was denied due to request throttling
",
+ "error":{
+ "httpStatusCode":429,
+ "senderFault":true
+ },
+ "exception":true,
+ "retryable":{"throttling":true}
+ },
+ "UntagResourceInput":{
+ "type":"structure",
+ "required":[
+ "resourceArn",
+ "tagKeys"
+ ],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ },
+ "tagKeys":{
+ "shape":"TagKeyList",
+ "location":"querystring",
+ "locationName":"tagKeys"
+ }
+ }
+ },
+ "UpdateClusterInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterId",
+ "location":"uri",
+ "locationName":"identifier"
+ },
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true
+ }
+ }
+ },
+ "UpdateClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "quorumRegion":{"shape":"Region"},
+ "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "ValidationException":{
+ "type":"structure",
+ "required":[
+ "message",
+ "reason"
+ ],
+ "members":{
+ "message":{"shape":"String"},
+ "reason":{"shape":"ValidationExceptionReason"},
+ "fieldList":{"shape":"ValidationExceptionFieldList"}
+ },
+ "documentation":"The input fails to satisfy the constraints specified by an AWS service
",
+ "error":{
+ "httpStatusCode":400,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "ValidationExceptionField":{
+ "type":"structure",
+ "required":[
+ "name",
+ "message"
+ ],
+ "members":{
+ "name":{
+ "shape":"String",
+ "documentation":"The field name
"
+ },
+ "message":{
+ "shape":"String",
+ "documentation":"Message describing why the field failed validation
"
+ }
+ },
+ "documentation":"A field that caused the error
"
+ },
+ "ValidationExceptionFieldList":{
+ "type":"list",
+ "member":{"shape":"ValidationExceptionField"},
+ "documentation":"List of fields that caused the error
"
+ },
+ "ValidationExceptionReason":{
+ "type":"string",
+ "documentation":"Reason the request failed validation
",
+ "enum":[
+ "unknownOperation",
+ "cannotParse",
+ "fieldValidationFailed",
+ "deletionProtectionEnabled",
+ "other"
+ ]
+ }
+ },
+ "documentation":"An example service, deployed with the Octane Service creator, which will echo the string
"
+}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json b/services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json
new file mode 100644
index 000000000000..69cd9baaeb5b
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json
@@ -0,0 +1,28 @@
+{
+ "version" : 2,
+ "waiters" : {
+ "ClusterActive" : {
+ "description" : "Wait until a Cluster is ACTIVE",
+ "delay" : 2,
+ "maxAttempts" : 60,
+ "operation" : "GetCluster",
+ "acceptors" : [ {
+ "matcher" : "path",
+ "argument" : "status",
+ "state" : "success",
+ "expected" : "ACTIVE"
+ } ]
+ },
+ "ClusterNotExists" : {
+ "description" : "Wait until a Cluster is gone",
+ "delay" : 2,
+ "maxAttempts" : 60,
+ "operation" : "GetCluster",
+ "acceptors" : [ {
+ "matcher" : "error",
+ "state" : "success",
+ "expected" : "ResourceNotFoundException"
+ } ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/pom.xml b/services/pom.xml
index 6c8a4bf1194a..999919bb4bf1 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -406,6 +406,7 @@
apptest
qapps
ssmquicksetup
+ axdbfrontend
The AWS Java SDK services
https://aws.amazon.com/sdkforjava
From e488ba6900b3d04ca85c7e0bc0d3d2485dc7d9f2 Mon Sep 17 00:00:00 2001
From: Amrit Pandher
Date: Tue, 6 Aug 2024 11:23:09 -0700
Subject: [PATCH 02/20] Add IAM Token Generation Utility for AxdbFrontend
---
docs/LaunchChangelog.md | 4 +
.../axdbfrontend/AxdbFrontendUtilities.java | 122 +++++++++
.../DefaultAxdbFrontendUtilities.java | 157 +++++++++++
.../services/axdbfrontend/model/Action.java | 36 +++
.../GenerateAuthenticationTokenRequest.java | 228 ++++++++++++++++
.../DefaultAxdbFrontendUtilitiesTest.java | 247 ++++++++++++++++++
6 files changed, 794 insertions(+)
create mode 100644 services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
create mode 100644 services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java
create mode 100644 services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
create mode 100644 services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java
create mode 100644 services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
diff --git a/docs/LaunchChangelog.md b/docs/LaunchChangelog.md
index 8f2d09270357..48c713b4c226 100644
--- a/docs/LaunchChangelog.md
+++ b/docs/LaunchChangelog.md
@@ -453,6 +453,10 @@ The S3 client in 2.0 is drastically different from the client in 1.11, because i
1. The class`RdsIamAuthTokenGenerator` has been replaced with `RdsUtilities#generateAuthenticationToken`.
+## 4.5. Axdbfrontend Changes
+
+1. The class `AxdbfrontendUtilities#generateAuthenticationToken` can now be used to generate an Authentication token to connect to a Xanadu database.
+
# 5. Profile File Changes
The parsing of the `~/.aws/config` and `~/.aws/credentials` has changed to more closely emulate that used by the AWS CLI.
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
new file mode 100644
index 000000000000..0137c9e2ec2c
--- /dev/null
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
@@ -0,0 +1,122 @@
+/*
+ * 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.
+ * 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 software.amazon.awssdk.services.axdbfrontend;
+
+import java.util.function.Consumer;
+import software.amazon.awssdk.annotations.SdkPublicApi;
+import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
+import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
+import software.amazon.awssdk.identity.spi.IdentityProvider;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
+
+/**
+ * Utilities for working with AxdbFrontend. An instance of this class can be created by:
+ *
+ * 1) Using the low-level client {@link AxdbFrontendClient#utilities()} (or {@link AxdbFrontendAsyncClient#utilities()}} method.
+ * This is
+ * recommended as SDK will use the same configuration from the {@link AxdbFrontendClient} object to create the
+ * {@link AxdbFrontendUtilities}
+ * object.
+ *
+ *
+ * AxdbFrontendClient AxdbFrontendClient = AxdbFrontendClient.create();
+ * AxdbFrontendUtilities utilities = AxdbFrontendClient.utilities();
+ *
+ *
+ *
+ *
+ * 2) Directly using the {@link #builder()} method.
+ *
+ *
+ * AxdbFrontendUtilities utilities = AxdbFrontendUtilities.builder()
+ * .credentialsProvider(DefaultCredentialsProvider.create())
+ * .region(Region.US_WEST_2)
+ * .build()
+ *
+ *
+ *
+ * Note: This class does not make network calls.
+ */
+@SdkPublicApi
+public interface AxdbFrontendUtilities {
+ /**
+ * Create a builder that can be used to configure and create a {@link AxdbFrontendUtilities}.
+ */
+ static Builder builder() {
+ return new DefaultAxdbFrontendUtilities.DefaultBuilder();
+ }
+
+ /**
+ * Generates an authentication token for IAM authentication to a Xanadu database.
+ *
+ * @param request The request used to generate the authentication token
+ * @return String to use as the AxdbFrontend authentication token
+ * @throws IllegalArgumentException if the required parameters are not valid
+ */
+ default String generateAuthenticationToken(Consumer request) {
+ return generateAuthenticationToken(GenerateAuthenticationTokenRequest.builder().applyMutation(request).build());
+ }
+
+ /**
+ * Generates an authentication token for IAM authentication to an Xanadu database.
+ *
+ * @param request The request used to generate the authentication token
+ * @return String to use as the AxdbFrontend authentication token
+ * @throws IllegalArgumentException if the required parameters are not valid
+ */
+ default String generateAuthenticationToken(GenerateAuthenticationTokenRequest request) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Builder for creating an instance of {@link AxdbFrontendUtilities}. It can be configured using
+ * {@link AxdbFrontendUtilities#builder()}.
+ * Once configured, the {@link AxdbFrontendUtilities} can created using {@link #build()}.
+ */
+ @SdkPublicApi
+ interface Builder {
+ /**
+ * The default region to use when working with the methods in {@link AxdbFrontendUtilities} class.
+ *
+ * @return This object for method chaining
+ */
+ Builder region(Region region);
+
+ /**
+ * The default credentials provider to use when working with the methods in {@link AxdbFrontendUtilities} class.
+ *
+ * @return This object for method chaining
+ */
+ default Builder credentialsProvider(AwsCredentialsProvider credentialsProvider) {
+ return credentialsProvider((IdentityProvider extends AwsCredentialsIdentity>) credentialsProvider);
+ }
+
+ /**
+ * The default credentials provider to use when working with the methods in {@link AxdbFrontendUtilities} class.
+ *
+ * @return This object for method chaining
+ */
+ default Builder credentialsProvider(IdentityProvider extends AwsCredentialsIdentity> credentialsProvider) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Create a {@link AxdbFrontendUtilities}
+ */
+ AxdbFrontendUtilities build();
+ }
+}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java
new file mode 100644
index 000000000000..48cbcb911934
--- /dev/null
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java
@@ -0,0 +1,157 @@
+/*
+ * 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.
+ * 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 software.amazon.awssdk.services.axdbfrontend;
+
+import java.time.Clock;
+import java.time.Instant;
+import software.amazon.awssdk.annotations.Immutable;
+import software.amazon.awssdk.annotations.SdkInternalApi;
+import software.amazon.awssdk.auth.credentials.AwsCredentials;
+import software.amazon.awssdk.auth.credentials.CredentialUtils;
+import software.amazon.awssdk.auth.signer.Aws4Signer;
+import software.amazon.awssdk.auth.signer.params.Aws4PresignerParams;
+import software.amazon.awssdk.awscore.client.config.AwsClientOption;
+import software.amazon.awssdk.core.client.config.SdkClientConfiguration;
+import software.amazon.awssdk.http.SdkHttpFullRequest;
+import software.amazon.awssdk.http.SdkHttpMethod;
+import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
+import software.amazon.awssdk.identity.spi.IdentityProvider;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
+import software.amazon.awssdk.utils.CompletableFutureUtils;
+import software.amazon.awssdk.utils.Logger;
+import software.amazon.awssdk.utils.StringUtils;
+
+@Immutable
+@SdkInternalApi
+final class DefaultAxdbFrontendUtilities implements AxdbFrontendUtilities {
+ private static final Logger log = Logger.loggerFor(AxdbFrontendUtilities.class);
+ private final Aws4Signer signer = Aws4Signer.create();
+ private final Region region;
+ private final IdentityProvider extends AwsCredentialsIdentity> credentialsProvider;
+ private final Clock clock;
+
+ DefaultAxdbFrontendUtilities(DefaultBuilder builder) {
+ this(builder, Clock.systemUTC());
+ }
+
+ /**
+ * For testing purposes only
+ */
+ DefaultAxdbFrontendUtilities(DefaultBuilder builder, Clock clock) {
+ this.credentialsProvider = builder.credentialsProvider;
+ this.region = builder.region;
+ this.clock = clock;
+ }
+
+ /**
+ * Used by AxdbFrontend low-level client's utilities() method
+ */
+ @SdkInternalApi
+ static AxdbFrontendUtilities create(SdkClientConfiguration clientConfiguration) {
+ return new DefaultBuilder().clientConfiguration(clientConfiguration).build();
+ }
+
+ @Override
+ public String generateAuthenticationToken(GenerateAuthenticationTokenRequest request) {
+ SdkHttpFullRequest httpRequest = SdkHttpFullRequest.builder()
+ .method(SdkHttpMethod.GET)
+ .protocol("https")
+ .host(request.hostname())
+ .encodedPath("/")
+ .putRawQueryParameter("Action", request.action().name())
+ .build();
+
+ Instant expirationTime = Instant.now(clock).plus(request.expiresIn());
+
+ Aws4PresignerParams presignRequest = Aws4PresignerParams.builder()
+ .signingClockOverride(clock)
+ .expirationTime(expirationTime)
+ .awsCredentials(resolveCredentials(request))
+ .signingName("xanadu")
+ .signingRegion(resolveRegion(request))
+ .build();
+
+ SdkHttpFullRequest fullRequest = signer.presign(httpRequest, presignRequest);
+ String signedUrl = fullRequest.getUri().toString();
+
+ String result = StringUtils.replacePrefixIgnoreCase(signedUrl, "https://", "");
+ return result;
+ }
+
+ private Region resolveRegion(GenerateAuthenticationTokenRequest request) {
+ if (request.region() != null) {
+ return request.region();
+ }
+
+ if (this.region != null) {
+ return this.region;
+ }
+
+ throw new IllegalArgumentException("Region should be provided either in GenerateAuthenticationTokenRequest object " +
+ "or AxdbFrontendUtilities object");
+ }
+
+ private AwsCredentials resolveCredentials(GenerateAuthenticationTokenRequest request) {
+ if (request.credentialsIdentityProvider() != null) {
+ return CredentialUtils.toCredentials(
+ CompletableFutureUtils.joinLikeSync(request.credentialsIdentityProvider().resolveIdentity()));
+ }
+
+ if (this.credentialsProvider != null) {
+ return CredentialUtils.toCredentials(CompletableFutureUtils.joinLikeSync(this.credentialsProvider.resolveIdentity()));
+ }
+
+ throw new IllegalArgumentException("CredentialProvider should be provided either in GenerateAuthenticationTokenRequest " +
+ "object or AxdbFrontendUtilities object");
+ }
+
+ @SdkInternalApi
+ static final class DefaultBuilder implements Builder {
+ private Region region;
+ private IdentityProvider extends AwsCredentialsIdentity> credentialsProvider;
+
+ DefaultBuilder() {
+ }
+
+ Builder clientConfiguration(SdkClientConfiguration clientConfiguration) {
+ this.credentialsProvider = clientConfiguration.option(AwsClientOption.CREDENTIALS_IDENTITY_PROVIDER);
+ this.region = clientConfiguration.option(AwsClientOption.AWS_REGION);
+
+ return this;
+ }
+
+ @Override
+ public Builder region(Region region) {
+ this.region = region;
+ return this;
+ }
+
+ @Override
+ public Builder credentialsProvider(IdentityProvider extends AwsCredentialsIdentity> credentialsProvider) {
+ this.credentialsProvider = credentialsProvider;
+ return this;
+ }
+
+ /**
+ * Construct a {@link AxdbFrontendUtilities} object.
+ */
+ @Override
+ public AxdbFrontendUtilities build() {
+ return new DefaultAxdbFrontendUtilities(this);
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
new file mode 100644
index 000000000000..27cf569cb683
--- /dev/null
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ * 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 software.amazon.awssdk.services.axdbfrontend.model;
+
+import java.io.Serializable;
+
+/**
+ * Enumerations of possible actions that can be performed on a Xanadu database.
+ */
+public enum Action implements Serializable {
+ DbConnect,
+ DbConnectSuperuser;
+
+ public static Action variant(String value) {
+ if (value.equalsIgnoreCase(Action.DbConnect.name())) {
+ return Action.DbConnect;
+ } else if (value.equalsIgnoreCase(Action.DbConnectSuperuser.name())) {
+ return Action.DbConnectSuperuser;
+ } else {
+ throw new IllegalArgumentException("Invalid action: " + value);
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java
new file mode 100644
index 000000000000..05c1baf8e3a6
--- /dev/null
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java
@@ -0,0 +1,228 @@
+/*
+ * 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.
+ * 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 software.amazon.awssdk.services.axdbfrontend.model;
+
+import java.time.Duration;
+import software.amazon.awssdk.annotations.NotThreadSafe;
+import software.amazon.awssdk.annotations.SdkPublicApi;
+import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
+import software.amazon.awssdk.auth.credentials.CredentialUtils;
+import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
+import software.amazon.awssdk.identity.spi.IdentityProvider;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.axdbfrontend.AxdbFrontendUtilities;
+import software.amazon.awssdk.services.axdbfrontend.model.Action;
+import software.amazon.awssdk.utils.Validate;
+import software.amazon.awssdk.utils.builder.CopyableBuilder;
+import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
+
+
+/**
+ * Input parameters for generating an authentication token for IAM database authentication for AxdbFrontend.
+ */
+@SdkPublicApi
+public final class GenerateAuthenticationTokenRequest implements
+ ToCopyableBuilder {
+
+ private final String hostname;
+ private final Region region;
+ private final Action action;
+ private final Duration expiresIn;
+ private final IdentityProvider extends AwsCredentialsIdentity> credentialsProvider;
+
+ private GenerateAuthenticationTokenRequest(BuilderImpl builder) {
+ this.hostname = Validate.notEmpty(builder.hostname, "hostname");
+ this.action = Validate.notNull(builder.action, "action");
+ Validate.isTrue(this.action == Action.DbConnect || this.action == Action.DbConnectSuperuser, "invalid action");
+ this.region = builder.region;
+ this.credentialsProvider = builder.credentialsProvider;
+ this.expiresIn = (builder.expiresIn != null) ? builder.expiresIn :
+ Duration.ofSeconds(900L);
+ }
+
+ /**
+ * @return The hostname of the database to connect to
+ */
+ public String hostname() {
+ return hostname;
+ }
+
+ /**
+ * @return The token expiry duration in seconds
+ */
+ public Duration expiresIn() {
+ return expiresIn;
+ }
+
+ /**
+ * @return The action to perform on the database
+ * {@link Action.Action}
+ */
+ public Action action() {
+ return action;
+ }
+
+ /**
+ * @return The region the database is hosted in. If specified, takes precedence over the value specified in
+ * {@link AxdbFrontendUtilities.Builder#region(Region)}
+ */
+ public Region region() {
+ return region;
+ }
+
+ /**
+ * @return The credentials provider to sign the IAM auth request with. If specified, takes precedence over the value
+ * specified in {@link AxdbFrontendUtilities.Builder#credentialsProvider}}
+ */
+ public AwsCredentialsProvider credentialsProvider() {
+ return CredentialUtils.toCredentialsProvider(credentialsProvider);
+ }
+
+ /**
+ * @return The credentials provider to sign the IAM auth request with. If specified, takes precedence over the value
+ * specified in {@link AxdbFrontendUtilities.Builder#credentialsProvider(AwsCredentialsProvider)}}
+ */
+ public IdentityProvider extends AwsCredentialsIdentity> credentialsIdentityProvider() {
+ return credentialsProvider;
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return new BuilderImpl(this);
+ }
+
+ /**
+ * Creates a builder for {@link AxdbFrontendUtilities}.
+ */
+ public static Builder builder() {
+ return new BuilderImpl();
+ }
+
+ /**
+ * A builder for a {@link GenerateAuthenticationTokenRequest}, created with {@link #builder()}.
+ */
+ @SdkPublicApi
+ @NotThreadSafe
+ public interface Builder extends CopyableBuilder {
+ /**
+ * The hostname of the database to connect to
+ *
+ * @return This object for method chaining
+ */
+ Builder hostname(String endpoint);
+
+ /**
+ * The action to connect to the database as.
+ *
+ * @return This object for method chaining
+ */
+ Builder action(Action action);
+
+ /**
+ * The region the database is hosted in. If specified, takes precedence over the value specified in
+ * {@link AxdbFrontendUtilities.Builder#region(Region)}
+ *
+ * @return This object for method chaining
+ */
+ Builder region(Region region);
+
+ /**
+ * The region the database is hosted in. If specified, takes precedence over the value specified in
+ * {@link AxdbFrontendUtilities.Builder#region(Region)}
+ *
+ * @return This object for method chaining
+ */
+ Builder expiresIn(Duration expiresIn);
+
+ /**
+ * The credentials provider to sign the IAM auth request with. If specified, takes precedence over the value
+ * specified in {@link AxdbFrontendUtilities.Builder#credentialsProvider)}}
+ *
+ * @return This object for method chaining
+ */
+ default Builder credentialsProvider(AwsCredentialsProvider credentialsProvider) {
+ return credentialsProvider((IdentityProvider extends AwsCredentialsIdentity>) credentialsProvider);
+ }
+
+ /**
+ * The credentials provider to sign the IAM auth request with. If specified, takes precedence over the value
+ * specified in {@link AxdbFrontendUtilities.Builder#credentialsProvider}}
+ *
+ * @return This object for method chaining
+ */
+ default Builder credentialsProvider(IdentityProvider extends AwsCredentialsIdentity> credentialsProvider) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ GenerateAuthenticationTokenRequest build();
+ }
+
+ private static final class BuilderImpl implements Builder {
+ private String hostname;
+ private Action action;
+ private Region region;
+ private Duration expiresIn;
+ private IdentityProvider extends AwsCredentialsIdentity> credentialsProvider;
+
+ private BuilderImpl() {
+ }
+
+ private BuilderImpl(GenerateAuthenticationTokenRequest request) {
+ this.hostname = request.hostname;
+ this.action = request.action;
+ this.region = request.region;
+ this.expiresIn = request.expiresIn;
+ this.credentialsProvider = request.credentialsProvider;
+ }
+
+ @Override
+ public Builder hostname(String hostname) {
+ this.hostname = hostname;
+ return this;
+ }
+
+ @Override
+ public Builder expiresIn(Duration expiresIn) {
+ this.expiresIn = expiresIn;
+ return this;
+ }
+
+ @Override
+ public Builder action(Action action) {
+ this.action = action;
+ return this;
+ }
+
+ @Override
+ public Builder region(Region region) {
+ this.region = region;
+ return this;
+ }
+
+ @Override
+ public Builder credentialsProvider(IdentityProvider extends AwsCredentialsIdentity> credentialsProvider) {
+ this.credentialsProvider = credentialsProvider;
+ return this;
+ }
+
+ @Override
+ public GenerateAuthenticationTokenRequest build() {
+ return new GenerateAuthenticationTokenRequest(this);
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java b/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
new file mode 100644
index 000000000000..334a8228277a
--- /dev/null
+++ b/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
@@ -0,0 +1,247 @@
+/*
+ * 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.
+ * 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 software.amazon.awssdk.services.axdbfrontend;
+
+import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
+
+import java.time.Clock;
+import java.time.Duration;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.util.function.Consumer;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
+import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
+import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
+import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
+import software.amazon.awssdk.identity.spi.IdentityProvider;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.axdbfrontend.DefaultAxdbFrontendUtilities.DefaultBuilder;
+import software.amazon.awssdk.services.axdbfrontend.model.Action;
+import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
+
+public class DefaultAxdbFrontendUtilitiesTest {
+ private final ZoneId utcZone = ZoneId.of("UTC").normalized();
+ private final Clock fixedClock = Clock.fixed(ZonedDateTime.of(2024, 11, 7, 17, 39, 33, 0, utcZone).toInstant(), utcZone);
+
+ @Test
+ public void testTokenGenerationWithBuilderDefaultsUsingAwsCredentialsProvider() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key")
+ );
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+
+ testTokenGenerationWithBuilderDefaults(utilitiesBuilder);
+ }
+
+ @Test
+ public void testTokenGenerationWithBuilderDefaultsUsingIdentityProvider() {
+ IdentityProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key")
+ );
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+
+ testTokenGenerationWithBuilderDefaults(utilitiesBuilder);
+ }
+
+ private void testTokenGenerationWithBuilderDefaults(DefaultBuilder utilitiesBuilder) {
+ DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
+ Action action = Action.DbConnectSuperuser;
+
+ String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
+ builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
+ .action(action);
+ });
+
+ String expectedToken = "test.us-east-1.prod.sql.axdb.aws.dev/?Action=DbConnectSuperuser&" +
+ "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241107T173933Z&X-Amz-SignedHeaders=host&" +
+ "X-Amz-Expires=900&X-Amz-Credential=access_key%2F20241107%2Fus-east-1%2Fxanadu" +
+ "%2Faws4_request&" +
+ "X-Amz-Signature=f7666e716762021d3a381a2030a41b29419c70b39b0d669dd44dfd56870a860b";
+ assertThat(authenticationToken).isEqualTo(expectedToken);
+ }
+
+ @Test
+ public void testTokenGenerationWithOverriddenCredentialsUsingAwsCredentialsProvider() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("foo", "bar")
+ );
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+ testTokenGenerationWithOverriddenCredentials(utilitiesBuilder, builder -> {
+ builder.credentialsProvider(StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key")));
+ });
+ }
+
+ @Test
+ public void testTokenGenerationWithOverriddenCredentialsUsingIdentityProvider() {
+ IdentityProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("foo", "bar")
+ );
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+ testTokenGenerationWithOverriddenCredentials(utilitiesBuilder, builder -> {
+ builder.credentialsProvider((IdentityProvider) StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key")));
+ });
+ }
+
+ private void testTokenGenerationWithOverriddenCredentials(DefaultBuilder utilitiesBuilder,
+ Consumer credsBuilder) {
+ DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
+ Action action = Action.DbConnectSuperuser;
+
+ String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
+ builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
+ .action(action)
+ .applyMutation(credsBuilder);
+ });
+
+ String expectedToken = "test.us-east-1.prod.sql.axdb.aws.dev/?Action=DbConnectSuperuser&" +
+ "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241107T173933Z&X-Amz-SignedHeaders=host&" +
+ "X-Amz-Expires=900&X-Amz-Credential=access_key%2F20241107%2Fus-east-1%2Fxanadu" +
+ "%2Faws4_request&" +
+ "X-Amz-Signature=f7666e716762021d3a381a2030a41b29419c70b39b0d669dd44dfd56870a860b";
+ assertThat(authenticationToken).isEqualTo(expectedToken);
+ }
+
+ @Test
+ public void testTokenGenerationWithOverriddenRegion() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key")
+ );
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+
+ DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
+ Action action = Action.DbConnectSuperuser;
+
+ String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
+ builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
+ .action(action)
+ .region(Region.US_WEST_2);
+ });
+
+ String expectedToken = "test.us-east-1.prod.sql.axdb.aws.dev/?Action=DbConnectSuperuser&" +
+ "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241107T173933Z&X-Amz-SignedHeaders=host&" +
+ "X-Amz-Expires=900&X-Amz-Credential=access_key%2F20241107%2Fus-west-2%2Fxanadu" +
+ "%2Faws4_request&" +
+ "X-Amz-Signature=7da651e0e1811750c55246d38b99917ded3679af2dfd3cd1eced38946bce94e5";
+ assertThat(authenticationToken).isEqualTo(expectedToken);
+ }
+
+ @Test
+ public void testMissingRegionThrowsException() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key")
+ );
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .credentialsProvider(credentialsProvider);
+
+ DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
+ Action action = Action.DbConnect;
+
+ assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
+ builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
+ .action(action);
+ })).isInstanceOf(IllegalArgumentException.class)
+ .hasMessageContaining("Region should be provided");
+ }
+
+ @Test
+ public void testMissingCredentialsThrowsException() {
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .region(Region.US_WEST_2);
+
+ DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
+ Action action = Action.DbConnect;
+
+ assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
+ builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
+ .action(action);
+ })).isInstanceOf(IllegalArgumentException.class)
+ .hasMessageContaining("CredentialProvider should be provided");
+ }
+
+ @Test
+ public void testMissingHostnameThrowsException() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key")
+ );
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .credentialsProvider(credentialsProvider);
+
+ DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
+ Action action = Action.DbConnect;
+
+ assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
+ builder.action(action);
+ })).isInstanceOf(NullPointerException.class)
+ .hasMessageContaining("hostname");
+ }
+
+ @Test
+ public void testMissingActionThrowsException() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key")
+ );
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .credentialsProvider(credentialsProvider);
+
+ DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
+
+ assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
+ builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev");
+ })).isInstanceOf(NullPointerException.class)
+ .hasMessageContaining("action");
+ }
+
+ @Test
+ public void testTokenGenerationWithCustomExpiry() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key")
+ );
+ DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+
+ DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
+ Action action = Action.DbConnect;
+ Duration expiry = Duration.ofSeconds(3600L);
+
+ String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
+ builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
+ .action(action)
+ .expiresIn(expiry);
+ });
+
+ String expectedToken = "test.us-east-1.prod.sql.axdb.aws.dev/?Action=DbConnect&" +
+ "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241107T173933Z&X-Amz-SignedHeaders=host&" +
+ "X-Amz-Expires=3600&X-Amz-Credential=access_key%2F20241107%2Fus-east-1%2Fxanadu" +
+ "%2Faws4_request&" +
+ "X-Amz-Signature=2effdbadd1d7172c6ec5e3293d6209109bc8969b8d8b9d3394363a8e986a2377";
+ assertThat(authenticationToken).isEqualTo(expectedToken);
+ }
+}
\ No newline at end of file
From c22e3825d3f5c76d260f59b574a204b674c053a9 Mon Sep 17 00:00:00 2001
From: Amrit Pandher
Date: Mon, 12 Aug 2024 00:40:24 -0700
Subject: [PATCH 03/20] Addressing PR Comments
---
.../feature-AxdbFrontend-d6ce1e6.json | 6 +++
docs/LaunchChangelog.md | 4 --
services/axdbfrontend/pom.xml | 5 ++
.../axdbfrontend/AxdbFrontendUtilities.java | 23 ++++-----
.../DefaultAxdbFrontendUtilities.java | 16 +++---
.../services/axdbfrontend/model/Action.java | 29 +++++++----
.../GenerateAuthenticationTokenRequest.java | 51 +++++++++++++++++--
.../DefaultAxdbFrontendUtilitiesTest.java | 27 ++++++----
8 files changed, 115 insertions(+), 46 deletions(-)
create mode 100644 .changes/next-release/feature-AxdbFrontend-d6ce1e6.json
rename services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/{ => internal}/DefaultAxdbFrontendUtilities.java (91%)
diff --git a/.changes/next-release/feature-AxdbFrontend-d6ce1e6.json b/.changes/next-release/feature-AxdbFrontend-d6ce1e6.json
new file mode 100644
index 000000000000..04cb97060b2e
--- /dev/null
+++ b/.changes/next-release/feature-AxdbFrontend-d6ce1e6.json
@@ -0,0 +1,6 @@
+{
+ "type": "feature",
+ "category": "AxdbFrontend",
+ "contributor": "APandher",
+ "description": "Add IAM Token Generation Utility for AxdbFrontend"
+}
diff --git a/docs/LaunchChangelog.md b/docs/LaunchChangelog.md
index 48c713b4c226..8f2d09270357 100644
--- a/docs/LaunchChangelog.md
+++ b/docs/LaunchChangelog.md
@@ -453,10 +453,6 @@ The S3 client in 2.0 is drastically different from the client in 1.11, because i
1. The class`RdsIamAuthTokenGenerator` has been replaced with `RdsUtilities#generateAuthenticationToken`.
-## 4.5. Axdbfrontend Changes
-
-1. The class `AxdbfrontendUtilities#generateAuthenticationToken` can now be used to generate an Authentication token to connect to a Xanadu database.
-
# 5. Profile File Changes
The parsing of the `~/.aws/config` and `~/.aws/credentials` has changed to more closely emulate that used by the AWS CLI.
diff --git a/services/axdbfrontend/pom.xml b/services/axdbfrontend/pom.xml
index 9c7d30b70697..da5b3ca876e4 100644
--- a/services/axdbfrontend/pom.xml
+++ b/services/axdbfrontend/pom.xml
@@ -41,6 +41,11 @@
+
+ nl.jqno.equalsverifier
+ equalsverifier
+ test
+
software.amazon.awssdk
protocol-core
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
index 0137c9e2ec2c..87981d530dc2 100644
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
@@ -21,33 +21,32 @@
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
import software.amazon.awssdk.identity.spi.IdentityProvider;
import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.axdbfrontend.internal.DefaultAxdbFrontendUtilities;
import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
/**
* Utilities for working with AxdbFrontend. An instance of this class can be created by:
*
* 1) Using the low-level client {@link AxdbFrontendClient#utilities()} (or {@link AxdbFrontendAsyncClient#utilities()}} method.
- * This is
- * recommended as SDK will use the same configuration from the {@link AxdbFrontendClient} object to create the
- * {@link AxdbFrontendUtilities}
- * object.
+ * This is recommended as SDK will use the same configuration from the {@link AxdbFrontendClient} object to create the
+ * {@link AxdbFrontendUtilities} object.
*
- *
+ * @snippet :
+ * {@code
* AxdbFrontendClient AxdbFrontendClient = AxdbFrontendClient.create();
* AxdbFrontendUtilities utilities = AxdbFrontendClient.utilities();
- *
- *
+ * }
*
*
* 2) Directly using the {@link #builder()} method.
*
- *
+ * @snippet :
+ * {@code
* AxdbFrontendUtilities utilities = AxdbFrontendUtilities.builder()
* .credentialsProvider(DefaultCredentialsProvider.create())
* .region(Region.US_WEST_2)
* .build()
- *
- *
+ * }
*
* Note: This class does not make network calls.
*/
@@ -61,7 +60,7 @@ static Builder builder() {
}
/**
- * Generates an authentication token for IAM authentication to a Xanadu database.
+ * Generates an authentication token for IAM authentication to an AxdbFrontend database.
*
* @param request The request used to generate the authentication token
* @return String to use as the AxdbFrontend authentication token
@@ -72,7 +71,7 @@ default String generateAuthenticationToken(Consumer credentialsProvider;
private final Clock clock;
- DefaultAxdbFrontendUtilities(DefaultBuilder builder) {
+ public DefaultAxdbFrontendUtilities(DefaultBuilder builder) {
this(builder, Clock.systemUTC());
}
/**
* For testing purposes only
*/
- DefaultAxdbFrontendUtilities(DefaultBuilder builder, Clock clock) {
+ public DefaultAxdbFrontendUtilities(DefaultBuilder builder, Clock clock) {
this.credentialsProvider = builder.credentialsProvider;
this.region = builder.region;
this.clock = clock;
@@ -72,7 +73,7 @@ public String generateAuthenticationToken(GenerateAuthenticationTokenRequest req
.protocol("https")
.host(request.hostname())
.encodedPath("/")
- .putRawQueryParameter("Action", request.action().name())
+ .putRawQueryParameter("Action", request.action().getAction())
.build();
Instant expirationTime = Instant.now(clock).plus(request.expiresIn());
@@ -105,6 +106,7 @@ private Region resolveRegion(GenerateAuthenticationTokenRequest request) {
"or AxdbFrontendUtilities object");
}
+ // TODO: update this to use AwsCredentialsIdentity when we migrate Signers to accept the new type.
private AwsCredentials resolveCredentials(GenerateAuthenticationTokenRequest request) {
if (request.credentialsIdentityProvider() != null) {
return CredentialUtils.toCredentials(
@@ -120,11 +122,11 @@ private AwsCredentials resolveCredentials(GenerateAuthenticationTokenRequest req
}
@SdkInternalApi
- static final class DefaultBuilder implements Builder {
+ public static final class DefaultBuilder implements Builder {
private Region region;
private IdentityProvider extends AwsCredentialsIdentity> credentialsProvider;
- DefaultBuilder() {
+ public DefaultBuilder() {
}
Builder clientConfiguration(SdkClientConfiguration clientConfiguration) {
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
index 27cf569cb683..cf360be3d6a2 100644
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
@@ -16,21 +16,32 @@
package software.amazon.awssdk.services.axdbfrontend.model;
import java.io.Serializable;
+import software.amazon.awssdk.annotations.SdkPublicApi;
/**
- * Enumerations of possible actions that can be performed on a Xanadu database.
+ * Enumerations of possible actions that can be performed on an AxdbFrontend database.
*/
+@SdkPublicApi
public enum Action implements Serializable {
- DbConnect,
- DbConnectSuperuser;
+ DB_CONNECT("DbConnect"),
+ DB_CONNECT_SUPERUSER("DbConnectSuperuser");
+
+ private final String action;
+
+ Action(String action) {
+ this.action = action;
+ }
+
+ public String getAction() {
+ return action;
+ }
public static Action variant(String value) {
- if (value.equalsIgnoreCase(Action.DbConnect.name())) {
- return Action.DbConnect;
- } else if (value.equalsIgnoreCase(Action.DbConnectSuperuser.name())) {
- return Action.DbConnectSuperuser;
- } else {
- throw new IllegalArgumentException("Invalid action: " + value);
+ for (Action action : Action.values()) {
+ if (value.equalsIgnoreCase(action.name())) {
+ return action;
+ }
}
+ throw new IllegalArgumentException("Invalid action: " + value);
}
}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java
index 05c1baf8e3a6..7f12c2813ad9 100644
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java
@@ -16,6 +16,7 @@
package software.amazon.awssdk.services.axdbfrontend.model;
import java.time.Duration;
+import java.util.Objects;
import software.amazon.awssdk.annotations.NotThreadSafe;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
@@ -25,6 +26,7 @@
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.axdbfrontend.AxdbFrontendUtilities;
import software.amazon.awssdk.services.axdbfrontend.model.Action;
+import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.Validate;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
@@ -37,6 +39,8 @@
public final class GenerateAuthenticationTokenRequest implements
ToCopyableBuilder {
+ // The time the IAM token is good for based on RDS. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html
+ private static final Duration EXPIRATION_DURATION = Duration.ofSeconds(900L);
private final String hostname;
private final Region region;
@@ -47,11 +51,49 @@ public final class GenerateAuthenticationTokenRequest implements
private GenerateAuthenticationTokenRequest(BuilderImpl builder) {
this.hostname = Validate.notEmpty(builder.hostname, "hostname");
this.action = Validate.notNull(builder.action, "action");
- Validate.isTrue(this.action == Action.DbConnect || this.action == Action.DbConnectSuperuser, "invalid action");
+ Validate.isTrue(this.action == Action.DB_CONNECT || this.action == Action.DB_CONNECT_SUPERUSER, "invalid action");
this.region = builder.region;
this.credentialsProvider = builder.credentialsProvider;
this.expiresIn = (builder.expiresIn != null) ? builder.expiresIn :
- Duration.ofSeconds(900L);
+ EXPIRATION_DURATION;
+ }
+
+ @Override
+ public String toString() {
+ return ToString.builder("GenerateAuthenticationTokenRequest")
+ .add("hostname", hostname)
+ .add("region", region)
+ .add("action", action)
+ .add("expiresIn", expiresIn)
+ .add("credentialsProvider", credentialsProvider)
+ .build();
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ GenerateAuthenticationTokenRequest that = (GenerateAuthenticationTokenRequest) o;
+ return Objects.equals(hostname, that.hostname) &&
+ Objects.equals(region, that.region) &&
+ Objects.equals(action, that.action) &&
+ Objects.equals(expiresIn, that.expiresIn) &&
+ Objects.equals(credentialsProvider, that.credentialsProvider);
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+ hashCode = 31 * hashCode + Objects.hashCode(hostname);
+ hashCode = 31 * hashCode + Objects.hashCode(region);
+ hashCode = 31 * hashCode + Objects.hashCode(action);
+ hashCode = 31 * hashCode + Objects.hashCode(expiresIn);
+ hashCode = 31 * hashCode + Objects.hashCode(credentialsProvider);
+ return hashCode;
}
/**
@@ -62,7 +104,7 @@ public String hostname() {
}
/**
- * @return The token expiry duration in seconds
+ * @return The token expiry duration
*/
public Duration expiresIn() {
return expiresIn;
@@ -141,8 +183,7 @@ public interface Builder extends CopyableBuilder {
builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
@@ -110,7 +118,7 @@ public void testTokenGenerationWithOverriddenCredentialsUsingIdentityProvider()
private void testTokenGenerationWithOverriddenCredentials(DefaultBuilder utilitiesBuilder,
Consumer credsBuilder) {
DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DbConnectSuperuser;
+ Action action = Action.DB_CONNECT_SUPERUSER;
String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
@@ -136,7 +144,7 @@ public void testTokenGenerationWithOverriddenRegion() {
.region(Region.US_EAST_1);
DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DbConnectSuperuser;
+ Action action = Action.DB_CONNECT_SUPERUSER;
String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
@@ -161,7 +169,7 @@ public void testMissingRegionThrowsException() {
.credentialsProvider(credentialsProvider);
DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DbConnect;
+ Action action = Action.DB_CONNECT;
assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
@@ -176,7 +184,7 @@ public void testMissingCredentialsThrowsException() {
.region(Region.US_WEST_2);
DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DbConnect;
+ Action action = Action.DB_CONNECT;
assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
@@ -194,7 +202,7 @@ public void testMissingHostnameThrowsException() {
.credentialsProvider(credentialsProvider);
DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DbConnect;
+ Action action = Action.DB_CONNECT;
assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
builder.action(action);
@@ -208,7 +216,8 @@ public void testMissingActionThrowsException() {
AwsBasicCredentials.create("access_key", "secret_key")
);
DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider);
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
@@ -228,7 +237,7 @@ public void testTokenGenerationWithCustomExpiry() {
.region(Region.US_EAST_1);
DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DbConnect;
+ Action action = Action.DB_CONNECT;
Duration expiry = Duration.ofSeconds(3600L);
String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
From 26b746a2503309671148d4bf802996bc79c63260 Mon Sep 17 00:00:00 2001
From: Amrit Pandher
Date: Mon, 12 Aug 2024 16:07:40 -0700
Subject: [PATCH 04/20] Adding GenerateAuthenticationTokenRequestTestClass and
addressing nits
---
.../services/axdbfrontend/model/Action.java | 8 +++-
.../DefaultAxdbFrontendUtilitiesTest.java | 39 ++++++++-----------
...enerateAuthenticationTokenRequestTest.java | 28 +++++++++++++
3 files changed, 51 insertions(+), 24 deletions(-)
create mode 100644 services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/GenerateAuthenticationTokenRequestTest.java
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
index cf360be3d6a2..27c466a035ef 100644
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
@@ -23,7 +23,13 @@
*/
@SdkPublicApi
public enum Action implements Serializable {
+ /**
+ * The action of connecting to an AxdbFrontend database using DbConnect
+ */
DB_CONNECT("DbConnect"),
+ /**
+ * The action of connecting to an AxdbFrontend database using DbConnectSuperuser
+ */
DB_CONNECT_SUPERUSER("DbConnectSuperuser");
private final String action;
@@ -36,7 +42,7 @@ public String getAction() {
return action;
}
- public static Action variant(String value) {
+ public static Action fromValue(String value) {
for (Action action : Action.values()) {
if (value.equalsIgnoreCase(action.name())) {
return action;
diff --git a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java b/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
index 7846cfd8a19f..9e0995aeb917 100644
--- a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
+++ b/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
@@ -22,7 +22,6 @@
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.function.Consumer;
-import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.jupiter.api.Test;
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
@@ -41,13 +40,7 @@ public class DefaultAxdbFrontendUtilitiesTest {
private final Clock fixedClock = Clock.fixed(ZonedDateTime.of(2024, 11, 7, 17, 39, 33, 0, utcZone).toInstant(), utcZone);
@Test
- void equalsHashcode() {
- EqualsVerifier.forClass(GenerateAuthenticationTokenRequest.class)
- .withNonnullFields("hostname", "region", "action", "expiresIn", "credentialsProvider")
- .verify();
- }
- @Test
- public void testTokenGenerationWithBuilderDefaultsUsingAwsCredentialsProvider() {
+ public void tokenGenerationWithBuilderDefaultsUsingAwsCredentialsProvider_isSuccessful() {
AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
AwsBasicCredentials.create("access_key", "secret_key")
);
@@ -55,11 +48,11 @@ public void testTokenGenerationWithBuilderDefaultsUsingAwsCredentialsProvider()
.credentialsProvider(credentialsProvider)
.region(Region.US_EAST_1);
- testTokenGenerationWithBuilderDefaults(utilitiesBuilder);
+ tokenGenerationWithBuilderDefaults(utilitiesBuilder);
}
@Test
- public void testTokenGenerationWithBuilderDefaultsUsingIdentityProvider() {
+ public void tokenGenerationWithBuilderDefaultsUsingIdentityProvider_isSuccessful() {
IdentityProvider credentialsProvider = StaticCredentialsProvider.create(
AwsBasicCredentials.create("access_key", "secret_key")
);
@@ -67,10 +60,10 @@ public void testTokenGenerationWithBuilderDefaultsUsingIdentityProvider() {
.credentialsProvider(credentialsProvider)
.region(Region.US_EAST_1);
- testTokenGenerationWithBuilderDefaults(utilitiesBuilder);
+ tokenGenerationWithBuilderDefaults(utilitiesBuilder);
}
- private void testTokenGenerationWithBuilderDefaults(DefaultBuilder utilitiesBuilder) {
+ private void tokenGenerationWithBuilderDefaults(DefaultBuilder utilitiesBuilder) {
DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
Action action = Action.DB_CONNECT_SUPERUSER;
@@ -88,34 +81,34 @@ private void testTokenGenerationWithBuilderDefaults(DefaultBuilder utilitiesBuil
}
@Test
- public void testTokenGenerationWithOverriddenCredentialsUsingAwsCredentialsProvider() {
+ public void tokenGenerationWithOverriddenCredentialsUsingAwsCredentialsProvider_isSuccessful() {
AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
AwsBasicCredentials.create("foo", "bar")
);
DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
.credentialsProvider(credentialsProvider)
.region(Region.US_EAST_1);
- testTokenGenerationWithOverriddenCredentials(utilitiesBuilder, builder -> {
+ tokenGenerationWithOverriddenCredentials(utilitiesBuilder, builder -> {
builder.credentialsProvider(StaticCredentialsProvider.create(
AwsBasicCredentials.create("access_key", "secret_key")));
});
}
@Test
- public void testTokenGenerationWithOverriddenCredentialsUsingIdentityProvider() {
+ public void tokenGenerationWithOverriddenCredentialsUsingIdentityProvider_isSuccessful() {
IdentityProvider credentialsProvider = StaticCredentialsProvider.create(
AwsBasicCredentials.create("foo", "bar")
);
DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
.credentialsProvider(credentialsProvider)
.region(Region.US_EAST_1);
- testTokenGenerationWithOverriddenCredentials(utilitiesBuilder, builder -> {
+ tokenGenerationWithOverriddenCredentials(utilitiesBuilder, builder -> {
builder.credentialsProvider((IdentityProvider) StaticCredentialsProvider.create(
AwsBasicCredentials.create("access_key", "secret_key")));
});
}
- private void testTokenGenerationWithOverriddenCredentials(DefaultBuilder utilitiesBuilder,
+ private void tokenGenerationWithOverriddenCredentials(DefaultBuilder utilitiesBuilder,
Consumer credsBuilder) {
DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
Action action = Action.DB_CONNECT_SUPERUSER;
@@ -135,7 +128,7 @@ private void testTokenGenerationWithOverriddenCredentials(DefaultBuilder utiliti
}
@Test
- public void testTokenGenerationWithOverriddenRegion() {
+ public void tokenGenerationWithOverriddenRegion_isSuccessful() {
AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
AwsBasicCredentials.create("access_key", "secret_key")
);
@@ -161,7 +154,7 @@ public void testTokenGenerationWithOverriddenRegion() {
}
@Test
- public void testMissingRegionThrowsException() {
+ public void missingRegion_throwsException() {
AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
AwsBasicCredentials.create("access_key", "secret_key")
);
@@ -179,7 +172,7 @@ public void testMissingRegionThrowsException() {
}
@Test
- public void testMissingCredentialsThrowsException() {
+ public void missingCredentials_throwsException() {
DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
.region(Region.US_WEST_2);
@@ -194,7 +187,7 @@ public void testMissingCredentialsThrowsException() {
}
@Test
- public void testMissingHostnameThrowsException() {
+ public void missingHostname_throwsException() {
AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
AwsBasicCredentials.create("access_key", "secret_key")
);
@@ -211,7 +204,7 @@ public void testMissingHostnameThrowsException() {
}
@Test
- public void testMissingActionThrowsException() {
+ public void missingAction_throwsException() {
AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
AwsBasicCredentials.create("access_key", "secret_key")
);
@@ -228,7 +221,7 @@ public void testMissingActionThrowsException() {
}
@Test
- public void testTokenGenerationWithCustomExpiry() {
+ public void tokenGenerationWithCustomExpiry_isSuccessful() {
AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
AwsBasicCredentials.create("access_key", "secret_key")
);
diff --git a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/GenerateAuthenticationTokenRequestTest.java b/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/GenerateAuthenticationTokenRequestTest.java
new file mode 100644
index 000000000000..57d4ea55705a
--- /dev/null
+++ b/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/GenerateAuthenticationTokenRequestTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ * 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 software.amazon.awssdk.services.axdbfrontend;
+
+import nl.jqno.equalsverifier.EqualsVerifier;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
+
+public class GenerateAuthenticationTokenRequestTest {
+ @Test
+ void equalsHashcode() {
+ EqualsVerifier.forClass(GenerateAuthenticationTokenRequest.class)
+ .withNonnullFields("hostname", "region", "action")
+ .verify();
+ }
+}
\ No newline at end of file
From 9e2487cdbeb27031b17ed0958e036fccbcc073ef Mon Sep 17 00:00:00 2001
From: hdavidh
Date: Wed, 14 Aug 2024 14:17:36 -0700
Subject: [PATCH 05/20] Add customization config for utilities method on client
---
.../services/axdbfrontend/AxdbFrontendUtilities.java | 1 -
.../{internal => }/DefaultAxdbFrontendUtilities.java | 3 +--
.../resources/codegen-resources/customization.config | 9 +++++++++
.../axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java | 4 +---
4 files changed, 11 insertions(+), 6 deletions(-)
rename services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/{internal => }/DefaultAxdbFrontendUtilities.java (98%)
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/customization.config
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
index 87981d530dc2..cdda3c60f51b 100644
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
@@ -21,7 +21,6 @@
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
import software.amazon.awssdk.identity.spi.IdentityProvider;
import software.amazon.awssdk.regions.Region;
-import software.amazon.awssdk.services.axdbfrontend.internal.DefaultAxdbFrontendUtilities;
import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
/**
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/internal/DefaultAxdbFrontendUtilities.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java
similarity index 98%
rename from services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/internal/DefaultAxdbFrontendUtilities.java
rename to services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java
index a7ebb6361945..860a5bd7d78f 100644
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/internal/DefaultAxdbFrontendUtilities.java
+++ b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java
@@ -13,7 +13,7 @@
* permissions and limitations under the License.
*/
-package software.amazon.awssdk.services.axdbfrontend.internal;
+package software.amazon.awssdk.services.axdbfrontend;
import java.time.Clock;
import java.time.Instant;
@@ -30,7 +30,6 @@
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
import software.amazon.awssdk.identity.spi.IdentityProvider;
import software.amazon.awssdk.regions.Region;
-import software.amazon.awssdk.services.axdbfrontend.AxdbFrontendUtilities;
import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
import software.amazon.awssdk.utils.CompletableFutureUtils;
import software.amazon.awssdk.utils.Logger;
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/customization.config b/services/axdbfrontend/src/main/resources/codegen-resources/customization.config
new file mode 100644
index 000000000000..0c3578e27743
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/customization.config
@@ -0,0 +1,9 @@
+{
+ "utilitiesMethod": {
+ "returnType": "software.amazon.awssdk.services.axdbfrontend.AxdbFrontendUtilities",
+ "instanceType": "software.amazon.awssdk.services.axdbfrontend.DefaultAxdbFrontendUtilities",
+ "createMethodParams": [
+ "clientConfiguration"
+ ]
+ }
+}
diff --git a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java b/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
index 9e0995aeb917..05656730abb8 100644
--- a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
+++ b/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
@@ -26,12 +26,10 @@
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
-import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
import software.amazon.awssdk.identity.spi.IdentityProvider;
import software.amazon.awssdk.regions.Region;
-import software.amazon.awssdk.services.axdbfrontend.internal.DefaultAxdbFrontendUtilities;
-import software.amazon.awssdk.services.axdbfrontend.internal.DefaultAxdbFrontendUtilities.DefaultBuilder;
+import software.amazon.awssdk.services.axdbfrontend.DefaultAxdbFrontendUtilities.DefaultBuilder;
import software.amazon.awssdk.services.axdbfrontend.model.Action;
import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
From 4e66c3dcc02a2c93cd4dc257f72f2e82bc87ffb1 Mon Sep 17 00:00:00 2001
From: hdavidh
Date: Wed, 14 Aug 2024 14:24:57 -0700
Subject: [PATCH 06/20] Remove feature metadata on custom branch
---
feature.metadata | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 feature.metadata
diff --git a/feature.metadata b/feature.metadata
deleted file mode 100644
index 8402480589c7..000000000000
--- a/feature.metadata
+++ /dev/null
@@ -1 +0,0 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":8,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
From 4eba96443a6daf0dd9e33a3b1cea31bd32b9e672 Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Thu, 15 Aug 2024 00:21:37 +0000
Subject: [PATCH 07/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 10
---
aws-sdk-java/pom.xml | 5 +
bom/pom.xml | 5 +
feature.metadata | 1 +
services/axdbfrontend/pom.xml | 60 ++
.../codegen-resources/endpoint-rule-set.json | 350 +++++++
.../codegen-resources/endpoint-tests.json | 314 ++++++
.../codegen-resources/paginators-1.json | 16 +
.../codegen-resources/service-2.json | 921 ++++++++++++++++++
.../codegen-resources/waiters-2.json | 28 +
services/pom.xml | 1 +
10 files changed, 1701 insertions(+)
create mode 100644 feature.metadata
create mode 100644 services/axdbfrontend/pom.xml
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
create mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json
diff --git a/aws-sdk-java/pom.xml b/aws-sdk-java/pom.xml
index 6abc42df5866..dc2ddb6e7844 100644
--- a/aws-sdk-java/pom.xml
+++ b/aws-sdk-java/pom.xml
@@ -1973,6 +1973,11 @@ Amazon AutoScaling, etc).
ssmquicksetup
${awsjavasdk.version}
+
+ software.amazon.awssdk
+ axdbfrontend
+ ${awsjavasdk.version}
+
${project.artifactId}-${project.version}
diff --git a/bom/pom.xml b/bom/pom.xml
index 1e61c8db57a1..136cc6addd8b 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -2168,6 +2168,11 @@
ssmquicksetup
${awsjavasdk.version}
+
+ software.amazon.awssdk
+ axdbfrontend
+ ${awsjavasdk.version}
+
diff --git a/feature.metadata b/feature.metadata
new file mode 100644
index 000000000000..97f52398fd0c
--- /dev/null
+++ b/feature.metadata
@@ -0,0 +1 @@
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":10,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
diff --git a/services/axdbfrontend/pom.xml b/services/axdbfrontend/pom.xml
new file mode 100644
index 000000000000..54a731fdee20
--- /dev/null
+++ b/services/axdbfrontend/pom.xml
@@ -0,0 +1,60 @@
+
+
+ 4.0.0
+
+ software.amazon.awssdk
+ services
+ 2.27.6-SNAPSHOT
+
+ axdbfrontend
+ AWS Java SDK :: Services :: Axdb Frontend
+ The AWS Java SDK for Axdb Frontend module holds the client classes that are used for
+ communicating with Axdb Frontend.
+
+ https://aws.amazon.com/sdkforjava
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ software.amazon.awssdk.services.axdbfrontend
+
+
+
+
+
+
+
+
+ software.amazon.awssdk
+ protocol-core
+ ${awsjavasdk.version}
+
+
+ software.amazon.awssdk
+ aws-json-protocol
+ ${awsjavasdk.version}
+
+
+ software.amazon.awssdk
+ http-auth-aws
+ ${awsjavasdk.version}
+
+
+
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json
new file mode 100644
index 000000000000..e1f87bcc4afb
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json
@@ -0,0 +1,350 @@
+{
+ "version": "1.0",
+ "parameters": {
+ "Region": {
+ "builtIn": "AWS::Region",
+ "required": false,
+ "documentation": "The AWS region used to dispatch the request.",
+ "type": "String"
+ },
+ "UseDualStack": {
+ "builtIn": "AWS::UseDualStack",
+ "required": true,
+ "default": false,
+ "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
+ "type": "Boolean"
+ },
+ "UseFIPS": {
+ "builtIn": "AWS::UseFIPS",
+ "required": true,
+ "default": false,
+ "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
+ "type": "Boolean"
+ },
+ "Endpoint": {
+ "builtIn": "SDK::Endpoint",
+ "required": false,
+ "documentation": "Override the endpoint used to send this request",
+ "type": "String"
+ }
+ },
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "isSet",
+ "argv": [
+ {
+ "ref": "Endpoint"
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseFIPS"
+ },
+ true
+ ]
+ }
+ ],
+ "error": "Invalid Configuration: FIPS and custom endpoint are not supported",
+ "type": "error"
+ },
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseDualStack"
+ },
+ true
+ ]
+ }
+ ],
+ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported",
+ "type": "error"
+ },
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": {
+ "ref": "Endpoint"
+ },
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "isSet",
+ "argv": [
+ {
+ "ref": "Region"
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "aws.partition",
+ "argv": [
+ {
+ "ref": "Region"
+ }
+ ],
+ "assign": "PartitionResult"
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseFIPS"
+ },
+ true
+ ]
+ },
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseDualStack"
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ true,
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsFIPS"
+ ]
+ }
+ ]
+ },
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ true,
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsDualStack"
+ ]
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://xanadu-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "FIPS and DualStack are enabled, but this partition does not support one or both",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseFIPS"
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsFIPS"
+ ]
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://xanadu-fips.{Region}.{PartitionResult#dnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "FIPS is enabled but this partition does not support FIPS",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseDualStack"
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ true,
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsDualStack"
+ ]
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://xanadu.{Region}.{PartitionResult#dualStackDnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "DualStack is enabled but this partition does not support DualStack",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://xanadu.{Region}.{PartitionResult#dnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "Invalid Configuration: Missing Region",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json
new file mode 100644
index 000000000000..d7a6824425c4
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json
@@ -0,0 +1,314 @@
+{
+ "testCases": [
+ {
+ "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.cn-north-1.api.amazonwebservices.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.cn-north-1.amazonaws.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.cn-north-1.api.amazonwebservices.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.cn-north-1.amazonaws.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-gov-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-gov-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-gov-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-gov-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-iso-east-1.c2s.ic.gov"
+ }
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "error": "DualStack is enabled but this partition does not support DualStack"
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-iso-east-1.c2s.ic.gov"
+ }
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu-fips.us-isob-east-1.sc2s.sgov.gov"
+ }
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "error": "DualStack is enabled but this partition does not support DualStack"
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://xanadu.us-isob-east-1.sc2s.sgov.gov"
+ }
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://example.com"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://example.com"
+ }
+ },
+ "params": {
+ "UseFIPS": false,
+ "UseDualStack": false,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "For custom endpoint with fips enabled and dualstack disabled",
+ "expect": {
+ "error": "Invalid Configuration: FIPS and custom endpoint are not supported"
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "For custom endpoint with fips disabled and dualstack enabled",
+ "expect": {
+ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported"
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "Missing region",
+ "expect": {
+ "error": "Invalid Configuration: Missing Region"
+ }
+ }
+ ],
+ "version": "1.0"
+}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json b/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
new file mode 100644
index 000000000000..7903f3b4ee13
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
@@ -0,0 +1,16 @@
+{
+ "pagination": {
+ "ListClusterGroups": {
+ "input_token": "nextToken",
+ "output_token": "nextToken",
+ "limit_key": "maxResults",
+ "result_key": "clusterGroups"
+ },
+ "ListClusters": {
+ "input_token": "nextToken",
+ "output_token": "nextToken",
+ "limit_key": "maxResults",
+ "result_key": "clusters"
+ }
+ }
+}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
new file mode 100644
index 000000000000..842a40b13b84
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
@@ -0,0 +1,921 @@
+{
+ "version":"2.0",
+ "metadata":{
+ "apiVersion":"2018-05-10",
+ "auth":["aws.auth#sigv4"],
+ "endpointPrefix":"xanadu",
+ "protocol":"rest-json",
+ "protocols":["rest-json"],
+ "serviceFullName":"A beautiful and amazing AxdbFrontend",
+ "serviceId":"AxdbFrontend",
+ "signatureVersion":"v4",
+ "signingName":"xanadu",
+ "uid":"axdbfrontend-2018-05-10"
+ },
+ "operations":{
+ "CreateCluster":{
+ "name":"CreateCluster",
+ "http":{
+ "method":"POST",
+ "requestUri":"/cluster",
+ "responseCode":200
+ },
+ "input":{"shape":"CreateClusterInput"},
+ "output":{"shape":"CreateClusterOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Create a cluster
"
+ },
+ "CreateMultiRegionClusters":{
+ "name":"CreateMultiRegionClusters",
+ "http":{
+ "method":"POST",
+ "requestUri":"/multi-region-clusters",
+ "responseCode":200
+ },
+ "input":{"shape":"CreateMultiRegionClustersInput"},
+ "output":{"shape":"CreateMultiRegionClustersOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Create clusters in multiple regions
"
+ },
+ "DeleteCluster":{
+ "name":"DeleteCluster",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/cluster/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"DeleteClusterInput"},
+ "output":{"shape":"DeleteClusterOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Delete a cluster
",
+ "idempotent":true
+ },
+ "DeleteMultiRegionClusters":{
+ "name":"DeleteMultiRegionClusters",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/multi-region-clusters",
+ "responseCode":200
+ },
+ "input":{"shape":"DeleteMultiRegionClustersInput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Delete clusters in mutiple regions
",
+ "idempotent":true
+ },
+ "GetCluster":{
+ "name":"GetCluster",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"GetClusterInput"},
+ "output":{"shape":"GetClusterOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Get a cluster
"
+ },
+ "GetClusterGroup":{
+ "name":"GetClusterGroup",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster-group/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"GetClusterGroupInput"},
+ "output":{"shape":"GetClusterGroupOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Get a cluster group
"
+ },
+ "ListClusterGroups":{
+ "name":"ListClusterGroups",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster-group",
+ "responseCode":200
+ },
+ "input":{"shape":"ListClusterGroupsInput"},
+ "output":{"shape":"ListClusterGroupsOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"List cluster groups
"
+ },
+ "ListClusters":{
+ "name":"ListClusters",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster",
+ "responseCode":200
+ },
+ "input":{"shape":"ListClustersInput"},
+ "output":{"shape":"ListClustersOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"List clusters
"
+ },
+ "ListTagsForResource":{
+ "name":"ListTagsForResource",
+ "http":{
+ "method":"GET",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"ListTagsForResourceInput"},
+ "output":{"shape":"ListTagsForResourceOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"List all Tags on an ARN
"
+ },
+ "TagResource":{
+ "name":"TagResource",
+ "http":{
+ "method":"POST",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"TagResourceInput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Add Tags to an ARN
",
+ "idempotent":true
+ },
+ "UntagResource":{
+ "name":"UntagResource",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"UntagResourceInput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Remove Tags from an ARN
",
+ "idempotent":true
+ },
+ "UpdateCluster":{
+ "name":"UpdateCluster",
+ "http":{
+ "method":"POST",
+ "requestUri":"/cluster/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"UpdateClusterInput"},
+ "output":{"shape":"UpdateClusterOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Update a cluster
"
+ }
+ },
+ "shapes":{
+ "AccessDeniedException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{"shape":"String"}
+ },
+ "documentation":"User does not have sufficient access to perform this action
",
+ "error":{
+ "httpStatusCode":403,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "Arn":{
+ "type":"string",
+ "documentation":"Amazon Resource Name
",
+ "max":1011,
+ "min":1,
+ "pattern":"arn:.+"
+ },
+ "ClientToken":{
+ "type":"string",
+ "documentation":"Idempotency Token
",
+ "max":128,
+ "min":1,
+ "pattern":"[!-~]+"
+ },
+ "ClusterArn":{
+ "type":"string",
+ "documentation":"Cluster ARN
"
+ },
+ "ClusterArnList":{
+ "type":"list",
+ "member":{"shape":"ClusterArn"},
+ "documentation":"List of cluster arns
"
+ },
+ "ClusterCreationTime":{
+ "type":"timestamp",
+ "documentation":"Timestamp when the Cluster was created
"
+ },
+ "ClusterEncryptionKey":{
+ "type":"string",
+ "documentation":"The server-side encryption key used for this Cluster
"
+ },
+ "ClusterGroupArn":{
+ "type":"string",
+ "documentation":"ClusterGroup ARN
"
+ },
+ "ClusterGroupCreationTime":{
+ "type":"timestamp",
+ "documentation":"Timestamp when the Cluster Group was created
"
+ },
+ "ClusterGroupId":{
+ "type":"string",
+ "documentation":"ClusterGroup ID
"
+ },
+ "ClusterGroupList":{
+ "type":"list",
+ "member":{"shape":"ClusterGroupSummary"},
+ "documentation":"List of cluster groups
"
+ },
+ "ClusterGroupSummary":{
+ "type":"structure",
+ "members":{
+ "identifier":{"shape":"ClusterGroupId"},
+ "arn":{"shape":"ClusterGroupArn"}
+ },
+ "documentation":"Cluster Group Summary
"
+ },
+ "ClusterId":{
+ "type":"string",
+ "documentation":"Cluster ID
"
+ },
+ "ClusterList":{
+ "type":"list",
+ "member":{"shape":"ClusterSummary"},
+ "documentation":"List of clusters
"
+ },
+ "ClusterName":{
+ "type":"string",
+ "documentation":"Cluster Name
",
+ "max":64,
+ "min":1,
+ "pattern":"[a-zA-Z](-?[a-zA-Z0-9]+)*"
+ },
+ "ClusterPassword":{
+ "type":"string",
+ "documentation":"temporary cluster password for Pandora
",
+ "sensitive":true
+ },
+ "ClusterStatus":{
+ "type":"string",
+ "documentation":"Cluster Status
",
+ "enum":[
+ "CREATING",
+ "ACTIVE",
+ "UPDATING",
+ "DELETING",
+ "DELETED",
+ "FAILED"
+ ]
+ },
+ "ClusterSummary":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"}
+ },
+ "documentation":"Cluster Summary
"
+ },
+ "ConflictException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "resourceId":{
+ "shape":"String",
+ "documentation":"Identifier of the resource affected
"
+ },
+ "resourceType":{
+ "shape":"String",
+ "documentation":"Type of the resource affected
"
+ }
+ },
+ "documentation":"Updating or deleting a resource can cause an inconsistent state
",
+ "error":{
+ "httpStatusCode":409,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "CreateClusterInput":{
+ "type":"structure",
+ "members":{
+ "name":{"shape":"ClusterName"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "groupWitnessRegion":{"shape":"Region"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "tags":{"shape":"TagMap"},
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true
+ }
+ }
+ },
+ "CreateClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "quorumRegion":{"shape":"Region"},
+ "multiRegionClusterArns":{"shape":"ClusterArnList"},
+ "superuserPassword":{"shape":"ClusterPassword"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "CreateMultiRegionClustersInput":{
+ "type":"structure",
+ "required":[
+ "clusterRegionList",
+ "quorumRegion"
+ ],
+ "members":{
+ "clusterRegionList":{"shape":"RegionList"},
+ "quorumRegion":{"shape":"Region"},
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true
+ }
+ }
+ },
+ "CreateMultiRegionClustersOutput":{
+ "type":"structure",
+ "required":["multiRegionClusterArns"],
+ "members":{
+ "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ }
+ },
+ "DeleteClusterInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterId",
+ "location":"uri",
+ "locationName":"identifier"
+ },
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true,
+ "location":"querystring",
+ "locationName":"client-token"
+ }
+ }
+ },
+ "DeleteClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "quorumRegion":{"shape":"Region"},
+ "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "DeleteMultiRegionClustersInput":{
+ "type":"structure",
+ "required":["multiRegionClusterArns"],
+ "members":{
+ "multiRegionClusterArns":{
+ "shape":"ClusterArnList",
+ "location":"querystring",
+ "locationName":"multi-region-cluster-arns"
+ },
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true,
+ "location":"querystring",
+ "locationName":"client-token"
+ }
+ }
+ },
+ "DeletionProtectionEnabled":{
+ "type":"boolean",
+ "documentation":"Deletion Protection
",
+ "box":true
+ },
+ "GetClusterGroupInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterGroupId",
+ "location":"uri",
+ "locationName":"identifier"
+ }
+ }
+ },
+ "GetClusterGroupOutput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{"shape":"ClusterGroupId"},
+ "arn":{"shape":"ClusterGroupArn"},
+ "witnessRegion":{"shape":"Region"},
+ "clusters":{"shape":"ClusterArnList"},
+ "creationTime":{"shape":"ClusterGroupCreationTime"}
+ },
+ "documentation":"Cluster Group Output Mixin
"
+ },
+ "GetClusterInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterId",
+ "location":"uri",
+ "locationName":"identifier"
+ }
+ }
+ },
+ "GetClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "quorumRegion":{"shape":"Region"},
+ "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "Integer":{
+ "type":"integer",
+ "box":true
+ },
+ "InternalServerException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "retryAfterSeconds":{
+ "shape":"Integer",
+ "documentation":"Advice to clients on when the call can be safely retried
",
+ "location":"header",
+ "locationName":"Retry-After"
+ }
+ },
+ "documentation":"Unexpected error during processing of request
",
+ "error":{"httpStatusCode":500},
+ "exception":true,
+ "fault":true,
+ "retryable":{"throttling":false}
+ },
+ "ListClusterGroupsInput":{
+ "type":"structure",
+ "members":{
+ "maxResults":{
+ "shape":"MaxResults",
+ "location":"querystring",
+ "locationName":"max-results"
+ },
+ "nextToken":{
+ "shape":"NextToken",
+ "location":"querystring",
+ "locationName":"next-token"
+ }
+ }
+ },
+ "ListClusterGroupsOutput":{
+ "type":"structure",
+ "required":["clusterGroups"],
+ "members":{
+ "nextToken":{"shape":"NextToken"},
+ "clusterGroups":{"shape":"ClusterGroupList"}
+ }
+ },
+ "ListClustersInput":{
+ "type":"structure",
+ "members":{
+ "maxResults":{
+ "shape":"MaxResults",
+ "location":"querystring",
+ "locationName":"max-results"
+ },
+ "nextToken":{
+ "shape":"NextToken",
+ "location":"querystring",
+ "locationName":"next-token"
+ }
+ }
+ },
+ "ListClustersOutput":{
+ "type":"structure",
+ "required":["clusters"],
+ "members":{
+ "nextToken":{"shape":"NextToken"},
+ "clusters":{"shape":"ClusterList"}
+ }
+ },
+ "ListTagsForResourceInput":{
+ "type":"structure",
+ "required":["resourceArn"],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ }
+ }
+ },
+ "ListTagsForResourceOutput":{
+ "type":"structure",
+ "members":{
+ "tags":{"shape":"TagMap"}
+ }
+ },
+ "MaxResults":{
+ "type":"integer",
+ "documentation":"Max results that will be returned per page
",
+ "box":true,
+ "max":100,
+ "min":1
+ },
+ "NextToken":{
+ "type":"string",
+ "documentation":"Opaque token used to retrieve next page
"
+ },
+ "Region":{
+ "type":"string",
+ "documentation":"AWS Region name (e.g.: 'us-east-1')
",
+ "max":20,
+ "min":0
+ },
+ "RegionList":{
+ "type":"list",
+ "member":{"shape":"Region"},
+ "documentation":"List of regions
"
+ },
+ "ResourceNotFoundException":{
+ "type":"structure",
+ "required":[
+ "message",
+ "resourceId",
+ "resourceType"
+ ],
+ "members":{
+ "message":{"shape":"String"},
+ "resourceId":{
+ "shape":"String",
+ "documentation":"Hypothetical identifier of the resource which does not exist
"
+ },
+ "resourceType":{
+ "shape":"String",
+ "documentation":"Hypothetical type of the resource which does not exist
"
+ }
+ },
+ "documentation":"Request references a resource which does not exist
",
+ "error":{
+ "httpStatusCode":404,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "ServiceQuotaExceededException":{
+ "type":"structure",
+ "required":[
+ "message",
+ "resourceId",
+ "resourceType",
+ "serviceCode",
+ "quotaCode"
+ ],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "resourceId":{
+ "shape":"String",
+ "documentation":"Identifier of the resource affected
"
+ },
+ "resourceType":{
+ "shape":"String",
+ "documentation":"Type of the resource affected
"
+ },
+ "serviceCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating service
"
+ },
+ "quotaCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating quota
"
+ }
+ },
+ "documentation":"Request would cause a service quota to be exceeded
",
+ "error":{
+ "httpStatusCode":402,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "String":{"type":"string"},
+ "TagKey":{
+ "type":"string",
+ "documentation":"Tag Key
",
+ "max":128,
+ "min":1
+ },
+ "TagKeyList":{
+ "type":"list",
+ "member":{"shape":"TagKey"},
+ "documentation":"List of tag keys
",
+ "max":200,
+ "min":0
+ },
+ "TagMap":{
+ "type":"map",
+ "key":{"shape":"TagKey"},
+ "value":{"shape":"TagValue"},
+ "documentation":"Map of tags
",
+ "max":200,
+ "min":0
+ },
+ "TagResourceInput":{
+ "type":"structure",
+ "required":[
+ "resourceArn",
+ "tags"
+ ],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ },
+ "tags":{"shape":"TagMap"}
+ }
+ },
+ "TagValue":{
+ "type":"string",
+ "documentation":"Tag Value
",
+ "max":256,
+ "min":0
+ },
+ "ThrottlingException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "serviceCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating service
"
+ },
+ "quotaCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating quota
"
+ },
+ "retryAfterSeconds":{
+ "shape":"Integer",
+ "documentation":"Advice to clients on when the call can be safely retried
",
+ "location":"header",
+ "locationName":"Retry-After"
+ }
+ },
+ "documentation":"Request was denied due to request throttling
",
+ "error":{
+ "httpStatusCode":429,
+ "senderFault":true
+ },
+ "exception":true,
+ "retryable":{"throttling":true}
+ },
+ "UntagResourceInput":{
+ "type":"structure",
+ "required":[
+ "resourceArn",
+ "tagKeys"
+ ],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ },
+ "tagKeys":{
+ "shape":"TagKeyList",
+ "location":"querystring",
+ "locationName":"tagKeys"
+ }
+ }
+ },
+ "UpdateClusterInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterId",
+ "location":"uri",
+ "locationName":"identifier"
+ },
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true
+ }
+ }
+ },
+ "UpdateClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "name":{"shape":"ClusterName"},
+ "arn":{"shape":"ClusterArn"},
+ "groupArn":{"shape":"ClusterGroupArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "encryptionKey":{"shape":"ClusterEncryptionKey"},
+ "quorumRegion":{"shape":"Region"},
+ "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "ValidationException":{
+ "type":"structure",
+ "required":[
+ "message",
+ "reason"
+ ],
+ "members":{
+ "message":{"shape":"String"},
+ "reason":{"shape":"ValidationExceptionReason"},
+ "fieldList":{"shape":"ValidationExceptionFieldList"}
+ },
+ "documentation":"The input fails to satisfy the constraints specified by an AWS service
",
+ "error":{
+ "httpStatusCode":400,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "ValidationExceptionField":{
+ "type":"structure",
+ "required":[
+ "name",
+ "message"
+ ],
+ "members":{
+ "name":{
+ "shape":"String",
+ "documentation":"The field name
"
+ },
+ "message":{
+ "shape":"String",
+ "documentation":"Message describing why the field failed validation
"
+ }
+ },
+ "documentation":"A field that caused the error
"
+ },
+ "ValidationExceptionFieldList":{
+ "type":"list",
+ "member":{"shape":"ValidationExceptionField"},
+ "documentation":"List of fields that caused the error
"
+ },
+ "ValidationExceptionReason":{
+ "type":"string",
+ "documentation":"Reason the request failed validation
",
+ "enum":[
+ "unknownOperation",
+ "cannotParse",
+ "fieldValidationFailed",
+ "deletionProtectionEnabled",
+ "other"
+ ]
+ }
+ },
+ "documentation":"An example service, deployed with the Octane Service creator, which will echo the string
"
+}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json b/services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json
new file mode 100644
index 000000000000..69cd9baaeb5b
--- /dev/null
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json
@@ -0,0 +1,28 @@
+{
+ "version" : 2,
+ "waiters" : {
+ "ClusterActive" : {
+ "description" : "Wait until a Cluster is ACTIVE",
+ "delay" : 2,
+ "maxAttempts" : 60,
+ "operation" : "GetCluster",
+ "acceptors" : [ {
+ "matcher" : "path",
+ "argument" : "status",
+ "state" : "success",
+ "expected" : "ACTIVE"
+ } ]
+ },
+ "ClusterNotExists" : {
+ "description" : "Wait until a Cluster is gone",
+ "delay" : 2,
+ "maxAttempts" : 60,
+ "operation" : "GetCluster",
+ "acceptors" : [ {
+ "matcher" : "error",
+ "state" : "success",
+ "expected" : "ResourceNotFoundException"
+ } ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/pom.xml b/services/pom.xml
index 87b39c000f13..55819fd35e44 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -406,6 +406,7 @@
apptest
qapps
ssmquicksetup
+ axdbfrontend
The AWS Java SDK services
https://aws.amazon.com/sdkforjava
From edb08bff410e922cb6640f5bb5466fc3aedc1a51 Mon Sep 17 00:00:00 2001
From: hdavidh
Date: Wed, 14 Aug 2024 21:25:04 -0700
Subject: [PATCH 08/20] Revert "Remove feature metadata on custom branch"
This reverts commit 4e66c3dcc02a2c93cd4dc257f72f2e82bc87ffb1.
---
feature.metadata | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/feature.metadata b/feature.metadata
index 97f52398fd0c..8402480589c7 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":10,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":8,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
From 1a3e812fcb6a3251909686c032c6b4f34c453d7e Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Thu, 15 Aug 2024 04:34:20 +0000
Subject: [PATCH 09/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 11
---
feature.metadata | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/feature.metadata b/feature.metadata
index 8402480589c7..2d3c6adfb477 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":8,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":11,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
From f0d1bf28c14658c5ef3663000ad30d147a75dfba Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Mon, 23 Sep 2024 11:00:53 +0000
Subject: [PATCH 10/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 12
---
feature.metadata | 2 +-
.../codegen-resources/paginators-1.json | 6 -
.../codegen-resources/service-2.json | 326 +-----------------
3 files changed, 20 insertions(+), 314 deletions(-)
diff --git a/feature.metadata b/feature.metadata
index 2d3c6adfb477..51c8430d4938 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":11,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":12,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json b/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
index 7903f3b4ee13..c9cfb66eb2f5 100644
--- a/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
@@ -1,11 +1,5 @@
{
"pagination": {
- "ListClusterGroups": {
- "input_token": "nextToken",
- "output_token": "nextToken",
- "limit_key": "maxResults",
- "result_key": "clusterGroups"
- },
"ListClusters": {
"input_token": "nextToken",
"output_token": "nextToken",
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
index 842a40b13b84..80feb7858f6f 100644
--- a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
@@ -6,7 +6,7 @@
"endpointPrefix":"xanadu",
"protocol":"rest-json",
"protocols":["rest-json"],
- "serviceFullName":"A beautiful and amazing AxdbFrontend",
+ "serviceFullName":"Xanadu",
"serviceId":"AxdbFrontend",
"signatureVersion":"v4",
"signingName":"xanadu",
@@ -87,7 +87,7 @@
{"shape":"ResourceNotFoundException"},
{"shape":"ThrottlingException"}
],
- "documentation":"Delete clusters in mutiple regions
",
+ "documentation":"Delete clusters in multiple regions
",
"idempotent":true
},
"GetCluster":{
@@ -108,42 +108,6 @@
],
"documentation":"Get a cluster
"
},
- "GetClusterGroup":{
- "name":"GetClusterGroup",
- "http":{
- "method":"GET",
- "requestUri":"/cluster-group/{identifier}",
- "responseCode":200
- },
- "input":{"shape":"GetClusterGroupInput"},
- "output":{"shape":"GetClusterGroupOutput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Get a cluster group
"
- },
- "ListClusterGroups":{
- "name":"ListClusterGroups",
- "http":{
- "method":"GET",
- "requestUri":"/cluster-group",
- "responseCode":200
- },
- "input":{"shape":"ListClusterGroupsInput"},
- "output":{"shape":"ListClusterGroupsOutput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"List cluster groups
"
- },
"ListClusters":{
"name":"ListClusters",
"http":{
@@ -162,61 +126,6 @@
],
"documentation":"List clusters
"
},
- "ListTagsForResource":{
- "name":"ListTagsForResource",
- "http":{
- "method":"GET",
- "requestUri":"/tags/{resourceArn}",
- "responseCode":200
- },
- "input":{"shape":"ListTagsForResourceInput"},
- "output":{"shape":"ListTagsForResourceOutput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"List all Tags on an ARN
"
- },
- "TagResource":{
- "name":"TagResource",
- "http":{
- "method":"POST",
- "requestUri":"/tags/{resourceArn}",
- "responseCode":200
- },
- "input":{"shape":"TagResourceInput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"ServiceQuotaExceededException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Add Tags to an ARN
",
- "idempotent":true
- },
- "UntagResource":{
- "name":"UntagResource",
- "http":{
- "method":"DELETE",
- "requestUri":"/tags/{resourceArn}",
- "responseCode":200
- },
- "input":{"shape":"UntagResourceInput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Remove Tags from an ARN
",
- "idempotent":true
- },
"UpdateCluster":{
"name":"UpdateCluster",
"http":{
@@ -251,13 +160,6 @@
},
"exception":true
},
- "Arn":{
- "type":"string",
- "documentation":"Amazon Resource Name
",
- "max":1011,
- "min":1,
- "pattern":"arn:.+"
- },
"ClientToken":{
"type":"string",
"documentation":"Idempotency Token
",
@@ -278,35 +180,6 @@
"type":"timestamp",
"documentation":"Timestamp when the Cluster was created
"
},
- "ClusterEncryptionKey":{
- "type":"string",
- "documentation":"The server-side encryption key used for this Cluster
"
- },
- "ClusterGroupArn":{
- "type":"string",
- "documentation":"ClusterGroup ARN
"
- },
- "ClusterGroupCreationTime":{
- "type":"timestamp",
- "documentation":"Timestamp when the Cluster Group was created
"
- },
- "ClusterGroupId":{
- "type":"string",
- "documentation":"ClusterGroup ID
"
- },
- "ClusterGroupList":{
- "type":"list",
- "member":{"shape":"ClusterGroupSummary"},
- "documentation":"List of cluster groups
"
- },
- "ClusterGroupSummary":{
- "type":"structure",
- "members":{
- "identifier":{"shape":"ClusterGroupId"},
- "arn":{"shape":"ClusterGroupArn"}
- },
- "documentation":"Cluster Group Summary
"
- },
"ClusterId":{
"type":"string",
"documentation":"Cluster ID
"
@@ -316,18 +189,6 @@
"member":{"shape":"ClusterSummary"},
"documentation":"List of clusters
"
},
- "ClusterName":{
- "type":"string",
- "documentation":"Cluster Name
",
- "max":64,
- "min":1,
- "pattern":"[a-zA-Z](-?[a-zA-Z0-9]+)*"
- },
- "ClusterPassword":{
- "type":"string",
- "documentation":"temporary cluster password for Pandora
",
- "sensitive":true
- },
"ClusterStatus":{
"type":"string",
"documentation":"Cluster Status
",
@@ -348,9 +209,7 @@
],
"members":{
"identifier":{"shape":"ClusterId"},
- "name":{"shape":"ClusterName"},
- "arn":{"shape":"ClusterArn"},
- "groupArn":{"shape":"ClusterGroupArn"}
+ "arn":{"shape":"ClusterArn"}
},
"documentation":"Cluster Summary
"
},
@@ -381,12 +240,7 @@
"CreateClusterInput":{
"type":"structure",
"members":{
- "name":{"shape":"ClusterName"},
- "groupArn":{"shape":"ClusterGroupArn"},
- "groupWitnessRegion":{"shape":"Region"},
"deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "encryptionKey":{"shape":"ClusterEncryptionKey"},
- "tags":{"shape":"TagMap"},
"clientToken":{
"shape":"ClientToken",
"idempotencyToken":true
@@ -404,28 +258,22 @@
],
"members":{
"identifier":{"shape":"ClusterId"},
- "name":{"shape":"ClusterName"},
"arn":{"shape":"ClusterArn"},
- "groupArn":{"shape":"ClusterGroupArn"},
"status":{"shape":"ClusterStatus"},
"creationTime":{"shape":"ClusterCreationTime"},
- "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "encryptionKey":{"shape":"ClusterEncryptionKey"},
- "quorumRegion":{"shape":"Region"},
- "multiRegionClusterArns":{"shape":"ClusterArnList"},
- "superuserPassword":{"shape":"ClusterPassword"}
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"}
},
"documentation":"Output Mixin
"
},
"CreateMultiRegionClustersInput":{
"type":"structure",
"required":[
- "clusterRegionList",
- "quorumRegion"
+ "linkedRegionList",
+ "witnessRegion"
],
"members":{
- "clusterRegionList":{"shape":"RegionList"},
- "quorumRegion":{"shape":"Region"},
+ "linkedRegionList":{"shape":"RegionList"},
+ "witnessRegion":{"shape":"Region"},
"clientToken":{
"shape":"ClientToken",
"idempotencyToken":true
@@ -434,9 +282,9 @@
},
"CreateMultiRegionClustersOutput":{
"type":"structure",
- "required":["multiRegionClusterArns"],
+ "required":["linkedClusterArns"],
"members":{
- "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ "linkedClusterArns":{"shape":"ClusterArnList"}
}
},
"DeleteClusterInput":{
@@ -467,26 +315,21 @@
],
"members":{
"identifier":{"shape":"ClusterId"},
- "name":{"shape":"ClusterName"},
"arn":{"shape":"ClusterArn"},
- "groupArn":{"shape":"ClusterGroupArn"},
"status":{"shape":"ClusterStatus"},
"creationTime":{"shape":"ClusterCreationTime"},
- "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "encryptionKey":{"shape":"ClusterEncryptionKey"},
- "quorumRegion":{"shape":"Region"},
- "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"}
},
"documentation":"Output Mixin
"
},
"DeleteMultiRegionClustersInput":{
"type":"structure",
- "required":["multiRegionClusterArns"],
+ "required":["linkedClusterArns"],
"members":{
- "multiRegionClusterArns":{
+ "linkedClusterArns":{
"shape":"ClusterArnList",
"location":"querystring",
- "locationName":"multi-region-cluster-arns"
+ "locationName":"linked-cluster-arns"
},
"clientToken":{
"shape":"ClientToken",
@@ -501,29 +344,6 @@
"documentation":"Deletion Protection
",
"box":true
},
- "GetClusterGroupInput":{
- "type":"structure",
- "required":["identifier"],
- "members":{
- "identifier":{
- "shape":"ClusterGroupId",
- "location":"uri",
- "locationName":"identifier"
- }
- }
- },
- "GetClusterGroupOutput":{
- "type":"structure",
- "required":["identifier"],
- "members":{
- "identifier":{"shape":"ClusterGroupId"},
- "arn":{"shape":"ClusterGroupArn"},
- "witnessRegion":{"shape":"Region"},
- "clusters":{"shape":"ClusterArnList"},
- "creationTime":{"shape":"ClusterGroupCreationTime"}
- },
- "documentation":"Cluster Group Output Mixin
"
- },
"GetClusterInput":{
"type":"structure",
"required":["identifier"],
@@ -546,15 +366,12 @@
],
"members":{
"identifier":{"shape":"ClusterId"},
- "name":{"shape":"ClusterName"},
"arn":{"shape":"ClusterArn"},
- "groupArn":{"shape":"ClusterGroupArn"},
"status":{"shape":"ClusterStatus"},
"creationTime":{"shape":"ClusterCreationTime"},
"deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "encryptionKey":{"shape":"ClusterEncryptionKey"},
- "quorumRegion":{"shape":"Region"},
- "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ "witnessRegion":{"shape":"Region"},
+ "linkedClusterArns":{"shape":"ClusterArnList"}
},
"documentation":"Output Mixin
"
},
@@ -583,29 +400,6 @@
"fault":true,
"retryable":{"throttling":false}
},
- "ListClusterGroupsInput":{
- "type":"structure",
- "members":{
- "maxResults":{
- "shape":"MaxResults",
- "location":"querystring",
- "locationName":"max-results"
- },
- "nextToken":{
- "shape":"NextToken",
- "location":"querystring",
- "locationName":"next-token"
- }
- }
- },
- "ListClusterGroupsOutput":{
- "type":"structure",
- "required":["clusterGroups"],
- "members":{
- "nextToken":{"shape":"NextToken"},
- "clusterGroups":{"shape":"ClusterGroupList"}
- }
- },
"ListClustersInput":{
"type":"structure",
"members":{
@@ -629,23 +423,6 @@
"clusters":{"shape":"ClusterList"}
}
},
- "ListTagsForResourceInput":{
- "type":"structure",
- "required":["resourceArn"],
- "members":{
- "resourceArn":{
- "shape":"Arn",
- "location":"uri",
- "locationName":"resourceArn"
- }
- }
- },
- "ListTagsForResourceOutput":{
- "type":"structure",
- "members":{
- "tags":{"shape":"TagMap"}
- }
- },
"MaxResults":{
"type":"integer",
"documentation":"Max results that will be returned per page
",
@@ -732,48 +509,6 @@
"exception":true
},
"String":{"type":"string"},
- "TagKey":{
- "type":"string",
- "documentation":"Tag Key
",
- "max":128,
- "min":1
- },
- "TagKeyList":{
- "type":"list",
- "member":{"shape":"TagKey"},
- "documentation":"List of tag keys
",
- "max":200,
- "min":0
- },
- "TagMap":{
- "type":"map",
- "key":{"shape":"TagKey"},
- "value":{"shape":"TagValue"},
- "documentation":"Map of tags
",
- "max":200,
- "min":0
- },
- "TagResourceInput":{
- "type":"structure",
- "required":[
- "resourceArn",
- "tags"
- ],
- "members":{
- "resourceArn":{
- "shape":"Arn",
- "location":"uri",
- "locationName":"resourceArn"
- },
- "tags":{"shape":"TagMap"}
- }
- },
- "TagValue":{
- "type":"string",
- "documentation":"Tag Value
",
- "max":256,
- "min":0
- },
"ThrottlingException":{
"type":"structure",
"required":["message"],
@@ -805,25 +540,6 @@
"exception":true,
"retryable":{"throttling":true}
},
- "UntagResourceInput":{
- "type":"structure",
- "required":[
- "resourceArn",
- "tagKeys"
- ],
- "members":{
- "resourceArn":{
- "shape":"Arn",
- "location":"uri",
- "locationName":"resourceArn"
- },
- "tagKeys":{
- "shape":"TagKeyList",
- "location":"querystring",
- "locationName":"tagKeys"
- }
- }
- },
"UpdateClusterInput":{
"type":"structure",
"required":["identifier"],
@@ -834,7 +550,6 @@
"locationName":"identifier"
},
"deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "encryptionKey":{"shape":"ClusterEncryptionKey"},
"clientToken":{
"shape":"ClientToken",
"idempotencyToken":true
@@ -852,15 +567,12 @@
],
"members":{
"identifier":{"shape":"ClusterId"},
- "name":{"shape":"ClusterName"},
"arn":{"shape":"ClusterArn"},
- "groupArn":{"shape":"ClusterGroupArn"},
"status":{"shape":"ClusterStatus"},
"creationTime":{"shape":"ClusterCreationTime"},
"deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "encryptionKey":{"shape":"ClusterEncryptionKey"},
- "quorumRegion":{"shape":"Region"},
- "multiRegionClusterArns":{"shape":"ClusterArnList"}
+ "witnessRegion":{"shape":"Region"},
+ "linkedClusterArns":{"shape":"ClusterArnList"}
},
"documentation":"Output Mixin
"
},
@@ -917,5 +629,5 @@
]
}
},
- "documentation":"An example service, deployed with the Octane Service creator, which will echo the string
"
+ "documentation":"Xanadu
"
}
From fcdb246df49313e9a3c2984d1589a293e53ca367 Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Tue, 8 Oct 2024 20:24:37 +0000
Subject: [PATCH 11/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 15
---
feature.metadata | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/feature.metadata b/feature.metadata
index 51c8430d4938..9b49f6c37062 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":12,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":15,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
From 42daf84cce8873ee73f41e68f981a2dfb35df5c5 Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Tue, 8 Oct 2024 22:06:25 +0000
Subject: [PATCH 12/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 18
---
feature.metadata | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/feature.metadata b/feature.metadata
index 9b49f6c37062..484b792d7549 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":15,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":18,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
From 51c5b972969b20e8fb27462e8caa02a24a20bcc0 Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Wed, 9 Oct 2024 00:27:36 +0000
Subject: [PATCH 13/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 20
---
feature.metadata | 2 +-
.../codegen-resources/service-2.json | 158 ++++++++++++++++++
2 files changed, 159 insertions(+), 1 deletion(-)
diff --git a/feature.metadata b/feature.metadata
index 484b792d7549..0fc197d54bf6 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":18,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":20,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
index 80feb7858f6f..dc9c06a96ba9 100644
--- a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
@@ -126,6 +126,61 @@
],
"documentation":"List clusters
"
},
+ "ListTagsForResource":{
+ "name":"ListTagsForResource",
+ "http":{
+ "method":"GET",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"ListTagsForResourceInput"},
+ "output":{"shape":"ListTagsForResourceOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"List all Tags on an ARN
"
+ },
+ "TagResource":{
+ "name":"TagResource",
+ "http":{
+ "method":"POST",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"TagResourceInput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Add Tags to an ARN
",
+ "idempotent":true
+ },
+ "UntagResource":{
+ "name":"UntagResource",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"UntagResourceInput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Remove Tags from an ARN
",
+ "idempotent":true
+ },
"UpdateCluster":{
"name":"UpdateCluster",
"http":{
@@ -160,6 +215,13 @@
},
"exception":true
},
+ "Arn":{
+ "type":"string",
+ "documentation":"Amazon Resource Name
",
+ "max":1011,
+ "min":1,
+ "pattern":"arn:.+"
+ },
"ClientToken":{
"type":"string",
"documentation":"Idempotency Token
",
@@ -189,6 +251,12 @@
"member":{"shape":"ClusterSummary"},
"documentation":"List of clusters
"
},
+ "ClusterPropertyMap":{
+ "type":"map",
+ "key":{"shape":"Region"},
+ "value":{"shape":"LinkedClusterProperties"},
+ "documentation":"Properties for each linked cluster
"
+ },
"ClusterStatus":{
"type":"string",
"documentation":"Cluster Status
",
@@ -241,6 +309,7 @@
"type":"structure",
"members":{
"deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "tags":{"shape":"TagMap"},
"clientToken":{
"shape":"ClientToken",
"idempotencyToken":true
@@ -273,6 +342,7 @@
],
"members":{
"linkedRegionList":{"shape":"RegionList"},
+ "clusterProperties":{"shape":"ClusterPropertyMap"},
"witnessRegion":{"shape":"Region"},
"clientToken":{
"shape":"ClientToken",
@@ -400,6 +470,14 @@
"fault":true,
"retryable":{"throttling":false}
},
+ "LinkedClusterProperties":{
+ "type":"structure",
+ "members":{
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "tags":{"shape":"TagMap"}
+ },
+ "documentation":"Linked Cluster Properties
"
+ },
"ListClustersInput":{
"type":"structure",
"members":{
@@ -423,6 +501,23 @@
"clusters":{"shape":"ClusterList"}
}
},
+ "ListTagsForResourceInput":{
+ "type":"structure",
+ "required":["resourceArn"],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ }
+ }
+ },
+ "ListTagsForResourceOutput":{
+ "type":"structure",
+ "members":{
+ "tags":{"shape":"TagMap"}
+ }
+ },
"MaxResults":{
"type":"integer",
"documentation":"Max results that will be returned per page
",
@@ -509,6 +604,50 @@
"exception":true
},
"String":{"type":"string"},
+ "TagKey":{
+ "type":"string",
+ "documentation":"Tag Key
",
+ "max":128,
+ "min":1,
+ "pattern":"[a-zA-Z0-9_.:/=+\\-@]*"
+ },
+ "TagKeyList":{
+ "type":"list",
+ "member":{"shape":"TagKey"},
+ "documentation":"List of tag keys
",
+ "max":200,
+ "min":0
+ },
+ "TagMap":{
+ "type":"map",
+ "key":{"shape":"TagKey"},
+ "value":{"shape":"TagValue"},
+ "documentation":"Map of tags
",
+ "max":200,
+ "min":0
+ },
+ "TagResourceInput":{
+ "type":"structure",
+ "required":[
+ "resourceArn",
+ "tags"
+ ],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ },
+ "tags":{"shape":"TagMap"}
+ }
+ },
+ "TagValue":{
+ "type":"string",
+ "documentation":"Tag Value
",
+ "max":256,
+ "min":0,
+ "pattern":"[a-zA-Z0-9_.:/=+\\-@]*"
+ },
"ThrottlingException":{
"type":"structure",
"required":["message"],
@@ -540,6 +679,25 @@
"exception":true,
"retryable":{"throttling":true}
},
+ "UntagResourceInput":{
+ "type":"structure",
+ "required":[
+ "resourceArn",
+ "tagKeys"
+ ],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ },
+ "tagKeys":{
+ "shape":"TagKeyList",
+ "location":"querystring",
+ "locationName":"tagKeys"
+ }
+ }
+ },
"UpdateClusterInput":{
"type":"structure",
"required":["identifier"],
From ea53b01a54d8bc977f44c5bea4f39c1541ba3589 Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Wed, 9 Oct 2024 00:43:34 +0000
Subject: [PATCH 14/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 22
---
feature.metadata | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/feature.metadata b/feature.metadata
index 0fc197d54bf6..eb4328778477 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":20,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":22,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
From 8b52dfee0936228308ee93b378f0dca63b68b4f6 Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Tue, 15 Oct 2024 20:09:31 +0000
Subject: [PATCH 15/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 23
---
feature.metadata | 2 +-
.../src/main/resources/codegen-resources/service-2.json | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/feature.metadata b/feature.metadata
index eb4328778477..b30e227f9131 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":22,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":23,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
index dc9c06a96ba9..28855ab4eeb2 100644
--- a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
+++ b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
@@ -473,7 +473,6 @@
"LinkedClusterProperties":{
"type":"structure",
"members":{
- "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
"tags":{"shape":"TagMap"}
},
"documentation":"Linked Cluster Properties
"
From 83e6398843e037c7e5f403a1c9f7befbd7f819d5 Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Thu, 7 Nov 2024 20:00:03 +0000
Subject: [PATCH 16/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 24
---
aws-sdk-java/pom.xml | 5 +
bom/pom.xml | 5 +
feature.metadata | 2 +-
services/dsql/pom.xml | 60 ++
.../codegen-resources/endpoint-rule-set.json | 350 ++++++++
.../codegen-resources/endpoint-tests.json | 314 +++++++
.../codegen-resources/paginators-1.json | 10 +
.../codegen-resources/service-2.json | 791 ++++++++++++++++++
.../codegen-resources/waiters-2.json | 28 +
services/pom.xml | 1 +
10 files changed, 1565 insertions(+), 1 deletion(-)
create mode 100644 services/dsql/pom.xml
create mode 100644 services/dsql/src/main/resources/codegen-resources/endpoint-rule-set.json
create mode 100644 services/dsql/src/main/resources/codegen-resources/endpoint-tests.json
create mode 100644 services/dsql/src/main/resources/codegen-resources/paginators-1.json
create mode 100644 services/dsql/src/main/resources/codegen-resources/service-2.json
create mode 100644 services/dsql/src/main/resources/codegen-resources/waiters-2.json
diff --git a/aws-sdk-java/pom.xml b/aws-sdk-java/pom.xml
index dc2ddb6e7844..1f28acdda67d 100644
--- a/aws-sdk-java/pom.xml
+++ b/aws-sdk-java/pom.xml
@@ -1978,6 +1978,11 @@ Amazon AutoScaling, etc).
axdbfrontend
${awsjavasdk.version}
+
+ software.amazon.awssdk
+ dsql
+ ${awsjavasdk.version}
+
${project.artifactId}-${project.version}
diff --git a/bom/pom.xml b/bom/pom.xml
index 136cc6addd8b..70af60127784 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -2173,6 +2173,11 @@
axdbfrontend
${awsjavasdk.version}
+
+ software.amazon.awssdk
+ dsql
+ ${awsjavasdk.version}
+
diff --git a/feature.metadata b/feature.metadata
index b30e227f9131..e08ac582734d 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":23,"messageId":1,"serviceId":"AxdbFrontend","serviceModule":"axdbfrontend"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":24,"messageId":1,"serviceId":"dsql","serviceModule":"dsql"}
diff --git a/services/dsql/pom.xml b/services/dsql/pom.xml
new file mode 100644
index 000000000000..cacb27c6ea8a
--- /dev/null
+++ b/services/dsql/pom.xml
@@ -0,0 +1,60 @@
+
+
+ 4.0.0
+
+ software.amazon.awssdk
+ services
+ 2.27.6-SNAPSHOT
+
+ dsql
+ AWS Java SDK :: Services :: Dsql
+ The AWS Java SDK for Dsql module holds the client classes that are used for
+ communicating with Dsql.
+
+ https://aws.amazon.com/sdkforjava
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ software.amazon.awssdk.services.dsql
+
+
+
+
+
+
+
+
+ software.amazon.awssdk
+ protocol-core
+ ${awsjavasdk.version}
+
+
+ software.amazon.awssdk
+ aws-json-protocol
+ ${awsjavasdk.version}
+
+
+ software.amazon.awssdk
+ http-auth-aws
+ ${awsjavasdk.version}
+
+
+
diff --git a/services/dsql/src/main/resources/codegen-resources/endpoint-rule-set.json b/services/dsql/src/main/resources/codegen-resources/endpoint-rule-set.json
new file mode 100644
index 000000000000..c5a9641e496c
--- /dev/null
+++ b/services/dsql/src/main/resources/codegen-resources/endpoint-rule-set.json
@@ -0,0 +1,350 @@
+{
+ "version": "1.0",
+ "parameters": {
+ "Region": {
+ "builtIn": "AWS::Region",
+ "required": false,
+ "documentation": "The AWS region used to dispatch the request.",
+ "type": "String"
+ },
+ "UseDualStack": {
+ "builtIn": "AWS::UseDualStack",
+ "required": true,
+ "default": false,
+ "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
+ "type": "Boolean"
+ },
+ "UseFIPS": {
+ "builtIn": "AWS::UseFIPS",
+ "required": true,
+ "default": false,
+ "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
+ "type": "Boolean"
+ },
+ "Endpoint": {
+ "builtIn": "SDK::Endpoint",
+ "required": false,
+ "documentation": "Override the endpoint used to send this request",
+ "type": "String"
+ }
+ },
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "isSet",
+ "argv": [
+ {
+ "ref": "Endpoint"
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseFIPS"
+ },
+ true
+ ]
+ }
+ ],
+ "error": "Invalid Configuration: FIPS and custom endpoint are not supported",
+ "type": "error"
+ },
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseDualStack"
+ },
+ true
+ ]
+ }
+ ],
+ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported",
+ "type": "error"
+ },
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": {
+ "ref": "Endpoint"
+ },
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "isSet",
+ "argv": [
+ {
+ "ref": "Region"
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "aws.partition",
+ "argv": [
+ {
+ "ref": "Region"
+ }
+ ],
+ "assign": "PartitionResult"
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseFIPS"
+ },
+ true
+ ]
+ },
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseDualStack"
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ true,
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsFIPS"
+ ]
+ }
+ ]
+ },
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ true,
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsDualStack"
+ ]
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://dsql-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "FIPS and DualStack are enabled, but this partition does not support one or both",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseFIPS"
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsFIPS"
+ ]
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://dsql-fips.{Region}.{PartitionResult#dnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "FIPS is enabled but this partition does not support FIPS",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ {
+ "ref": "UseDualStack"
+ },
+ true
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [
+ {
+ "fn": "booleanEquals",
+ "argv": [
+ true,
+ {
+ "fn": "getAttr",
+ "argv": [
+ {
+ "ref": "PartitionResult"
+ },
+ "supportsDualStack"
+ ]
+ }
+ ]
+ }
+ ],
+ "rules": [
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://dsql.{Region}.{PartitionResult#dualStackDnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "DualStack is enabled but this partition does not support DualStack",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "rules": [
+ {
+ "conditions": [],
+ "endpoint": {
+ "url": "https://dsql.{Region}.{PartitionResult#dnsSuffix}",
+ "properties": {},
+ "headers": {}
+ },
+ "type": "endpoint"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ }
+ ],
+ "type": "tree"
+ },
+ {
+ "conditions": [],
+ "error": "Invalid Configuration: Missing Region",
+ "type": "error"
+ }
+ ],
+ "type": "tree"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/services/dsql/src/main/resources/codegen-resources/endpoint-tests.json b/services/dsql/src/main/resources/codegen-resources/endpoint-tests.json
new file mode 100644
index 000000000000..2f5a0ae04f90
--- /dev/null
+++ b/services/dsql/src/main/resources/codegen-resources/endpoint-tests.json
@@ -0,0 +1,314 @@
+{
+ "testCases": [
+ {
+ "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql-fips.us-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql-fips.us-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql.us-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql.us-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql-fips.cn-north-1.api.amazonwebservices.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql-fips.cn-north-1.amazonaws.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql.cn-north-1.api.amazonwebservices.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql.cn-north-1.amazonaws.com.cn"
+ }
+ },
+ "params": {
+ "Region": "cn-north-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql-fips.us-gov-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql-fips.us-gov-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql.us-gov-east-1.api.aws"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql.us-gov-east-1.amazonaws.com"
+ }
+ },
+ "params": {
+ "Region": "us-gov-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql-fips.us-iso-east-1.c2s.ic.gov"
+ }
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "error": "DualStack is enabled but this partition does not support DualStack"
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql.us-iso-east-1.c2s.ic.gov"
+ }
+ },
+ "params": {
+ "Region": "us-iso-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled",
+ "expect": {
+ "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": true,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql-fips.us-isob-east-1.sc2s.sgov.gov"
+ }
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled",
+ "expect": {
+ "error": "DualStack is enabled but this partition does not support DualStack"
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true
+ }
+ },
+ {
+ "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://dsql.us-isob-east-1.sc2s.sgov.gov"
+ }
+ },
+ "params": {
+ "Region": "us-isob-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false
+ }
+ },
+ {
+ "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://example.com"
+ }
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": false,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled",
+ "expect": {
+ "endpoint": {
+ "url": "https://example.com"
+ }
+ },
+ "params": {
+ "UseFIPS": false,
+ "UseDualStack": false,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "For custom endpoint with fips enabled and dualstack disabled",
+ "expect": {
+ "error": "Invalid Configuration: FIPS and custom endpoint are not supported"
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": true,
+ "UseDualStack": false,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "For custom endpoint with fips disabled and dualstack enabled",
+ "expect": {
+ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported"
+ },
+ "params": {
+ "Region": "us-east-1",
+ "UseFIPS": false,
+ "UseDualStack": true,
+ "Endpoint": "https://example.com"
+ }
+ },
+ {
+ "documentation": "Missing region",
+ "expect": {
+ "error": "Invalid Configuration: Missing Region"
+ }
+ }
+ ],
+ "version": "1.0"
+}
\ No newline at end of file
diff --git a/services/dsql/src/main/resources/codegen-resources/paginators-1.json b/services/dsql/src/main/resources/codegen-resources/paginators-1.json
new file mode 100644
index 000000000000..c9cfb66eb2f5
--- /dev/null
+++ b/services/dsql/src/main/resources/codegen-resources/paginators-1.json
@@ -0,0 +1,10 @@
+{
+ "pagination": {
+ "ListClusters": {
+ "input_token": "nextToken",
+ "output_token": "nextToken",
+ "limit_key": "maxResults",
+ "result_key": "clusters"
+ }
+ }
+}
diff --git a/services/dsql/src/main/resources/codegen-resources/service-2.json b/services/dsql/src/main/resources/codegen-resources/service-2.json
new file mode 100644
index 000000000000..27bd83030d13
--- /dev/null
+++ b/services/dsql/src/main/resources/codegen-resources/service-2.json
@@ -0,0 +1,791 @@
+{
+ "version":"2.0",
+ "metadata":{
+ "apiVersion":"2018-05-10",
+ "auth":["aws.auth#sigv4"],
+ "endpointPrefix":"dsql",
+ "protocol":"rest-json",
+ "protocols":["rest-json"],
+ "serviceFullName":"Dsql",
+ "serviceId":"dsql",
+ "signatureVersion":"v4",
+ "signingName":"dsql",
+ "uid":"dsql-2018-05-10"
+ },
+ "operations":{
+ "CreateCluster":{
+ "name":"CreateCluster",
+ "http":{
+ "method":"POST",
+ "requestUri":"/cluster",
+ "responseCode":200
+ },
+ "input":{"shape":"CreateClusterInput"},
+ "output":{"shape":"CreateClusterOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Create a cluster
"
+ },
+ "CreateMultiRegionClusters":{
+ "name":"CreateMultiRegionClusters",
+ "http":{
+ "method":"POST",
+ "requestUri":"/multi-region-clusters",
+ "responseCode":200
+ },
+ "input":{"shape":"CreateMultiRegionClustersInput"},
+ "output":{"shape":"CreateMultiRegionClustersOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Create clusters in multiple regions
"
+ },
+ "DeleteCluster":{
+ "name":"DeleteCluster",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/cluster/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"DeleteClusterInput"},
+ "output":{"shape":"DeleteClusterOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Delete a cluster
",
+ "idempotent":true
+ },
+ "DeleteMultiRegionClusters":{
+ "name":"DeleteMultiRegionClusters",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/multi-region-clusters",
+ "responseCode":200
+ },
+ "input":{"shape":"DeleteMultiRegionClustersInput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Delete clusters in multiple regions
",
+ "idempotent":true
+ },
+ "GetCluster":{
+ "name":"GetCluster",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"GetClusterInput"},
+ "output":{"shape":"GetClusterOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Get a cluster
"
+ },
+ "ListClusters":{
+ "name":"ListClusters",
+ "http":{
+ "method":"GET",
+ "requestUri":"/cluster",
+ "responseCode":200
+ },
+ "input":{"shape":"ListClustersInput"},
+ "output":{"shape":"ListClustersOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"List clusters
"
+ },
+ "ListTagsForResource":{
+ "name":"ListTagsForResource",
+ "http":{
+ "method":"GET",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"ListTagsForResourceInput"},
+ "output":{"shape":"ListTagsForResourceOutput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"List all Tags on an ARN
"
+ },
+ "TagResource":{
+ "name":"TagResource",
+ "http":{
+ "method":"POST",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"TagResourceInput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"ServiceQuotaExceededException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Add Tags to an ARN
",
+ "idempotent":true
+ },
+ "UntagResource":{
+ "name":"UntagResource",
+ "http":{
+ "method":"DELETE",
+ "requestUri":"/tags/{resourceArn}",
+ "responseCode":200
+ },
+ "input":{"shape":"UntagResourceInput"},
+ "errors":[
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Remove Tags from an ARN
",
+ "idempotent":true
+ },
+ "UpdateCluster":{
+ "name":"UpdateCluster",
+ "http":{
+ "method":"POST",
+ "requestUri":"/cluster/{identifier}",
+ "responseCode":200
+ },
+ "input":{"shape":"UpdateClusterInput"},
+ "output":{"shape":"UpdateClusterOutput"},
+ "errors":[
+ {"shape":"ConflictException"},
+ {"shape":"ValidationException"},
+ {"shape":"InternalServerException"},
+ {"shape":"AccessDeniedException"},
+ {"shape":"ResourceNotFoundException"},
+ {"shape":"ThrottlingException"}
+ ],
+ "documentation":"Update a cluster
"
+ }
+ },
+ "shapes":{
+ "AccessDeniedException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{"shape":"String"}
+ },
+ "documentation":"User does not have sufficient access to perform this action
",
+ "error":{
+ "httpStatusCode":403,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "Arn":{
+ "type":"string",
+ "documentation":"Amazon Resource Name
",
+ "max":1011,
+ "min":1,
+ "pattern":"arn:.+"
+ },
+ "ClientToken":{
+ "type":"string",
+ "documentation":"Idempotency Token
",
+ "max":128,
+ "min":1,
+ "pattern":"[!-~]+"
+ },
+ "ClusterArn":{
+ "type":"string",
+ "documentation":"Cluster ARN
"
+ },
+ "ClusterArnList":{
+ "type":"list",
+ "member":{"shape":"ClusterArn"},
+ "documentation":"List of cluster arns
"
+ },
+ "ClusterCreationTime":{
+ "type":"timestamp",
+ "documentation":"Timestamp when the Cluster was created
"
+ },
+ "ClusterId":{
+ "type":"string",
+ "documentation":"Cluster ID
"
+ },
+ "ClusterList":{
+ "type":"list",
+ "member":{"shape":"ClusterSummary"},
+ "documentation":"List of clusters
"
+ },
+ "ClusterPropertyMap":{
+ "type":"map",
+ "key":{"shape":"Region"},
+ "value":{"shape":"LinkedClusterProperties"},
+ "documentation":"Properties for each linked cluster
"
+ },
+ "ClusterStatus":{
+ "type":"string",
+ "documentation":"Cluster Status
",
+ "enum":[
+ "CREATING",
+ "ACTIVE",
+ "UPDATING",
+ "DELETING",
+ "DELETED",
+ "FAILED"
+ ]
+ },
+ "ClusterSummary":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "arn":{"shape":"ClusterArn"}
+ },
+ "documentation":"Cluster Summary
"
+ },
+ "ConflictException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "resourceId":{
+ "shape":"String",
+ "documentation":"Identifier of the resource affected
"
+ },
+ "resourceType":{
+ "shape":"String",
+ "documentation":"Type of the resource affected
"
+ }
+ },
+ "documentation":"Updating or deleting a resource can cause an inconsistent state
",
+ "error":{
+ "httpStatusCode":409,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "CreateClusterInput":{
+ "type":"structure",
+ "members":{
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "tags":{"shape":"TagMap"},
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true
+ }
+ }
+ },
+ "CreateClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "arn":{"shape":"ClusterArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "CreateMultiRegionClustersInput":{
+ "type":"structure",
+ "required":[
+ "linkedRegionList",
+ "witnessRegion"
+ ],
+ "members":{
+ "linkedRegionList":{"shape":"RegionList"},
+ "clusterProperties":{"shape":"ClusterPropertyMap"},
+ "witnessRegion":{"shape":"Region"},
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true
+ }
+ }
+ },
+ "CreateMultiRegionClustersOutput":{
+ "type":"structure",
+ "required":["linkedClusterArns"],
+ "members":{
+ "linkedClusterArns":{"shape":"ClusterArnList"}
+ }
+ },
+ "DeleteClusterInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterId",
+ "location":"uri",
+ "locationName":"identifier"
+ },
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true,
+ "location":"querystring",
+ "locationName":"client-token"
+ }
+ }
+ },
+ "DeleteClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "arn":{"shape":"ClusterArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "DeleteMultiRegionClustersInput":{
+ "type":"structure",
+ "required":["linkedClusterArns"],
+ "members":{
+ "linkedClusterArns":{
+ "shape":"ClusterArnList",
+ "location":"querystring",
+ "locationName":"linked-cluster-arns"
+ },
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true,
+ "location":"querystring",
+ "locationName":"client-token"
+ }
+ }
+ },
+ "DeletionProtectionEnabled":{
+ "type":"boolean",
+ "documentation":"Deletion Protection
",
+ "box":true
+ },
+ "GetClusterInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterId",
+ "location":"uri",
+ "locationName":"identifier"
+ }
+ }
+ },
+ "GetClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "arn":{"shape":"ClusterArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "witnessRegion":{"shape":"Region"},
+ "linkedClusterArns":{"shape":"ClusterArnList"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "Integer":{
+ "type":"integer",
+ "box":true
+ },
+ "InternalServerException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "retryAfterSeconds":{
+ "shape":"Integer",
+ "documentation":"Advice to clients on when the call can be safely retried
",
+ "location":"header",
+ "locationName":"Retry-After"
+ }
+ },
+ "documentation":"Unexpected error during processing of request
",
+ "error":{"httpStatusCode":500},
+ "exception":true,
+ "fault":true,
+ "retryable":{"throttling":false}
+ },
+ "LinkedClusterProperties":{
+ "type":"structure",
+ "members":{
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "tags":{"shape":"TagMap"}
+ },
+ "documentation":"Linked Cluster Properties
"
+ },
+ "ListClustersInput":{
+ "type":"structure",
+ "members":{
+ "maxResults":{
+ "shape":"MaxResults",
+ "location":"querystring",
+ "locationName":"max-results"
+ },
+ "nextToken":{
+ "shape":"NextToken",
+ "location":"querystring",
+ "locationName":"next-token"
+ }
+ }
+ },
+ "ListClustersOutput":{
+ "type":"structure",
+ "required":["clusters"],
+ "members":{
+ "nextToken":{"shape":"NextToken"},
+ "clusters":{"shape":"ClusterList"}
+ }
+ },
+ "ListTagsForResourceInput":{
+ "type":"structure",
+ "required":["resourceArn"],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ }
+ }
+ },
+ "ListTagsForResourceOutput":{
+ "type":"structure",
+ "members":{
+ "tags":{"shape":"TagMap"}
+ }
+ },
+ "MaxResults":{
+ "type":"integer",
+ "documentation":"Max results that will be returned per page
",
+ "box":true,
+ "max":100,
+ "min":1
+ },
+ "NextToken":{
+ "type":"string",
+ "documentation":"Opaque token used to retrieve next page
"
+ },
+ "Region":{
+ "type":"string",
+ "documentation":"AWS Region name (e.g.: 'us-east-1')
",
+ "max":20,
+ "min":0
+ },
+ "RegionList":{
+ "type":"list",
+ "member":{"shape":"Region"},
+ "documentation":"List of regions
"
+ },
+ "ResourceNotFoundException":{
+ "type":"structure",
+ "required":[
+ "message",
+ "resourceId",
+ "resourceType"
+ ],
+ "members":{
+ "message":{"shape":"String"},
+ "resourceId":{
+ "shape":"String",
+ "documentation":"Hypothetical identifier of the resource which does not exist
"
+ },
+ "resourceType":{
+ "shape":"String",
+ "documentation":"Hypothetical type of the resource which does not exist
"
+ }
+ },
+ "documentation":"Request references a resource which does not exist
",
+ "error":{
+ "httpStatusCode":404,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "ServiceQuotaExceededException":{
+ "type":"structure",
+ "required":[
+ "message",
+ "resourceId",
+ "resourceType",
+ "serviceCode",
+ "quotaCode"
+ ],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "resourceId":{
+ "shape":"String",
+ "documentation":"Identifier of the resource affected
"
+ },
+ "resourceType":{
+ "shape":"String",
+ "documentation":"Type of the resource affected
"
+ },
+ "serviceCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating service
"
+ },
+ "quotaCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating quota
"
+ }
+ },
+ "documentation":"Request would cause a service quota to be exceeded
",
+ "error":{
+ "httpStatusCode":402,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "String":{"type":"string"},
+ "TagKey":{
+ "type":"string",
+ "documentation":"Tag Key
",
+ "max":128,
+ "min":1,
+ "pattern":"[a-zA-Z0-9_.:/=+\\-@ ]*"
+ },
+ "TagKeyList":{
+ "type":"list",
+ "member":{"shape":"TagKey"},
+ "documentation":"List of tag keys
",
+ "max":200,
+ "min":0
+ },
+ "TagMap":{
+ "type":"map",
+ "key":{"shape":"TagKey"},
+ "value":{"shape":"TagValue"},
+ "documentation":"Map of tags
",
+ "max":200,
+ "min":0
+ },
+ "TagResourceInput":{
+ "type":"structure",
+ "required":[
+ "resourceArn",
+ "tags"
+ ],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ },
+ "tags":{"shape":"TagMap"}
+ }
+ },
+ "TagValue":{
+ "type":"string",
+ "documentation":"Tag Value
",
+ "max":256,
+ "min":0,
+ "pattern":"[a-zA-Z0-9_.:/=+\\-@ ]*"
+ },
+ "ThrottlingException":{
+ "type":"structure",
+ "required":["message"],
+ "members":{
+ "message":{
+ "shape":"String",
+ "documentation":"Description of the error
"
+ },
+ "serviceCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating service
"
+ },
+ "quotaCode":{
+ "shape":"String",
+ "documentation":"Service Quotas requirement to identify originating quota
"
+ },
+ "retryAfterSeconds":{
+ "shape":"Integer",
+ "documentation":"Advice to clients on when the call can be safely retried
",
+ "location":"header",
+ "locationName":"Retry-After"
+ }
+ },
+ "documentation":"Request was denied due to request throttling
",
+ "error":{
+ "httpStatusCode":429,
+ "senderFault":true
+ },
+ "exception":true,
+ "retryable":{"throttling":true}
+ },
+ "UntagResourceInput":{
+ "type":"structure",
+ "required":[
+ "resourceArn",
+ "tagKeys"
+ ],
+ "members":{
+ "resourceArn":{
+ "shape":"Arn",
+ "location":"uri",
+ "locationName":"resourceArn"
+ },
+ "tagKeys":{
+ "shape":"TagKeyList",
+ "location":"querystring",
+ "locationName":"tagKeys"
+ }
+ }
+ },
+ "UpdateClusterInput":{
+ "type":"structure",
+ "required":["identifier"],
+ "members":{
+ "identifier":{
+ "shape":"ClusterId",
+ "location":"uri",
+ "locationName":"identifier"
+ },
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "clientToken":{
+ "shape":"ClientToken",
+ "idempotencyToken":true
+ }
+ }
+ },
+ "UpdateClusterOutput":{
+ "type":"structure",
+ "required":[
+ "identifier",
+ "arn",
+ "status",
+ "creationTime",
+ "deletionProtectionEnabled"
+ ],
+ "members":{
+ "identifier":{"shape":"ClusterId"},
+ "arn":{"shape":"ClusterArn"},
+ "status":{"shape":"ClusterStatus"},
+ "creationTime":{"shape":"ClusterCreationTime"},
+ "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
+ "witnessRegion":{"shape":"Region"},
+ "linkedClusterArns":{"shape":"ClusterArnList"}
+ },
+ "documentation":"Output Mixin
"
+ },
+ "ValidationException":{
+ "type":"structure",
+ "required":[
+ "message",
+ "reason"
+ ],
+ "members":{
+ "message":{"shape":"String"},
+ "reason":{"shape":"ValidationExceptionReason"},
+ "fieldList":{"shape":"ValidationExceptionFieldList"}
+ },
+ "documentation":"The input fails to satisfy the constraints specified by an AWS service
",
+ "error":{
+ "httpStatusCode":400,
+ "senderFault":true
+ },
+ "exception":true
+ },
+ "ValidationExceptionField":{
+ "type":"structure",
+ "required":[
+ "name",
+ "message"
+ ],
+ "members":{
+ "name":{
+ "shape":"String",
+ "documentation":"The field name
"
+ },
+ "message":{
+ "shape":"String",
+ "documentation":"Message describing why the field failed validation
"
+ }
+ },
+ "documentation":"A field that caused the error
"
+ },
+ "ValidationExceptionFieldList":{
+ "type":"list",
+ "member":{"shape":"ValidationExceptionField"},
+ "documentation":"List of fields that caused the error
"
+ },
+ "ValidationExceptionReason":{
+ "type":"string",
+ "documentation":"Reason the request failed validation
",
+ "enum":[
+ "unknownOperation",
+ "cannotParse",
+ "fieldValidationFailed",
+ "deletionProtectionEnabled",
+ "other"
+ ]
+ }
+ },
+ "documentation":"Dsql
"
+}
diff --git a/services/dsql/src/main/resources/codegen-resources/waiters-2.json b/services/dsql/src/main/resources/codegen-resources/waiters-2.json
new file mode 100644
index 000000000000..69cd9baaeb5b
--- /dev/null
+++ b/services/dsql/src/main/resources/codegen-resources/waiters-2.json
@@ -0,0 +1,28 @@
+{
+ "version" : 2,
+ "waiters" : {
+ "ClusterActive" : {
+ "description" : "Wait until a Cluster is ACTIVE",
+ "delay" : 2,
+ "maxAttempts" : 60,
+ "operation" : "GetCluster",
+ "acceptors" : [ {
+ "matcher" : "path",
+ "argument" : "status",
+ "state" : "success",
+ "expected" : "ACTIVE"
+ } ]
+ },
+ "ClusterNotExists" : {
+ "description" : "Wait until a Cluster is gone",
+ "delay" : 2,
+ "maxAttempts" : 60,
+ "operation" : "GetCluster",
+ "acceptors" : [ {
+ "matcher" : "error",
+ "state" : "success",
+ "expected" : "ResourceNotFoundException"
+ } ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/services/pom.xml b/services/pom.xml
index 55819fd35e44..662af7786581 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -407,6 +407,7 @@
qapps
ssmquicksetup
axdbfrontend
+ dsql
The AWS Java SDK services
https://aws.amazon.com/sdkforjava
From 4b85c9243e0b8f7f9885b2e3035d8420684fc983 Mon Sep 17 00:00:00 2001
From: AWS <>
Date: Fri, 8 Nov 2024 17:54:01 +0000
Subject: [PATCH 17/20] Update models for trebuchet feature
https://trebuchet.corp.amazon.com/manage_feature.html?featureArn=arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a
revision 25
---
feature.metadata | 2 +-
.../src/main/resources/codegen-resources/service-2.json | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/feature.metadata b/feature.metadata
index e08ac582734d..ce11e6bf1e26 100644
--- a/feature.metadata
+++ b/feature.metadata
@@ -1 +1 @@
-{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":24,"messageId":1,"serviceId":"dsql","serviceModule":"dsql"}
+{"trebuchetFeatureArn":"arn:aws:trebuchet:::feature:v2:2a236723-7c96-48cd-8055-918b35a8308a","c2jModelsRevision":25,"messageId":1,"serviceId":"DSQL","serviceModule":"dsql"}
diff --git a/services/dsql/src/main/resources/codegen-resources/service-2.json b/services/dsql/src/main/resources/codegen-resources/service-2.json
index 27bd83030d13..958073e1b21e 100644
--- a/services/dsql/src/main/resources/codegen-resources/service-2.json
+++ b/services/dsql/src/main/resources/codegen-resources/service-2.json
@@ -6,8 +6,8 @@
"endpointPrefix":"dsql",
"protocol":"rest-json",
"protocols":["rest-json"],
- "serviceFullName":"Dsql",
- "serviceId":"dsql",
+ "serviceFullName":"Amazon Aurora DSQL",
+ "serviceId":"DSQL",
"signatureVersion":"v4",
"signingName":"dsql",
"uid":"dsql-2018-05-10"
@@ -787,5 +787,5 @@
]
}
},
- "documentation":"Dsql
"
+ "documentation":"Amazon Aurora DSQL is a serverless, distributed SQL database suitable for workloads of any size. Aurora DSQL provides you with a familiar relational database experience based on PostgreSQL that lets you get started quickly. Aurora DSQL offers reliable multi-AZ database clusters in single and multi-Region configurations. Aurora DSQL supports active-active read and write to endpoints, so Aurora DSQL is always available even if an Availability Zone or if an AWS Region is unavailable. With Aurora DSQL, you don't have to manage, patch, or scale any servers to manage, patch, or scale. There are no maintenance windows or planned downtime.
"
}
From afb2785a7d4e3c051bb666609b8f9c244593ad5a Mon Sep 17 00:00:00 2001
From: hdavidh
Date: Sun, 10 Nov 2024 15:52:26 -0800
Subject: [PATCH 18/20] Update name to dsql and utilities to follow spec
---
.../feature-AxdbFrontend-d6ce1e6.json | 4 +-
aws-sdk-java/pom.xml | 5 -
bom/pom.xml | 5 -
services/axdbfrontend/pom.xml | 65 --
.../services/axdbfrontend/model/Action.java | 53 --
.../codegen-resources/customization.config | 9 -
.../codegen-resources/endpoint-rule-set.json | 350 --------
.../codegen-resources/endpoint-tests.json | 314 -------
.../codegen-resources/paginators-1.json | 10 -
.../codegen-resources/service-2.json | 790 ------------------
.../codegen-resources/waiters-2.json | 28 -
.../DefaultAxdbFrontendUtilitiesTest.java | 247 ------
services/dsql/pom.xml | 5 +
.../services/dsql/DefaultDsqlUtilities.java} | 60 +-
.../awssdk/services/dsql/DsqlUtilities.java} | 77 +-
.../dsql/model/GenerateAuthTokenRequest.java} | 74 +-
.../codegen-resources/customization.config | 9 +
.../dsql/DefaultDsqlUtilitiesTest.java | 213 +++++
.../dsql/GenerateAuthTokenRequestTest.java} | 11 +-
services/pom.xml | 1 -
20 files changed, 341 insertions(+), 1989 deletions(-)
delete mode 100644 services/axdbfrontend/pom.xml
delete mode 100644 services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
delete mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/customization.config
delete mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json
delete mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json
delete mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
delete mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
delete mode 100644 services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json
delete mode 100644 services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
rename services/{axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java => dsql/src/main/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilities.java} (72%)
rename services/{axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java => dsql/src/main/java/software/amazon/awssdk/services/dsql/DsqlUtilities.java} (53%)
rename services/{axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java => dsql/src/main/java/software/amazon/awssdk/services/dsql/model/GenerateAuthTokenRequest.java} (74%)
create mode 100644 services/dsql/src/main/resources/codegen-resources/customization.config
create mode 100644 services/dsql/src/test/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilitiesTest.java
rename services/{axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/GenerateAuthenticationTokenRequestTest.java => dsql/src/test/java/software/amazon/awssdk/services/dsql/GenerateAuthTokenRequestTest.java} (67%)
diff --git a/.changes/next-release/feature-AxdbFrontend-d6ce1e6.json b/.changes/next-release/feature-AxdbFrontend-d6ce1e6.json
index 04cb97060b2e..30ef8b7626d7 100644
--- a/.changes/next-release/feature-AxdbFrontend-d6ce1e6.json
+++ b/.changes/next-release/feature-AxdbFrontend-d6ce1e6.json
@@ -1,6 +1,6 @@
{
"type": "feature",
- "category": "AxdbFrontend",
+ "category": "DSQL",
"contributor": "APandher",
- "description": "Add IAM Token Generation Utility for AxdbFrontend"
+ "description": "Add IAM Token Generation Utility for DSQL"
}
diff --git a/aws-sdk-java/pom.xml b/aws-sdk-java/pom.xml
index 1f28acdda67d..141cd4ce13e6 100644
--- a/aws-sdk-java/pom.xml
+++ b/aws-sdk-java/pom.xml
@@ -1973,11 +1973,6 @@ Amazon AutoScaling, etc).
ssmquicksetup
${awsjavasdk.version}
-
- software.amazon.awssdk
- axdbfrontend
- ${awsjavasdk.version}
-
software.amazon.awssdk
dsql
diff --git a/bom/pom.xml b/bom/pom.xml
index 70af60127784..559a920fd3a1 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -2168,11 +2168,6 @@
ssmquicksetup
${awsjavasdk.version}
-
- software.amazon.awssdk
- axdbfrontend
- ${awsjavasdk.version}
-
software.amazon.awssdk
dsql
diff --git a/services/axdbfrontend/pom.xml b/services/axdbfrontend/pom.xml
deleted file mode 100644
index 250d95d4d5b0..000000000000
--- a/services/axdbfrontend/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
- 4.0.0
-
- software.amazon.awssdk
- services
- 2.27.6-SNAPSHOT
-
- axdbfrontend
- AWS Java SDK :: Services :: Axdb Frontend
- The AWS Java SDK for Axdb Frontend module holds the client classes that are used for
- communicating with Axdb Frontend.
-
- https://aws.amazon.com/sdkforjava
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
-
-
-
- software.amazon.awssdk.services.axdbfrontend
-
-
-
-
-
-
-
-
- nl.jqno.equalsverifier
- equalsverifier
- test
-
-
- software.amazon.awssdk
- protocol-core
- ${awsjavasdk.version}
-
-
- software.amazon.awssdk
- aws-json-protocol
- ${awsjavasdk.version}
-
-
- software.amazon.awssdk
- http-auth-aws
- ${awsjavasdk.version}
-
-
-
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java b/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
deleted file mode 100644
index 27c466a035ef..000000000000
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/Action.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.
- * 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 software.amazon.awssdk.services.axdbfrontend.model;
-
-import java.io.Serializable;
-import software.amazon.awssdk.annotations.SdkPublicApi;
-
-/**
- * Enumerations of possible actions that can be performed on an AxdbFrontend database.
- */
-@SdkPublicApi
-public enum Action implements Serializable {
- /**
- * The action of connecting to an AxdbFrontend database using DbConnect
- */
- DB_CONNECT("DbConnect"),
- /**
- * The action of connecting to an AxdbFrontend database using DbConnectSuperuser
- */
- DB_CONNECT_SUPERUSER("DbConnectSuperuser");
-
- private final String action;
-
- Action(String action) {
- this.action = action;
- }
-
- public String getAction() {
- return action;
- }
-
- public static Action fromValue(String value) {
- for (Action action : Action.values()) {
- if (value.equalsIgnoreCase(action.name())) {
- return action;
- }
- }
- throw new IllegalArgumentException("Invalid action: " + value);
- }
-}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/customization.config b/services/axdbfrontend/src/main/resources/codegen-resources/customization.config
deleted file mode 100644
index 0c3578e27743..000000000000
--- a/services/axdbfrontend/src/main/resources/codegen-resources/customization.config
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "utilitiesMethod": {
- "returnType": "software.amazon.awssdk.services.axdbfrontend.AxdbFrontendUtilities",
- "instanceType": "software.amazon.awssdk.services.axdbfrontend.DefaultAxdbFrontendUtilities",
- "createMethodParams": [
- "clientConfiguration"
- ]
- }
-}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json
deleted file mode 100644
index e1f87bcc4afb..000000000000
--- a/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-rule-set.json
+++ /dev/null
@@ -1,350 +0,0 @@
-{
- "version": "1.0",
- "parameters": {
- "Region": {
- "builtIn": "AWS::Region",
- "required": false,
- "documentation": "The AWS region used to dispatch the request.",
- "type": "String"
- },
- "UseDualStack": {
- "builtIn": "AWS::UseDualStack",
- "required": true,
- "default": false,
- "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
- "type": "Boolean"
- },
- "UseFIPS": {
- "builtIn": "AWS::UseFIPS",
- "required": true,
- "default": false,
- "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
- "type": "Boolean"
- },
- "Endpoint": {
- "builtIn": "SDK::Endpoint",
- "required": false,
- "documentation": "Override the endpoint used to send this request",
- "type": "String"
- }
- },
- "rules": [
- {
- "conditions": [
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "Endpoint"
- }
- ]
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "UseFIPS"
- },
- true
- ]
- }
- ],
- "error": "Invalid Configuration: FIPS and custom endpoint are not supported",
- "type": "error"
- },
- {
- "conditions": [],
- "rules": [
- {
- "conditions": [
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "UseDualStack"
- },
- true
- ]
- }
- ],
- "error": "Invalid Configuration: Dualstack and custom endpoint are not supported",
- "type": "error"
- },
- {
- "conditions": [],
- "endpoint": {
- "url": {
- "ref": "Endpoint"
- },
- "properties": {},
- "headers": {}
- },
- "type": "endpoint"
- }
- ],
- "type": "tree"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [],
- "rules": [
- {
- "conditions": [
- {
- "fn": "isSet",
- "argv": [
- {
- "ref": "Region"
- }
- ]
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "aws.partition",
- "argv": [
- {
- "ref": "Region"
- }
- ],
- "assign": "PartitionResult"
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "UseFIPS"
- },
- true
- ]
- },
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "UseDualStack"
- },
- true
- ]
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "booleanEquals",
- "argv": [
- true,
- {
- "fn": "getAttr",
- "argv": [
- {
- "ref": "PartitionResult"
- },
- "supportsFIPS"
- ]
- }
- ]
- },
- {
- "fn": "booleanEquals",
- "argv": [
- true,
- {
- "fn": "getAttr",
- "argv": [
- {
- "ref": "PartitionResult"
- },
- "supportsDualStack"
- ]
- }
- ]
- }
- ],
- "rules": [
- {
- "conditions": [],
- "rules": [
- {
- "conditions": [],
- "endpoint": {
- "url": "https://xanadu-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
- "properties": {},
- "headers": {}
- },
- "type": "endpoint"
- }
- ],
- "type": "tree"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [],
- "error": "FIPS and DualStack are enabled, but this partition does not support one or both",
- "type": "error"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "UseFIPS"
- },
- true
- ]
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "fn": "getAttr",
- "argv": [
- {
- "ref": "PartitionResult"
- },
- "supportsFIPS"
- ]
- },
- true
- ]
- }
- ],
- "rules": [
- {
- "conditions": [],
- "rules": [
- {
- "conditions": [],
- "endpoint": {
- "url": "https://xanadu-fips.{Region}.{PartitionResult#dnsSuffix}",
- "properties": {},
- "headers": {}
- },
- "type": "endpoint"
- }
- ],
- "type": "tree"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [],
- "error": "FIPS is enabled but this partition does not support FIPS",
- "type": "error"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [
- {
- "fn": "booleanEquals",
- "argv": [
- {
- "ref": "UseDualStack"
- },
- true
- ]
- }
- ],
- "rules": [
- {
- "conditions": [
- {
- "fn": "booleanEquals",
- "argv": [
- true,
- {
- "fn": "getAttr",
- "argv": [
- {
- "ref": "PartitionResult"
- },
- "supportsDualStack"
- ]
- }
- ]
- }
- ],
- "rules": [
- {
- "conditions": [],
- "rules": [
- {
- "conditions": [],
- "endpoint": {
- "url": "https://xanadu.{Region}.{PartitionResult#dualStackDnsSuffix}",
- "properties": {},
- "headers": {}
- },
- "type": "endpoint"
- }
- ],
- "type": "tree"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [],
- "error": "DualStack is enabled but this partition does not support DualStack",
- "type": "error"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [],
- "rules": [
- {
- "conditions": [],
- "endpoint": {
- "url": "https://xanadu.{Region}.{PartitionResult#dnsSuffix}",
- "properties": {},
- "headers": {}
- },
- "type": "endpoint"
- }
- ],
- "type": "tree"
- }
- ],
- "type": "tree"
- }
- ],
- "type": "tree"
- },
- {
- "conditions": [],
- "error": "Invalid Configuration: Missing Region",
- "type": "error"
- }
- ],
- "type": "tree"
- }
- ]
-}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json b/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json
deleted file mode 100644
index d7a6824425c4..000000000000
--- a/services/axdbfrontend/src/main/resources/codegen-resources/endpoint-tests.json
+++ /dev/null
@@ -1,314 +0,0 @@
-{
- "testCases": [
- {
- "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu-fips.us-east-1.api.aws"
- }
- },
- "params": {
- "Region": "us-east-1",
- "UseFIPS": true,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu-fips.us-east-1.amazonaws.com"
- }
- },
- "params": {
- "Region": "us-east-1",
- "UseFIPS": true,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu.us-east-1.api.aws"
- }
- },
- "params": {
- "Region": "us-east-1",
- "UseFIPS": false,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu.us-east-1.amazonaws.com"
- }
- },
- "params": {
- "Region": "us-east-1",
- "UseFIPS": false,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu-fips.cn-north-1.api.amazonwebservices.com.cn"
- }
- },
- "params": {
- "Region": "cn-north-1",
- "UseFIPS": true,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu-fips.cn-north-1.amazonaws.com.cn"
- }
- },
- "params": {
- "Region": "cn-north-1",
- "UseFIPS": true,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu.cn-north-1.api.amazonwebservices.com.cn"
- }
- },
- "params": {
- "Region": "cn-north-1",
- "UseFIPS": false,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu.cn-north-1.amazonaws.com.cn"
- }
- },
- "params": {
- "Region": "cn-north-1",
- "UseFIPS": false,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu-fips.us-gov-east-1.api.aws"
- }
- },
- "params": {
- "Region": "us-gov-east-1",
- "UseFIPS": true,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu-fips.us-gov-east-1.amazonaws.com"
- }
- },
- "params": {
- "Region": "us-gov-east-1",
- "UseFIPS": true,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu.us-gov-east-1.api.aws"
- }
- },
- "params": {
- "Region": "us-gov-east-1",
- "UseFIPS": false,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu.us-gov-east-1.amazonaws.com"
- }
- },
- "params": {
- "Region": "us-gov-east-1",
- "UseFIPS": false,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled",
- "expect": {
- "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
- },
- "params": {
- "Region": "us-iso-east-1",
- "UseFIPS": true,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu-fips.us-iso-east-1.c2s.ic.gov"
- }
- },
- "params": {
- "Region": "us-iso-east-1",
- "UseFIPS": true,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled",
- "expect": {
- "error": "DualStack is enabled but this partition does not support DualStack"
- },
- "params": {
- "Region": "us-iso-east-1",
- "UseFIPS": false,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu.us-iso-east-1.c2s.ic.gov"
- }
- },
- "params": {
- "Region": "us-iso-east-1",
- "UseFIPS": false,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled",
- "expect": {
- "error": "FIPS and DualStack are enabled, but this partition does not support one or both"
- },
- "params": {
- "Region": "us-isob-east-1",
- "UseFIPS": true,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu-fips.us-isob-east-1.sc2s.sgov.gov"
- }
- },
- "params": {
- "Region": "us-isob-east-1",
- "UseFIPS": true,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled",
- "expect": {
- "error": "DualStack is enabled but this partition does not support DualStack"
- },
- "params": {
- "Region": "us-isob-east-1",
- "UseFIPS": false,
- "UseDualStack": true
- }
- },
- {
- "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
- "expect": {
- "endpoint": {
- "url": "https://xanadu.us-isob-east-1.sc2s.sgov.gov"
- }
- },
- "params": {
- "Region": "us-isob-east-1",
- "UseFIPS": false,
- "UseDualStack": false
- }
- },
- {
- "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled",
- "expect": {
- "endpoint": {
- "url": "https://example.com"
- }
- },
- "params": {
- "Region": "us-east-1",
- "UseFIPS": false,
- "UseDualStack": false,
- "Endpoint": "https://example.com"
- }
- },
- {
- "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled",
- "expect": {
- "endpoint": {
- "url": "https://example.com"
- }
- },
- "params": {
- "UseFIPS": false,
- "UseDualStack": false,
- "Endpoint": "https://example.com"
- }
- },
- {
- "documentation": "For custom endpoint with fips enabled and dualstack disabled",
- "expect": {
- "error": "Invalid Configuration: FIPS and custom endpoint are not supported"
- },
- "params": {
- "Region": "us-east-1",
- "UseFIPS": true,
- "UseDualStack": false,
- "Endpoint": "https://example.com"
- }
- },
- {
- "documentation": "For custom endpoint with fips disabled and dualstack enabled",
- "expect": {
- "error": "Invalid Configuration: Dualstack and custom endpoint are not supported"
- },
- "params": {
- "Region": "us-east-1",
- "UseFIPS": false,
- "UseDualStack": true,
- "Endpoint": "https://example.com"
- }
- },
- {
- "documentation": "Missing region",
- "expect": {
- "error": "Invalid Configuration: Missing Region"
- }
- }
- ],
- "version": "1.0"
-}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json b/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
deleted file mode 100644
index c9cfb66eb2f5..000000000000
--- a/services/axdbfrontend/src/main/resources/codegen-resources/paginators-1.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "pagination": {
- "ListClusters": {
- "input_token": "nextToken",
- "output_token": "nextToken",
- "limit_key": "maxResults",
- "result_key": "clusters"
- }
- }
-}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json b/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
deleted file mode 100644
index 28855ab4eeb2..000000000000
--- a/services/axdbfrontend/src/main/resources/codegen-resources/service-2.json
+++ /dev/null
@@ -1,790 +0,0 @@
-{
- "version":"2.0",
- "metadata":{
- "apiVersion":"2018-05-10",
- "auth":["aws.auth#sigv4"],
- "endpointPrefix":"xanadu",
- "protocol":"rest-json",
- "protocols":["rest-json"],
- "serviceFullName":"Xanadu",
- "serviceId":"AxdbFrontend",
- "signatureVersion":"v4",
- "signingName":"xanadu",
- "uid":"axdbfrontend-2018-05-10"
- },
- "operations":{
- "CreateCluster":{
- "name":"CreateCluster",
- "http":{
- "method":"POST",
- "requestUri":"/cluster",
- "responseCode":200
- },
- "input":{"shape":"CreateClusterInput"},
- "output":{"shape":"CreateClusterOutput"},
- "errors":[
- {"shape":"ConflictException"},
- {"shape":"ValidationException"},
- {"shape":"ServiceQuotaExceededException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Create a cluster
"
- },
- "CreateMultiRegionClusters":{
- "name":"CreateMultiRegionClusters",
- "http":{
- "method":"POST",
- "requestUri":"/multi-region-clusters",
- "responseCode":200
- },
- "input":{"shape":"CreateMultiRegionClustersInput"},
- "output":{"shape":"CreateMultiRegionClustersOutput"},
- "errors":[
- {"shape":"ConflictException"},
- {"shape":"ValidationException"},
- {"shape":"ServiceQuotaExceededException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Create clusters in multiple regions
"
- },
- "DeleteCluster":{
- "name":"DeleteCluster",
- "http":{
- "method":"DELETE",
- "requestUri":"/cluster/{identifier}",
- "responseCode":200
- },
- "input":{"shape":"DeleteClusterInput"},
- "output":{"shape":"DeleteClusterOutput"},
- "errors":[
- {"shape":"ConflictException"},
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Delete a cluster
",
- "idempotent":true
- },
- "DeleteMultiRegionClusters":{
- "name":"DeleteMultiRegionClusters",
- "http":{
- "method":"DELETE",
- "requestUri":"/multi-region-clusters",
- "responseCode":200
- },
- "input":{"shape":"DeleteMultiRegionClustersInput"},
- "errors":[
- {"shape":"ConflictException"},
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Delete clusters in multiple regions
",
- "idempotent":true
- },
- "GetCluster":{
- "name":"GetCluster",
- "http":{
- "method":"GET",
- "requestUri":"/cluster/{identifier}",
- "responseCode":200
- },
- "input":{"shape":"GetClusterInput"},
- "output":{"shape":"GetClusterOutput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Get a cluster
"
- },
- "ListClusters":{
- "name":"ListClusters",
- "http":{
- "method":"GET",
- "requestUri":"/cluster",
- "responseCode":200
- },
- "input":{"shape":"ListClustersInput"},
- "output":{"shape":"ListClustersOutput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"List clusters
"
- },
- "ListTagsForResource":{
- "name":"ListTagsForResource",
- "http":{
- "method":"GET",
- "requestUri":"/tags/{resourceArn}",
- "responseCode":200
- },
- "input":{"shape":"ListTagsForResourceInput"},
- "output":{"shape":"ListTagsForResourceOutput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"List all Tags on an ARN
"
- },
- "TagResource":{
- "name":"TagResource",
- "http":{
- "method":"POST",
- "requestUri":"/tags/{resourceArn}",
- "responseCode":200
- },
- "input":{"shape":"TagResourceInput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"ServiceQuotaExceededException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Add Tags to an ARN
",
- "idempotent":true
- },
- "UntagResource":{
- "name":"UntagResource",
- "http":{
- "method":"DELETE",
- "requestUri":"/tags/{resourceArn}",
- "responseCode":200
- },
- "input":{"shape":"UntagResourceInput"},
- "errors":[
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Remove Tags from an ARN
",
- "idempotent":true
- },
- "UpdateCluster":{
- "name":"UpdateCluster",
- "http":{
- "method":"POST",
- "requestUri":"/cluster/{identifier}",
- "responseCode":200
- },
- "input":{"shape":"UpdateClusterInput"},
- "output":{"shape":"UpdateClusterOutput"},
- "errors":[
- {"shape":"ConflictException"},
- {"shape":"ValidationException"},
- {"shape":"InternalServerException"},
- {"shape":"AccessDeniedException"},
- {"shape":"ResourceNotFoundException"},
- {"shape":"ThrottlingException"}
- ],
- "documentation":"Update a cluster
"
- }
- },
- "shapes":{
- "AccessDeniedException":{
- "type":"structure",
- "required":["message"],
- "members":{
- "message":{"shape":"String"}
- },
- "documentation":"User does not have sufficient access to perform this action
",
- "error":{
- "httpStatusCode":403,
- "senderFault":true
- },
- "exception":true
- },
- "Arn":{
- "type":"string",
- "documentation":"Amazon Resource Name
",
- "max":1011,
- "min":1,
- "pattern":"arn:.+"
- },
- "ClientToken":{
- "type":"string",
- "documentation":"Idempotency Token
",
- "max":128,
- "min":1,
- "pattern":"[!-~]+"
- },
- "ClusterArn":{
- "type":"string",
- "documentation":"Cluster ARN
"
- },
- "ClusterArnList":{
- "type":"list",
- "member":{"shape":"ClusterArn"},
- "documentation":"List of cluster arns
"
- },
- "ClusterCreationTime":{
- "type":"timestamp",
- "documentation":"Timestamp when the Cluster was created
"
- },
- "ClusterId":{
- "type":"string",
- "documentation":"Cluster ID
"
- },
- "ClusterList":{
- "type":"list",
- "member":{"shape":"ClusterSummary"},
- "documentation":"List of clusters
"
- },
- "ClusterPropertyMap":{
- "type":"map",
- "key":{"shape":"Region"},
- "value":{"shape":"LinkedClusterProperties"},
- "documentation":"Properties for each linked cluster
"
- },
- "ClusterStatus":{
- "type":"string",
- "documentation":"Cluster Status
",
- "enum":[
- "CREATING",
- "ACTIVE",
- "UPDATING",
- "DELETING",
- "DELETED",
- "FAILED"
- ]
- },
- "ClusterSummary":{
- "type":"structure",
- "required":[
- "identifier",
- "arn"
- ],
- "members":{
- "identifier":{"shape":"ClusterId"},
- "arn":{"shape":"ClusterArn"}
- },
- "documentation":"Cluster Summary
"
- },
- "ConflictException":{
- "type":"structure",
- "required":["message"],
- "members":{
- "message":{
- "shape":"String",
- "documentation":"Description of the error
"
- },
- "resourceId":{
- "shape":"String",
- "documentation":"Identifier of the resource affected
"
- },
- "resourceType":{
- "shape":"String",
- "documentation":"Type of the resource affected
"
- }
- },
- "documentation":"Updating or deleting a resource can cause an inconsistent state
",
- "error":{
- "httpStatusCode":409,
- "senderFault":true
- },
- "exception":true
- },
- "CreateClusterInput":{
- "type":"structure",
- "members":{
- "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "tags":{"shape":"TagMap"},
- "clientToken":{
- "shape":"ClientToken",
- "idempotencyToken":true
- }
- }
- },
- "CreateClusterOutput":{
- "type":"structure",
- "required":[
- "identifier",
- "arn",
- "status",
- "creationTime",
- "deletionProtectionEnabled"
- ],
- "members":{
- "identifier":{"shape":"ClusterId"},
- "arn":{"shape":"ClusterArn"},
- "status":{"shape":"ClusterStatus"},
- "creationTime":{"shape":"ClusterCreationTime"},
- "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"}
- },
- "documentation":"Output Mixin
"
- },
- "CreateMultiRegionClustersInput":{
- "type":"structure",
- "required":[
- "linkedRegionList",
- "witnessRegion"
- ],
- "members":{
- "linkedRegionList":{"shape":"RegionList"},
- "clusterProperties":{"shape":"ClusterPropertyMap"},
- "witnessRegion":{"shape":"Region"},
- "clientToken":{
- "shape":"ClientToken",
- "idempotencyToken":true
- }
- }
- },
- "CreateMultiRegionClustersOutput":{
- "type":"structure",
- "required":["linkedClusterArns"],
- "members":{
- "linkedClusterArns":{"shape":"ClusterArnList"}
- }
- },
- "DeleteClusterInput":{
- "type":"structure",
- "required":["identifier"],
- "members":{
- "identifier":{
- "shape":"ClusterId",
- "location":"uri",
- "locationName":"identifier"
- },
- "clientToken":{
- "shape":"ClientToken",
- "idempotencyToken":true,
- "location":"querystring",
- "locationName":"client-token"
- }
- }
- },
- "DeleteClusterOutput":{
- "type":"structure",
- "required":[
- "identifier",
- "arn",
- "status",
- "creationTime",
- "deletionProtectionEnabled"
- ],
- "members":{
- "identifier":{"shape":"ClusterId"},
- "arn":{"shape":"ClusterArn"},
- "status":{"shape":"ClusterStatus"},
- "creationTime":{"shape":"ClusterCreationTime"},
- "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"}
- },
- "documentation":"Output Mixin
"
- },
- "DeleteMultiRegionClustersInput":{
- "type":"structure",
- "required":["linkedClusterArns"],
- "members":{
- "linkedClusterArns":{
- "shape":"ClusterArnList",
- "location":"querystring",
- "locationName":"linked-cluster-arns"
- },
- "clientToken":{
- "shape":"ClientToken",
- "idempotencyToken":true,
- "location":"querystring",
- "locationName":"client-token"
- }
- }
- },
- "DeletionProtectionEnabled":{
- "type":"boolean",
- "documentation":"Deletion Protection
",
- "box":true
- },
- "GetClusterInput":{
- "type":"structure",
- "required":["identifier"],
- "members":{
- "identifier":{
- "shape":"ClusterId",
- "location":"uri",
- "locationName":"identifier"
- }
- }
- },
- "GetClusterOutput":{
- "type":"structure",
- "required":[
- "identifier",
- "arn",
- "status",
- "creationTime",
- "deletionProtectionEnabled"
- ],
- "members":{
- "identifier":{"shape":"ClusterId"},
- "arn":{"shape":"ClusterArn"},
- "status":{"shape":"ClusterStatus"},
- "creationTime":{"shape":"ClusterCreationTime"},
- "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "witnessRegion":{"shape":"Region"},
- "linkedClusterArns":{"shape":"ClusterArnList"}
- },
- "documentation":"Output Mixin
"
- },
- "Integer":{
- "type":"integer",
- "box":true
- },
- "InternalServerException":{
- "type":"structure",
- "required":["message"],
- "members":{
- "message":{
- "shape":"String",
- "documentation":"Description of the error
"
- },
- "retryAfterSeconds":{
- "shape":"Integer",
- "documentation":"Advice to clients on when the call can be safely retried
",
- "location":"header",
- "locationName":"Retry-After"
- }
- },
- "documentation":"Unexpected error during processing of request
",
- "error":{"httpStatusCode":500},
- "exception":true,
- "fault":true,
- "retryable":{"throttling":false}
- },
- "LinkedClusterProperties":{
- "type":"structure",
- "members":{
- "tags":{"shape":"TagMap"}
- },
- "documentation":"Linked Cluster Properties
"
- },
- "ListClustersInput":{
- "type":"structure",
- "members":{
- "maxResults":{
- "shape":"MaxResults",
- "location":"querystring",
- "locationName":"max-results"
- },
- "nextToken":{
- "shape":"NextToken",
- "location":"querystring",
- "locationName":"next-token"
- }
- }
- },
- "ListClustersOutput":{
- "type":"structure",
- "required":["clusters"],
- "members":{
- "nextToken":{"shape":"NextToken"},
- "clusters":{"shape":"ClusterList"}
- }
- },
- "ListTagsForResourceInput":{
- "type":"structure",
- "required":["resourceArn"],
- "members":{
- "resourceArn":{
- "shape":"Arn",
- "location":"uri",
- "locationName":"resourceArn"
- }
- }
- },
- "ListTagsForResourceOutput":{
- "type":"structure",
- "members":{
- "tags":{"shape":"TagMap"}
- }
- },
- "MaxResults":{
- "type":"integer",
- "documentation":"Max results that will be returned per page
",
- "box":true,
- "max":100,
- "min":1
- },
- "NextToken":{
- "type":"string",
- "documentation":"Opaque token used to retrieve next page
"
- },
- "Region":{
- "type":"string",
- "documentation":"AWS Region name (e.g.: 'us-east-1')
",
- "max":20,
- "min":0
- },
- "RegionList":{
- "type":"list",
- "member":{"shape":"Region"},
- "documentation":"List of regions
"
- },
- "ResourceNotFoundException":{
- "type":"structure",
- "required":[
- "message",
- "resourceId",
- "resourceType"
- ],
- "members":{
- "message":{"shape":"String"},
- "resourceId":{
- "shape":"String",
- "documentation":"Hypothetical identifier of the resource which does not exist
"
- },
- "resourceType":{
- "shape":"String",
- "documentation":"Hypothetical type of the resource which does not exist
"
- }
- },
- "documentation":"Request references a resource which does not exist
",
- "error":{
- "httpStatusCode":404,
- "senderFault":true
- },
- "exception":true
- },
- "ServiceQuotaExceededException":{
- "type":"structure",
- "required":[
- "message",
- "resourceId",
- "resourceType",
- "serviceCode",
- "quotaCode"
- ],
- "members":{
- "message":{
- "shape":"String",
- "documentation":"Description of the error
"
- },
- "resourceId":{
- "shape":"String",
- "documentation":"Identifier of the resource affected
"
- },
- "resourceType":{
- "shape":"String",
- "documentation":"Type of the resource affected
"
- },
- "serviceCode":{
- "shape":"String",
- "documentation":"Service Quotas requirement to identify originating service
"
- },
- "quotaCode":{
- "shape":"String",
- "documentation":"Service Quotas requirement to identify originating quota
"
- }
- },
- "documentation":"Request would cause a service quota to be exceeded
",
- "error":{
- "httpStatusCode":402,
- "senderFault":true
- },
- "exception":true
- },
- "String":{"type":"string"},
- "TagKey":{
- "type":"string",
- "documentation":"Tag Key
",
- "max":128,
- "min":1,
- "pattern":"[a-zA-Z0-9_.:/=+\\-@]*"
- },
- "TagKeyList":{
- "type":"list",
- "member":{"shape":"TagKey"},
- "documentation":"List of tag keys
",
- "max":200,
- "min":0
- },
- "TagMap":{
- "type":"map",
- "key":{"shape":"TagKey"},
- "value":{"shape":"TagValue"},
- "documentation":"Map of tags
",
- "max":200,
- "min":0
- },
- "TagResourceInput":{
- "type":"structure",
- "required":[
- "resourceArn",
- "tags"
- ],
- "members":{
- "resourceArn":{
- "shape":"Arn",
- "location":"uri",
- "locationName":"resourceArn"
- },
- "tags":{"shape":"TagMap"}
- }
- },
- "TagValue":{
- "type":"string",
- "documentation":"Tag Value
",
- "max":256,
- "min":0,
- "pattern":"[a-zA-Z0-9_.:/=+\\-@]*"
- },
- "ThrottlingException":{
- "type":"structure",
- "required":["message"],
- "members":{
- "message":{
- "shape":"String",
- "documentation":"Description of the error
"
- },
- "serviceCode":{
- "shape":"String",
- "documentation":"Service Quotas requirement to identify originating service
"
- },
- "quotaCode":{
- "shape":"String",
- "documentation":"Service Quotas requirement to identify originating quota
"
- },
- "retryAfterSeconds":{
- "shape":"Integer",
- "documentation":"Advice to clients on when the call can be safely retried
",
- "location":"header",
- "locationName":"Retry-After"
- }
- },
- "documentation":"Request was denied due to request throttling
",
- "error":{
- "httpStatusCode":429,
- "senderFault":true
- },
- "exception":true,
- "retryable":{"throttling":true}
- },
- "UntagResourceInput":{
- "type":"structure",
- "required":[
- "resourceArn",
- "tagKeys"
- ],
- "members":{
- "resourceArn":{
- "shape":"Arn",
- "location":"uri",
- "locationName":"resourceArn"
- },
- "tagKeys":{
- "shape":"TagKeyList",
- "location":"querystring",
- "locationName":"tagKeys"
- }
- }
- },
- "UpdateClusterInput":{
- "type":"structure",
- "required":["identifier"],
- "members":{
- "identifier":{
- "shape":"ClusterId",
- "location":"uri",
- "locationName":"identifier"
- },
- "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "clientToken":{
- "shape":"ClientToken",
- "idempotencyToken":true
- }
- }
- },
- "UpdateClusterOutput":{
- "type":"structure",
- "required":[
- "identifier",
- "arn",
- "status",
- "creationTime",
- "deletionProtectionEnabled"
- ],
- "members":{
- "identifier":{"shape":"ClusterId"},
- "arn":{"shape":"ClusterArn"},
- "status":{"shape":"ClusterStatus"},
- "creationTime":{"shape":"ClusterCreationTime"},
- "deletionProtectionEnabled":{"shape":"DeletionProtectionEnabled"},
- "witnessRegion":{"shape":"Region"},
- "linkedClusterArns":{"shape":"ClusterArnList"}
- },
- "documentation":"Output Mixin
"
- },
- "ValidationException":{
- "type":"structure",
- "required":[
- "message",
- "reason"
- ],
- "members":{
- "message":{"shape":"String"},
- "reason":{"shape":"ValidationExceptionReason"},
- "fieldList":{"shape":"ValidationExceptionFieldList"}
- },
- "documentation":"The input fails to satisfy the constraints specified by an AWS service
",
- "error":{
- "httpStatusCode":400,
- "senderFault":true
- },
- "exception":true
- },
- "ValidationExceptionField":{
- "type":"structure",
- "required":[
- "name",
- "message"
- ],
- "members":{
- "name":{
- "shape":"String",
- "documentation":"The field name
"
- },
- "message":{
- "shape":"String",
- "documentation":"Message describing why the field failed validation
"
- }
- },
- "documentation":"A field that caused the error
"
- },
- "ValidationExceptionFieldList":{
- "type":"list",
- "member":{"shape":"ValidationExceptionField"},
- "documentation":"List of fields that caused the error
"
- },
- "ValidationExceptionReason":{
- "type":"string",
- "documentation":"Reason the request failed validation
",
- "enum":[
- "unknownOperation",
- "cannotParse",
- "fieldValidationFailed",
- "deletionProtectionEnabled",
- "other"
- ]
- }
- },
- "documentation":"Xanadu
"
-}
diff --git a/services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json b/services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json
deleted file mode 100644
index 69cd9baaeb5b..000000000000
--- a/services/axdbfrontend/src/main/resources/codegen-resources/waiters-2.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "version" : 2,
- "waiters" : {
- "ClusterActive" : {
- "description" : "Wait until a Cluster is ACTIVE",
- "delay" : 2,
- "maxAttempts" : 60,
- "operation" : "GetCluster",
- "acceptors" : [ {
- "matcher" : "path",
- "argument" : "status",
- "state" : "success",
- "expected" : "ACTIVE"
- } ]
- },
- "ClusterNotExists" : {
- "description" : "Wait until a Cluster is gone",
- "delay" : 2,
- "maxAttempts" : 60,
- "operation" : "GetCluster",
- "acceptors" : [ {
- "matcher" : "error",
- "state" : "success",
- "expected" : "ResourceNotFoundException"
- } ]
- }
- }
-}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java b/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
deleted file mode 100644
index 05656730abb8..000000000000
--- a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilitiesTest.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * 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.
- * 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 software.amazon.awssdk.services.axdbfrontend;
-
-import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
-import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
-
-import java.time.Clock;
-import java.time.Duration;
-import java.time.ZoneId;
-import java.time.ZonedDateTime;
-import java.util.function.Consumer;
-import org.junit.jupiter.api.Test;
-import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
-import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
-import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
-import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
-import software.amazon.awssdk.identity.spi.IdentityProvider;
-import software.amazon.awssdk.regions.Region;
-import software.amazon.awssdk.services.axdbfrontend.DefaultAxdbFrontendUtilities.DefaultBuilder;
-import software.amazon.awssdk.services.axdbfrontend.model.Action;
-import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
-
-public class DefaultAxdbFrontendUtilitiesTest {
- private final ZoneId utcZone = ZoneId.of("UTC").normalized();
- private final Clock fixedClock = Clock.fixed(ZonedDateTime.of(2024, 11, 7, 17, 39, 33, 0, utcZone).toInstant(), utcZone);
-
- @Test
- public void tokenGenerationWithBuilderDefaultsUsingAwsCredentialsProvider_isSuccessful() {
- AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
- AwsBasicCredentials.create("access_key", "secret_key")
- );
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider)
- .region(Region.US_EAST_1);
-
- tokenGenerationWithBuilderDefaults(utilitiesBuilder);
- }
-
- @Test
- public void tokenGenerationWithBuilderDefaultsUsingIdentityProvider_isSuccessful() {
- IdentityProvider credentialsProvider = StaticCredentialsProvider.create(
- AwsBasicCredentials.create("access_key", "secret_key")
- );
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider)
- .region(Region.US_EAST_1);
-
- tokenGenerationWithBuilderDefaults(utilitiesBuilder);
- }
-
- private void tokenGenerationWithBuilderDefaults(DefaultBuilder utilitiesBuilder) {
- DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DB_CONNECT_SUPERUSER;
-
- String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
- builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
- .action(action);
- });
-
- String expectedToken = "test.us-east-1.prod.sql.axdb.aws.dev/?Action=DbConnectSuperuser&" +
- "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241107T173933Z&X-Amz-SignedHeaders=host&" +
- "X-Amz-Expires=900&X-Amz-Credential=access_key%2F20241107%2Fus-east-1%2Fxanadu" +
- "%2Faws4_request&" +
- "X-Amz-Signature=f7666e716762021d3a381a2030a41b29419c70b39b0d669dd44dfd56870a860b";
- assertThat(authenticationToken).isEqualTo(expectedToken);
- }
-
- @Test
- public void tokenGenerationWithOverriddenCredentialsUsingAwsCredentialsProvider_isSuccessful() {
- AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
- AwsBasicCredentials.create("foo", "bar")
- );
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider)
- .region(Region.US_EAST_1);
- tokenGenerationWithOverriddenCredentials(utilitiesBuilder, builder -> {
- builder.credentialsProvider(StaticCredentialsProvider.create(
- AwsBasicCredentials.create("access_key", "secret_key")));
- });
- }
-
- @Test
- public void tokenGenerationWithOverriddenCredentialsUsingIdentityProvider_isSuccessful() {
- IdentityProvider credentialsProvider = StaticCredentialsProvider.create(
- AwsBasicCredentials.create("foo", "bar")
- );
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider)
- .region(Region.US_EAST_1);
- tokenGenerationWithOverriddenCredentials(utilitiesBuilder, builder -> {
- builder.credentialsProvider((IdentityProvider) StaticCredentialsProvider.create(
- AwsBasicCredentials.create("access_key", "secret_key")));
- });
- }
-
- private void tokenGenerationWithOverriddenCredentials(DefaultBuilder utilitiesBuilder,
- Consumer credsBuilder) {
- DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DB_CONNECT_SUPERUSER;
-
- String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
- builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
- .action(action)
- .applyMutation(credsBuilder);
- });
-
- String expectedToken = "test.us-east-1.prod.sql.axdb.aws.dev/?Action=DbConnectSuperuser&" +
- "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241107T173933Z&X-Amz-SignedHeaders=host&" +
- "X-Amz-Expires=900&X-Amz-Credential=access_key%2F20241107%2Fus-east-1%2Fxanadu" +
- "%2Faws4_request&" +
- "X-Amz-Signature=f7666e716762021d3a381a2030a41b29419c70b39b0d669dd44dfd56870a860b";
- assertThat(authenticationToken).isEqualTo(expectedToken);
- }
-
- @Test
- public void tokenGenerationWithOverriddenRegion_isSuccessful() {
- AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
- AwsBasicCredentials.create("access_key", "secret_key")
- );
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider)
- .region(Region.US_EAST_1);
-
- DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DB_CONNECT_SUPERUSER;
-
- String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
- builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
- .action(action)
- .region(Region.US_WEST_2);
- });
-
- String expectedToken = "test.us-east-1.prod.sql.axdb.aws.dev/?Action=DbConnectSuperuser&" +
- "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241107T173933Z&X-Amz-SignedHeaders=host&" +
- "X-Amz-Expires=900&X-Amz-Credential=access_key%2F20241107%2Fus-west-2%2Fxanadu" +
- "%2Faws4_request&" +
- "X-Amz-Signature=7da651e0e1811750c55246d38b99917ded3679af2dfd3cd1eced38946bce94e5";
- assertThat(authenticationToken).isEqualTo(expectedToken);
- }
-
- @Test
- public void missingRegion_throwsException() {
- AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
- AwsBasicCredentials.create("access_key", "secret_key")
- );
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider);
-
- DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DB_CONNECT;
-
- assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
- builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
- .action(action);
- })).isInstanceOf(IllegalArgumentException.class)
- .hasMessageContaining("Region should be provided");
- }
-
- @Test
- public void missingCredentials_throwsException() {
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .region(Region.US_WEST_2);
-
- DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DB_CONNECT;
-
- assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
- builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
- .action(action);
- })).isInstanceOf(IllegalArgumentException.class)
- .hasMessageContaining("CredentialProvider should be provided");
- }
-
- @Test
- public void missingHostname_throwsException() {
- AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
- AwsBasicCredentials.create("access_key", "secret_key")
- );
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider);
-
- DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DB_CONNECT;
-
- assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
- builder.action(action);
- })).isInstanceOf(NullPointerException.class)
- .hasMessageContaining("hostname");
- }
-
- @Test
- public void missingAction_throwsException() {
- AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
- AwsBasicCredentials.create("access_key", "secret_key")
- );
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider)
- .region(Region.US_EAST_1);
-
- DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
-
- assertThatThrownBy(() -> AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
- builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev");
- })).isInstanceOf(NullPointerException.class)
- .hasMessageContaining("action");
- }
-
- @Test
- public void tokenGenerationWithCustomExpiry_isSuccessful() {
- AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
- AwsBasicCredentials.create("access_key", "secret_key")
- );
- DefaultBuilder utilitiesBuilder = (DefaultBuilder) AxdbFrontendUtilities.builder()
- .credentialsProvider(credentialsProvider)
- .region(Region.US_EAST_1);
-
- DefaultAxdbFrontendUtilities AxdbFrontendUtilities = new DefaultAxdbFrontendUtilities(utilitiesBuilder, fixedClock);
- Action action = Action.DB_CONNECT;
- Duration expiry = Duration.ofSeconds(3600L);
-
- String authenticationToken = AxdbFrontendUtilities.generateAuthenticationToken(builder -> {
- builder.hostname("test.us-east-1.prod.sql.axdb.aws.dev")
- .action(action)
- .expiresIn(expiry);
- });
-
- String expectedToken = "test.us-east-1.prod.sql.axdb.aws.dev/?Action=DbConnect&" +
- "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241107T173933Z&X-Amz-SignedHeaders=host&" +
- "X-Amz-Expires=3600&X-Amz-Credential=access_key%2F20241107%2Fus-east-1%2Fxanadu" +
- "%2Faws4_request&" +
- "X-Amz-Signature=2effdbadd1d7172c6ec5e3293d6209109bc8969b8d8b9d3394363a8e986a2377";
- assertThat(authenticationToken).isEqualTo(expectedToken);
- }
-}
\ No newline at end of file
diff --git a/services/dsql/pom.xml b/services/dsql/pom.xml
index cacb27c6ea8a..dc11f6186108 100644
--- a/services/dsql/pom.xml
+++ b/services/dsql/pom.xml
@@ -41,6 +41,11 @@
+
+ nl.jqno.equalsverifier
+ equalsverifier
+ test
+
software.amazon.awssdk
protocol-core
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilities.java
similarity index 72%
rename from services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java
rename to services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilities.java
index 860a5bd7d78f..c1f69c7a66be 100644
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/DefaultAxdbFrontendUtilities.java
+++ b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilities.java
@@ -13,12 +13,13 @@
* permissions and limitations under the License.
*/
-package software.amazon.awssdk.services.axdbfrontend;
+package software.amazon.awssdk.services.dsql;
import java.time.Clock;
import java.time.Instant;
import software.amazon.awssdk.annotations.Immutable;
import software.amazon.awssdk.annotations.SdkInternalApi;
+import software.amazon.awssdk.annotations.SdkTestInternalApi;
import software.amazon.awssdk.auth.credentials.AwsCredentials;
import software.amazon.awssdk.auth.credentials.CredentialUtils;
import software.amazon.awssdk.auth.signer.Aws4Signer;
@@ -30,49 +31,61 @@
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
import software.amazon.awssdk.identity.spi.IdentityProvider;
import software.amazon.awssdk.regions.Region;
-import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
+import software.amazon.awssdk.services.dsql.model.GenerateAuthTokenRequest;
import software.amazon.awssdk.utils.CompletableFutureUtils;
import software.amazon.awssdk.utils.Logger;
import software.amazon.awssdk.utils.StringUtils;
@Immutable
@SdkInternalApi
-public final class DefaultAxdbFrontendUtilities implements AxdbFrontendUtilities {
- private static final Logger log = Logger.loggerFor(AxdbFrontendUtilities.class);
+public final class DefaultDsqlUtilities implements DsqlUtilities {
+ private static final Logger log = Logger.loggerFor(DsqlUtilities.class);
private final Aws4Signer signer = Aws4Signer.create();
private final Region region;
private final IdentityProvider extends AwsCredentialsIdentity> credentialsProvider;
private final Clock clock;
- public DefaultAxdbFrontendUtilities(DefaultBuilder builder) {
+ public DefaultDsqlUtilities(DefaultBuilder builder) {
this(builder, Clock.systemUTC());
}
/**
* For testing purposes only
*/
- public DefaultAxdbFrontendUtilities(DefaultBuilder builder, Clock clock) {
+ @SdkTestInternalApi
+ public DefaultDsqlUtilities(DefaultBuilder builder, Clock clock) {
this.credentialsProvider = builder.credentialsProvider;
this.region = builder.region;
this.clock = clock;
}
/**
- * Used by AxdbFrontend low-level client's utilities() method
+ * Used by DSQL low-level client's utilities() method
*/
@SdkInternalApi
- static AxdbFrontendUtilities create(SdkClientConfiguration clientConfiguration) {
+ static DsqlUtilities create(SdkClientConfiguration clientConfiguration) {
return new DefaultBuilder().clientConfiguration(clientConfiguration).build();
}
@Override
- public String generateAuthenticationToken(GenerateAuthenticationTokenRequest request) {
+ public String generateDbConnectAuthToken(GenerateAuthTokenRequest request) {
+ return generateAuthToken(request, false);
+ }
+
+ @Override
+ public String generateDbConnectAdminAuthToken(GenerateAuthTokenRequest request) {
+ return generateAuthToken(request, true);
+ }
+
+ private String generateAuthToken(GenerateAuthTokenRequest request, boolean isAdmin) {
+ String action = isAdmin ? "DbConnectAdmin" : "DbConnect";
+
SdkHttpFullRequest httpRequest = SdkHttpFullRequest.builder()
.method(SdkHttpMethod.GET)
.protocol("https")
.host(request.hostname())
.encodedPath("/")
- .putRawQueryParameter("Action", request.action().getAction())
+ .putRawQueryParameter("Action", action)
.build();
Instant expirationTime = Instant.now(clock).plus(request.expiresIn());
@@ -81,18 +94,18 @@ public String generateAuthenticationToken(GenerateAuthenticationTokenRequest req
.signingClockOverride(clock)
.expirationTime(expirationTime)
.awsCredentials(resolveCredentials(request))
- .signingName("xanadu")
+ .signingName("dsql")
.signingRegion(resolveRegion(request))
.build();
SdkHttpFullRequest fullRequest = signer.presign(httpRequest, presignRequest);
String signedUrl = fullRequest.getUri().toString();
- String result = StringUtils.replacePrefixIgnoreCase(signedUrl, "https://", "");
- return result;
+ log.debug(() -> "Generated DSQL authentication token with expiration of " + expirationTime);
+ return StringUtils.replacePrefixIgnoreCase(signedUrl, "https://", "");
}
- private Region resolveRegion(GenerateAuthenticationTokenRequest request) {
+ private Region resolveRegion(GenerateAuthTokenRequest request) {
if (request.region() != null) {
return request.region();
}
@@ -101,12 +114,11 @@ private Region resolveRegion(GenerateAuthenticationTokenRequest request) {
return this.region;
}
- throw new IllegalArgumentException("Region should be provided either in GenerateAuthenticationTokenRequest object " +
- "or AxdbFrontendUtilities object");
+ throw new IllegalArgumentException("Region must be provided in GenerateAuthTokenRequest or DsqlUtilities");
}
// TODO: update this to use AwsCredentialsIdentity when we migrate Signers to accept the new type.
- private AwsCredentials resolveCredentials(GenerateAuthenticationTokenRequest request) {
+ private AwsCredentials resolveCredentials(GenerateAuthTokenRequest request) {
if (request.credentialsIdentityProvider() != null) {
return CredentialUtils.toCredentials(
CompletableFutureUtils.joinLikeSync(request.credentialsIdentityProvider().resolveIdentity()));
@@ -116,18 +128,14 @@ private AwsCredentials resolveCredentials(GenerateAuthenticationTokenRequest req
return CredentialUtils.toCredentials(CompletableFutureUtils.joinLikeSync(this.credentialsProvider.resolveIdentity()));
}
- throw new IllegalArgumentException("CredentialProvider should be provided either in GenerateAuthenticationTokenRequest " +
- "object or AxdbFrontendUtilities object");
+ throw new IllegalArgumentException("CredentialProvider must be provided in GenerateAuthTokenRequest or DsqlUtilities");
}
@SdkInternalApi
- public static final class DefaultBuilder implements Builder {
+ public static final class DefaultBuilder implements DsqlUtilities.Builder {
private Region region;
private IdentityProvider extends AwsCredentialsIdentity> credentialsProvider;
- public DefaultBuilder() {
- }
-
Builder clientConfiguration(SdkClientConfiguration clientConfiguration) {
this.credentialsProvider = clientConfiguration.option(AwsClientOption.CREDENTIALS_IDENTITY_PROVIDER);
this.region = clientConfiguration.option(AwsClientOption.AWS_REGION);
@@ -148,11 +156,11 @@ public Builder credentialsProvider(IdentityProvider extends AwsCredentialsIden
}
/**
- * Construct a {@link AxdbFrontendUtilities} object.
+ * Construct a {@link DsqlUtilities} object.
*/
@Override
- public AxdbFrontendUtilities build() {
- return new DefaultAxdbFrontendUtilities(this);
+ public DsqlUtilities build() {
+ return new DefaultDsqlUtilities(this);
}
}
}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DsqlUtilities.java
similarity index 53%
rename from services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
rename to services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DsqlUtilities.java
index cdda3c60f51b..d92ac243a828 100644
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/AxdbFrontendUtilities.java
+++ b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DsqlUtilities.java
@@ -13,7 +13,7 @@
* permissions and limitations under the License.
*/
-package software.amazon.awssdk.services.axdbfrontend;
+package software.amazon.awssdk.services.dsql;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.SdkPublicApi;
@@ -21,19 +21,19 @@
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
import software.amazon.awssdk.identity.spi.IdentityProvider;
import software.amazon.awssdk.regions.Region;
-import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
+import software.amazon.awssdk.services.dsql.model.GenerateAuthTokenRequest;
/**
- * Utilities for working with AxdbFrontend. An instance of this class can be created by:
+ * Utilities for working with DSQL. An instance of this class can be created by:
*
- * 1) Using the low-level client {@link AxdbFrontendClient#utilities()} (or {@link AxdbFrontendAsyncClient#utilities()}} method.
- * This is recommended as SDK will use the same configuration from the {@link AxdbFrontendClient} object to create the
- * {@link AxdbFrontendUtilities} object.
+ * 1) Using the low-level client {@link DsqlClient#utilities()} (or {@link DsqlAsyncClient#utilities()}} method.
+ * This is recommended as SDK will use the same configuration from the {@link DsqlClient} object to create the
+ * {@link DsqlUtilities} object.
*
* @snippet :
* {@code
- * AxdbFrontendClient AxdbFrontendClient = AxdbFrontendClient.create();
- * AxdbFrontendUtilities utilities = AxdbFrontendClient.utilities();
+ * DsqlClient dsqlClient = DsqlClient.create();
+ * DsqlUtilities utilities = DsqlClient.utilities();
* }
*
*
@@ -41,7 +41,7 @@
*
* @snippet :
* {@code
- * AxdbFrontendUtilities utilities = AxdbFrontendUtilities.builder()
+ * DsqlUtilities utilities = DsqlUtilities.builder()
* .credentialsProvider(DefaultCredentialsProvider.create())
* .region(Region.US_WEST_2)
* .build()
@@ -50,52 +50,75 @@
* Note: This class does not make network calls.
*/
@SdkPublicApi
-public interface AxdbFrontendUtilities {
+public interface DsqlUtilities {
/**
- * Create a builder that can be used to configure and create a {@link AxdbFrontendUtilities}.
+ * Create a builder that can be used to configure and create a {@link DsqlUtilities}.
*/
static Builder builder() {
- return new DefaultAxdbFrontendUtilities.DefaultBuilder();
+ return new DefaultDsqlUtilities.DefaultBuilder();
}
/**
- * Generates an authentication token for IAM authentication to an AxdbFrontend database.
+ * Generates an authentication token for IAM authentication to an DSQL database.
*
* @param request The request used to generate the authentication token
- * @return String to use as the AxdbFrontend authentication token
+ * @return String to use as the DSQL authentication token
* @throws IllegalArgumentException if the required parameters are not valid
*/
- default String generateAuthenticationToken(Consumer request) {
- return generateAuthenticationToken(GenerateAuthenticationTokenRequest.builder().applyMutation(request).build());
+ default String generateDbConnectAuthToken(Consumer request) {
+ return generateDbConnectAuthToken(GenerateAuthTokenRequest.builder().applyMutation(request).build());
}
/**
- * Generates an authentication token for IAM authentication to an AxdbFrontend database.
+ * Generates an authentication token for IAM authentication to an DSQL database.
*
* @param request The request used to generate the authentication token
- * @return String to use as the AxdbFrontend authentication token
+ * @return String to use as the DSQL authentication token
* @throws IllegalArgumentException if the required parameters are not valid
*/
- default String generateAuthenticationToken(GenerateAuthenticationTokenRequest request) {
+ default String generateDbConnectAuthToken(GenerateAuthTokenRequest request) {
throw new UnsupportedOperationException();
}
/**
- * Builder for creating an instance of {@link AxdbFrontendUtilities}. It can be configured using
- * {@link AxdbFrontendUtilities#builder()}.
- * Once configured, the {@link AxdbFrontendUtilities} can created using {@link #build()}.
+ * Generates an admin authentication token for IAM authentication to an DSQL database.
+ *
+ * @param request The request used to generate the admin authentication token
+ * @return String to use as the DSQL authentication token
+ * @throws IllegalArgumentException if the required parameters are not valid
+ */
+ default String generateDbConnectAdminAuthToken(Consumer request) {
+ return generateDbConnectAuthToken(GenerateAuthTokenRequest.builder().applyMutation(request).build());
+ }
+
+ /**
+ * Generates an admin authentication token for IAM authentication to an DSQL database.
+ *
+ * @param request The request used to generate the admin authentication token
+ * @return String to use as the DSQL authentication token
+ * @throws IllegalArgumentException if the required parameters are not valid
+ */
+ default String generateDbConnectAdminAuthToken(GenerateAuthTokenRequest request) {
+ throw new UnsupportedOperationException();
+ }
+
+
+ /**
+ * Builder for creating an instance of {@link DsqlUtilities}. It can be configured using
+ * {@link DsqlUtilities#builder()}.
+ * Once configured, the {@link DsqlUtilities} can created using {@link #build()}.
*/
@SdkPublicApi
interface Builder {
/**
- * The default region to use when working with the methods in {@link AxdbFrontendUtilities} class.
+ * The default region to use when working with the methods in {@link DsqlUtilities} class.
*
* @return This object for method chaining
*/
Builder region(Region region);
/**
- * The default credentials provider to use when working with the methods in {@link AxdbFrontendUtilities} class.
+ * The default credentials provider to use when working with the methods in {@link DsqlUtilities} class.
*
* @return This object for method chaining
*/
@@ -104,7 +127,7 @@ default Builder credentialsProvider(AwsCredentialsProvider credentialsProvider)
}
/**
- * The default credentials provider to use when working with the methods in {@link AxdbFrontendUtilities} class.
+ * The default credentials provider to use when working with the methods in {@link DsqlUtilities} class.
*
* @return This object for method chaining
*/
@@ -113,8 +136,8 @@ default Builder credentialsProvider(IdentityProvider extends AwsCredentialsIde
}
/**
- * Create a {@link AxdbFrontendUtilities}
+ * Create a {@link DsqlUtilities}
*/
- AxdbFrontendUtilities build();
+ DsqlUtilities build();
}
}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/model/GenerateAuthTokenRequest.java
similarity index 74%
rename from services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java
rename to services/dsql/src/main/java/software/amazon/awssdk/services/dsql/model/GenerateAuthTokenRequest.java
index 7f12c2813ad9..921f2be84ed1 100644
--- a/services/axdbfrontend/src/main/java/software/amazon/awssdk/services/axdbfrontend/model/GenerateAuthenticationTokenRequest.java
+++ b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/model/GenerateAuthTokenRequest.java
@@ -13,7 +13,7 @@
* permissions and limitations under the License.
*/
-package software.amazon.awssdk.services.axdbfrontend.model;
+package software.amazon.awssdk.services.dsql.model;
import java.time.Duration;
import java.util.Objects;
@@ -24,8 +24,7 @@
import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
import software.amazon.awssdk.identity.spi.IdentityProvider;
import software.amazon.awssdk.regions.Region;
-import software.amazon.awssdk.services.axdbfrontend.AxdbFrontendUtilities;
-import software.amazon.awssdk.services.axdbfrontend.model.Action;
+import software.amazon.awssdk.services.dsql.DsqlUtilities;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.Validate;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
@@ -33,25 +32,22 @@
/**
- * Input parameters for generating an authentication token for IAM database authentication for AxdbFrontend.
+ * Input parameters for generating an authentication token for IAM database authentication for DSQL.
*/
@SdkPublicApi
-public final class GenerateAuthenticationTokenRequest implements
- ToCopyableBuilder {
+public final class GenerateAuthTokenRequest implements
+ ToCopyableBuilder {
// The time the IAM token is good for based on RDS. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html
private static final Duration EXPIRATION_DURATION = Duration.ofSeconds(900L);
private final String hostname;
private final Region region;
- private final Action action;
private final Duration expiresIn;
private final IdentityProvider extends AwsCredentialsIdentity> credentialsProvider;
- private GenerateAuthenticationTokenRequest(BuilderImpl builder) {
+ private GenerateAuthTokenRequest(BuilderImpl builder) {
this.hostname = Validate.notEmpty(builder.hostname, "hostname");
- this.action = Validate.notNull(builder.action, "action");
- Validate.isTrue(this.action == Action.DB_CONNECT || this.action == Action.DB_CONNECT_SUPERUSER, "invalid action");
this.region = builder.region;
this.credentialsProvider = builder.credentialsProvider;
this.expiresIn = (builder.expiresIn != null) ? builder.expiresIn :
@@ -60,10 +56,9 @@ private GenerateAuthenticationTokenRequest(BuilderImpl builder) {
@Override
public String toString() {
- return ToString.builder("GenerateAuthenticationTokenRequest")
+ return ToString.builder("GenerateAuthTokenRequest")
.add("hostname", hostname)
.add("region", region)
- .add("action", action)
.add("expiresIn", expiresIn)
.add("credentialsProvider", credentialsProvider)
.build();
@@ -77,10 +72,9 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- GenerateAuthenticationTokenRequest that = (GenerateAuthenticationTokenRequest) o;
+ GenerateAuthTokenRequest that = (GenerateAuthTokenRequest) o;
return Objects.equals(hostname, that.hostname) &&
Objects.equals(region, that.region) &&
- Objects.equals(action, that.action) &&
Objects.equals(expiresIn, that.expiresIn) &&
Objects.equals(credentialsProvider, that.credentialsProvider);
}
@@ -90,7 +84,6 @@ public int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(hostname);
hashCode = 31 * hashCode + Objects.hashCode(region);
- hashCode = 31 * hashCode + Objects.hashCode(action);
hashCode = 31 * hashCode + Objects.hashCode(expiresIn);
hashCode = 31 * hashCode + Objects.hashCode(credentialsProvider);
return hashCode;
@@ -110,17 +103,9 @@ public Duration expiresIn() {
return expiresIn;
}
- /**
- * @return The action to perform on the database
- * {@link Action.Action}
- */
- public Action action() {
- return action;
- }
-
/**
* @return The region the database is hosted in. If specified, takes precedence over the value specified in
- * {@link AxdbFrontendUtilities.Builder#region(Region)}
+ * {@link DsqlUtilities.Builder#region(Region)}
*/
public Region region() {
return region;
@@ -128,7 +113,7 @@ public Region region() {
/**
* @return The credentials provider to sign the IAM auth request with. If specified, takes precedence over the value
- * specified in {@link AxdbFrontendUtilities.Builder#credentialsProvider}}
+ * specified in {@link DsqlUtilities.Builder#credentialsProvider}}
*/
public AwsCredentialsProvider credentialsProvider() {
return CredentialUtils.toCredentialsProvider(credentialsProvider);
@@ -136,7 +121,7 @@ public AwsCredentialsProvider credentialsProvider() {
/**
* @return The credentials provider to sign the IAM auth request with. If specified, takes precedence over the value
- * specified in {@link AxdbFrontendUtilities.Builder#credentialsProvider(AwsCredentialsProvider)}}
+ * specified in {@link DsqlUtilities.Builder#credentialsProvider(AwsCredentialsProvider)}}
*/
public IdentityProvider extends AwsCredentialsIdentity> credentialsIdentityProvider() {
return credentialsProvider;
@@ -148,18 +133,18 @@ public Builder toBuilder() {
}
/**
- * Creates a builder for {@link AxdbFrontendUtilities}.
+ * Creates a builder for {@link DsqlUtilities}.
*/
public static Builder builder() {
return new BuilderImpl();
}
/**
- * A builder for a {@link GenerateAuthenticationTokenRequest}, created with {@link #builder()}.
+ * A builder for a {@link GenerateAuthTokenRequest}, created with {@link #builder()}.
*/
@SdkPublicApi
@NotThreadSafe
- public interface Builder extends CopyableBuilder {
+ public interface Builder extends CopyableBuilder {
/**
* The hostname of the database to connect to
*
@@ -167,16 +152,9 @@ public interface Builder extends CopyableBuilder credentialsProvider;
@@ -223,9 +200,8 @@ private static final class BuilderImpl implements Builder {
private BuilderImpl() {
}
- private BuilderImpl(GenerateAuthenticationTokenRequest request) {
+ private BuilderImpl(GenerateAuthTokenRequest request) {
this.hostname = request.hostname;
- this.action = request.action;
this.region = request.region;
this.expiresIn = request.expiresIn;
this.credentialsProvider = request.credentialsProvider;
@@ -243,12 +219,6 @@ public Builder expiresIn(Duration expiresIn) {
return this;
}
- @Override
- public Builder action(Action action) {
- this.action = action;
- return this;
- }
-
@Override
public Builder region(Region region) {
this.region = region;
@@ -262,8 +232,8 @@ public Builder credentialsProvider(IdentityProvider extends AwsCredentialsIden
}
@Override
- public GenerateAuthenticationTokenRequest build() {
- return new GenerateAuthenticationTokenRequest(this);
+ public GenerateAuthTokenRequest build() {
+ return new GenerateAuthTokenRequest(this);
}
}
}
\ No newline at end of file
diff --git a/services/dsql/src/main/resources/codegen-resources/customization.config b/services/dsql/src/main/resources/codegen-resources/customization.config
new file mode 100644
index 000000000000..a63c69ef3dd5
--- /dev/null
+++ b/services/dsql/src/main/resources/codegen-resources/customization.config
@@ -0,0 +1,9 @@
+{
+ "utilitiesMethod": {
+ "returnType": "software.amazon.awssdk.services.dsql.DsqlUtilities",
+ "instanceType": "software.amazon.awssdk.services.dsql.DefaultDsqlUtilities",
+ "createMethodParams": [
+ "clientConfiguration"
+ ]
+ }
+}
diff --git a/services/dsql/src/test/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilitiesTest.java b/services/dsql/src/test/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilitiesTest.java
new file mode 100644
index 000000000000..1e7fc57d54e3
--- /dev/null
+++ b/services/dsql/src/test/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilitiesTest.java
@@ -0,0 +1,213 @@
+/*
+ * 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.
+ * 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 software.amazon.awssdk.services.dsql;
+
+import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
+
+import java.time.Clock;
+import java.time.Duration;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.util.function.Consumer;
+import org.junit.jupiter.api.Test;
+import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
+import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
+import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
+import software.amazon.awssdk.identity.spi.AwsCredentialsIdentity;
+import software.amazon.awssdk.identity.spi.IdentityProvider;
+import software.amazon.awssdk.regions.Region;
+import software.amazon.awssdk.services.dsql.DefaultDsqlUtilities.DefaultBuilder;
+import software.amazon.awssdk.services.dsql.model.GenerateAuthTokenRequest;
+
+public class DefaultDsqlUtilitiesTest {
+ private final ZoneId utcZone = ZoneId.of("UTC").normalized();
+ private final Clock fixedClock = Clock.fixed(ZonedDateTime.of(2024, 11, 7, 17, 39, 33, 0, utcZone).toInstant(), utcZone);
+ private static final String HOSTNAME = "test.dsql.us-east-1.on.aws";
+ private static final String EXPECTED_TOKEN = "test.dsql.us-east-1.on.aws/?Action=DbConnect&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date"
+ + "=20241107T173933Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=access_key"
+ + "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=e319d85380261f643d78a558f76257f05aacea758a6ccd42a2510e2ae0854a47";
+ private static final String EXPECTED_ADMIN_TOKEN = "test.dsql.us-east-1.on.aws/?Action=DbConnect&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date="
+ + "20241107T173933Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=access_key"
+ + "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=e319d85380261f643d78a558f76257f05aacea758a6ccd42a2510e2ae0854a47";
+
+ @Test
+ public void tokenGenerationWithBuilderDefaultsUsingAwsCredentialsProvider_isSuccessful() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key"));
+
+ DsqlUtilities.Builder builder = DsqlUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+
+ tokenGenerationWithBuilderDefaults(builder);
+ }
+
+ @Test
+ public void tokenGenerationWithBuilderDefaultsUsingIdentityProvider_isSuccessful() {
+ IdentityProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key"));
+
+ DsqlUtilities.Builder utilitiesBuilder = DsqlUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+
+ tokenGenerationWithBuilderDefaults(utilitiesBuilder);
+ }
+
+ private void tokenGenerationWithBuilderDefaults(DsqlUtilities.Builder builder) {
+ DsqlUtilities dsqlUtilities = new DefaultDsqlUtilities((DefaultBuilder) builder, fixedClock);
+
+ String authToken = dsqlUtilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME));
+ assertThat(authToken).isEqualTo(EXPECTED_TOKEN);
+
+ String adminAuthToken = dsqlUtilities.generateDbConnectAdminAuthToken(b -> b.hostname(HOSTNAME));
+ assertThat(adminAuthToken).isEqualTo(EXPECTED_ADMIN_TOKEN);
+ }
+
+ @Test
+ public void tokenGenerationWithOverriddenCredentialsUsingAwsCredentialsProvider_isSuccessful() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("foo", "bar"));
+
+ DsqlUtilities.Builder builder = DsqlUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+
+ tokenGenerationWithOverriddenCredentials(builder, b -> b.credentialsProvider(StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key"))));
+ }
+
+ @Test
+ public void tokenGenerationWithOverriddenCredentialsUsingIdentityProvider_isSuccessful() {
+ IdentityProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("foo", "bar"));
+
+ DsqlUtilities.Builder builder = DsqlUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+
+ tokenGenerationWithOverriddenCredentials(builder, b -> b.credentialsProvider(
+ (IdentityProvider) StaticCredentialsProvider.create(AwsBasicCredentials.create("access_key", "secret_key"))));
+ }
+
+ private void tokenGenerationWithOverriddenCredentials(DsqlUtilities.Builder builder,
+ Consumer credsBuilder) {
+ DsqlUtilities dsqlUtilities = new DefaultDsqlUtilities((DefaultBuilder) builder, fixedClock);
+
+ String authToken = dsqlUtilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME).applyMutation(credsBuilder));
+ assertThat(authToken).isEqualTo(EXPECTED_TOKEN);
+
+ String adminAuthToken = dsqlUtilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME).applyMutation(credsBuilder));
+ assertThat(adminAuthToken).isEqualTo(EXPECTED_ADMIN_TOKEN);
+ }
+
+ @Test
+ public void tokenGenerationWithOverriddenRegion_isSuccessful() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key"));
+
+ DsqlUtilities.Builder builder = DsqlUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_WEST_2);
+
+ DsqlUtilities utilities = new DefaultDsqlUtilities((DefaultBuilder) builder, fixedClock);
+
+ String authToken = utilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME).region(Region.US_EAST_1));
+ assertThat(authToken).isEqualTo(EXPECTED_TOKEN);
+
+ String adminAuthToken = utilities.generateDbConnectAdminAuthToken(b -> b.hostname(HOSTNAME).region(Region.US_EAST_1));
+ assertThat(adminAuthToken).isEqualTo(EXPECTED_ADMIN_TOKEN);
+ }
+
+ @Test
+ public void missingRegion_throwsException() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key"));
+
+ DsqlUtilities.Builder builder = DsqlUtilities.builder()
+ .credentialsProvider(credentialsProvider);
+
+ DsqlUtilities utilities = new DefaultDsqlUtilities((DefaultBuilder) builder, fixedClock);
+
+ assertThatThrownBy(() -> utilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME)))
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasMessageContaining("Region must be provided in GenerateAuthTokenRequest or DsqlUtilities");
+
+ assertThatThrownBy(() -> utilities.generateDbConnectAdminAuthToken(b -> b.hostname(HOSTNAME)))
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasMessageContaining("Region must be provided in GenerateAuthTokenRequest or DsqlUtilities");
+ }
+
+ @Test
+ public void missingCredentials_throwsException() {
+ DsqlUtilities.Builder builder = DsqlUtilities.builder()
+ .region(Region.US_WEST_2);
+
+ DsqlUtilities utilities = new DefaultDsqlUtilities((DefaultBuilder) builder, fixedClock);
+
+ assertThatThrownBy(() -> utilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME)))
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasMessageContaining("CredentialsProvider must be provided in GenerateAuthTokenRequest or DsqlUtilities");
+
+ assertThatThrownBy(() -> utilities.generateDbConnectAdminAuthToken(b -> b.hostname(HOSTNAME)))
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasMessageContaining("CredentialsProvider must be provided in GenerateAuthTokenRequest or DsqlUtilities");
+ }
+
+ @Test
+ public void missingHostname_throwsException() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key"));
+
+ DsqlUtilities.Builder builder = DsqlUtilities.builder()
+ .credentialsProvider(credentialsProvider);
+
+ DsqlUtilities utilities = new DefaultDsqlUtilities((DefaultBuilder) builder, fixedClock);
+
+ assertThatThrownBy(() -> utilities.generateDbConnectAuthToken(GenerateAuthTokenRequest.builder().build()))
+ .isInstanceOf(NullPointerException.class)
+ .hasMessageContaining("hostname");
+
+ assertThatThrownBy(() -> utilities.generateDbConnectAdminAuthToken(GenerateAuthTokenRequest.builder().build()))
+ .isInstanceOf(NullPointerException.class)
+ .hasMessageContaining("hostname");
+ }
+
+ @Test
+ public void tokenGenerationWithCustomExpiry_isSuccessful() {
+ AwsCredentialsProvider credentialsProvider = StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("access_key", "secret_key"));
+
+ DsqlUtilities.Builder builder = DsqlUtilities.builder()
+ .credentialsProvider(credentialsProvider)
+ .region(Region.US_EAST_1);
+
+ DsqlUtilities utilities = new DefaultDsqlUtilities((DefaultBuilder) builder, fixedClock);
+ Duration expiry = Duration.ofSeconds(3600L);
+
+ String authToken = utilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME).expiresIn(expiry));
+ String expectedToken = "test.dsql.us-east-1.on.aws/?Action=DbConnect&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date="
+ + "20241107T173933Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=access_key"
+ + "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=63987ab6908fe81bfcaa5a5120444a8d012751992bcdfec351522db555232c51";
+ assertThat(authToken).isEqualTo(expectedToken);
+
+ String adminAuthToken = utilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME).expiresIn(expiry));
+ String expectedAdminToken = "test.dsql.us-east-1.on.aws/?Action=DbConnect&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date="
+ + "20241107T173933Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=access_key"
+ + "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=63987ab6908fe81bfcaa5a5120444a8d012751992bcdfec351522db555232c51";
+ assertThat(adminAuthToken).isEqualTo(expectedAdminToken);
+ }
+}
\ No newline at end of file
diff --git a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/GenerateAuthenticationTokenRequestTest.java b/services/dsql/src/test/java/software/amazon/awssdk/services/dsql/GenerateAuthTokenRequestTest.java
similarity index 67%
rename from services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/GenerateAuthenticationTokenRequestTest.java
rename to services/dsql/src/test/java/software/amazon/awssdk/services/dsql/GenerateAuthTokenRequestTest.java
index 57d4ea55705a..9dc1c2825cb6 100644
--- a/services/axdbfrontend/src/test/java/software/amazon/awssdk/services/axdbfrontend/GenerateAuthenticationTokenRequestTest.java
+++ b/services/dsql/src/test/java/software/amazon/awssdk/services/dsql/GenerateAuthTokenRequestTest.java
@@ -12,17 +12,18 @@
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
-package software.amazon.awssdk.services.axdbfrontend;
+package software.amazon.awssdk.services.dsql;
import nl.jqno.equalsverifier.EqualsVerifier;
import org.junit.jupiter.api.Test;
-import software.amazon.awssdk.services.axdbfrontend.model.GenerateAuthenticationTokenRequest;
+import software.amazon.awssdk.services.dsql.model.GenerateAuthTokenRequest;
+
+public class GenerateAuthTokenRequestTest {
-public class GenerateAuthenticationTokenRequestTest {
@Test
void equalsHashcode() {
- EqualsVerifier.forClass(GenerateAuthenticationTokenRequest.class)
- .withNonnullFields("hostname", "region", "action")
+ EqualsVerifier.forClass(GenerateAuthTokenRequest.class)
+ .withNonnullFields("hostname", "region")
.verify();
}
}
\ No newline at end of file
diff --git a/services/pom.xml b/services/pom.xml
index 662af7786581..0ae0e5938fdc 100644
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -406,7 +406,6 @@
apptest
qapps
ssmquicksetup
- axdbfrontend
dsql
The AWS Java SDK services
From 01cc7b535e8887eaa31ed5a1f156f7a5d7d3a0f2 Mon Sep 17 00:00:00 2001
From: hdavidh
Date: Mon, 11 Nov 2024 10:54:34 -0800
Subject: [PATCH 19/20] Update error msg
---
.../amazon/awssdk/services/dsql/DefaultDsqlUtilities.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilities.java b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilities.java
index c1f69c7a66be..bc74fde337ea 100644
--- a/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilities.java
+++ b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilities.java
@@ -128,7 +128,7 @@ private AwsCredentials resolveCredentials(GenerateAuthTokenRequest request) {
return CredentialUtils.toCredentials(CompletableFutureUtils.joinLikeSync(this.credentialsProvider.resolveIdentity()));
}
- throw new IllegalArgumentException("CredentialProvider must be provided in GenerateAuthTokenRequest or DsqlUtilities");
+ throw new IllegalArgumentException("CredentialsProvider must be provided in GenerateAuthTokenRequest or DsqlUtilities");
}
@SdkInternalApi
From 76d2c0e905052ab2ce86e1dcf6b1fcf0952370a8 Mon Sep 17 00:00:00 2001
From: hdavidh
Date: Thu, 14 Nov 2024 21:41:18 -0800
Subject: [PATCH 20/20] Fix generateDbConnectAdminAuthToken
---
.../amazon/awssdk/services/dsql/DsqlUtilities.java | 2 +-
.../services/dsql/DefaultDsqlUtilitiesTest.java | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DsqlUtilities.java b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DsqlUtilities.java
index d92ac243a828..95d3875dec20 100644
--- a/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DsqlUtilities.java
+++ b/services/dsql/src/main/java/software/amazon/awssdk/services/dsql/DsqlUtilities.java
@@ -88,7 +88,7 @@ default String generateDbConnectAuthToken(GenerateAuthTokenRequest request) {
* @throws IllegalArgumentException if the required parameters are not valid
*/
default String generateDbConnectAdminAuthToken(Consumer request) {
- return generateDbConnectAuthToken(GenerateAuthTokenRequest.builder().applyMutation(request).build());
+ return generateDbConnectAdminAuthToken(GenerateAuthTokenRequest.builder().applyMutation(request).build());
}
/**
diff --git a/services/dsql/src/test/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilitiesTest.java b/services/dsql/src/test/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilitiesTest.java
index 1e7fc57d54e3..db953c6061c1 100644
--- a/services/dsql/src/test/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilitiesTest.java
+++ b/services/dsql/src/test/java/software/amazon/awssdk/services/dsql/DefaultDsqlUtilitiesTest.java
@@ -39,9 +39,9 @@ public class DefaultDsqlUtilitiesTest {
private static final String EXPECTED_TOKEN = "test.dsql.us-east-1.on.aws/?Action=DbConnect&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date"
+ "=20241107T173933Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=access_key"
+ "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=e319d85380261f643d78a558f76257f05aacea758a6ccd42a2510e2ae0854a47";
- private static final String EXPECTED_ADMIN_TOKEN = "test.dsql.us-east-1.on.aws/?Action=DbConnect&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date="
- + "20241107T173933Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=access_key"
- + "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=e319d85380261f643d78a558f76257f05aacea758a6ccd42a2510e2ae0854a47";
+ private static final String EXPECTED_ADMIN_TOKEN = "test.dsql.us-east-1.on.aws/?Action=DbConnectAdmin&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date"
+ + "=20241107T173933Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=access_key"
+ + "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=a08adc4c84a490014ce374b90c98ba9ed015b77b451c0d9f9fb3f8ca8c6f9c36";
@Test
public void tokenGenerationWithBuilderDefaultsUsingAwsCredentialsProvider_isSuccessful() {
@@ -110,7 +110,7 @@ private void tokenGenerationWithOverriddenCredentials(DsqlUtilities.Builder buil
String authToken = dsqlUtilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME).applyMutation(credsBuilder));
assertThat(authToken).isEqualTo(EXPECTED_TOKEN);
- String adminAuthToken = dsqlUtilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME).applyMutation(credsBuilder));
+ String adminAuthToken = dsqlUtilities.generateDbConnectAdminAuthToken(b -> b.hostname(HOSTNAME).applyMutation(credsBuilder));
assertThat(adminAuthToken).isEqualTo(EXPECTED_ADMIN_TOKEN);
}
@@ -204,10 +204,10 @@ public void tokenGenerationWithCustomExpiry_isSuccessful() {
+ "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=63987ab6908fe81bfcaa5a5120444a8d012751992bcdfec351522db555232c51";
assertThat(authToken).isEqualTo(expectedToken);
- String adminAuthToken = utilities.generateDbConnectAuthToken(b -> b.hostname(HOSTNAME).expiresIn(expiry));
- String expectedAdminToken = "test.dsql.us-east-1.on.aws/?Action=DbConnect&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date="
+ String adminAuthToken = utilities.generateDbConnectAdminAuthToken(b -> b.hostname(HOSTNAME).expiresIn(expiry));
+ String expectedAdminToken = "test.dsql.us-east-1.on.aws/?Action=DbConnectAdmin&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date="
+ "20241107T173933Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Credential=access_key"
- + "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=63987ab6908fe81bfcaa5a5120444a8d012751992bcdfec351522db555232c51";
+ + "%2F20241107%2Fus-east-1%2Fdsql%2Faws4_request&X-Amz-Signature=46e02dfc8d6d07289b9e5910ccd9a50f1c3b798e48ccd92153255df508bd0b82";
assertThat(adminAuthToken).isEqualTo(expectedAdminToken);
}
}
\ No newline at end of file