Skip to content

Commit 9f56f09

Browse files
author
awstools
committed
feat(client-arc-zonal-shift): This release adds new API options to enable allowed windows and multiple alarms for practice runs.
1 parent afe2b07 commit 9f56f09

File tree

7 files changed

+196
-124
lines changed

7 files changed

+196
-124
lines changed

clients/client-arc-zonal-shift/src/commands/CreatePracticeRunConfigurationCommand.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,16 @@ export interface CreatePracticeRunConfigurationCommandOutput
4848
* blockedDates: [ // BlockedDates
4949
* "STRING_VALUE",
5050
* ],
51-
* blockingAlarms: [ // ControlConditions
51+
* blockingAlarms: [ // BlockingAlarms
5252
* { // ControlCondition
5353
* type: "CLOUDWATCH", // required
5454
* alarmIdentifier: "STRING_VALUE", // required
5555
* },
5656
* ],
57-
* outcomeAlarms: [ // required
57+
* allowedWindows: [ // AllowedWindows
58+
* "STRING_VALUE",
59+
* ],
60+
* outcomeAlarms: [ // OutcomeAlarms // required
5861
* {
5962
* type: "CLOUDWATCH", // required
6063
* alarmIdentifier: "STRING_VALUE", // required
@@ -68,13 +71,13 @@ export interface CreatePracticeRunConfigurationCommandOutput
6871
* // name: "STRING_VALUE", // required
6972
* // zonalAutoshiftStatus: "ENABLED" || "DISABLED", // required
7073
* // practiceRunConfiguration: { // PracticeRunConfiguration
71-
* // blockingAlarms: [ // ControlConditions
74+
* // blockingAlarms: [ // BlockingAlarms
7275
* // { // ControlCondition
7376
* // type: "CLOUDWATCH", // required
7477
* // alarmIdentifier: "STRING_VALUE", // required
7578
* // },
7679
* // ],
77-
* // outcomeAlarms: [ // required
80+
* // outcomeAlarms: [ // OutcomeAlarms // required
7881
* // {
7982
* // type: "CLOUDWATCH", // required
8083
* // alarmIdentifier: "STRING_VALUE", // required
@@ -83,6 +86,9 @@ export interface CreatePracticeRunConfigurationCommandOutput
8386
* // blockedWindows: [ // BlockedWindows
8487
* // "STRING_VALUE",
8588
* // ],
89+
* // allowedWindows: [ // AllowedWindows
90+
* // "STRING_VALUE",
91+
* // ],
8692
* // blockedDates: [ // BlockedDates
8793
* // "STRING_VALUE",
8894
* // ],

clients/client-arc-zonal-shift/src/commands/GetManagedResourceCommand.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ export interface GetManagedResourceCommandOutput extends GetManagedResourceRespo
6767
* // },
6868
* // ],
6969
* // practiceRunConfiguration: { // PracticeRunConfiguration
70-
* // blockingAlarms: [ // ControlConditions
70+
* // blockingAlarms: [ // BlockingAlarms
7171
* // { // ControlCondition
7272
* // type: "CLOUDWATCH", // required
7373
* // alarmIdentifier: "STRING_VALUE", // required
7474
* // },
7575
* // ],
76-
* // outcomeAlarms: [ // required
76+
* // outcomeAlarms: [ // OutcomeAlarms // required
7777
* // {
7878
* // type: "CLOUDWATCH", // required
7979
* // alarmIdentifier: "STRING_VALUE", // required
@@ -82,6 +82,9 @@ export interface GetManagedResourceCommandOutput extends GetManagedResourceRespo
8282
* // blockedWindows: [ // BlockedWindows
8383
* // "STRING_VALUE",
8484
* // ],
85+
* // allowedWindows: [ // AllowedWindows
86+
* // "STRING_VALUE",
87+
* // ],
8588
* // blockedDates: [ // BlockedDates
8689
* // "STRING_VALUE",
8790
* // ],

clients/client-arc-zonal-shift/src/commands/UpdatePracticeRunConfigurationCommand.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,16 @@ export interface UpdatePracticeRunConfigurationCommandOutput
4848
* blockedDates: [ // BlockedDates
4949
* "STRING_VALUE",
5050
* ],
51-
* blockingAlarms: [ // ControlConditions
51+
* blockingAlarms: [ // BlockingAlarms
5252
* { // ControlCondition
5353
* type: "CLOUDWATCH", // required
5454
* alarmIdentifier: "STRING_VALUE", // required
5555
* },
5656
* ],
57-
* outcomeAlarms: [
57+
* allowedWindows: [ // AllowedWindows
58+
* "STRING_VALUE",
59+
* ],
60+
* outcomeAlarms: [ // OutcomeAlarms
5861
* {
5962
* type: "CLOUDWATCH", // required
6063
* alarmIdentifier: "STRING_VALUE", // required
@@ -68,13 +71,13 @@ export interface UpdatePracticeRunConfigurationCommandOutput
6871
* // name: "STRING_VALUE", // required
6972
* // zonalAutoshiftStatus: "ENABLED" || "DISABLED", // required
7073
* // practiceRunConfiguration: { // PracticeRunConfiguration
71-
* // blockingAlarms: [ // ControlConditions
74+
* // blockingAlarms: [ // BlockingAlarms
7275
* // { // ControlCondition
7376
* // type: "CLOUDWATCH", // required
7477
* // alarmIdentifier: "STRING_VALUE", // required
7578
* // },
7679
* // ],
77-
* // outcomeAlarms: [ // required
80+
* // outcomeAlarms: [ // OutcomeAlarms // required
7881
* // {
7982
* // type: "CLOUDWATCH", // required
8083
* // alarmIdentifier: "STRING_VALUE", // required
@@ -83,6 +86,9 @@ export interface UpdatePracticeRunConfigurationCommandOutput
8386
* // blockedWindows: [ // BlockedWindows
8487
* // "STRING_VALUE",
8588
* // ],
89+
* // allowedWindows: [ // AllowedWindows
90+
* // "STRING_VALUE",
91+
* // ],
8692
* // blockedDates: [ // BlockedDates
8793
* // "STRING_VALUE",
8894
* // ],

clients/client-arc-zonal-shift/src/commands/UpdateZonalAutoshiftConfigurationCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface UpdateZonalAutoshiftConfigurationCommandOutput
3636
__MetadataBearer {}
3737

3838
/**
39-
* <p>The zonal autoshift configuration for a resource includes the practice run configuration and the status for running autoshifts, zonal autoshift status. When a resource has a practice run configuation, ARC starts weekly zonal shifts for the resource, to shift traffic away from an Availability Zone. Weekly practice runs help you to make sure that your application can continue to operate normally with the loss of one Availability Zone.</p> <p>You can update the zonal autoshift autoshift status to enable or disable zonal autoshift. When zonal autoshift is <code>ENABLED</code>, you authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery. Traffic is also shifted away for the required weekly practice runs.</p>
39+
* <p>The zonal autoshift configuration for a resource includes the practice run configuration and the status for running autoshifts, zonal autoshift status. When a resource has a practice run configuration, ARC starts weekly zonal shifts for the resource, to shift traffic away from an Availability Zone. Weekly practice runs help you to make sure that your application can continue to operate normally with the loss of one Availability Zone.</p> <p>You can update the zonal autoshift status to enable or disable zonal autoshift. When zonal autoshift is <code>ENABLED</code>, you authorize Amazon Web Services to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery. Traffic is also shifted away for the required weekly practice runs.</p>
4040
* @example
4141
* Use a bare-bones client and the command you need to make an API call.
4242
* ```javascript

clients/client-arc-zonal-shift/src/models/models_0.ts

Lines changed: 60 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,13 @@ export class ThrottlingException extends __BaseException {
167167
*/
168168
export const ValidationExceptionReason = {
169169
AUTOSHIFT_UPDATE_NOT_ALLOWED: "AutoshiftUpdateNotAllowed",
170+
CONFLICTING_PRACTICE_WINDOWS: "InvalidPracticeWindows",
170171
FIS_EXPERIMENT_UPDATE_NOT_ALLOWED: "FISExperimentUpdateNotAllowed",
171172
INVALID_ALARM_CONDITION: "InvalidAlarmCondition",
172173
INVALID_AZ: "InvalidAz",
173174
INVALID_CONDITION_TYPE: "InvalidConditionType",
174175
INVALID_EXPIRES_IN: "InvalidExpiresIn",
176+
INVALID_PRACTICE_ALLOWED_WINDOW: "InvalidPracticeAllowedWindow",
175177
INVALID_PRACTICE_BLOCKER: "InvalidPracticeBlocker",
176178
INVALID_RESOURCE_IDENTIFIER: "InvalidResourceIdentifier",
177179
INVALID_STATUS: "InvalidStatus",
@@ -304,6 +306,37 @@ export interface UpdateAutoshiftObserverNotificationStatusResponse {
304306
status: AutoshiftObserverNotificationStatus | undefined;
305307
}
306308

309+
/**
310+
* @public
311+
* @enum
312+
*/
313+
export const ControlConditionType = {
314+
CLOUDWATCH: "CLOUDWATCH",
315+
} as const;
316+
317+
/**
318+
* @public
319+
*/
320+
export type ControlConditionType = (typeof ControlConditionType)[keyof typeof ControlConditionType];
321+
322+
/**
323+
* <p>A control condition is an alarm that you specify for a practice run. When you configure practice runs with zonal autoshift for a resource, you specify Amazon CloudWatch alarms, which you create in CloudWatch to use with the practice run. The alarms that you specify are an <i>outcome alarm</i>, to monitor application health during practice runs and, optionally, a <i>blocking alarm</i>, to block practice runs from starting or to interrupt a practice run in progress.</p> <p>Control condition alarms do not apply for autoshifts.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.considerations.html"> Considerations when you configure zonal autoshift</a> in the Amazon Application Recovery Controller Developer Guide.</p>
324+
* @public
325+
*/
326+
export interface ControlCondition {
327+
/**
328+
* <p>The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, so the only valid value is <code>CLOUDWATCH</code>.</p>
329+
* @public
330+
*/
331+
type: ControlConditionType | undefined;
332+
333+
/**
334+
* <p>The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.</p>
335+
* @public
336+
*/
337+
alarmIdentifier: string | undefined;
338+
}
339+
307340
/**
308341
* @public
309342
*/
@@ -389,6 +422,7 @@ export const ConflictExceptionReason = {
389422
PRACTICE_IN_BLOCKED_DATES: "PracticeInBlockedDates",
390423
PRACTICE_IN_BLOCKED_WINDOWS: "PracticeInBlockedWindows",
391424
PRACTICE_OUTCOME_ALARMS_RED: "PracticeOutcomeAlarmsRed",
425+
PRACTICE_OUTSIDE_ALLOWED_WINDOWS: "PracticeOutsideAllowedWindows",
392426
SIMULTANEOUS_ZONAL_SHIFTS_CONFLICT: "SimultaneousZonalShiftsConflict",
393427
ZONAL_AUTOSHIFT_ACTIVE: "ZonalAutoshiftActive",
394428
ZONAL_SHIFT_ALREADY_EXISTS: "ZonalShiftAlreadyExists",
@@ -512,37 +546,6 @@ export interface ZonalShift {
512546
comment: string | undefined;
513547
}
514548

515-
/**
516-
* @public
517-
* @enum
518-
*/
519-
export const ControlConditionType = {
520-
CLOUDWATCH: "CLOUDWATCH",
521-
} as const;
522-
523-
/**
524-
* @public
525-
*/
526-
export type ControlConditionType = (typeof ControlConditionType)[keyof typeof ControlConditionType];
527-
528-
/**
529-
* <p>A control condition is an alarm that you specify for a practice run. When you configure practice runs with zonal autoshift for a resource, you specify Amazon CloudWatch alarms, which you create in CloudWatch to use with the practice run. The alarms that you specify are an <i>outcome alarm</i>, to monitor application health during practice runs and, optionally, a <i>blocking alarm</i>, to block practice runs from starting or to interrupt a practice run in progress.</p> <p>Control condition alarms do not apply for autoshifts.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/r53recovery/latest/dg/arc-zonal-autoshift.considerations.html"> Considerations when you configure zonal autoshift</a> in the Amazon Application Recovery Controller Developer Guide.</p>
530-
* @public
531-
*/
532-
export interface ControlCondition {
533-
/**
534-
* <p>The type of alarm specified for a practice run. You can only specify Amazon CloudWatch alarms for practice runs, so the only valid value is <code>CLOUDWATCH</code>.</p>
535-
* @public
536-
*/
537-
type: ControlConditionType | undefined;
538-
539-
/**
540-
* <p>The Amazon Resource Name (ARN) for an Amazon CloudWatch alarm that you specify as a control condition for a practice run.</p>
541-
* @public
542-
*/
543-
alarmIdentifier: string | undefined;
544-
}
545-
546549
/**
547550
* @public
548551
*/
@@ -554,7 +557,7 @@ export interface CreatePracticeRunConfigurationRequest {
554557
resourceIdentifier: string | undefined;
555558

556559
/**
557-
* <p>Optionally, you can block ARC from starting practice runs for specific windows of days and times. </p> <p>The format for blocked windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Also, be aware of potential time adjustments that might be required for daylight saving time differences. Separate multiple blocked windows with spaces.</p> <p>For example, say you run business report summaries three days a week. For this scenario, you might set the following recurring days and times as blocked windows, for example: <code>MON-20:30-21:30 WED-20:30-21:30 FRI-20:30-21:30</code>.</p>
560+
* <p>Optionally, you can block ARC from starting practice runs for specific windows of days and times. </p> <p>The format for blocked windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Also, be aware of potential time adjustments that might be required for daylight saving time differences. Separate multiple blocked windows with spaces.</p> <p>For example, say you run business report summaries three days a week. For this scenario, you could set the following recurring days and times as blocked windows, for example: <code>Mon:00:00-Mon:10:00 Wed-20:30-Wed:21:30 Fri-20:30-Fri:21:30</code>.</p> <important> <p>The <code>blockedWindows</code> have to start and end on the same day. Windows that span multiple days aren't supported.</p> </important>
558561
* @public
559562
*/
560563
blockedWindows?: string[] | undefined;
@@ -566,13 +569,19 @@ export interface CreatePracticeRunConfigurationRequest {
566569
blockedDates?: string[] | undefined;
567570

568571
/**
569-
* <p>An Amazon CloudWatch alarm that you can specify for zonal autoshift practice runs. This alarm blocks ARC from starting practice run zonal shifts, and ends a practice run that's in progress, when the alarm is in an <code>ALARM</code> state. </p>
572+
* <p> <i>Blocking alarms</i> for practice runs are optional alarms that you can specify that block practice runs when one or more of the alarms is in an <code>ALARM</code> state.</p>
570573
* @public
571574
*/
572575
blockingAlarms?: ControlCondition[] | undefined;
573576

574577
/**
575-
* <p>The <i>outcome alarm</i> for practice runs is a required Amazon CloudWatch alarm that you specify that ends a practice run when the alarm is in an <code>ALARM</code> state.</p> <p>Configure the alarm to monitor the health of your application when traffic is shifted away from an Availability Zone during each practice run. You should configure the alarm to go into an <code>ALARM</code> state if your application is impacted by the zonal shift, and you want to stop the zonal shift, to let traffic for the resource return to the Availability Zone.</p>
578+
* <p>Optionally, you can allow ARC to start practice runs for specific windows of days and times. </p> <p>The format for allowed windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Also, be aware of potential time adjustments that might be required for daylight saving time differences. Separate multiple allowed windows with spaces.</p> <p>For example, say you want to allow practice runs only on Wednesdays and Fridays from noon to 5 p.m. For this scenario, you could set the following recurring days and times as allowed windows, for example: <code>Wed-12:00-Wed:17:00 Fri-12:00-Fri:17:00</code>.</p> <important> <p>The <code>allowedWindows</code> have to start and end on the same day. Windows that span multiple days aren't supported.</p> </important>
579+
* @public
580+
*/
581+
allowedWindows?: string[] | undefined;
582+
583+
/**
584+
* <p> <i>Outcome alarms</i> for practice runs are alarms that you specify that end a practice run when one or more of the alarms is in an <code>ALARM</code> state.</p> <p>Configure one or more of these alarms to monitor the health of your application when traffic is shifted away from an Availability Zone during each practice run. You should configure these alarms to go into an <code>ALARM</code> state if you want to stop a zonal shift, to let traffic for the resource return to the original Availability Zone.</p>
576585
* @public
577586
*/
578587
outcomeAlarms: ControlCondition[] | undefined;
@@ -584,23 +593,29 @@ export interface CreatePracticeRunConfigurationRequest {
584593
*/
585594
export interface PracticeRunConfiguration {
586595
/**
587-
* <p>The <i>blocking alarm</i> for practice runs is an optional alarm that you can specify that blocks practice runs when the alarm is in an <code>ALARM</code> state.</p>
596+
* <p> <i>Blocking alarms</i> for practice runs are optional alarms that you can specify that block practice runs when one or more of the alarms is in an <code>ALARM</code> state.</p>
588597
* @public
589598
*/
590599
blockingAlarms?: ControlCondition[] | undefined;
591600

592601
/**
593-
* <p>The <i>outcome alarm</i> for practice runs is an alarm that you specify that ends a practice run when the alarm is in an <code>ALARM</code> state.</p>
602+
* <p> <i>Outcome alarms</i> for practice runs are alarms that you specify that end a practice run when one or more of the alarms is in an <code>ALARM</code> state.</p>
594603
* @public
595604
*/
596605
outcomeAlarms: ControlCondition[] | undefined;
597606

598607
/**
599-
* <p>An array of one or more windows of days and times that you can block ARC from starting practice runs for a resource.</p> <p>Specify the blocked windows in UTC, using the format <code>DAY:HH:MM-DAY:HH:MM</code>, separated by spaces. For example, <code>MON:18:30-MON:19:30 TUE:18:30-TUE:19:30</code>.</p>
608+
* <p>An array of one or more windows of days and times that you can block ARC from starting practice runs for a resource.</p> <p>Specify the blocked windows in UTC, using the format <code>DAY:HH:MM-DAY:HH:MM</code>, separated by spaces. For example, <code>MON:18:30-MON:19:30 TUE:18:30-TUE:19:30</code>.</p> <p>The <code>blockedWindows</code> have to start and end on the same day. Windows that span multiple days aren't supported.</p>
600609
* @public
601610
*/
602611
blockedWindows?: string[] | undefined;
603612

613+
/**
614+
* <p>An array of one or more windows of days and times that you can allow ARC to start practice runs for a resource.</p> <p>For example, say you want to allow practice runs only on Wednesdays and Fridays from noon to 5 p.m. For this scenario, you could set the following recurring days and times as allowed windows, for example: <code>Wed-12:00-Wed:17:00 Fri-12:00-Fri:17:00</code>.</p> <p>The <code>allowedWindows</code> have to start and end on the same day. Windows that span multiple days aren't supported.</p>
615+
* @public
616+
*/
617+
allowedWindows?: string[] | undefined;
618+
604619
/**
605620
* <p>An array of one or more dates that you can specify when Amazon Web Services does not start practice runs for a resource.</p> <p>Specify blocked dates, in UTC, in the format <code>YYYY-MM-DD</code>, separated by spaces. </p>
606621
* @public
@@ -1087,13 +1102,19 @@ export interface UpdatePracticeRunConfigurationRequest {
10871102
blockedDates?: string[] | undefined;
10881103

10891104
/**
1090-
* <p>Add, change, or remove the Amazon CloudWatch alarm that you optionally specify as the blocking alarm for practice runs.</p>
1105+
* <p>Add, change, or remove the Amazon CloudWatch alarms that you optionally specify as the blocking alarms for practice runs.</p>
10911106
* @public
10921107
*/
10931108
blockingAlarms?: ControlCondition[] | undefined;
10941109

10951110
/**
1096-
* <p>Specify a new the Amazon CloudWatch alarm as the outcome alarm for practice runs.</p>
1111+
* <p>Add, change, or remove windows of days and times for when you can, optionally, allow ARC to start a practice run for a resource.</p> <p>The format for allowed windows is: DAY:HH:SS-DAY:HH:SS. Keep in mind, when you specify dates, that dates and times for practice runs are in UTC. Also, be aware of potential time adjustments that might be required for daylight saving time differences. Separate multiple allowed windows with spaces.</p> <p>For example, say you want to allow practice runs only on Wednesdays and Fridays from noon to 5 p.m. For this scenario, you could set the following recurring days and times as allowed windows, for example: <code>Wed-12:00-Wed:17:00 Fri-12:00-Fri:17:00</code>.</p> <important> <p>The <code>allowedWindows</code> have to start and end on the same day. Windows that span multiple days aren't supported.</p> </important>
1112+
* @public
1113+
*/
1114+
allowedWindows?: string[] | undefined;
1115+
1116+
/**
1117+
* <p>Specify one or more Amazon CloudWatch alarms as the outcome alarms for practice runs.</p>
10971118
* @public
10981119
*/
10991120
outcomeAlarms?: ControlCondition[] | undefined;

0 commit comments

Comments
 (0)