Skip to content

Commit

Permalink
feat(client-backup): This release introduces a boolean attribute Mana…
Browse files Browse the repository at this point in the history
…gedByAWSBackupOnly as part of ListRecoveryPointsByResource api to filter the recovery points based on ownership. This attribute can be used to filter out the recovery points protected by AWSBackup.
  • Loading branch information
awstools committed Mar 15, 2024
1 parent 1d943e0 commit 7077749
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface ListRecoveryPointsByResourceCommandOutput
* ResourceArn: "STRING_VALUE", // required
* NextToken: "STRING_VALUE",
* MaxResults: Number("int"),
* ManagedByAWSBackupOnly: true || false,
* };
* const command = new ListRecoveryPointsByResourceCommand(input);
* const response = await client.send(command);
Expand All @@ -65,6 +66,7 @@ export interface ListRecoveryPointsByResourceCommandOutput
* // IsParent: true || false,
* // ParentRecoveryPointArn: "STRING_VALUE",
* // ResourceName: "STRING_VALUE",
* // VaultType: "BACKUP_VAULT" || "LOGICALLY_AIR_GAPPED_BACKUP_VAULT",
* // },
* // ],
* // };
Expand Down
2 changes: 1 addition & 1 deletion clients/client-backup/src/commands/StopBackupJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface StopBackupJobCommandOutput extends __MetadataBearer {}
/**
* <p>Attempts to cancel a job to create a one-time backup of a resource.</p>
* <p>This action is not supported for the following services:
* Amazon FSx for Windows File Server, Amazon FSx for Lustre, FSx for ONTAP
* Amazon FSx for Windows File Server, Amazon FSx for Lustre, Amazon FSx for NetApp ONTAP
* , Amazon FSx for OpenZFS, Amazon DocumentDB (with MongoDB compatibility), Amazon RDS, Amazon Aurora,
* and Amazon Neptune.</p>
* @example
Expand Down
50 changes: 46 additions & 4 deletions clients/client-backup/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2136,6 +2136,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.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/API_ControlScope.html">
* <code>ControlScope</code>.</a>
* </p>
* @public
*/
ControlScope?: ControlScope;
Expand Down Expand Up @@ -5550,6 +5553,16 @@ export interface ListBackupJobsInput {

/**
* <p>Returns only backup jobs that are in the specified state.</p>
* <p>
* <code>Completed with issues</code> is a status found only in the Backup
* console. For API, this status refers to jobs with a state of <code>COMPLETED</code> and a
* <code>MessageCategory</code> with a value other than <code>SUCCESS</code>; that is, the
* status is completed but comes with a status message.</p>
* <p>To obtain the job count for
* <code>Completed with issues</code>, run two GET requests, and subtract the second,
* smaller number:</p>
* <p>GET /backup-jobs/?state=COMPLETED</p>
* <p>GET /backup-jobs/?messageCategory=SUCCESS&state=COMPLETED</p>
* @public
*/
ByState?: BackupJobState;
Expand Down Expand Up @@ -5736,12 +5749,22 @@ export interface ListBackupJobSummariesInput {
AccountId?: string;

/**
* <p>This parameter returns the job count for jobs
* with the specified state.</p>
* <p>This parameter returns the job count for jobs with the specified state.</p>
* <p>The the value ANY returns count of all states.</p>
* <p>
* <code>AGGREGATE_ALL</code> aggregates job counts
* for all states and returns the sum.</p>
* <code>AGGREGATE_ALL</code> aggregates job counts for all states and returns the
* sum.</p>
* <p>
* <code>Completed with issues</code> is a status found only in the Backup
* console. For API, this status refers to jobs with a state of <code>COMPLETED</code> and a
* <code>MessageCategory</code> with a value other than <code>SUCCESS</code>; that is, the
* status is completed but comes with a status message. To obtain the job count for
* <code>Completed with issues</code>, run two GET requests, and subtract the second,
* smaller number:</p>
* <p>GET
* /audit/backup-job-summaries?AggregationPeriod=FOURTEEN_DAYS&State=COMPLETED</p>
* <p>GET
* /audit/backup-job-summaries?AggregationPeriod=FOURTEEN_DAYS&MessageCategory=SUCCESS&State=COMPLETED</p>
* @public
*/
State?: BackupJobStatus;
Expand Down Expand Up @@ -7229,6 +7252,18 @@ export interface ListRecoveryPointsByResourceInput {
* @public
*/
MaxResults?: number;

/**
* <p>This attribute filters recovery points based on ownership.</p>
* <p>If this is
* set to <code>TRUE</code>, the response will contain recovery points associated
* with the selected resources that are managed by Backup.</p>
* <p>If this is set to <code>FALSE</code>, the response will contain all
* recovery points associated with the selected resource.</p>
* <p>Type: Boolean</p>
* @public
*/
ManagedByAWSBackupOnly?: boolean;
}

/**
Expand Down Expand Up @@ -7306,6 +7341,13 @@ export interface RecoveryPointByResource {
* @public
*/
ResourceName?: string;

/**
* <p>This is the type of vault in which the described recovery point is
* stored.</p>
* @public
*/
VaultType?: VaultType;
}

/**
Expand Down
4 changes: 4 additions & 0 deletions clients/client-backup/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,7 @@ export const se_ListRecoveryPointsByResourceCommand = async (
const query: any = map({
[_nT]: [, input[_NT]!],
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR]!.toString()],
[_mBAWSBO]: [() => input.ManagedByAWSBackupOnly !== void 0, () => input[_MBAWSBO]!.toString()],
});
let body: any;
b.m("GET").h(headers).q(query).b(body);
Expand Down Expand Up @@ -5118,6 +5119,7 @@ const de_RecoveryPointByResource = (output: any, context: __SerdeContext): Recov
ResourceName: __expectString,
Status: __expectString,
StatusMessage: __expectString,
VaultType: __expectString,
}) as any;
};

Expand Down Expand Up @@ -5447,6 +5449,7 @@ const _CA = "CreationAfter";
const _CB = "CreationBefore";
const _CD = "CancelDescription";
const _ID = "IncludeDeleted";
const _MBAWSBO = "ManagedByAWSBackupOnly";
const _MC = "MessageCategory";
const _MR = "MaxResults";
const _NT = "NextToken";
Expand All @@ -5468,6 +5471,7 @@ const _cBo = "completeBefore";
const _cD = "cancelDescription";
const _dVA = "destinationVaultArn";
const _iD = "includeDeleted";
const _mBAWSBO = "managedByAWSBackupOnly";
const _mC = "messageCategory";
const _mR = "maxResults";
const _nT = "nextToken";
Expand Down
22 changes: 18 additions & 4 deletions codegen/sdk-codegen/aws-models/backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -6054,7 +6054,7 @@
"ControlScope": {
"target": "com.amazonaws.backup#ControlScope",
"traits": {
"smithy.api#documentation": "<p>The scope of a control. The control scope defines what the control will evaluate. Three\n examples of control scopes are: a specific backup plan, all backup plans with a specific\n tag, or all backup plans.</p>"
"smithy.api#documentation": "<p>The scope of a control. The control scope defines what the control will evaluate. Three\n examples of control scopes are: a specific backup plan, all backup plans with a specific\n tag, or all backup plans.</p>\n <p>For more information, see <a href=\"https://docs.aws.amazon.com/aws-backup/latest/devguide/API_ControlScope.html\">\n <code>ControlScope</code>.</a>\n </p>"
}
}
},
Expand Down Expand Up @@ -7411,7 +7411,7 @@
"State": {
"target": "com.amazonaws.backup#BackupJobStatus",
"traits": {
"smithy.api#documentation": "<p>This parameter returns the job count for jobs \n with the specified state.</p>\n <p>The the value ANY returns count of all states.</p>\n <p>\n <code>AGGREGATE_ALL</code> aggregates job counts \n for all states and returns the sum.</p>",
"smithy.api#documentation": "<p>This parameter returns the job count for jobs with the specified state.</p>\n <p>The the value ANY returns count of all states.</p>\n <p>\n <code>AGGREGATE_ALL</code> aggregates job counts for all states and returns the\n sum.</p>\n <p>\n <code>Completed with issues</code> is a status found only in the Backup\n console. For API, this status refers to jobs with a state of <code>COMPLETED</code> and a\n <code>MessageCategory</code> with a value other than <code>SUCCESS</code>; that is, the\n status is completed but comes with a status message. To obtain the job count for\n <code>Completed with issues</code>, run two GET requests, and subtract the second,\n smaller number:</p>\n <p>GET\n /audit/backup-job-summaries?AggregationPeriod=FOURTEEN_DAYS&State=COMPLETED</p>\n <p>GET\n /audit/backup-job-summaries?AggregationPeriod=FOURTEEN_DAYS&MessageCategory=SUCCESS&State=COMPLETED</p>",
"smithy.api#httpQuery": "State"
}
},
Expand Down Expand Up @@ -7540,7 +7540,7 @@
"ByState": {
"target": "com.amazonaws.backup#BackupJobState",
"traits": {
"smithy.api#documentation": "<p>Returns only backup jobs that are in the specified state.</p>",
"smithy.api#documentation": "<p>Returns only backup jobs that are in the specified state.</p>\n <p>\n <code>Completed with issues</code> is a status found only in the Backup\n console. For API, this status refers to jobs with a state of <code>COMPLETED</code> and a\n <code>MessageCategory</code> with a value other than <code>SUCCESS</code>; that is, the\n status is completed but comes with a status message.</p>\n <p>To obtain the job count for\n <code>Completed with issues</code>, run two GET requests, and subtract the second,\n smaller number:</p>\n <p>GET /backup-jobs/?state=COMPLETED</p>\n <p>GET /backup-jobs/?messageCategory=SUCCESS&state=COMPLETED</p>",
"smithy.api#httpQuery": "state"
}
},
Expand Down Expand Up @@ -8933,6 +8933,14 @@
"smithy.api#documentation": "<p>The maximum number of items to be returned.</p>\n <note>\n <p>Amazon RDS requires a value of at least 20.</p>\n </note>",
"smithy.api#httpQuery": "maxResults"
}
},
"ManagedByAWSBackupOnly": {
"target": "com.amazonaws.backup#Boolean2",
"traits": {
"smithy.api#default": false,
"smithy.api#documentation": "<p>This attribute filters recovery points based on ownership.</p>\n <p>If this is \n set to <code>TRUE</code>, the response will contain recovery points associated \n with the selected resources that are managed by Backup.</p>\n <p>If this is set to <code>FALSE</code>, the response will contain all \n recovery points associated with the selected resource.</p>\n <p>Type: Boolean</p>",
"smithy.api#httpQuery": "managedByAWSBackupOnly"
}
}
},
"traits": {
Expand Down Expand Up @@ -10365,6 +10373,12 @@
"traits": {
"smithy.api#documentation": "<p>This is the non-unique name of the resource that \n belongs to the specified backup.</p>"
}
},
"VaultType": {
"target": "com.amazonaws.backup#VaultType",
"traits": {
"smithy.api#documentation": "<p>This is the type of vault in which the described recovery point is \n stored.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -12159,7 +12173,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Attempts to cancel a job to create a one-time backup of a resource.</p>\n <p>This action is not supported for the following services:\n Amazon FSx for Windows File Server, Amazon FSx for Lustre, FSx for ONTAP\n , Amazon FSx for OpenZFS, Amazon DocumentDB (with MongoDB compatibility), Amazon RDS, Amazon Aurora, \n and Amazon Neptune.</p>",
"smithy.api#documentation": "<p>Attempts to cancel a job to create a one-time backup of a resource.</p>\n <p>This action is not supported for the following services:\n Amazon FSx for Windows File Server, Amazon FSx for Lustre, Amazon FSx for NetApp ONTAP\n , Amazon FSx for OpenZFS, Amazon DocumentDB (with MongoDB compatibility), Amazon RDS, Amazon Aurora, \n and Amazon Neptune.</p>",
"smithy.api#http": {
"method": "POST",
"uri": "/backup-jobs/{BackupJobId}",
Expand Down

0 comments on commit 7077749

Please sign in to comment.