From 4f9715e2a14dd18325d870c860e8b38d207097bc Mon Sep 17 00:00:00 2001 From: awstools Date: Mon, 23 Oct 2023 18:15:38 +0000 Subject: [PATCH] feat(client-redshift-serverless): This release adds support for customers to see the patch version and workgroup version in Amazon Redshift Serverless. --- .../src/commands/CreateWorkgroupCommand.ts | 2 + .../src/commands/DeleteWorkgroupCommand.ts | 2 + .../src/commands/GetWorkgroupCommand.ts | 2 + .../src/commands/ListWorkgroupsCommand.ts | 2 + .../src/commands/UpdateWorkgroupCommand.ts | 2 + .../src/endpoint/ruleset.ts | 44 +++++++-------- .../src/models/models_0.ts | 15 +++++- .../src/protocols/Aws_json1_1.ts | 2 + .../aws-models/redshift-serverless.json | 54 +++++++++++-------- 9 files changed, 82 insertions(+), 43 deletions(-) diff --git a/clients/client-redshift-serverless/src/commands/CreateWorkgroupCommand.ts b/clients/client-redshift-serverless/src/commands/CreateWorkgroupCommand.ts index 5fdaa24012af..66d339eb21b5 100644 --- a/clients/client-redshift-serverless/src/commands/CreateWorkgroupCommand.ts +++ b/clients/client-redshift-serverless/src/commands/CreateWorkgroupCommand.ts @@ -118,6 +118,8 @@ export interface CreateWorkgroupCommandOutput extends CreateWorkgroupResponse, _ * // publiclyAccessible: true || false, * // creationDate: new Date("TIMESTAMP"), * // port: Number("int"), + * // workgroupVersion: "STRING_VALUE", + * // patchVersion: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-redshift-serverless/src/commands/DeleteWorkgroupCommand.ts b/clients/client-redshift-serverless/src/commands/DeleteWorkgroupCommand.ts index 5327fe57a649..267a893043c6 100644 --- a/clients/client-redshift-serverless/src/commands/DeleteWorkgroupCommand.ts +++ b/clients/client-redshift-serverless/src/commands/DeleteWorkgroupCommand.ts @@ -95,6 +95,8 @@ export interface DeleteWorkgroupCommandOutput extends DeleteWorkgroupResponse, _ * // publiclyAccessible: true || false, * // creationDate: new Date("TIMESTAMP"), * // port: Number("int"), + * // workgroupVersion: "STRING_VALUE", + * // patchVersion: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-redshift-serverless/src/commands/GetWorkgroupCommand.ts b/clients/client-redshift-serverless/src/commands/GetWorkgroupCommand.ts index dae485d4a962..d9ba581fdbb3 100644 --- a/clients/client-redshift-serverless/src/commands/GetWorkgroupCommand.ts +++ b/clients/client-redshift-serverless/src/commands/GetWorkgroupCommand.ts @@ -95,6 +95,8 @@ export interface GetWorkgroupCommandOutput extends GetWorkgroupResponse, __Metad * // publiclyAccessible: true || false, * // creationDate: new Date("TIMESTAMP"), * // port: Number("int"), + * // workgroupVersion: "STRING_VALUE", + * // patchVersion: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-redshift-serverless/src/commands/ListWorkgroupsCommand.ts b/clients/client-redshift-serverless/src/commands/ListWorkgroupsCommand.ts index fb623133e5de..c44c5d733faf 100644 --- a/clients/client-redshift-serverless/src/commands/ListWorkgroupsCommand.ts +++ b/clients/client-redshift-serverless/src/commands/ListWorkgroupsCommand.ts @@ -98,6 +98,8 @@ export interface ListWorkgroupsCommandOutput extends ListWorkgroupsResponse, __M * // publiclyAccessible: true || false, * // creationDate: new Date("TIMESTAMP"), * // port: Number("int"), + * // workgroupVersion: "STRING_VALUE", + * // patchVersion: "STRING_VALUE", * // }, * // ], * // }; diff --git a/clients/client-redshift-serverless/src/commands/UpdateWorkgroupCommand.ts b/clients/client-redshift-serverless/src/commands/UpdateWorkgroupCommand.ts index f6b3aa76d69e..cbbb472fb916 100644 --- a/clients/client-redshift-serverless/src/commands/UpdateWorkgroupCommand.ts +++ b/clients/client-redshift-serverless/src/commands/UpdateWorkgroupCommand.ts @@ -112,6 +112,8 @@ export interface UpdateWorkgroupCommandOutput extends UpdateWorkgroupResponse, _ * // publiclyAccessible: true || false, * // creationDate: new Date("TIMESTAMP"), * // port: Number("int"), + * // workgroupVersion: "STRING_VALUE", + * // patchVersion: "STRING_VALUE", * // }, * // }; * diff --git a/clients/client-redshift-serverless/src/endpoint/ruleset.ts b/clients/client-redshift-serverless/src/endpoint/ruleset.ts index 23987c0212ac..3c2bfcb532e0 100644 --- a/clients/client-redshift-serverless/src/endpoint/ruleset.ts +++ b/clients/client-redshift-serverless/src/endpoint/ruleset.ts @@ -6,25 +6,27 @@ import { RuleSetObject } from "@smithy/types"; or see "smithy.rules#endpointRuleSet" in codegen/sdk-codegen/aws-models/redshift-serverless.json */ -const q="required", -r="fn", -s="argv", -t="ref"; -const a="isSet", -b="tree", -c="error", -d="endpoint", -e="PartitionResult", -f={[q]:false,"type":"String"}, -g={[q]:true,"default":false,"type":"Boolean"}, -h={[t]:"Endpoint"}, -i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]}, -j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]}, -k={}, -l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]}, -m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]}, -n=[i], -o=[j], -p=[{[t]:"Region"}]; -const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://redshift-serverless-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://redshift-serverless-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://redshift-serverless.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://redshift-serverless.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}; +const s="required", +t="fn", +u="argv", +v="ref"; +const a=true, +b="isSet", +c="booleanEquals", +d="error", +e="endpoint", +f="tree", +g="PartitionResult", +h={[s]:false,"type":"String"}, +i={[s]:true,"default":false,"type":"Boolean"}, +j={[v]:"Endpoint"}, +k={[t]:c,[u]:[{[v]:"UseFIPS"},true]}, +l={[t]:c,[u]:[{[v]:"UseDualStack"},true]}, +m={}, +n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]}, +o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]}, +p=[k], +q=[l], +r=[{[v]:"Region"}]; +const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f},{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{endpoint:{url:"https://redshift-serverless-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{endpoint:{url:"https://redshift-serverless-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{endpoint:{url:"https://redshift-serverless.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://redshift-serverless.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]}; export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-redshift-serverless/src/models/models_0.ts b/clients/client-redshift-serverless/src/models/models_0.ts index 5abe189991e0..b16a7b3a5bf9 100644 --- a/clients/client-redshift-serverless/src/models/models_0.ts +++ b/clients/client-redshift-serverless/src/models/models_0.ts @@ -1171,6 +1171,19 @@ export interface Workgroup { *

The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.

*/ port?: number; + + /** + * @public + *

The Amazon Redshift Serverless version of your workgroup. For more information about Amazon Redshift Serverless versions, seeCluster versions for Amazon Redshift.

+ */ + workgroupVersion?: string; + + /** + * @public + *

The patch version of your Amazon Redshift Serverless workgroup. For more information about patch versions, see + * Cluster versions for Amazon Redshift.

+ */ + patchVersion?: string; } /** @@ -2242,7 +2255,7 @@ export interface UpdateNamespaceRequest { * @public *

The password of the administrator for the first database created in the namespace. This parameter must be updated together * with adminUsername.

- *

You can't use adminUserPassword if manageAdminPassword is true.

+ *

You can't use adminUserPassword if manageAdminPassword is true.

*/ adminUserPassword?: string; diff --git a/clients/client-redshift-serverless/src/protocols/Aws_json1_1.ts b/clients/client-redshift-serverless/src/protocols/Aws_json1_1.ts index 8b61a15ef57a..43f0e0fcfb6a 100644 --- a/clients/client-redshift-serverless/src/protocols/Aws_json1_1.ts +++ b/clients/client-redshift-serverless/src/protocols/Aws_json1_1.ts @@ -3720,6 +3720,7 @@ const de_Workgroup = (output: any, context: __SerdeContext): Workgroup => { endpoint: _json, enhancedVpcRouting: __expectBoolean, namespaceName: __expectString, + patchVersion: __expectString, port: __expectInt32, publiclyAccessible: __expectBoolean, securityGroupIds: _json, @@ -3728,6 +3729,7 @@ const de_Workgroup = (output: any, context: __SerdeContext): Workgroup => { workgroupArn: __expectString, workgroupId: __expectString, workgroupName: __expectString, + workgroupVersion: __expectString, }) as any; }; diff --git a/codegen/sdk-codegen/aws-models/redshift-serverless.json b/codegen/sdk-codegen/aws-models/redshift-serverless.json index 12f51aae71d3..57ffeb19391d 100644 --- a/codegen/sdk-codegen/aws-models/redshift-serverless.json +++ b/codegen/sdk-codegen/aws-models/redshift-serverless.json @@ -2854,7 +2854,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -2897,7 +2896,8 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [ @@ -2910,7 +2910,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -2924,7 +2923,6 @@ "assign": "PartitionResult" } ], - "type": "tree", "rules": [ { "conditions": [ @@ -2947,7 +2945,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -2982,7 +2979,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [], @@ -2993,14 +2989,16 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [], "error": "FIPS and DualStack are enabled, but this partition does not support one or both", "type": "error" } - ] + ], + "type": "tree" }, { "conditions": [ @@ -3014,14 +3012,12 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ - true, { "fn": "getAttr", "argv": [ @@ -3030,11 +3026,11 @@ }, "supportsFIPS" ] - } + }, + true ] } ], - "type": "tree", "rules": [ { "conditions": [], @@ -3045,14 +3041,16 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [], "error": "FIPS is enabled but this partition does not support FIPS", "type": "error" } - ] + ], + "type": "tree" }, { "conditions": [ @@ -3066,7 +3064,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [ @@ -3086,7 +3083,6 @@ ] } ], - "type": "tree", "rules": [ { "conditions": [], @@ -3097,14 +3093,16 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" }, { "conditions": [], "error": "DualStack is enabled but this partition does not support DualStack", "type": "error" } - ] + ], + "type": "tree" }, { "conditions": [], @@ -3115,9 +3113,11 @@ }, "type": "endpoint" } - ] + ], + "type": "tree" } - ] + ], + "type": "tree" }, { "conditions": [], @@ -4573,7 +4573,7 @@ "adminUserPassword": { "target": "com.amazonaws.redshiftserverless#DbPassword", "traits": { - "smithy.api#documentation": "

The password of the administrator for the first database created in the namespace. This parameter must be updated together\n with adminUsername.

\n

You can't use adminUserPassword if manageAdminPassword is true.

" + "smithy.api#documentation": "

The password of the administrator for the first database created in the namespace. This parameter must be updated together\n with adminUsername.

\n

You can't use adminUserPassword if manageAdminPassword is true.

" } }, "adminUsername": { @@ -5172,6 +5172,18 @@ "traits": { "smithy.api#documentation": "

The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.

" } + }, + "workgroupVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The Amazon Redshift Serverless version of your workgroup. For more information about Amazon Redshift Serverless versions, seeCluster versions for Amazon Redshift.

" + } + }, + "patchVersion": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "

The patch version of your Amazon Redshift Serverless workgroup. For more information about patch versions, see\n Cluster versions for Amazon Redshift.

" + } } }, "traits": {