Skip to content

Commit

Permalink
feat(client-redshift-serverless): This release adds support for custo…
Browse files Browse the repository at this point in the history
…mers to see the patch version and workgroup version in Amazon Redshift Serverless.
  • Loading branch information
awstools committed Oct 23, 2023
1 parent 6f675cf commit 4f9715e
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 43 deletions.
Expand Up @@ -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",
* // },
* // };
*
Expand Down
Expand Up @@ -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",
* // },
* // };
*
Expand Down
Expand Up @@ -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",
* // },
* // };
*
Expand Down
Expand Up @@ -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",
* // },
* // ],
* // };
Expand Down
Expand Up @@ -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",
* // },
* // };
*
Expand Down
44 changes: 23 additions & 21 deletions clients/client-redshift-serverless/src/endpoint/ruleset.ts
Expand Up @@ -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;
15 changes: 14 additions & 1 deletion clients/client-redshift-serverless/src/models/models_0.ts
Expand Up @@ -1171,6 +1171,19 @@ export interface Workgroup {
* <p>The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.</p>
*/
port?: number;

/**
* @public
* <p>The Amazon Redshift Serverless version of your workgroup. For more information about Amazon Redshift Serverless versions, see<a href="https://docs.aws.amazon.com/redshift/latest/mgmt/cluster-versions.html">Cluster versions for Amazon Redshift</a>.</p>
*/
workgroupVersion?: string;

/**
* @public
* <p>The patch version of your Amazon Redshift Serverless workgroup. For more information about patch versions, see
* <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/cluster-versions.html">Cluster versions for Amazon Redshift</a>.</p>
*/
patchVersion?: string;
}

/**
Expand Down Expand Up @@ -2242,7 +2255,7 @@ export interface UpdateNamespaceRequest {
* @public
* <p>The password of the administrator for the first database created in the namespace. This parameter must be updated together
* with <code>adminUsername</code>.</p>
* <p>You can't use <code>adminUserPassword</code> if <code>manageAdminPassword</code> is true. </p>
* <p>You can't use <code>adminUserPassword</code> if <code>manageAdminPassword</code> is true.</p>
*/
adminUserPassword?: string;

Expand Down
Expand Up @@ -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,
Expand All @@ -3728,6 +3729,7 @@ const de_Workgroup = (output: any, context: __SerdeContext): Workgroup => {
workgroupArn: __expectString,
workgroupId: __expectString,
workgroupName: __expectString,
workgroupVersion: __expectString,
}) as any;
};

Expand Down
54 changes: 33 additions & 21 deletions codegen/sdk-codegen/aws-models/redshift-serverless.json
Expand Up @@ -2854,7 +2854,6 @@
]
}
],
"type": "tree",
"rules": [
{
"conditions": [
Expand Down Expand Up @@ -2897,7 +2896,8 @@
},
"type": "endpoint"
}
]
],
"type": "tree"
},
{
"conditions": [
Expand All @@ -2910,7 +2910,6 @@
]
}
],
"type": "tree",
"rules": [
{
"conditions": [
Expand All @@ -2924,7 +2923,6 @@
"assign": "PartitionResult"
}
],
"type": "tree",
"rules": [
{
"conditions": [
Expand All @@ -2947,7 +2945,6 @@
]
}
],
"type": "tree",
"rules": [
{
"conditions": [
Expand Down Expand Up @@ -2982,7 +2979,6 @@
]
}
],
"type": "tree",
"rules": [
{
"conditions": [],
Expand All @@ -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": [
Expand All @@ -3014,14 +3012,12 @@
]
}
],
"type": "tree",
"rules": [
{
"conditions": [
{
"fn": "booleanEquals",
"argv": [
true,
{
"fn": "getAttr",
"argv": [
Expand All @@ -3030,11 +3026,11 @@
},
"supportsFIPS"
]
}
},
true
]
}
],
"type": "tree",
"rules": [
{
"conditions": [],
Expand All @@ -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": [
Expand All @@ -3066,7 +3064,6 @@
]
}
],
"type": "tree",
"rules": [
{
"conditions": [
Expand All @@ -3086,7 +3083,6 @@
]
}
],
"type": "tree",
"rules": [
{
"conditions": [],
Expand All @@ -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": [],
Expand All @@ -3115,9 +3113,11 @@
},
"type": "endpoint"
}
]
],
"type": "tree"
}
]
],
"type": "tree"
},
{
"conditions": [],
Expand Down Expand Up @@ -4573,7 +4573,7 @@
"adminUserPassword": {
"target": "com.amazonaws.redshiftserverless#DbPassword",
"traits": {
"smithy.api#documentation": "<p>The password of the administrator for the first database created in the namespace. This parameter must be updated together\n with <code>adminUsername</code>.</p>\n <p>You can't use <code>adminUserPassword</code> if <code>manageAdminPassword</code> is true. </p>"
"smithy.api#documentation": "<p>The password of the administrator for the first database created in the namespace. This parameter must be updated together\n with <code>adminUsername</code>.</p>\n <p>You can't use <code>adminUserPassword</code> if <code>manageAdminPassword</code> is true.</p>"
}
},
"adminUsername": {
Expand Down Expand Up @@ -5172,6 +5172,18 @@
"traits": {
"smithy.api#documentation": "<p>The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default is 5439.</p>"
}
},
"workgroupVersion": {
"target": "smithy.api#String",
"traits": {
"smithy.api#documentation": "<p>The Amazon Redshift Serverless version of your workgroup. For more information about Amazon Redshift Serverless versions, see<a href=\"https://docs.aws.amazon.com/redshift/latest/mgmt/cluster-versions.html\">Cluster versions for Amazon Redshift</a>.</p>"
}
},
"patchVersion": {
"target": "smithy.api#String",
"traits": {
"smithy.api#documentation": "<p>The patch version of your Amazon Redshift Serverless workgroup. For more information about patch versions, see\n <a href=\"https://docs.aws.amazon.com/redshift/latest/mgmt/cluster-versions.html\">Cluster versions for Amazon Redshift</a>.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 4f9715e

Please sign in to comment.