Skip to content

Commit

Permalink
feat(client-dlm): This release adds support for Amazon Data Lifecycle…
Browse files Browse the repository at this point in the history
… Manager default policies for EBS snapshots and EBS-backed AMIs.
  • Loading branch information
awstools committed Nov 16, 2023
1 parent 9fbb42b commit 50f4cd8
Show file tree
Hide file tree
Showing 7 changed files with 982 additions and 106 deletions.
65 changes: 63 additions & 2 deletions clients/client-dlm/src/commands/CreateLifecyclePolicyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,30 @@ export interface CreateLifecyclePolicyCommandOutput extends CreateLifecyclePolic

/**
* @public
* <p>Creates a policy to manage the lifecycle of the specified Amazon Web Services resources. You can
* create up to 100 lifecycle policies.</p>
* <p>Creates an Amazon Data Lifecycle Manager lifecycle policy. Amazon Data Lifecycle Manager supports the following policy types:</p>
* <ul>
* <li>
* <p>Custom EBS snapshot policy</p>
* </li>
* <li>
* <p>Custom EBS-backed AMI policy</p>
* </li>
* <li>
* <p>Cross-account copy event policy</p>
* </li>
* <li>
* <p>Default policy for EBS snapshots</p>
* </li>
* <li>
* <p>Default policy for EBS-backed AMIs</p>
* </li>
* </ul>
* <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/policy-differences.html">
* Default policies vs custom policies</a>.</p>
* <important>
* <p>If you create a default policy, you can specify the request parameters either in
* the request body, or in the PolicyDetails request structure, but not both.</p>
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -190,10 +212,49 @@ export interface CreateLifecyclePolicyCommandOutput extends CreateLifecyclePolic
* ],
* },
* ],
* PolicyLanguage: "SIMPLIFIED" || "STANDARD",
* ResourceType: "VOLUME" || "INSTANCE",
* CreateInterval: Number("int"),
* RetainInterval: Number("int"),
* CopyTags: true || false,
* CrossRegionCopyTargets: [ // CrossRegionCopyTargetList
* { // CrossRegionCopyTarget
* TargetRegion: "STRING_VALUE",
* },
* ],
* ExtendDeletion: true || false,
* Exclusions: { // Exclusions
* ExcludeBootVolumes: true || false,
* ExcludeVolumeTypes: [ // ExcludeVolumeTypesList
* "STRING_VALUE",
* ],
* ExcludeTags: [ // ExcludeTagsList
* "<Tag>",
* ],
* },
* },
* Tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
* DefaultPolicy: "VOLUME" || "INSTANCE",
* CreateInterval: Number("int"),
* RetainInterval: Number("int"),
* CopyTags: true || false,
* ExtendDeletion: true || false,
* CrossRegionCopyTargets: [
* {
* TargetRegion: "STRING_VALUE",
* },
* ],
* Exclusions: {
* ExcludeBootVolumes: true || false,
* ExcludeVolumeTypes: [
* "STRING_VALUE",
* ],
* ExcludeTags: [
* "<Tag>",
* ],
* },
* };
* const command = new CreateLifecyclePolicyCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export interface GetLifecyclePoliciesCommandOutput extends GetLifecyclePoliciesR
* TagsToAdd: [ // TagsToAddFilterList
* "STRING_VALUE",
* ],
* DefaultPolicyType: "VOLUME" || "INSTANCE" || "ALL",
* };
* const command = new GetLifecyclePoliciesCommand(input);
* const response = await client.send(command);
Expand All @@ -72,6 +73,7 @@ export interface GetLifecyclePoliciesCommandOutput extends GetLifecyclePoliciesR
* // "<keys>": "STRING_VALUE",
* // },
* // PolicyType: "EBS_SNAPSHOT_MANAGEMENT" || "IMAGE_MANAGEMENT" || "EVENT_BASED_POLICY",
* // DefaultPolicy: true || false,
* // },
* // ],
* // };
Expand Down
21 changes: 21 additions & 0 deletions clients/client-dlm/src/commands/GetLifecyclePolicyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,32 @@ export interface GetLifecyclePolicyCommandOutput extends GetLifecyclePolicyRespo
* // ],
* // },
* // ],
* // PolicyLanguage: "SIMPLIFIED" || "STANDARD",
* // ResourceType: "VOLUME" || "INSTANCE",
* // CreateInterval: Number("int"),
* // RetainInterval: Number("int"),
* // CopyTags: true || false,
* // CrossRegionCopyTargets: [ // CrossRegionCopyTargetList
* // { // CrossRegionCopyTarget
* // TargetRegion: "STRING_VALUE",
* // },
* // ],
* // ExtendDeletion: true || false,
* // Exclusions: { // Exclusions
* // ExcludeBootVolumes: true || false,
* // ExcludeVolumeTypes: [ // ExcludeVolumeTypesList
* // "STRING_VALUE",
* // ],
* // ExcludeTags: [ // ExcludeTagsList
* // "<Tag>",
* // ],
* // },
* // },
* // Tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // PolicyArn: "STRING_VALUE",
* // DefaultPolicy: true || false,
* // },
* // };
*
Expand Down
38 changes: 38 additions & 0 deletions clients/client-dlm/src/commands/UpdateLifecyclePolicyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,44 @@ export interface UpdateLifecyclePolicyCommandOutput extends UpdateLifecyclePolic
* ],
* },
* ],
* PolicyLanguage: "SIMPLIFIED" || "STANDARD",
* ResourceType: "VOLUME" || "INSTANCE",
* CreateInterval: Number("int"),
* RetainInterval: Number("int"),
* CopyTags: true || false,
* CrossRegionCopyTargets: [ // CrossRegionCopyTargetList
* { // CrossRegionCopyTarget
* TargetRegion: "STRING_VALUE",
* },
* ],
* ExtendDeletion: true || false,
* Exclusions: { // Exclusions
* ExcludeBootVolumes: true || false,
* ExcludeVolumeTypes: [ // ExcludeVolumeTypesList
* "STRING_VALUE",
* ],
* ExcludeTags: [ // ExcludeTagsList
* "<Tag>",
* ],
* },
* },
* CreateInterval: Number("int"),
* RetainInterval: Number("int"),
* CopyTags: true || false,
* ExtendDeletion: true || false,
* CrossRegionCopyTargets: [
* {
* TargetRegion: "STRING_VALUE",
* },
* ],
* Exclusions: {
* ExcludeBootVolumes: true || false,
* ExcludeVolumeTypes: [
* "STRING_VALUE",
* ],
* ExcludeTags: [
* "<Tag>",
* ],
* },
* };
* const command = new UpdateLifecyclePolicyCommand(input);
Expand Down
Loading

0 comments on commit 50f4cd8

Please sign in to comment.