Skip to content

Commit f8fdf92

Browse files
author
awstools
committed
feat(client-auto-scaling): Amazon EC2 Auto Scaling now supports Amazon Application Recovery Controller (ARC) zonal shift and zonal autoshift to help you quickly recover an impaired application from failures in an Availability Zone (AZ).
1 parent 6c6c9c8 commit f8fdf92

File tree

7 files changed

+249
-0
lines changed

7 files changed

+249
-0
lines changed

clients/client-auto-scaling/src/commands/AttachTrafficSourcesCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export interface AttachTrafficSourcesCommandOutput extends AttachTrafficSourcesR
6767
* Type: "STRING_VALUE",
6868
* },
6969
* ],
70+
* SkipZonalShiftValidation: true || false,
7071
* };
7172
* const command = new AttachTrafficSourcesCommand(input);
7273
* const response = await client.send(command);

clients/client-auto-scaling/src/commands/CreateAutoScalingGroupCommand.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ export interface CreateAutoScalingGroupCommandOutput extends __MetadataBearer {}
211211
* AvailabilityZoneDistribution: { // AvailabilityZoneDistribution
212212
* CapacityDistributionStrategy: "balanced-only" || "balanced-best-effort",
213213
* },
214+
* AvailabilityZoneImpairmentPolicy: { // AvailabilityZoneImpairmentPolicy
215+
* ZonalShiftEnabled: true || false,
216+
* ImpairedZoneHealthCheckBehavior: "ReplaceUnhealthy" || "IgnoreUnhealthy",
217+
* },
218+
* SkipZonalShiftValidation: true || false,
214219
* };
215220
* const command = new CreateAutoScalingGroupCommand(input);
216221
* const response = await client.send(command);

clients/client-auto-scaling/src/commands/DescribeAutoScalingGroupsCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ export interface DescribeAutoScalingGroupsCommandOutput extends AutoScalingGroup
250250
* // AvailabilityZoneDistribution: { // AvailabilityZoneDistribution
251251
* // CapacityDistributionStrategy: "balanced-only" || "balanced-best-effort",
252252
* // },
253+
* // AvailabilityZoneImpairmentPolicy: { // AvailabilityZoneImpairmentPolicy
254+
* // ZonalShiftEnabled: true || false,
255+
* // ImpairedZoneHealthCheckBehavior: "ReplaceUnhealthy" || "IgnoreUnhealthy",
256+
* // },
253257
* // },
254258
* // ],
255259
* // NextToken: "STRING_VALUE",

clients/client-auto-scaling/src/commands/UpdateAutoScalingGroupCommand.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,11 @@ export interface UpdateAutoScalingGroupCommandOutput extends __MetadataBearer {}
207207
* AvailabilityZoneDistribution: { // AvailabilityZoneDistribution
208208
* CapacityDistributionStrategy: "balanced-only" || "balanced-best-effort",
209209
* },
210+
* AvailabilityZoneImpairmentPolicy: { // AvailabilityZoneImpairmentPolicy
211+
* ZonalShiftEnabled: true || false,
212+
* ImpairedZoneHealthCheckBehavior: "ReplaceUnhealthy" || "IgnoreUnhealthy",
213+
* },
214+
* SkipZonalShiftValidation: true || false,
210215
* };
211216
* const command = new UpdateAutoScalingGroupCommand(input);
212217
* const response = await client.send(command);

clients/client-auto-scaling/src/models/models_0.ts

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,15 @@ export interface AttachTrafficSourcesType {
496496
* @public
497497
*/
498498
TrafficSources: TrafficSourceIdentifier[] | undefined;
499+
500+
/**
501+
* <p>
502+
* If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify <code>true</code>. For more information, see
503+
* <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-shift.html">Auto Scaling group zonal shift</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.
504+
* </p>
505+
* @public
506+
*/
507+
SkipZonalShiftValidation?: boolean | undefined;
499508
}
500509

501510
/**
@@ -784,6 +793,48 @@ export interface AvailabilityZoneDistribution {
784793
CapacityDistributionStrategy?: CapacityDistributionStrategy | undefined;
785794
}
786795

796+
/**
797+
* @public
798+
* @enum
799+
*/
800+
export const ImpairedZoneHealthCheckBehavior = {
801+
IgnoreUnhealthy: "IgnoreUnhealthy",
802+
ReplaceUnhealthy: "ReplaceUnhealthy",
803+
} as const;
804+
805+
/**
806+
* @public
807+
*/
808+
export type ImpairedZoneHealthCheckBehavior =
809+
(typeof ImpairedZoneHealthCheckBehavior)[keyof typeof ImpairedZoneHealthCheckBehavior];
810+
811+
/**
812+
* <p>
813+
* Describes an Availability Zone impairment policy.
814+
* </p>
815+
* @public
816+
*/
817+
export interface AvailabilityZoneImpairmentPolicy {
818+
/**
819+
* <p>
820+
* If <code>true</code>, enable zonal shift for your Auto Scaling group.
821+
* </p>
822+
* @public
823+
*/
824+
ZonalShiftEnabled?: boolean | undefined;
825+
826+
/**
827+
* <p>
828+
* Specifies the health check behavior for the impaired Availability Zone in an active zonal shift. If you select <code>Replace unhealthy</code>, instances that appear unhealthy will be replaced in all Availability Zones.
829+
* If you select <code>Ignore unhealthy</code>, instances will not be replaced in the Availability Zone with the active zonal shift. For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-shift.html">Auto Scaling group zonal shift</a>
830+
* in the <i>Amazon EC2 Auto Scaling User Guide</i>.
831+
*
832+
* </p>
833+
* @public
834+
*/
835+
ImpairedZoneHealthCheckBehavior?: ImpairedZoneHealthCheckBehavior | undefined;
836+
}
837+
787838
/**
788839
* <p>Describes an instance maintenance policy.</p>
789840
* <p>For more information, see <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-maintenance-policy.html">Set instance maintenance policy</a> in the
@@ -2149,6 +2200,23 @@ export interface CreateAutoScalingGroupType {
21492200
* @public
21502201
*/
21512202
AvailabilityZoneDistribution?: AvailabilityZoneDistribution | undefined;
2203+
2204+
/**
2205+
* <p>
2206+
* The policy for Availability Zone impairment.
2207+
* </p>
2208+
* @public
2209+
*/
2210+
AvailabilityZoneImpairmentPolicy?: AvailabilityZoneImpairmentPolicy | undefined;
2211+
2212+
/**
2213+
* <p>
2214+
* If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify <code>true</code>. For more information, see
2215+
* <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-shift.html">Auto Scaling group zonal shift</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.
2216+
* </p>
2217+
* @public
2218+
*/
2219+
SkipZonalShiftValidation?: boolean | undefined;
21522220
}
21532221

21542222
/**
@@ -3535,6 +3603,14 @@ export interface AutoScalingGroup {
35353603
* @public
35363604
*/
35373605
AvailabilityZoneDistribution?: AvailabilityZoneDistribution | undefined;
3606+
3607+
/**
3608+
* <p>
3609+
* The Availability Zone impairment policy.
3610+
* </p>
3611+
* @public
3612+
*/
3613+
AvailabilityZoneImpairmentPolicy?: AvailabilityZoneImpairmentPolicy | undefined;
35383614
}
35393615

35403616
/**
@@ -8303,4 +8379,21 @@ export interface UpdateAutoScalingGroupType {
83038379
* @public
83048380
*/
83058381
AvailabilityZoneDistribution?: AvailabilityZoneDistribution | undefined;
8382+
8383+
/**
8384+
* <p>
8385+
* The policy for Availability Zone impairment.
8386+
* </p>
8387+
* @public
8388+
*/
8389+
AvailabilityZoneImpairmentPolicy?: AvailabilityZoneImpairmentPolicy | undefined;
8390+
8391+
/**
8392+
* <p>
8393+
* If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify <code>true</code>. For more information, see
8394+
* <a href="https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-zonal-shift.html">Auto Scaling group zonal shift</a> in the <i>Amazon EC2 Auto Scaling User Guide</i>.
8395+
* </p>
8396+
* @public
8397+
*/
8398+
SkipZonalShiftValidation?: boolean | undefined;
83068399
}

clients/client-auto-scaling/src/protocols/Aws_query.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ import {
254254
AutoScalingInstanceDetails,
255255
AutoScalingInstancesType,
256256
AvailabilityZoneDistribution,
257+
AvailabilityZoneImpairmentPolicy,
257258
BaselineEbsBandwidthMbpsRequest,
258259
BatchDeleteScheduledActionAnswer,
259260
BatchDeleteScheduledActionType,
@@ -3180,6 +3181,9 @@ const se_AttachTrafficSourcesType = (input: AttachTrafficSourcesType, context: _
31803181
entries[loc] = value;
31813182
});
31823183
}
3184+
if (input[_SZSV] != null) {
3185+
entries[_SZSV] = input[_SZSV];
3186+
}
31833187
return entries;
31843188
};
31853189

@@ -3260,6 +3264,20 @@ const se_AvailabilityZoneDistribution = (input: AvailabilityZoneDistribution, co
32603264
return entries;
32613265
};
32623266

3267+
/**
3268+
* serializeAws_queryAvailabilityZoneImpairmentPolicy
3269+
*/
3270+
const se_AvailabilityZoneImpairmentPolicy = (input: AvailabilityZoneImpairmentPolicy, context: __SerdeContext): any => {
3271+
const entries: any = {};
3272+
if (input[_ZSE] != null) {
3273+
entries[_ZSE] = input[_ZSE];
3274+
}
3275+
if (input[_IZHCB] != null) {
3276+
entries[_IZHCB] = input[_IZHCB];
3277+
}
3278+
return entries;
3279+
};
3280+
32633281
/**
32643282
* serializeAws_queryAvailabilityZones
32653283
*/
@@ -3617,6 +3635,16 @@ const se_CreateAutoScalingGroupType = (input: CreateAutoScalingGroupType, contex
36173635
entries[loc] = value;
36183636
});
36193637
}
3638+
if (input[_AZIP] != null) {
3639+
const memberEntries = se_AvailabilityZoneImpairmentPolicy(input[_AZIP], context);
3640+
Object.entries(memberEntries).forEach(([key, value]) => {
3641+
const loc = `AvailabilityZoneImpairmentPolicy.${key}`;
3642+
entries[loc] = value;
3643+
});
3644+
}
3645+
if (input[_SZSV] != null) {
3646+
entries[_SZSV] = input[_SZSV];
3647+
}
36203648
return entries;
36213649
};
36223650

@@ -6385,6 +6413,16 @@ const se_UpdateAutoScalingGroupType = (input: UpdateAutoScalingGroupType, contex
63856413
entries[loc] = value;
63866414
});
63876415
}
6416+
if (input[_AZIP] != null) {
6417+
const memberEntries = se_AvailabilityZoneImpairmentPolicy(input[_AZIP], context);
6418+
Object.entries(memberEntries).forEach(([key, value]) => {
6419+
const loc = `AvailabilityZoneImpairmentPolicy.${key}`;
6420+
entries[loc] = value;
6421+
});
6422+
}
6423+
if (input[_SZSV] != null) {
6424+
entries[_SZSV] = input[_SZSV];
6425+
}
63886426
return entries;
63896427
};
63906428

@@ -6829,6 +6867,9 @@ const de_AutoScalingGroup = (output: any, context: __SerdeContext): AutoScalingG
68296867
if (output[_AZD] != null) {
68306868
contents[_AZD] = de_AvailabilityZoneDistribution(output[_AZD], context);
68316869
}
6870+
if (output[_AZIP] != null) {
6871+
contents[_AZIP] = de_AvailabilityZoneImpairmentPolicy(output[_AZIP], context);
6872+
}
68326873
return contents;
68336874
};
68346875

@@ -6946,6 +6987,23 @@ const de_AvailabilityZoneDistribution = (output: any, context: __SerdeContext):
69466987
return contents;
69476988
};
69486989

6990+
/**
6991+
* deserializeAws_queryAvailabilityZoneImpairmentPolicy
6992+
*/
6993+
const de_AvailabilityZoneImpairmentPolicy = (
6994+
output: any,
6995+
context: __SerdeContext
6996+
): AvailabilityZoneImpairmentPolicy => {
6997+
const contents: any = {};
6998+
if (output[_ZSE] != null) {
6999+
contents[_ZSE] = __parseBoolean(output[_ZSE]);
7000+
}
7001+
if (output[_IZHCB] != null) {
7002+
contents[_IZHCB] = __expectString(output[_IZHCB]);
7003+
}
7004+
return contents;
7005+
};
7006+
69497007
/**
69507008
* deserializeAws_queryAvailabilityZones
69517009
*/
@@ -9466,6 +9524,7 @@ const _ATd = "AdjustmentType";
94669524
const _ATdj = "AdjustmentTypes";
94679525
const _AZ = "AvailabilityZones";
94689526
const _AZD = "AvailabilityZoneDistribution";
9527+
const _AZIP = "AvailabilityZoneImpairmentPolicy";
94699528
const _AZv = "AvailabilityZone";
94709529
const _Ac = "Activities";
94719530
const _Act = "Activity";
@@ -9595,6 +9654,7 @@ const _IT = "InstanceType";
95959654
const _ITU = "InstancesToUpdate";
95969655
const _ITUOR = "InstancesToUpdateOnRollback";
95979656
const _IW = "InstanceWarmup";
9657+
const _IZHCB = "ImpairedZoneHealthCheckBehavior";
95989658
const _Id = "Id";
95999659
const _Ide = "Identifier";
96009660
const _In = "Instances";
@@ -9758,6 +9818,7 @@ const _SRGP = "ShouldRespectGracePeriod";
97589818
const _SRu = "SuspensionReason";
97599819
const _ST = "StartTime";
97609820
const _SUGA = "ScheduledUpdateGroupActions";
9821+
const _SZSV = "SkipZonalShiftValidation";
97619822
const _St = "Stat";
97629823
const _Sta = "Status";
97639824
const _Stat = "State";
@@ -9795,6 +9856,7 @@ const _WC = "WeightedCapacity";
97959856
const _WPC = "WarmPoolConfiguration";
97969857
const _WPP = "WarmPoolProgress";
97979858
const _WPS = "WarmPoolSize";
9859+
const _ZSE = "ZonalShiftEnabled";
97989860
const _m = "message";
97999861
const _me = "member";
98009862

0 commit comments

Comments
 (0)