Skip to content

Commit 3ada76f

Browse files
author
awstools
committed
feat(client-backup): Adds optional MaxScheduledRunsPreview input to GetBackupPlan API to provide a preview of up to 10 next scheduled backup plan runs in the GetBackupPlan response.
1 parent 8dca8a0 commit 3ada76f

File tree

5 files changed

+14349
-14175
lines changed

5 files changed

+14349
-14175
lines changed

clients/client-backup/src/commands/GetBackupPlanCommand.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export interface GetBackupPlanCommandOutput extends GetBackupPlanOutput, __Metad
4141
* const input = { // GetBackupPlanInput
4242
* BackupPlanId: "STRING_VALUE", // required
4343
* VersionId: "STRING_VALUE",
44+
* MaxScheduledRunsPreview: Number("int"),
4445
* };
4546
* const command = new GetBackupPlanCommand(input);
4647
* const response = await client.send(command);
@@ -108,6 +109,13 @@ export interface GetBackupPlanCommandOutput extends GetBackupPlanOutput, __Metad
108109
* // },
109110
* // },
110111
* // ],
112+
* // ScheduledRunsPreview: [ // ScheduledRunsPreview
113+
* // { // ScheduledPlanExecutionMember
114+
* // ExecutionTime: new Date("TIMESTAMP"),
115+
* // RuleId: "STRING_VALUE",
116+
* // RuleExecutionType: "CONTINUOUS" || "SNAPSHOTS" || "CONTINUOUS_AND_SNAPSHOTS",
117+
* // },
118+
* // ],
111119
* // };
112120
*
113121
* ```

clients/client-backup/src/commands/StartCopyJobCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ export interface StartCopyJobCommandOutput extends StartCopyJobOutput, __Metadat
3030
/**
3131
* <p>Starts a job to create a one-time copy of the specified resource.</p>
3232
* <p>Does not support continuous backups.</p>
33+
* <p>See <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/recov-point-create-a-copy.html#backup-copy-retry">Copy
34+
* job retry</a> for information on how Backup retries copy job
35+
* operations.</p>
3336
* @example
3437
* Use a bare-bones client and the command you need to make an API call.
3538
* ```javascript

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

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4149,7 +4149,8 @@ export interface DescribeGlobalSettingsInput {}
41494149
*/
41504150
export interface DescribeGlobalSettingsOutput {
41514151
/**
4152-
* <p>The status of the flag <code>isCrossAccountBackupEnabled</code>.</p>
4152+
* <p>The status of the flags <code>isCrossAccountBackupEnabled</code> and
4153+
* <code>isMpaEnabled</code> ('Mpa' refers to multi-party approval).</p>
41534154
* @public
41544155
*/
41554156
GlobalSettings?: Record<string, string> | undefined;
@@ -5144,6 +5145,51 @@ export interface GetBackupPlanInput {
51445145
* @public
51455146
*/
51465147
VersionId?: string | undefined;
5148+
5149+
/**
5150+
* <p>Number of future scheduled backup runs to preview. When set to 0 (default), no scheduled runs preview is included in the response. Valid range is 0-10.</p>
5151+
* @public
5152+
*/
5153+
MaxScheduledRunsPreview?: number | undefined;
5154+
}
5155+
5156+
/**
5157+
* @public
5158+
* @enum
5159+
*/
5160+
export const RuleExecutionType = {
5161+
CONTINUOUS: "CONTINUOUS",
5162+
CONTINUOUS_AND_SNAPSHOTS: "CONTINUOUS_AND_SNAPSHOTS",
5163+
SNAPSHOTS: "SNAPSHOTS",
5164+
} as const;
5165+
5166+
/**
5167+
* @public
5168+
*/
5169+
export type RuleExecutionType = (typeof RuleExecutionType)[keyof typeof RuleExecutionType];
5170+
5171+
/**
5172+
* <p>Contains information about a scheduled backup plan execution, including the execution time, rule type, and associated rule identifier.</p>
5173+
* @public
5174+
*/
5175+
export interface ScheduledPlanExecutionMember {
5176+
/**
5177+
* <p>The timestamp when the backup is scheduled to run, in Unix format and Coordinated Universal Time (UTC). The value is accurate to milliseconds.</p>
5178+
* @public
5179+
*/
5180+
ExecutionTime?: Date | undefined;
5181+
5182+
/**
5183+
* <p>The unique identifier of the backup rule that will execute at the scheduled time.</p>
5184+
* @public
5185+
*/
5186+
RuleId?: string | undefined;
5187+
5188+
/**
5189+
* <p>The type of backup rule execution. Valid values are <code>CONTINUOUS</code> (point-in-time recovery), <code>SNAPSHOTS</code> (snapshot backups), or <code>CONTINUOUS_AND_SNAPSHOTS</code> (both types combined).</p>
5190+
* @public
5191+
*/
5192+
RuleExecutionType?: RuleExecutionType | undefined;
51475193
}
51485194

51495195
/**
@@ -5217,6 +5263,12 @@ export interface GetBackupPlanOutput {
52175263
* @public
52185264
*/
52195265
AdvancedBackupSettings?: AdvancedBackupSetting[] | undefined;
5266+
5267+
/**
5268+
* <p>List of upcoming scheduled backup runs. Only included when <code>MaxScheduledRunsPreview</code> parameter is greater than 0. Contains up to 10 future backup executions with their scheduled times, execution types, and associated rule IDs.</p>
5269+
* @public
5270+
*/
5271+
ScheduledRunsPreview?: ScheduledPlanExecutionMember[] | undefined;
52205272
}
52215273

52225274
/**
@@ -9991,9 +10043,14 @@ export interface UpdateFrameworkOutput {
999110043
*/
999210044
export interface UpdateGlobalSettingsInput {
999310045
/**
9994-
* <p>A value for <code>isCrossAccountBackupEnabled</code> and a Region. Example:
10046+
* <p>Inputs can include:</p>
10047+
* <p>A value for <code>isCrossAccountBackupEnabled</code> and a Region. Example:
999510048
* <code>update-global-settings --global-settings isCrossAccountBackupEnabled=false
999610049
* --region us-west-2</code>.</p>
10050+
* <p>A value for Multi-party approval, styled as "Mpa": <code>isMpaEnabled</code>. Values can
10051+
* be true or false. Example:
10052+
* <code>update-global-settings --global-settings isMpaEnabled=false
10053+
* --region us-west-2</code>.</p>
999710054
* @public
999810055
*/
999910056
GlobalSettings?: Record<string, string> | undefined;

clients/client-backup/src/protocols/Aws_restJson1.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ import {
369369
RestoreTestingSelectionForGet,
370370
RestoreTestingSelectionForList,
371371
RestoreTestingSelectionForUpdate,
372+
ScheduledPlanExecutionMember,
372373
ServiceUnavailableException,
373374
} from "../models/models_0";
374375

@@ -1117,6 +1118,7 @@ export const se_GetBackupPlanCommand = async (
11171118
b.p("BackupPlanId", () => input.BackupPlanId!, "{BackupPlanId}", false);
11181119
const query: any = map({
11191120
[_vI]: [, input[_VI]!],
1121+
[_MSRP]: [() => input.MaxScheduledRunsPreview !== void 0, () => input[_MSRP]!.toString()],
11201122
});
11211123
let body: any;
11221124
b.m("GET").h(headers).q(query).b(body);
@@ -3322,6 +3324,7 @@ export const de_GetBackupPlanCommand = async (
33223324
CreatorRequestId: __expectString,
33233325
DeletionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
33243326
LastExecutionDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
3327+
ScheduledRunsPreview: (_) => de_ScheduledRunsPreview(_, context),
33253328
VersionId: __expectString,
33263329
});
33273330
Object.assign(contents, doc);
@@ -5862,6 +5865,29 @@ const de_RestoreTestingSelections = (output: any, context: __SerdeContext): Rest
58625865
return retVal;
58635866
};
58645867

5868+
/**
5869+
* deserializeAws_restJson1ScheduledPlanExecutionMember
5870+
*/
5871+
const de_ScheduledPlanExecutionMember = (output: any, context: __SerdeContext): ScheduledPlanExecutionMember => {
5872+
return take(output, {
5873+
ExecutionTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
5874+
RuleExecutionType: __expectString,
5875+
RuleId: __expectString,
5876+
}) as any;
5877+
};
5878+
5879+
/**
5880+
* deserializeAws_restJson1ScheduledRunsPreview
5881+
*/
5882+
const de_ScheduledRunsPreview = (output: any, context: __SerdeContext): ScheduledPlanExecutionMember[] => {
5883+
const retVal = (output || [])
5884+
.filter((e: any) => e != null)
5885+
.map((entry: any) => {
5886+
return de_ScheduledPlanExecutionMember(entry, context);
5887+
});
5888+
return retVal;
5889+
};
5890+
58655891
// de_SensitiveStringMap omitted.
58665892

58675893
// de_stringList omitted.
@@ -5921,6 +5947,7 @@ const _IS = "IndexStatus";
59215947
const _MBAWSBO = "ManagedByAWSBackupOnly";
59225948
const _MC = "MessageCategory";
59235949
const _MR = "MaxResults";
5950+
const _MSRP = "MaxScheduledRunsPreview";
59245951
const _NT = "NextToken";
59255952
const _RC = "RequesterComment";
59265953
const _RPA = "RecoveryPointArn";

0 commit comments

Comments
 (0)