Skip to content

Commit a88a887

Browse files
author
awstools
committed
feat(client-dlm): This release adds support for archival of single-volume snapshots created by Amazon Data Lifecycle Manager policies
1 parent ac3017f commit a88a887

File tree

8 files changed

+498
-184
lines changed

8 files changed

+498
-184
lines changed

clients/client-dlm/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ AWS SDK for JavaScript DLM Client for Node.js, Browser and React Native.
1414
<p>With Amazon Data Lifecycle Manager, you can manage the lifecycle of your Amazon Web Services resources. You create
1515
lifecycle policies, which are used to automate operations on the specified
1616
resources.</p>
17-
<p>Amazon DLM supports Amazon EBS volumes and snapshots. For information about using Amazon DLM
18-
with Amazon EBS, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html">Automating the Amazon EBS
19-
Snapshot Lifecycle</a> in the <i>Amazon EC2 User Guide</i>.</p>
17+
<p>Amazon Data Lifecycle Manager supports Amazon EBS volumes and snapshots. For information about using Amazon Data Lifecycle Manager
18+
with Amazon EBS, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html">
19+
Amazon Data Lifecycle Manager</a> in the <i>Amazon EC2 User Guide</i>.</p>
2020

2121
## Installing
2222

clients/client-dlm/src/DLM.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ import { DLMClient } from "./DLMClient";
4444
* <p>With Amazon Data Lifecycle Manager, you can manage the lifecycle of your Amazon Web Services resources. You create
4545
* lifecycle policies, which are used to automate operations on the specified
4646
* resources.</p>
47-
* <p>Amazon DLM supports Amazon EBS volumes and snapshots. For information about using Amazon DLM
48-
* with Amazon EBS, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html">Automating the Amazon EBS
49-
* Snapshot Lifecycle</a> in the <i>Amazon EC2 User Guide</i>.</p>
47+
* <p>Amazon Data Lifecycle Manager supports Amazon EBS volumes and snapshots. For information about using Amazon Data Lifecycle Manager
48+
* with Amazon EBS, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html">
49+
* Amazon Data Lifecycle Manager</a> in the <i>Amazon EC2 User Guide</i>.</p>
5050
*/
5151
export class DLM extends DLMClient {
5252
/**
@@ -85,6 +85,8 @@ export class DLM extends DLMClient {
8585
/**
8686
* <p>Deletes the specified lifecycle policy and halts the automated operations that the
8787
* policy specified.</p>
88+
* <p>For more information about deleting a policy, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/view-modify-delete.html#delete">Delete lifecycle
89+
* policies</a>.</p>
8890
*/
8991
public deleteLifecyclePolicy(
9092
args: DeleteLifecyclePolicyCommandInput,
@@ -272,6 +274,8 @@ export class DLM extends DLMClient {
272274

273275
/**
274276
* <p>Updates the specified lifecycle policy.</p>
277+
* <p>For more information about updating a policy, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/view-modify-delete.html#modify">Modify lifecycle
278+
* policies</a>.</p>
275279
*/
276280
public updateLifecyclePolicy(
277281
args: UpdateLifecyclePolicyCommandInput,

clients/client-dlm/src/DLMClient.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ export interface DLMClientResolvedConfig extends DLMClientResolvedConfigType {}
256256
* <p>With Amazon Data Lifecycle Manager, you can manage the lifecycle of your Amazon Web Services resources. You create
257257
* lifecycle policies, which are used to automate operations on the specified
258258
* resources.</p>
259-
* <p>Amazon DLM supports Amazon EBS volumes and snapshots. For information about using Amazon DLM
260-
* with Amazon EBS, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html">Automating the Amazon EBS
261-
* Snapshot Lifecycle</a> in the <i>Amazon EC2 User Guide</i>.</p>
259+
* <p>Amazon Data Lifecycle Manager supports Amazon EBS volumes and snapshots. For information about using Amazon Data Lifecycle Manager
260+
* with Amazon EBS, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-lifecycle.html">
261+
* Amazon Data Lifecycle Manager</a> in the <i>Amazon EC2 User Guide</i>.</p>
262262
*/
263263
export class DLMClient extends __Client<
264264
__HttpHandlerOptions,

clients/client-dlm/src/commands/DeleteLifecyclePolicyCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export interface DeleteLifecyclePolicyCommandOutput extends DeleteLifecyclePolic
3030
/**
3131
* <p>Deletes the specified lifecycle policy and halts the automated operations that the
3232
* policy specified.</p>
33+
* <p>For more information about deleting a policy, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/view-modify-delete.html#delete">Delete lifecycle
34+
* policies</a>.</p>
3335
* @example
3436
* Use a bare-bones client and the command you need to make an API call.
3537
* ```javascript

clients/client-dlm/src/commands/UpdateLifecyclePolicyCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ export interface UpdateLifecyclePolicyCommandOutput extends UpdateLifecyclePolic
2929

3030
/**
3131
* <p>Updates the specified lifecycle policy.</p>
32+
* <p>For more information about updating a policy, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/view-modify-delete.html#modify">Modify lifecycle
33+
* policies</a>.</p>
3234
* @example
3335
* Use a bare-bones client and the command you need to make an API call.
3436
* ```javascript

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

Lines changed: 155 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,68 @@ export interface Action {
9393
CrossRegionCopy: CrossRegionCopyAction[] | undefined;
9494
}
9595

96+
/**
97+
* <p>
98+
* <b>[Snapshot policies only]</b> Describes the retention rule for archived snapshots. Once the archive
99+
* retention threshold is met, the snapshots are permanently deleted from the archive tier.</p>
100+
* <note>
101+
* <p>The archive retention rule must retain snapshots in the archive tier for a minimum
102+
* of 90 days.</p>
103+
* </note>
104+
*
105+
* <p>For <b>count-based schedules</b>, you must specify <b>Count</b>. For <b>age-based
106+
* schedules</b>, you must specify <b>Interval</b> and
107+
* <b> IntervalUnit</b>.</p>
108+
* <p>For more information about using snapshot archiving, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-ami-policy.html#dlm-archive">Considerations for
109+
* snapshot lifecycle policies</a>.</p>
110+
*/
111+
export interface RetentionArchiveTier {
112+
/**
113+
* <p>The maximum number of snapshots to retain in the archive storage tier for each volume.
114+
* The count must ensure that each snapshot remains in the archive tier for at least
115+
* 90 days. For example, if the schedule creates snapshots every 30 days, you must specify a
116+
* count of 3 or more to ensure that each snapshot is archived for at least 90 days.</p>
117+
*/
118+
Count?: number;
119+
120+
/**
121+
* <p>Specifies the period of time to retain snapshots in the archive tier. After this period
122+
* expires, the snapshot is permanently deleted.</p>
123+
*/
124+
Interval?: number;
125+
126+
/**
127+
* <p>The unit of time in which to measure the <b>Interval</b>. For
128+
* example, to retain a snapshots in the archive tier for 6 months, specify <code>Interval=6</code>
129+
* and <code>IntervalUnit=MONTHS</code>.</p>
130+
*/
131+
IntervalUnit?: RetentionIntervalUnitValues | string;
132+
}
133+
134+
/**
135+
* <p>
136+
* <b>[Snapshot policies only]</b> Specifies information about the archive storage tier retention period.</p>
137+
*/
138+
export interface ArchiveRetainRule {
139+
/**
140+
* <p>Information about retention period in the Amazon EBS Snapshots Archive. For more information, see
141+
* <a href="https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/snapshot-archive.html">Archive Amazon
142+
* EBS snapshots</a>.</p>
143+
*/
144+
RetentionArchiveTier: RetentionArchiveTier | undefined;
145+
}
146+
147+
/**
148+
* <p>
149+
* <b>[Snapshot policies only]</b> Specifies a snapshot archiving rule for a schedule.</p>
150+
*/
151+
export interface ArchiveRule {
152+
/**
153+
* <p>Information about the retention period for the snapshot archiving rule.</p>
154+
*/
155+
RetainRule: ArchiveRetainRule | undefined;
156+
}
157+
96158
export enum EventTypeValues {
97159
SHARE_SNAPSHOT = "shareSnapshot",
98160
}
@@ -165,7 +227,7 @@ export interface Tag {
165227
* set of valid parameters depends on the combination of policy type and target resource
166228
* type.</p>
167229
* <p>If you choose to exclude boot volumes and you specify tags that consequently exclude
168-
* all of the additional data volumes attached to an instance, then Amazon DLM will not create
230+
* all of the additional data volumes attached to an instance, then Amazon Data Lifecycle Manager will not create
169231
* any snapshots for the affected instance, and it will emit a <code>SnapshotsCreateFailed</code>
170232
* Amazon CloudWatch metric. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitor-dlm-cw-metrics.html">Monitor your policies
171233
* using Amazon CloudWatch</a>.</p>
@@ -228,10 +290,19 @@ export enum LocationValues {
228290
/**
229291
* <p>
230292
* <b>[Snapshot and AMI policies only]</b> Specifies when the policy should create snapshots or AMIs.</p>
231-
* <important>
232-
* <p>You must specify either a Cron expression or an interval, interval unit, and start
233-
* time. You cannot specify both.</p>
234-
* </important>
293+
* <note>
294+
* <ul>
295+
* <li>
296+
* <p>You must specify either <b>CronExpression</b>, or
297+
* <b>Interval</b>, <b>IntervalUnit</b>,
298+
* and <b>Times</b>.</p>
299+
* </li>
300+
* <li>
301+
* <p>If you need to specify an <a>ArchiveRule</a> for the schedule, then you must
302+
* specify a creation frequency of at least 28 days.</p>
303+
* </li>
304+
* </ul>
305+
* </note>
235306
*/
236307
export interface CreateRule {
237308
/**
@@ -248,8 +319,7 @@ export interface CreateRule {
248319
Location?: LocationValues | string;
249320

250321
/**
251-
* <p>The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and
252-
* 24.</p>
322+
* <p>The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.</p>
253323
*/
254324
Interval?: number;
255325

@@ -261,7 +331,7 @@ export interface CreateRule {
261331
/**
262332
* <p>The time, in UTC, to start the operation. The supported format is hh:mm.</p>
263333
* <p>The operation occurs within a one-hour window following the specified time. If you do
264-
* not specify a time, Amazon DLM selects a time within the next 24 hours.</p>
334+
* not specify a time, Amazon Data Lifecycle Manager selects a time within the next 24 hours.</p>
265335
*/
266336
Times?: string[];
267337

@@ -385,8 +455,8 @@ export interface DeprecateRule {
385455
/**
386456
* <p>
387457
* <b>[Snapshot policies only]</b> Specifies a rule for enabling fast snapshot restore for snapshots created by
388-
* snaspshot policies. You can enable fast snapshot restore based on either a count or a time
389-
* interval.</p>
458+
* snapshot policies. You can enable fast snapshot restore based on either a count or a
459+
* time interval.</p>
390460
*/
391461
export interface FastRestoreRule {
392462
/**
@@ -413,14 +483,48 @@ export interface FastRestoreRule {
413483

414484
/**
415485
* <p>
416-
* <b>[Snapshot and AMI policies only]</b> Specifies a retention rule for snapshots created by snapshot policies
417-
* or for AMIs created by AMI policies. You can retain snapshots based on either a count or a time interval.</p>
418-
* <p>You must specify either <b>Count</b>, or <b>Interval</b>
419-
* and <b>IntervalUnit</b>.</p>
486+
* <b>[Snapshot and AMI policies only]</b> Specifies a retention rule for snapshots created by snapshot policies, or for AMIs
487+
* created by AMI policies.</p>
488+
*
489+
* <note>
490+
* <p>For snapshot policies that have an <a>ArchiveRule</a>, this retention rule
491+
* applies to standard tier retention. When the retention threshold is met, snapshots
492+
* are moved from the standard to the archive tier.</p>
493+
* <p>For snapshot policies that do not have an <b>ArchiveRule</b>, snapshots
494+
* are permanently deleted when this retention threshold is met.</p>
495+
* </note>
496+
*
497+
* <p>You can retain snapshots based on either a count or a time interval.</p>
498+
* <ul>
499+
* <li>
500+
* <p>
501+
* <b>Count-based retention</b>
502+
* </p>
503+
* <p>You must specify <b>Count</b>.
504+
* If you specify an <a>ArchiveRule</a> for the schedule, then you can specify a retention count of
505+
* <code>0</code> to archive snapshots immediately after creation. If you specify a <a>FastRestoreRule</a>,
506+
* <a>ShareRule</a>, or a <a>CrossRegionCopyRule</a>, then you must specify a retention count
507+
* of <code>1</code> or more.</p>
508+
* </li>
509+
* <li>
510+
* <p>
511+
* <b>Age-based retention</b>
512+
* </p>
513+
* <p>You must specify <b>Interval</b>
514+
* and <b>IntervalUnit</b>. If you specify an <a>ArchiveRule</a> for the
515+
* schedule, then you can specify a retention interval of <code>0</code> days to archive snapshots immediately
516+
* after creation. If you specify a <a>FastRestoreRule</a>, <a>ShareRule</a>, or a
517+
* <a>CrossRegionCopyRule</a>, then you must specify a retention interval of <code>1</code> day or
518+
* more.</p>
519+
* </li>
520+
* </ul>
420521
*/
421522
export interface RetainRule {
422523
/**
423-
* <p>The number of snapshots to retain for each volume, up to a maximum of 1000.</p>
524+
* <p>The number of snapshots to retain for each volume, up to a maximum of 1000. For example if you want to
525+
* retain a maximum of three snapshots, specify <code>3</code>. When the fourth snapshot is created, the
526+
* oldest retained snapshot is deleted, or it is moved to the archive tier if you have specified an
527+
* <a>ArchiveRule</a>.</p>
424528
*/
425529
Count?: number;
426530

@@ -431,7 +535,10 @@ export interface RetainRule {
431535
Interval?: number;
432536

433537
/**
434-
* <p>The unit of time for time-based retention.</p>
538+
* <p>The unit of time for time-based retention. For example, to retain snapshots for 3 months, specify
539+
* <code>Interval=3</code> and <code>IntervalUnit=MONTHS</code>. Once the snapshot has been retained for
540+
* 3 months, it is deleted, or it is moved to the archive tier if you have specified an
541+
* <a>ArchiveRule</a>.</p>
435542
*/
436543
IntervalUnit?: RetentionIntervalUnitValues | string;
437544
}
@@ -527,6 +634,17 @@ export interface Schedule {
527634
* <b>[AMI policies only]</b> The AMI deprecation rule for the schedule.</p>
528635
*/
529636
DeprecateRule?: DeprecateRule;
637+
638+
/**
639+
* <p>
640+
* <b>[Snapshot policies that target volumes only]</b> The snapshot archiving rule for the schedule. When you specify an archiving
641+
* rule, snapshots are automatically moved from the standard tier to the archive tier once the schedule's
642+
* retention threshold is met. Snapshots are then retained in the archive tier for the archive retention
643+
* period that you specify. </p>
644+
* <p>For more information about using snapshot archiving, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-ami-policy.html#dlm-archive">Considerations for
645+
* snapshot lifecycle policies</a>.</p>
646+
*/
647+
ArchiveRule?: ArchiveRule;
530648
}
531649

532650
/**
@@ -1021,6 +1139,27 @@ export const ActionFilterSensitiveLog = (obj: Action): any => ({
10211139
...obj,
10221140
});
10231141

1142+
/**
1143+
* @internal
1144+
*/
1145+
export const RetentionArchiveTierFilterSensitiveLog = (obj: RetentionArchiveTier): any => ({
1146+
...obj,
1147+
});
1148+
1149+
/**
1150+
* @internal
1151+
*/
1152+
export const ArchiveRetainRuleFilterSensitiveLog = (obj: ArchiveRetainRule): any => ({
1153+
...obj,
1154+
});
1155+
1156+
/**
1157+
* @internal
1158+
*/
1159+
export const ArchiveRuleFilterSensitiveLog = (obj: ArchiveRule): any => ({
1160+
...obj,
1161+
});
1162+
10241163
/**
10251164
* @internal
10261165
*/

0 commit comments

Comments
 (0)