Skip to content

Commit

Permalink
feat(client-elasticache): Added support to modify the cluster mode co…
Browse files Browse the repository at this point in the history
…nfiguration for the existing ElastiCache ReplicationGroups. Customers can now modify the configuration from cluster mode disabled to cluster mode enabled.
  • Loading branch information
awstools committed May 11, 2023
1 parent 5a9d621 commit 20159f4
Show file tree
Hide file tree
Showing 15 changed files with 627 additions and 1,567 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export interface CompleteMigrationCommandOutput extends CompleteMigrationRespons
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -163,6 +164,7 @@ export interface CompleteMigrationCommandOutput extends CompleteMigrationRespons
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export interface CreateReplicationGroupCommandOutput extends CreateReplicationGr
* NetworkType: "ipv4" || "ipv6" || "dual_stack",
* IpDiscovery: "ipv4" || "ipv6",
* TransitEncryptionMode: "preferred" || "required",
* ClusterMode: "enabled" || "disabled" || "compatible",
* };
* const command = new CreateReplicationGroupCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -191,6 +192,7 @@ export interface CreateReplicationGroupCommandOutput extends CreateReplicationGr
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -266,6 +268,7 @@ export interface CreateReplicationGroupCommandOutput extends CreateReplicationGr
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export interface DecreaseReplicaCountCommandOutput extends DecreaseReplicaCountR
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -181,6 +182,7 @@ export interface DecreaseReplicaCountCommandOutput extends DecreaseReplicaCountR
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export interface DeleteReplicationGroupCommandOutput extends DeleteReplicationGr
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -172,6 +173,7 @@ export interface DeleteReplicationGroupCommandOutput extends DeleteReplicationGr
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export interface DescribeReplicationGroupsCommandOutput extends ReplicationGroup
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -171,6 +172,7 @@ export interface DescribeReplicationGroupsCommandOutput extends ReplicationGroup
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // ],
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ export interface IncreaseReplicaCountCommandOutput extends IncreaseReplicaCountR
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -178,6 +179,7 @@ export interface IncreaseReplicaCountCommandOutput extends IncreaseReplicaCountR
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export interface ModifyReplicationGroupCommandOutput extends ModifyReplicationGr
* IpDiscovery: "ipv4" || "ipv6",
* TransitEncryptionEnabled: true || false,
* TransitEncryptionMode: "preferred" || "required",
* ClusterMode: "enabled" || "disabled" || "compatible",
* };
* const command = new ModifyReplicationGroupCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -152,6 +153,7 @@ export interface ModifyReplicationGroupCommandOutput extends ModifyReplicationGr
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -227,6 +229,7 @@ export interface ModifyReplicationGroupCommandOutput extends ModifyReplicationGr
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export interface ModifyReplicationGroupShardConfigurationCommandOutput
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -188,6 +189,7 @@ export interface ModifyReplicationGroupShardConfigurationCommandOutput
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export interface StartMigrationCommandOutput extends StartMigrationResponse, __M
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -168,6 +169,7 @@ export interface StartMigrationCommandOutput extends StartMigrationResponse, __M
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export interface TestFailoverCommandOutput extends TestFailoverResult, __Metadat
* // ],
* // TransitEncryptionEnabled: true || false,
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // MemberClusters: [ // ClusterIdList
* // "STRING_VALUE",
Expand Down Expand Up @@ -224,6 +225,7 @@ export interface TestFailoverCommandOutput extends TestFailoverResult, __Metadat
* // NetworkType: "ipv4" || "ipv6" || "dual_stack",
* // IpDiscovery: "ipv4" || "ipv6",
* // TransitEncryptionMode: "preferred" || "required",
* // ClusterMode: "enabled" || "disabled" || "compatible",
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
};

export interface EndpointParameters extends __EndpointParameters {
Region: string;
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
Expand Down
42 changes: 21 additions & 21 deletions clients/client-elasticache/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/elasticache.json */

const t="fn",
const s="required",
t="fn",
u="argv",
v="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h="getAttr",
i={"required":true,"default":false,"type":"Boolean"},
j={[v]:"Endpoint"},
k={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]},
l={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]},
m={},
n={[t]:"booleanEquals",[u]:[true,{[t]:h,[u]:[{[v]:d},"supportsFIPS"]}]},
o={[v]:d},
p={[t]:"booleanEquals",[u]:[true,{[t]:h,[u]:[o,"supportsDualStack"]}]},
q={"url":"https://elasticache.{Region}.{PartitionResult#dnsSuffix}","properties":{},"headers":{}},
r=[k],
s=[l];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:i,UseFIPS:i,Endpoint:{required:b,type:c}},rules:[{conditions:[{[t]:"aws.partition",[u]:[{[v]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[t]:"isSet",[u]:[j]}],type:e,rules:[{conditions:r,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:s,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:j,properties:m,headers:m},type:g}]}]},{conditions:[k,l],type:e,rules:[{conditions:[n,p],type:e,rules:[{endpoint:{url:"https://elasticache-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:r,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:h,[u]:[o,"name"]}]}],endpoint:q,type:g},{endpoint:{url:"https://elasticache-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:s,type:e,rules:[{conditions:[p],type:e,rules:[{endpoint:{url:"https://elasticache.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:g}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{endpoint:q,type:g}]}]};
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f="getAttr",
g={[s]:false,"type":"String"},
h={[s]:true,"default":false,"type":"Boolean"},
i={[v]:"Endpoint"},
j={[t]:"booleanEquals",[u]:[{[v]:"UseFIPS"},true]},
k={[t]:"booleanEquals",[u]:[{[v]:"UseDualStack"},true]},
l={},
m={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[{[v]:e},"supportsFIPS"]}]},
n={[v]:e},
o={[t]:"booleanEquals",[u]:[true,{[t]:f,[u]:[n,"supportsDualStack"]}]},
p=[j],
q=[k],
r=[{[v]:"Region"}];
const _data={version:"1.0",parameters:{Region:g,UseDualStack:h,UseFIPS:h,Endpoint:g},rules:[{conditions:[{[t]:a,[u]:[i]}],type:b,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:i,properties:l,headers:l},type:d}]}]},{type:b,rules:[{conditions:[{[t]:a,[u]:r}],type:b,rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:e}],type:b,rules:[{conditions:[j,k],type:b,rules:[{conditions:[m,o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://elasticache-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:p,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{conditions:[{[t]:"stringEquals",[u]:["aws-us-gov",{[t]:f,[u]:[n,"name"]}]}],endpoint:{url:"https://elasticache.{Region}.amazonaws.com",properties:l,headers:l},type:d},{endpoint:{url:"https://elasticache-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:q,type:b,rules:[{conditions:[o],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://elasticache.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://elasticache.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;
Loading

0 comments on commit 20159f4

Please sign in to comment.