Skip to content

Commit

Permalink
feat(client-backup): Adds support to 2 new filters about job complete…
Browse files Browse the repository at this point in the history
… time for 3 list jobs APIs in AWS Backup
  • Loading branch information
awstools committed May 4, 2022
1 parent f0b9bd4 commit 164cdf7
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 2 deletions.
40 changes: 39 additions & 1 deletion clients/client-backup/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,9 @@ export interface FrameworkControl {
/**
* <p>The scope of a control. The control scope defines what the control will evaluate. Three
* examples of control scopes are: a specific backup plan, all backup plans with a specific
* tag, or all backup plans. For more information, see <code>ControlScope</code>.</p>
* tag, or all backup plans. For more information, see <a href="aws-backup/latest/devguide/API_ControlScope.html">
* <code>ControlScope</code>.</a>
* </p>
*/
ControlScope?: ControlScope;
}
Expand Down Expand Up @@ -3942,6 +3944,18 @@ export interface ListBackupJobsInput {
* all jobs across the organization.</p>
*/
ByAccountId?: string;

/**
* <p>Returns only backup jobs completed after a date expressed in Unix format and Coordinated
* Universal Time (UTC).</p>
*/
ByCompleteAfter?: Date;

/**
* <p>Returns only backup jobs completed before a date expressed in Unix format and
* Coordinated Universal Time (UTC).</p>
*/
ByCompleteBefore?: Date;
}

export namespace ListBackupJobsInput {
Expand Down Expand Up @@ -4339,6 +4353,18 @@ export interface ListCopyJobsInput {
* specified account ID.</p>
*/
ByAccountId?: string;

/**
* <p>Returns only copy jobs completed before a date expressed in Unix format and Coordinated
* Universal Time (UTC).</p>
*/
ByCompleteBefore?: Date;

/**
* <p>Returns only copy jobs completed after a date expressed in Unix format and Coordinated
* Universal Time (UTC).</p>
*/
ByCompleteAfter?: Date;
}

export namespace ListCopyJobsInput {
Expand Down Expand Up @@ -5060,6 +5086,18 @@ export interface ListRestoreJobsInput {
* <p>Returns only restore jobs associated with the specified job status.</p>
*/
ByStatus?: RestoreJobStatus | string;

/**
* <p>Returns only copy jobs completed before a date expressed in Unix format and Coordinated
* Universal Time (UTC).</p>
*/
ByCompleteBefore?: Date;

/**
* <p>Returns only copy jobs completed after a date expressed in Unix format and Coordinated
* Universal Time (UTC).</p>
*/
ByCompleteAfter?: Date;
}

export namespace ListRestoreJobsInput {
Expand Down
18 changes: 18 additions & 0 deletions clients/client-backup/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,12 @@ export const serializeAws_restJson1ListBackupJobsCommand = async (
}),
...(input.ByResourceType !== undefined && { resourceType: input.ByResourceType }),
...(input.ByAccountId !== undefined && { accountId: input.ByAccountId }),
...(input.ByCompleteAfter !== undefined && {
completeAfter: (input.ByCompleteAfter.toISOString().split(".")[0] + "Z").toString(),
}),
...(input.ByCompleteBefore !== undefined && {
completeBefore: (input.ByCompleteBefore.toISOString().split(".")[0] + "Z").toString(),
}),
};
let body: any;
return new __HttpRequest({
Expand Down Expand Up @@ -1518,6 +1524,12 @@ export const serializeAws_restJson1ListCopyJobsCommand = async (
...(input.ByResourceType !== undefined && { resourceType: input.ByResourceType }),
...(input.ByDestinationVaultArn !== undefined && { destinationVaultArn: input.ByDestinationVaultArn }),
...(input.ByAccountId !== undefined && { accountId: input.ByAccountId }),
...(input.ByCompleteBefore !== undefined && {
completeBefore: (input.ByCompleteBefore.toISOString().split(".")[0] + "Z").toString(),
}),
...(input.ByCompleteAfter !== undefined && {
completeAfter: (input.ByCompleteAfter.toISOString().split(".")[0] + "Z").toString(),
}),
};
let body: any;
return new __HttpRequest({
Expand Down Expand Up @@ -1732,6 +1744,12 @@ export const serializeAws_restJson1ListRestoreJobsCommand = async (
createdAfter: (input.ByCreatedAfter.toISOString().split(".")[0] + "Z").toString(),
}),
...(input.ByStatus !== undefined && { status: input.ByStatus }),
...(input.ByCompleteBefore !== undefined && {
completeBefore: (input.ByCompleteBefore.toISOString().split(".")[0] + "Z").toString(),
}),
...(input.ByCompleteAfter !== undefined && {
completeAfter: (input.ByCompleteAfter.toISOString().split(".")[0] + "Z").toString(),
}),
};
let body: any;
return new __HttpRequest({
Expand Down
Loading

0 comments on commit 164cdf7

Please sign in to comment.