Skip to content

Commit 7be3674

Browse files
author
awstools
committed
feat(client-elasticache): AWS ElastiCache SDK now supports using MemcachedUpgradeConfig parameter with ModifyCacheCluster API to enable updating Memcached cache node types. Please refer to updated AWS ElastiCache public documentation for detailed information on API usage and implementation.
1 parent 2c22fc3 commit 7be3674

9 files changed

+143
-46
lines changed

clients/client-elasticache/src/commands/CreateCacheClusterCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ export interface CreateCacheClusterCommandOutput extends CreateCacheClusterResul
143143
* // ],
144144
* // TransitEncryptionEnabled: true || false,
145145
* // TransitEncryptionMode: "preferred" || "required",
146+
* // ScaleConfig: { // ScaleConfig
147+
* // ScalePercentage: Number("int"),
148+
* // ScaleIntervalMinutes: Number("int"),
149+
* // },
146150
* // },
147151
* // NotificationConfiguration: { // NotificationConfiguration
148152
* // TopicArn: "STRING_VALUE",

clients/client-elasticache/src/commands/DeleteCacheClusterCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ export interface DeleteCacheClusterCommandOutput extends DeleteCacheClusterResul
110110
* // ],
111111
* // TransitEncryptionEnabled: true || false,
112112
* // TransitEncryptionMode: "preferred" || "required",
113+
* // ScaleConfig: { // ScaleConfig
114+
* // ScalePercentage: Number("int"),
115+
* // ScaleIntervalMinutes: Number("int"),
116+
* // },
113117
* // },
114118
* // NotificationConfiguration: { // NotificationConfiguration
115119
* // TopicArn: "STRING_VALUE",

clients/client-elasticache/src/commands/DescribeCacheClustersCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ export interface DescribeCacheClustersCommandOutput extends CacheClusterMessage,
103103
* // ],
104104
* // TransitEncryptionEnabled: true || false,
105105
* // TransitEncryptionMode: "preferred" || "required",
106+
* // ScaleConfig: { // ScaleConfig
107+
* // ScalePercentage: Number("int"),
108+
* // ScaleIntervalMinutes: Number("int"),
109+
* // },
106110
* // },
107111
* // NotificationConfiguration: { // NotificationConfiguration
108112
* // TopicArn: "STRING_VALUE",

clients/client-elasticache/src/commands/ModifyCacheClusterCommand.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ export interface ModifyCacheClusterCommandOutput extends ModifyCacheClusterResul
8282
* },
8383
* ],
8484
* IpDiscovery: "ipv4" || "ipv6",
85+
* ScaleConfig: { // ScaleConfig
86+
* ScalePercentage: Number("int"),
87+
* ScaleIntervalMinutes: Number("int"),
88+
* },
8589
* };
8690
* const command = new ModifyCacheClusterCommand(input);
8791
* const response = await client.send(command);
@@ -127,6 +131,10 @@ export interface ModifyCacheClusterCommandOutput extends ModifyCacheClusterResul
127131
* // ],
128132
* // TransitEncryptionEnabled: true || false,
129133
* // TransitEncryptionMode: "preferred" || "required",
134+
* // ScaleConfig: { // ScaleConfig
135+
* // ScalePercentage: Number("int"),
136+
* // ScaleIntervalMinutes: Number("int"),
137+
* // },
130138
* // },
131139
* // NotificationConfiguration: { // NotificationConfiguration
132140
* // TopicArn: "STRING_VALUE",

clients/client-elasticache/src/commands/RebootCacheClusterCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ export interface RebootCacheClusterCommandOutput extends RebootCacheClusterResul
9696
* // ],
9797
* // TransitEncryptionEnabled: true || false,
9898
* // TransitEncryptionMode: "preferred" || "required",
99+
* // ScaleConfig: { // ScaleConfig
100+
* // ScalePercentage: Number("int"),
101+
* // ScaleIntervalMinutes: Number("int"),
102+
* // },
99103
* // },
100104
* // NotificationConfiguration: { // NotificationConfiguration
101105
* // TopicArn: "STRING_VALUE",

clients/client-elasticache/src/commands/RevokeCacheSecurityGroupIngressCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { ElastiCacheClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ElastiCacheClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { RevokeCacheSecurityGroupIngressMessage, RevokeCacheSecurityGroupIngressResult } from "../models/models_0";
9+
import { RevokeCacheSecurityGroupIngressMessage } from "../models/models_0";
10+
import { RevokeCacheSecurityGroupIngressResult } from "../models/models_1";
1011
import {
1112
de_RevokeCacheSecurityGroupIngressCommand,
1213
se_RevokeCacheSecurityGroupIngressCommand,

clients/client-elasticache/src/models/models_0.ts

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3458,6 +3458,24 @@ export interface NotificationConfiguration {
34583458
TopicStatus?: string | undefined;
34593459
}
34603460

3461+
/**
3462+
* <p>Configuration settings for horizontal or vertical scaling operations on Memcached clusters.</p>
3463+
* @public
3464+
*/
3465+
export interface ScaleConfig {
3466+
/**
3467+
* <p>The percentage by which to scale the Memcached cluster, either horizontally by adding nodes or vertically by increasing resources.</p>
3468+
* @public
3469+
*/
3470+
ScalePercentage?: number | undefined;
3471+
3472+
/**
3473+
* <p>The time interval in seconds between scaling operations when performing gradual scaling for a Memcached cluster.</p>
3474+
* @public
3475+
*/
3476+
ScaleIntervalMinutes?: number | undefined;
3477+
}
3478+
34613479
/**
34623480
* <p>A group of settings that are applied to the cluster in the future, or that are
34633481
* currently being applied.</p>
@@ -3515,6 +3533,12 @@ export interface PendingModifiedValues {
35153533
* @public
35163534
*/
35173535
TransitEncryptionMode?: TransitEncryptionMode | undefined;
3536+
3537+
/**
3538+
* <p>The scaling configuration changes that are pending for the Memcached cluster.</p>
3539+
* @public
3540+
*/
3541+
ScaleConfig?: ScaleConfig | undefined;
35183542
}
35193543

35203544
/**
@@ -10653,7 +10677,7 @@ export interface ModifyCacheClusterMessage {
1065310677
ApplyImmediately?: boolean | undefined;
1065410678

1065510679
/**
10656-
* <p>Modifies the engine listed in a cluster message. The options are redis, memcached or valkey.</p>
10680+
* <p>The engine type used by the cache cluster. The options are valkey, memcached or redis.</p>
1065710681
* @public
1065810682
*/
1065910683
Engine?: string | undefined;
@@ -10757,6 +10781,12 @@ export interface ModifyCacheClusterMessage {
1075710781
* @public
1075810782
*/
1075910783
IpDiscovery?: IpDiscovery | undefined;
10784+
10785+
/**
10786+
* <p>Configures horizontal or vertical scaling for Memcached clusters, specifying the scaling percentage and interval.</p>
10787+
* @public
10788+
*/
10789+
ScaleConfig?: ScaleConfig | undefined;
1076010790
}
1076110791

1076210792
/**
@@ -11844,31 +11874,3 @@ export interface RevokeCacheSecurityGroupIngressMessage {
1184411874
*/
1184511875
EC2SecurityGroupOwnerId: string | undefined;
1184611876
}
11847-
11848-
/**
11849-
* @public
11850-
*/
11851-
export interface RevokeCacheSecurityGroupIngressResult {
11852-
/**
11853-
* <p>Represents the output of one of the following operations:</p>
11854-
* <ul>
11855-
* <li>
11856-
* <p>
11857-
* <code>AuthorizeCacheSecurityGroupIngress</code>
11858-
* </p>
11859-
* </li>
11860-
* <li>
11861-
* <p>
11862-
* <code>CreateCacheSecurityGroup</code>
11863-
* </p>
11864-
* </li>
11865-
* <li>
11866-
* <p>
11867-
* <code>RevokeCacheSecurityGroupIngress</code>
11868-
* </p>
11869-
* </li>
11870-
* </ul>
11871-
* @public
11872-
*/
11873-
CacheSecurityGroup?: CacheSecurityGroup | undefined;
11874-
}

clients/client-elasticache/src/models/models_1.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,35 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-cli
33

44
import { ElastiCacheServiceException as __BaseException } from "./ElastiCacheServiceException";
55

6-
import { ReplicationGroup } from "./models_0";
6+
import { CacheSecurityGroup, ReplicationGroup } from "./models_0";
7+
8+
/**
9+
* @public
10+
*/
11+
export interface RevokeCacheSecurityGroupIngressResult {
12+
/**
13+
* <p>Represents the output of one of the following operations:</p>
14+
* <ul>
15+
* <li>
16+
* <p>
17+
* <code>AuthorizeCacheSecurityGroupIngress</code>
18+
* </p>
19+
* </li>
20+
* <li>
21+
* <p>
22+
* <code>CreateCacheSecurityGroup</code>
23+
* </p>
24+
* </li>
25+
* <li>
26+
* <p>
27+
* <code>RevokeCacheSecurityGroupIngress</code>
28+
* </p>
29+
* </li>
30+
* </ul>
31+
* @public
32+
*/
33+
CacheSecurityGroup?: CacheSecurityGroup | undefined;
34+
}
735

836
/**
937
* <p>The targeted replication group is not available. </p>

clients/client-elasticache/src/protocols/Aws_query.ts

Lines changed: 57 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ import {
487487
ReshardingConfiguration,
488488
ReshardingStatus,
489489
RevokeCacheSecurityGroupIngressMessage,
490-
RevokeCacheSecurityGroupIngressResult,
490+
ScaleConfig,
491491
SecurityGroupMembership,
492492
ServerlessCache,
493493
ServerlessCacheAlreadyExistsFault,
@@ -539,6 +539,7 @@ import {
539539
CustomerNodeEndpoint,
540540
NodeGroupNotFoundFault,
541541
ReplicationGroupAlreadyUnderMigrationFault,
542+
RevokeCacheSecurityGroupIngressResult,
542543
StartMigrationMessage,
543544
StartMigrationResponse,
544545
TestFailoverMessage,
@@ -6956,6 +6957,13 @@ const se_ModifyCacheClusterMessage = (input: ModifyCacheClusterMessage, context:
69566957
if (input[_ID] != null) {
69576958
entries[_ID] = input[_ID];
69586959
}
6960+
if (input[_SC] != null) {
6961+
const memberEntries = se_ScaleConfig(input[_SC], context);
6962+
Object.entries(memberEntries).forEach(([key, value]) => {
6963+
const loc = `ScaleConfig.${key}`;
6964+
entries[loc] = value;
6965+
});
6966+
}
69596967
return entries;
69606968
};
69616969

@@ -7803,6 +7811,20 @@ const se_RevokeCacheSecurityGroupIngressMessage = (
78037811
return entries;
78047812
};
78057813

7814+
/**
7815+
* serializeAws_queryScaleConfig
7816+
*/
7817+
const se_ScaleConfig = (input: ScaleConfig, context: __SerdeContext): any => {
7818+
const entries: any = {};
7819+
if (input[_SP] != null) {
7820+
entries[_SP] = input[_SP];
7821+
}
7822+
if (input[_SIM] != null) {
7823+
entries[_SIM] = input[_SIM];
7824+
}
7825+
return entries;
7826+
};
7827+
78067828
/**
78077829
* serializeAws_querySecurityGroupIdsList
78087830
*/
@@ -9084,8 +9106,8 @@ const de_CreateReplicationGroupResult = (output: any, context: __SerdeContext):
90849106
*/
90859107
const de_CreateServerlessCacheResponse = (output: any, context: __SerdeContext): CreateServerlessCacheResponse => {
90869108
const contents: any = {};
9087-
if (output[_SC] != null) {
9088-
contents[_SC] = de_ServerlessCache(output[_SC], context);
9109+
if (output[_SCe] != null) {
9110+
contents[_SCe] = de_ServerlessCache(output[_SCe], context);
90899111
}
90909112
return contents;
90919113
};
@@ -9223,8 +9245,8 @@ const de_DeleteReplicationGroupResult = (output: any, context: __SerdeContext):
92239245
*/
92249246
const de_DeleteServerlessCacheResponse = (output: any, context: __SerdeContext): DeleteServerlessCacheResponse => {
92259247
const contents: any = {};
9226-
if (output[_SC] != null) {
9227-
contents[_SC] = de_ServerlessCache(output[_SC], context);
9248+
if (output[_SCe] != null) {
9249+
contents[_SCe] = de_ServerlessCache(output[_SCe], context);
92289250
}
92299251
return contents;
92309252
};
@@ -9318,9 +9340,9 @@ const de_DescribeServerlessCachesResponse = (
93189340
contents[_NTe] = __expectString(output[_NTe]);
93199341
}
93209342
if (output.ServerlessCaches === "") {
9321-
contents[_SCe] = [];
9322-
} else if (output[_SCe] != null && output[_SCe][_m] != null) {
9323-
contents[_SCe] = de_ServerlessCacheList(__getArrayIfSingleItem(output[_SCe][_m]), context);
9343+
contents[_SCer] = [];
9344+
} else if (output[_SCer] != null && output[_SCer][_m] != null) {
9345+
contents[_SCer] = de_ServerlessCacheList(__getArrayIfSingleItem(output[_SCer][_m]), context);
93249346
}
93259347
return contents;
93269348
};
@@ -10094,8 +10116,8 @@ const de_ModifyReplicationGroupShardConfigurationResult = (
1009410116
*/
1009510117
const de_ModifyServerlessCacheResponse = (output: any, context: __SerdeContext): ModifyServerlessCacheResponse => {
1009610118
const contents: any = {};
10097-
if (output[_SC] != null) {
10098-
contents[_SC] = de_ServerlessCache(output[_SC], context);
10119+
if (output[_SCe] != null) {
10120+
contents[_SCe] = de_ServerlessCache(output[_SCe], context);
1009910121
}
1010010122
return contents;
1010110123
};
@@ -10546,6 +10568,9 @@ const de_PendingModifiedValues = (output: any, context: __SerdeContext): Pending
1054610568
if (output[_TEM] != null) {
1054710569
contents[_TEM] = __expectString(output[_TEM]);
1054810570
}
10571+
if (output[_SC] != null) {
10572+
contents[_SC] = de_ScaleConfig(output[_SC], context);
10573+
}
1054910574
return contents;
1055010575
};
1055110576

@@ -11107,6 +11132,20 @@ const de_RevokeCacheSecurityGroupIngressResult = (
1110711132
return contents;
1110811133
};
1110911134

11135+
/**
11136+
* deserializeAws_queryScaleConfig
11137+
*/
11138+
const de_ScaleConfig = (output: any, context: __SerdeContext): ScaleConfig => {
11139+
const contents: any = {};
11140+
if (output[_SP] != null) {
11141+
contents[_SP] = __strictParseInt32(output[_SP]) as number;
11142+
}
11143+
if (output[_SIM] != null) {
11144+
contents[_SIM] = __strictParseInt32(output[_SIM]) as number;
11145+
}
11146+
return contents;
11147+
};
11148+
1111011149
/**
1111111150
* deserializeAws_querySecurityGroupIdsList
1111211151
*/
@@ -12041,9 +12080,9 @@ const de_UserGroup = (output: any, context: __SerdeContext): UserGroup => {
1204112080
contents[_RGe] = de_UGReplicationGroupIdList(__getArrayIfSingleItem(output[_RGe][_m]), context);
1204212081
}
1204312082
if (output.ServerlessCaches === "") {
12044-
contents[_SCe] = [];
12045-
} else if (output[_SCe] != null && output[_SCe][_m] != null) {
12046-
contents[_SCe] = de_UGServerlessCacheIdList(__getArrayIfSingleItem(output[_SCe][_m]), context);
12083+
contents[_SCer] = [];
12084+
} else if (output[_SCer] != null && output[_SCer][_m] != null) {
12085+
contents[_SCer] = de_UGServerlessCacheIdList(__getArrayIfSingleItem(output[_SCer][_m]), context);
1204712086
}
1204812087
if (output[_ARN] != null) {
1204912088
contents[_ARN] = __expectString(output[_ARN]);
@@ -12553,7 +12592,7 @@ const _SA = "SnapshotArns";
1255312592
const _SATR = "SnapshotArnsToRestore";
1255412593
const _SAZ = "SubnetAvailabilityZone";
1255512594
const _SBN = "S3BucketName";
12556-
const _SC = "ServerlessCache";
12595+
const _SC = "ScaleConfig";
1255712596
const _SCC = "ServerlessCacheConfiguration";
1255812597
const _SCCNIRG = "ShowCacheClustersNotInReplicationGroups";
1255912598
const _SCI = "SnapshottingClusterId";
@@ -12564,12 +12603,14 @@ const _SCS = "ServerlessCacheSnapshot";
1256412603
const _SCSN = "ServerlessCacheSnapshotName";
1256512604
const _SCSe = "ServerlessCacheSnapshots";
1256612605
const _SCT = "SnapshotCreateTime";
12567-
const _SCe = "ServerlessCaches";
12606+
const _SCe = "ServerlessCache";
12607+
const _SCer = "ServerlessCaches";
1256812608
const _SDM = "ScaleDownModifications";
1256912609
const _SG = "SecurityGroups";
1257012610
const _SGI = "SecurityGroupIds";
1257112611
const _SGIe = "SecurityGroupId";
1257212612
const _SI = "SubnetIds";
12613+
const _SIM = "ScaleIntervalMinutes";
1257312614
const _SIo = "SourceIdentifier";
1257412615
const _SIu = "SubnetId";
1257512616
const _SIub = "SubnetIdentifier";
@@ -12583,6 +12624,7 @@ const _SNLUS = "ShowNodeLevelUpdateStatus";
1258312624
const _SNT = "SupportedNetworkTypes";
1258412625
const _SO = "SubnetOutpost";
1258512626
const _SOA = "SubnetOutpostArn";
12627+
const _SP = "ScalePercentage";
1258612628
const _SRL = "SnapshotRetentionLimit";
1258712629
const _SS = "SnapshotSource";
1258812630
const _SSCSN = "SourceServerlessCacheSnapshotName";

0 commit comments

Comments
 (0)