Skip to content

Commit c196753

Browse files
author
awstools
committed
feat(client-rbin): This release adds support for exclusion tags for Recycle Bin, which allows you to identify resources that are to be excluded, or ignored, by a Region-level retention rule.
1 parent 1cc5eef commit c196753

File tree

9 files changed

+257
-53
lines changed

9 files changed

+257
-53
lines changed

clients/client-rbin/src/commands/CreateRuleCommand.ts

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,27 @@ export interface CreateRuleCommandInput extends CreateRuleRequest {}
2828
export interface CreateRuleCommandOutput extends CreateRuleResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Creates a Recycle Bin retention rule. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-rules.html#recycle-bin-create-rule">
32-
* Create Recycle Bin retention rules</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
31+
* <p>Creates a Recycle Bin retention rule. You can create two types of retention rules:</p>
32+
* <ul>
33+
* <li>
34+
* <p>
35+
* <b>Tag-level retention rules</b> - These retention rules use
36+
* resource tags to identify the resources to protect. For each retention rule, you specify one or
37+
* more tag key and value pairs. Resources (of the specified type) that have at least one of these
38+
* tag key and value pairs are automatically retained in the Recycle Bin upon deletion. Use this
39+
* type of retention rule to protect specific resources in your account based on their tags.</p>
40+
* </li>
41+
* <li>
42+
* <p>
43+
* <b>Region-level retention rules</b> - These retention rules,
44+
* by default, apply to all of the resources (of the specified type) in the Region, even if the
45+
* resources are not tagged. However, you can specify exclusion tags to exclude resources that have
46+
* specific tags. Use this type of retention rule to protect all resources of a specific type in a
47+
* Region.</p>
48+
* </li>
49+
* </ul>
50+
* <p>For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/recycle-bin.html">
51+
* Create Recycle Bin retention rules</a> in the <i>Amazon EBS User Guide</i>.</p>
3352
* @example
3453
* Use a bare-bones client and the command you need to make an API call.
3554
* ```javascript
@@ -61,6 +80,12 @@ export interface CreateRuleCommandOutput extends CreateRuleResponse, __MetadataB
6180
* UnlockDelayUnit: "DAYS", // required
6281
* },
6382
* },
83+
* ExcludeResourceTags: [ // ExcludeResourceTags
84+
* {
85+
* ResourceTagKey: "STRING_VALUE", // required
86+
* ResourceTagValue: "STRING_VALUE",
87+
* },
88+
* ],
6489
* };
6590
* const command = new CreateRuleCommand(input);
6691
* const response = await client.send(command);
@@ -93,6 +118,12 @@ export interface CreateRuleCommandOutput extends CreateRuleResponse, __MetadataB
93118
* // },
94119
* // LockState: "locked" || "pending_unlock" || "unlocked",
95120
* // RuleArn: "STRING_VALUE",
121+
* // ExcludeResourceTags: [ // ExcludeResourceTags
122+
* // {
123+
* // ResourceTagKey: "STRING_VALUE", // required
124+
* // ResourceTagValue: "STRING_VALUE",
125+
* // },
126+
* // ],
96127
* // };
97128
*
98129
* ```

clients/client-rbin/src/commands/GetRuleCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ export interface GetRuleCommandOutput extends GetRuleResponse, __MetadataBearer
6464
* // LockState: "locked" || "pending_unlock" || "unlocked",
6565
* // LockEndTime: new Date("TIMESTAMP"),
6666
* // RuleArn: "STRING_VALUE",
67+
* // ExcludeResourceTags: [ // ExcludeResourceTags
68+
* // {
69+
* // ResourceTagKey: "STRING_VALUE", // required
70+
* // ResourceTagValue: "STRING_VALUE",
71+
* // },
72+
* // ],
6773
* // };
6874
*
6975
* ```

clients/client-rbin/src/commands/ListRulesCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ export interface ListRulesCommandOutput extends ListRulesResponse, __MetadataBea
4646
* },
4747
* ],
4848
* LockState: "locked" || "pending_unlock" || "unlocked",
49+
* ExcludeResourceTags: [ // ExcludeResourceTags
50+
* {
51+
* ResourceTagKey: "STRING_VALUE", // required
52+
* ResourceTagValue: "STRING_VALUE",
53+
* },
54+
* ],
4955
* };
5056
* const command = new ListRulesCommand(input);
5157
* const response = await client.send(command);

clients/client-rbin/src/commands/LockRuleCommand.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ export interface LockRuleCommandInput extends LockRuleRequest {}
2828
export interface LockRuleCommandOutput extends LockRuleResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Locks a retention rule. A locked retention rule can't be modified or deleted.</p>
31+
* <p>Locks a Region-level retention rule. A locked retention rule can't be modified or
32+
* deleted.</p>
33+
* <note>
34+
* <p>You can't lock tag-level retention rules, or Region-level retention rules that
35+
* have exclusion tags.</p>
36+
* </note>
3237
* @example
3338
* Use a bare-bones client and the command you need to make an API call.
3439
* ```javascript
@@ -69,6 +74,12 @@ export interface LockRuleCommandOutput extends LockRuleResponse, __MetadataBeare
6974
* // },
7075
* // LockState: "locked" || "pending_unlock" || "unlocked",
7176
* // RuleArn: "STRING_VALUE",
77+
* // ExcludeResourceTags: [ // ExcludeResourceTags
78+
* // {
79+
* // ResourceTagKey: "STRING_VALUE", // required
80+
* // ResourceTagValue: "STRING_VALUE",
81+
* // },
82+
* // ],
7283
* // };
7384
*
7485
* ```

clients/client-rbin/src/commands/UnlockRuleCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ export interface UnlockRuleCommandOutput extends UnlockRuleResponse, __MetadataB
6565
* // LockState: "locked" || "pending_unlock" || "unlocked",
6666
* // LockEndTime: new Date("TIMESTAMP"),
6767
* // RuleArn: "STRING_VALUE",
68+
* // ExcludeResourceTags: [ // ExcludeResourceTags
69+
* // {
70+
* // ResourceTagKey: "STRING_VALUE", // required
71+
* // ResourceTagValue: "STRING_VALUE",
72+
* // },
73+
* // ],
6874
* // };
6975
*
7076
* ```

clients/client-rbin/src/commands/UpdateRuleCommand.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ export interface UpdateRuleCommandOutput extends UpdateRuleResponse, __MetadataB
5252
* ResourceTagValue: "STRING_VALUE",
5353
* },
5454
* ],
55+
* ExcludeResourceTags: [ // ExcludeResourceTags
56+
* {
57+
* ResourceTagKey: "STRING_VALUE", // required
58+
* ResourceTagValue: "STRING_VALUE",
59+
* },
60+
* ],
5561
* };
5662
* const command = new UpdateRuleCommand(input);
5763
* const response = await client.send(command);
@@ -73,6 +79,12 @@ export interface UpdateRuleCommandOutput extends UpdateRuleResponse, __MetadataB
7379
* // LockState: "locked" || "pending_unlock" || "unlocked",
7480
* // LockEndTime: new Date("TIMESTAMP"),
7581
* // RuleArn: "STRING_VALUE",
82+
* // ExcludeResourceTags: [ // ExcludeResourceTags
83+
* // {
84+
* // ResourceTagKey: "STRING_VALUE", // required
85+
* // ResourceTagValue: "STRING_VALUE",
86+
* // },
87+
* // ],
7688
* // };
7789
*
7890
* ```

0 commit comments

Comments
 (0)