Skip to content

Commit ceac978

Browse files
author
awstools
committed
feat(client-backup): Added support for tags on restore.
1 parent 472552f commit ceac978

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface StartRestoreJobCommandOutput extends StartRestoreJobOutput, __M
5151
* IamRoleArn: "STRING_VALUE",
5252
* IdempotencyToken: "STRING_VALUE",
5353
* ResourceType: "STRING_VALUE",
54+
* CopySourceTagsToRestoredResource: true || false,
5455
* };
5556
* const command = new StartRestoreJobCommand(input);
5657
* const response = await client.send(command);
@@ -70,6 +71,10 @@ export interface StartRestoreJobCommandOutput extends StartRestoreJobOutput, __M
7071
* <p>Indicates that something is wrong with a parameter's value. For example, the value is
7172
* out of range.</p>
7273
*
74+
* @throws {@link InvalidRequestException} (client fault)
75+
* <p>Indicates that something is wrong with the input to the request. For example, a
76+
* parameter is of the wrong type.</p>
77+
*
7378
* @throws {@link MissingParameterValueException} (client fault)
7479
* <p>Indicates that a required parameter is missing.</p>
7580
*

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2831,11 +2831,14 @@ export interface DescribeRecoveryPointOutput {
28312831
* that versioning is enabled on the S3 bucket. Once these conditions are met, the next instance
28322832
* of a backup rule running will result in a new continuous recovery point being created.
28332833
* The recovery points with STOPPED status do not need to be deleted.</p>
2834+
* <p>For SAP HANA on Amazon EC2 <code>STOPPED</code> status occurs due to user action, application
2835+
* misconfiguration, or backup failure. To ensure that future continuous backups succeed,
2836+
* refer to the recovery point status and check SAP HANA for details.</p>
28342837
*/
28352838
Status?: RecoveryPointStatus | string;
28362839

28372840
/**
2838-
* <p>A status message explaining the reason for the recovery point deletion failure.</p>
2841+
* <p>A status message explaining the status of the recovery point.</p>
28392842
*/
28402843
StatusMessage?: string;
28412844

@@ -5714,6 +5717,13 @@ export interface StartRestoreJobInput {
57145717
* </ul>
57155718
*/
57165719
ResourceType?: string;
5720+
5721+
/**
5722+
* <p>This is an optional parameter. If this equals <code>True</code>, tags included in the backup
5723+
* will be copied to the restored resource.</p>
5724+
* <p>This can only be applied to backups created through Backup.</p>
5725+
*/
5726+
CopySourceTagsToRestoredResource?: boolean;
57175727
}
57185728

57195729
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,6 +2294,7 @@ export const se_StartRestoreJobCommand = async (
22942294
let body: any;
22952295
body = JSON.stringify(
22962296
take(input, {
2297+
CopySourceTagsToRestoredResource: [],
22972298
IamRoleArn: [],
22982299
IdempotencyToken: [],
22992300
Metadata: (_) => _json(_),
@@ -6226,6 +6227,9 @@ const de_StartRestoreJobCommandError = async (
62266227
case "InvalidParameterValueException":
62276228
case "com.amazonaws.backup#InvalidParameterValueException":
62286229
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
6230+
case "InvalidRequestException":
6231+
case "com.amazonaws.backup#InvalidRequestException":
6232+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
62296233
case "MissingParameterValueException":
62306234
case "com.amazonaws.backup#MissingParameterValueException":
62316235
throw await de_MissingParameterValueExceptionRes(parsedOutput, context);

codegen/sdk-codegen/aws-models/backup.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4558,13 +4558,13 @@
45584558
"Status": {
45594559
"target": "com.amazonaws.backup#RecoveryPointStatus",
45604560
"traits": {
4561-
"smithy.api#documentation": "<p>A status code specifying the state of the recovery point.</p>\n <p>\n <code>PARTIAL</code> status indicates Backup could not create the recovery\n point before the backup window closed. To increase your backup plan window using the API,\n see <a href=\"https://docs.aws.amazon.com/aws-backup/latest/devguide/API_UpdateBackupPlan.html\">UpdateBackupPlan</a>. You can also increase your backup plan window using the\n Console by choosing and editing your backup plan.</p>\n <p>\n <code>EXPIRED</code> status indicates that the recovery point has exceeded its retention\n period, but Backup lacks permission or is otherwise unable to delete it. To\n manually delete these recovery points, see <a href=\"https://docs.aws.amazon.com/aws-backup/latest/devguide/gs-cleanup-resources.html#cleanup-backups\"> Step 3:\n Delete the recovery points</a> in the <i>Clean up resources</i>\n section of <i>Getting started</i>.</p>\n <p>\n <code>STOPPED</code> status occurs on a continuous backup where a user has taken some \n action that causes the continuous backup to be disabled. This can be caused by the removal\n of permissions, turning off versioning, turning off events being sent to EventBridge, \n or disabling the EventBridge rules that are put in place by Backup.</p>\n <p>To resolve <code>STOPPED</code> status, ensure that all requested permissions are in place and\n that versioning is enabled on the S3 bucket. Once these conditions are met, the next instance\n of a backup rule running will result in a new continuous recovery point being created. \n The recovery points with STOPPED status do not need to be deleted.</p>"
4561+
"smithy.api#documentation": "<p>A status code specifying the state of the recovery point.</p>\n <p>\n <code>PARTIAL</code> status indicates Backup could not create the recovery\n point before the backup window closed. To increase your backup plan window using the API,\n see <a href=\"https://docs.aws.amazon.com/aws-backup/latest/devguide/API_UpdateBackupPlan.html\">UpdateBackupPlan</a>. You can also increase your backup plan window using the\n Console by choosing and editing your backup plan.</p>\n <p>\n <code>EXPIRED</code> status indicates that the recovery point has exceeded its retention\n period, but Backup lacks permission or is otherwise unable to delete it. To\n manually delete these recovery points, see <a href=\"https://docs.aws.amazon.com/aws-backup/latest/devguide/gs-cleanup-resources.html#cleanup-backups\"> Step 3:\n Delete the recovery points</a> in the <i>Clean up resources</i>\n section of <i>Getting started</i>.</p>\n <p>\n <code>STOPPED</code> status occurs on a continuous backup where a user has taken some \n action that causes the continuous backup to be disabled. This can be caused by the removal\n of permissions, turning off versioning, turning off events being sent to EventBridge, \n or disabling the EventBridge rules that are put in place by Backup.</p>\n <p>To resolve <code>STOPPED</code> status, ensure that all requested permissions are in place and\n that versioning is enabled on the S3 bucket. Once these conditions are met, the next instance\n of a backup rule running will result in a new continuous recovery point being created. \n The recovery points with STOPPED status do not need to be deleted.</p>\n <p>For SAP HANA on Amazon EC2 <code>STOPPED</code> status occurs due to user action, application\n misconfiguration, or backup failure. To ensure that future continuous backups succeed,\n refer to the recovery point status and check SAP HANA for details.</p>"
45624562
}
45634563
},
45644564
"StatusMessage": {
45654565
"target": "com.amazonaws.backup#string",
45664566
"traits": {
4567-
"smithy.api#documentation": "<p>A status message explaining the reason for the recovery point deletion failure.</p>"
4567+
"smithy.api#documentation": "<p>A status message explaining the status of the recovery point.</p>"
45684568
}
45694569
},
45704570
"CreationDate": {
@@ -9283,6 +9283,9 @@
92839283
{
92849284
"target": "com.amazonaws.backup#InvalidParameterValueException"
92859285
},
9286+
{
9287+
"target": "com.amazonaws.backup#InvalidRequestException"
9288+
},
92869289
{
92879290
"target": "com.amazonaws.backup#MissingParameterValueException"
92889291
},
@@ -9337,6 +9340,13 @@
93379340
"traits": {
93389341
"smithy.api#documentation": "<p>Starts a job to restore a recovery point for one of the following resources:</p>\n <ul>\n <li>\n <p>\n <code>Aurora</code> for Amazon Aurora</p>\n </li>\n <li>\n <p>\n <code>DocumentDB</code> for Amazon DocumentDB (with MongoDB compatibility)</p>\n </li>\n <li>\n <p>\n <code>CloudFormation</code> for CloudFormation</p>\n </li>\n <li>\n <p>\n <code>DynamoDB</code> for Amazon DynamoDB</p>\n </li>\n <li>\n <p>\n <code>EBS</code> for Amazon Elastic Block Store</p>\n </li>\n <li>\n <p>\n <code>EC2</code> for Amazon Elastic Compute Cloud</p>\n </li>\n <li>\n <p>\n <code>EFS</code> for Amazon Elastic File System</p>\n </li>\n <li>\n <p>\n <code>FSx</code> for Amazon FSx</p>\n </li>\n <li>\n <p>\n <code>Neptune</code> for Amazon Neptune</p>\n </li>\n <li>\n <p>\n <code>RDS</code> for Amazon Relational Database Service</p>\n </li>\n <li>\n <p>\n <code>Redshift</code> for Amazon Redshift</p>\n </li>\n <li>\n <p>\n <code>Storage Gateway</code> for Storage Gateway</p>\n </li>\n <li>\n <p>\n <code>S3</code> for Amazon S3</p>\n </li>\n <li>\n <p>\n <code>Timestream</code> for Amazon Timestream</p>\n </li>\n <li>\n <p>\n <code>VirtualMachine</code> for virtual machines</p>\n </li>\n </ul>"
93399342
}
9343+
},
9344+
"CopySourceTagsToRestoredResource": {
9345+
"target": "com.amazonaws.backup#Boolean2",
9346+
"traits": {
9347+
"smithy.api#default": false,
9348+
"smithy.api#documentation": "<p>This is an optional parameter. If this equals <code>True</code>, tags included in the backup\n will be copied to the restored resource.</p>\n <p>This can only be applied to backups created through Backup.</p>"
9349+
}
93409350
}
93419351
},
93429352
"traits": {

0 commit comments

Comments
 (0)