From 50f4cd84ecbe5307449e37856a56e59b109d2e5f Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 16 Nov 2023 19:22:02 +0000 Subject: [PATCH] feat(client-dlm): This release adds support for Amazon Data Lifecycle Manager default policies for EBS snapshots and EBS-backed AMIs. --- .../commands/CreateLifecyclePolicyCommand.ts | 65 ++- .../commands/GetLifecyclePoliciesCommand.ts | 2 + .../src/commands/GetLifecyclePolicyCommand.ts | 21 + .../commands/UpdateLifecyclePolicyCommand.ts | 38 ++ clients/client-dlm/src/models/models_0.ts | 531 ++++++++++++++++-- .../client-dlm/src/protocols/Aws_restJson1.ts | 38 ++ codegen/sdk-codegen/aws-models/dlm.json | 393 +++++++++++-- 7 files changed, 982 insertions(+), 106 deletions(-) diff --git a/clients/client-dlm/src/commands/CreateLifecyclePolicyCommand.ts b/clients/client-dlm/src/commands/CreateLifecyclePolicyCommand.ts index b1149d85f766c..6f601a2648060 100644 --- a/clients/client-dlm/src/commands/CreateLifecyclePolicyCommand.ts +++ b/clients/client-dlm/src/commands/CreateLifecyclePolicyCommand.ts @@ -37,8 +37,30 @@ export interface CreateLifecyclePolicyCommandOutput extends CreateLifecyclePolic /** * @public - *

Creates a policy to manage the lifecycle of the specified Amazon Web Services resources. You can - * create up to 100 lifecycle policies.

+ *

Creates an Amazon Data Lifecycle Manager lifecycle policy. Amazon Data Lifecycle Manager supports the following policy types:

+ * + *

For more information, see + * Default policies vs custom policies.

+ * + *

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.

+ *
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -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 + * "", + * ], + * }, * }, * Tags: { // TagMap * "": "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: [ + * "", + * ], + * }, * }; * const command = new CreateLifecyclePolicyCommand(input); * const response = await client.send(command); diff --git a/clients/client-dlm/src/commands/GetLifecyclePoliciesCommand.ts b/clients/client-dlm/src/commands/GetLifecyclePoliciesCommand.ts index 3e559ab0ad84a..dc5f8473f1022 100644 --- a/clients/client-dlm/src/commands/GetLifecyclePoliciesCommand.ts +++ b/clients/client-dlm/src/commands/GetLifecyclePoliciesCommand.ts @@ -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); @@ -72,6 +73,7 @@ export interface GetLifecyclePoliciesCommandOutput extends GetLifecyclePoliciesR * // "": "STRING_VALUE", * // }, * // PolicyType: "EBS_SNAPSHOT_MANAGEMENT" || "IMAGE_MANAGEMENT" || "EVENT_BASED_POLICY", + * // DefaultPolicy: true || false, * // }, * // ], * // }; diff --git a/clients/client-dlm/src/commands/GetLifecyclePolicyCommand.ts b/clients/client-dlm/src/commands/GetLifecyclePolicyCommand.ts index 4ae25b23d2d94..afb169961161e 100644 --- a/clients/client-dlm/src/commands/GetLifecyclePolicyCommand.ts +++ b/clients/client-dlm/src/commands/GetLifecyclePolicyCommand.ts @@ -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 + * // "", + * // ], + * // }, * // }, * // Tags: { // TagMap * // "": "STRING_VALUE", * // }, * // PolicyArn: "STRING_VALUE", + * // DefaultPolicy: true || false, * // }, * // }; * diff --git a/clients/client-dlm/src/commands/UpdateLifecyclePolicyCommand.ts b/clients/client-dlm/src/commands/UpdateLifecyclePolicyCommand.ts index 02779b8cc6615..1e13714c09e14 100644 --- a/clients/client-dlm/src/commands/UpdateLifecyclePolicyCommand.ts +++ b/clients/client-dlm/src/commands/UpdateLifecyclePolicyCommand.ts @@ -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 + * "", + * ], + * }, + * }, + * CreateInterval: Number("int"), + * RetainInterval: Number("int"), + * CopyTags: true || false, + * ExtendDeletion: true || false, + * CrossRegionCopyTargets: [ + * { + * TargetRegion: "STRING_VALUE", + * }, + * ], + * Exclusions: { + * ExcludeBootVolumes: true || false, + * ExcludeVolumeTypes: [ + * "STRING_VALUE", + * ], + * ExcludeTags: [ + * "", + * ], * }, * }; * const command = new UpdateLifecyclePolicyCommand(input); diff --git a/clients/client-dlm/src/models/models_0.ts b/clients/client-dlm/src/models/models_0.ts index a3c769ad6f7e5..5a2f0f4216fba 100644 --- a/clients/client-dlm/src/models/models_0.ts +++ b/clients/client-dlm/src/models/models_0.ts @@ -118,7 +118,7 @@ export interface Action { /** * @public *

- * [Snapshot policies only] Describes the retention rule for archived snapshots. Once the archive + * [Custom snapshot policies only] Describes the retention rule for archived snapshots. Once the archive * retention threshold is met, the snapshots are permanently deleted from the archive tier.

* *

The archive retention rule must retain snapshots in the archive tier for a minimum @@ -159,7 +159,7 @@ export interface RetentionArchiveTier { /** * @public *

- * [Snapshot policies only] Specifies information about the archive storage tier retention period.

+ * [Custom snapshot policies only] Specifies information about the archive storage tier retention period.

*/ export interface ArchiveRetainRule { /** @@ -174,7 +174,7 @@ export interface ArchiveRetainRule { /** * @public *

- * [Snapshot policies only] Specifies a snapshot archiving rule for a schedule.

+ * [Custom snapshot policies only] Specifies a snapshot archiving rule for a schedule.

*/ export interface ArchiveRule { /** @@ -184,6 +184,85 @@ export interface ArchiveRule { RetainRule: ArchiveRetainRule | undefined; } +/** + * @public + *

+ * [Default policies only] Specifies a destination Region for cross-Region copy actions.

+ */ +export interface CrossRegionCopyTarget { + /** + * @public + *

The target Region, for example us-east-1.

+ */ + TargetRegion?: string; +} + +/** + * @public + * @enum + */ +export const DefaultPolicyTypeValues = { + INSTANCE: "INSTANCE", + VOLUME: "VOLUME", +} as const; + +/** + * @public + */ +export type DefaultPolicyTypeValues = (typeof DefaultPolicyTypeValues)[keyof typeof DefaultPolicyTypeValues]; + +/** + * @public + *

Specifies a tag for a resource.

+ */ +export interface Tag { + /** + * @public + *

The tag key.

+ */ + Key: string | undefined; + + /** + * @public + *

The tag value.

+ */ + Value: string | undefined; +} + +/** + * @public + *

+ * [Default policies only] Specifies exclusion parameters for volumes or instances for which you + * do not want to create snapshots or AMIs. The policy will not create snapshots or AMIs + * for target resources that match any of the specified exclusion parameters.

+ */ +export interface Exclusions { + /** + * @public + *

+ * [Default policies for EBS snapshots only] Indicates whether to exclude volumes that are attached to + * instances as the boot volume. If you exclude boot volumes, only volumes attached as data + * (non-boot) volumes will be backed up by the policy. To exclude boot volumes, specify + * true.

+ */ + ExcludeBootVolumes?: boolean; + + /** + * @public + *

+ * [Default policies for EBS snapshots only] Specifies the volume types to exclude. Volumes of the specified + * types will not be targeted by the policy.

+ */ + ExcludeVolumeTypes?: string[]; + + /** + * @public + *

+ * [Default policies for EBS-backed AMIs only] Specifies whether to exclude volumes that have specific tags.

+ */ + ExcludeTags?: Tag[]; +} + /** * @public * @enum @@ -260,28 +339,10 @@ export interface EventSource { Parameters?: EventParameters; } -/** - * @public - *

Specifies a tag for a resource.

- */ -export interface Tag { - /** - * @public - *

The tag key.

- */ - Key: string | undefined; - - /** - * @public - *

The tag value.

- */ - Value: string | undefined; -} - /** * @public *

- * [Snapshot and AMI policies only] Specifies optional parameters for snapshot and AMI policies. The + * [Custom snapshot and AMI policies only] Specifies optional parameters for snapshot and AMI policies. The * set of valid parameters depends on the combination of policy type and target resource * type.

*

If you choose to exclude boot volumes and you specify tags that consequently exclude @@ -294,7 +355,7 @@ export interface _Parameters { /** * @public *

- * [Snapshot policies that target instances only] Indicates whether to exclude the root volume from multi-volume + * [Custom snapshot policies that target instances only] Indicates whether to exclude the root volume from multi-volume * snapshot sets. The default is false. If you specify true, * then the root volumes attached to targeted instances will be excluded from the multi-volume * snapshot sets created by the policy.

@@ -304,7 +365,7 @@ export interface _Parameters { /** * @public *

- * [AMI policies only] Indicates whether targeted instances are rebooted when the lifecycle policy + * [Custom AMI policies only] Indicates whether targeted instances are rebooted when the lifecycle policy * runs. true indicates that targeted instances are not rebooted when the policy * runs. false indicates that target instances are rebooted when the policy runs. * The default is true (instances are not rebooted).

@@ -314,7 +375,7 @@ export interface _Parameters { /** * @public *

- * [Snapshot policies that target instances only] The tags used to identify data (non-root) volumes to exclude from + * [Custom snapshot policies that target instances only] The tags used to identify data (non-root) volumes to exclude from * multi-volume snapshot sets.

*

If you create a snapshot lifecycle policy that targets instances and you specify tags for * this parameter, then data volumes with the specified tags that are attached to targeted @@ -323,6 +384,20 @@ export interface _Parameters { ExcludeDataVolumeTags?: Tag[]; } +/** + * @public + * @enum + */ +export const PolicyLanguageValues = { + SIMPLIFIED: "SIMPLIFIED", + STANDARD: "STANDARD", +} as const; + +/** + * @public + */ +export type PolicyLanguageValues = (typeof PolicyLanguageValues)[keyof typeof PolicyLanguageValues]; + /** * @public * @enum @@ -424,7 +499,7 @@ export type StageValues = (typeof StageValues)[keyof typeof StageValues]; /** * @public *

- * [Snapshot policies that target instances only] Information about pre and/or post scripts for a + * [Custom snapshot policies that target instances only] Information about pre and/or post scripts for a * snapshot lifecycle policy that targets instances. For more information, see * * Automating application-consistent snapshots with pre and post scripts.

@@ -547,7 +622,7 @@ export interface Script { /** * @public *

- * [Snapshot and AMI policies only] Specifies when the policy should create snapshots or AMIs.

+ * [Custom snapshot and AMI policies only] Specifies when the policy should create snapshots or AMIs.

* *
    *
  • @@ -567,7 +642,7 @@ export interface CreateRule { /** * @public *

    - * [Snapshot policies only] Specifies the destination for snapshots created by the policy. To create + * [Custom snapshot policies only] Specifies the destination for snapshots created by the policy. To create * snapshots in the same Region as the source resource, specify CLOUD. To create * snapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL. * If you omit this parameter, CLOUD is used by default.

    @@ -609,7 +684,7 @@ export interface CreateRule { /** * @public *

    - * [Snapshot policies that target instances only] Specifies pre and/or post scripts for a snapshot lifecycle policy + * [Custom snapshot policies that target instances only] Specifies pre and/or post scripts for a snapshot lifecycle policy * that targets instances. This is useful for creating application-consistent snapshots, or for * performing specific administrative tasks before or after Amazon Data Lifecycle Manager initiates snapshot creation.

    *

    For more information, see Automating @@ -621,7 +696,7 @@ export interface CreateRule { /** * @public *

    - * [AMI policies only] Specifies an AMI deprecation rule for cross-Region AMI copies created by an AMI policy.

    + * [Custom AMI policies only] Specifies an AMI deprecation rule for cross-Region AMI copies created by an AMI policy.

    */ export interface CrossRegionCopyDeprecateRule { /** @@ -644,7 +719,7 @@ export interface CrossRegionCopyDeprecateRule { /** * @public *

    - * [Snapshot and AMI policies only] Specifies a cross-Region copy rule for a snapshot and AMI policies.

    + * [Custom snapshot and AMI policies only] Specifies a cross-Region copy rule for a snapshot and AMI policies.

    * *

    To specify a cross-Region copy action for event-based polices, use * CrossRegionCopyAction.

    @@ -662,7 +737,7 @@ export interface CrossRegionCopyRule { *

    * *

    - * [AMI policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the + * [Custom AMI policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the * snapshot copies.

    */ TargetRegion?: string; @@ -674,7 +749,7 @@ export interface CrossRegionCopyRule { * TargetRegion instead.

    * *

    - * [Snapshot policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the + * [Custom snapshot policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the * snapshot copies.

    */ Target?: string; @@ -711,7 +786,7 @@ export interface CrossRegionCopyRule { /** * @public *

    - * [AMI policies only] The AMI deprecation rule for cross-Region AMI copies created by the rule.

    + * [Custom AMI policies only] The AMI deprecation rule for cross-Region AMI copies created by the rule.

    */ DeprecateRule?: CrossRegionCopyDeprecateRule; } @@ -719,7 +794,7 @@ export interface CrossRegionCopyRule { /** * @public *

    - * [AMI policies only] Specifies an AMI deprecation rule for AMIs created by an AMI lifecycle policy.

    + * [Custom AMI policies only] Specifies an AMI deprecation rule for AMIs created by an AMI lifecycle policy.

    *

    For age-based schedules, you must specify Interval and * IntervalUnit. For count-based schedules, you must specify * Count.

    @@ -752,7 +827,7 @@ export interface DeprecateRule { /** * @public *

    - * [Snapshot policies only] Specifies a rule for enabling fast snapshot restore for snapshots created by + * [Custom snapshot policies only] Specifies a rule for enabling fast snapshot restore for snapshots created by * snapshot policies. You can enable fast snapshot restore based on either a count or a * time interval.

    */ @@ -786,7 +861,7 @@ export interface FastRestoreRule { /** * @public *

    - * [Snapshot and AMI policies only] Specifies a retention rule for snapshots created by snapshot policies, or for AMIs + * [Custom snapshot and AMI policies only] Specifies a retention rule for snapshots created by snapshot policies, or for AMIs * created by AMI policies.

    * *

    For snapshot policies that have an ArchiveRule, this retention rule @@ -852,7 +927,7 @@ export interface RetainRule { /** * @public *

    - * [Snapshot policies only] Specifies a rule for sharing snapshots across Amazon Web Services accounts.

    + * [Custom snapshot policies only] Specifies a rule for sharing snapshots across Amazon Web Services accounts.

    */ export interface ShareRule { /** @@ -877,7 +952,7 @@ export interface ShareRule { /** * @public *

    - * [Snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.

    + * [Custom snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.

    */ export interface Schedule { /** @@ -926,7 +1001,7 @@ export interface Schedule { /** * @public *

    - * [Snapshot policies only] The rule for enabling fast snapshot restore.

    + * [Custom snapshot policies only] The rule for enabling fast snapshot restore.

    */ FastRestoreRule?: FastRestoreRule; @@ -944,21 +1019,21 @@ export interface Schedule { /** * @public *

    - * [Snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.

    + * [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.

    */ ShareRules?: ShareRule[]; /** * @public *

    - * [AMI policies only] The AMI deprecation rule for the schedule.

    + * [Custom AMI policies only] The AMI deprecation rule for the schedule.

    */ DeprecateRule?: DeprecateRule; /** * @public *

    - * [Snapshot policies that target volumes only] The snapshot archiving rule for the schedule. When you specify an archiving + * [Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule. When you specify an archiving * rule, snapshots are automatically moved from the standard tier to the archive tier once the schedule's * retention threshold is met. Snapshots are then retained in the archive tier for the archive retention * period that you specify.

    @@ -970,14 +1045,13 @@ export interface Schedule { /** * @public - *

    - * [All policy types] Specifies the configuration of a lifecycle policy.

    + *

    Specifies the configuration of a lifecycle policy.

    */ export interface PolicyDetails { /** * @public *

    - * [All policy types] The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT + * [Custom policies only] The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT * to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT * to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY * to create an event-based policy that performs specific actions when a defined event occurs in your Amazon Web Services account.

    @@ -988,7 +1062,7 @@ export interface PolicyDetails { /** * @public *

    - * [Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies. Use VOLUME to + * [Custom snapshot policies only] The target resource type for snapshot and AMI lifecycle policies. Use VOLUME to * create snapshots of individual volumes or use INSTANCE to create multi-volume * snapshots from the volumes for an instance.

    */ @@ -997,7 +1071,7 @@ export interface PolicyDetails { /** * @public *

    - * [Snapshot and AMI policies only] The location of the resources to backup. If the source resources are located in an + * [Custom snapshot and AMI policies only] The location of the resources to backup. If the source resources are located in an * Amazon Web Services Region, specify CLOUD. If the source resources are located on an Outpost * in your account, specify OUTPOST.

    *

    If you specify OUTPOST, Amazon Data Lifecycle Manager backs up all resources @@ -1008,14 +1082,14 @@ export interface PolicyDetails { /** * @public *

    - * [Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.

    + * [Custom snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.

    */ TargetTags?: Tag[]; /** * @public *

    - * [Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy + * [Custom snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy * can have up to four schedules—one mandatory schedule and up to three optional schedules.

    */ Schedules?: Schedule[]; @@ -1023,7 +1097,7 @@ export interface PolicyDetails { /** * @public *

    - * [Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.

    + * [Custom snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.

    * *

    If you are modifying a policy that was created or previously modified using the Amazon * Data Lifecycle Manager console, then you must include this parameter and specify either @@ -1047,6 +1121,116 @@ export interface PolicyDetails { * only one action per policy.

    */ Actions?: Action[]; + + /** + * @public + *

    The type of policy to create. Specify one of the following:

    + *
      + *
    • + *

      + * SIMPLIFIED To create a default policy.

      + *
    • + *
    • + *

      + * STANDARD To create a custom policy.

      + *
    • + *
    + */ + PolicyLanguage?: PolicyLanguageValues; + + /** + * @public + *

    + * [Default policies only] Specify the type of default policy to create.

    + *
      + *
    • + *

      To create a default policy for EBS snapshots, that creates snapshots of all volumes in the + * Region that do not have recent backups, specify VOLUME.

      + *
    • + *
    • + *

      To create a default policy for EBS-backed AMIs, that creates EBS-backed + * AMIs from all instances in the Region that do not have recent backups, specify + * INSTANCE.

      + *
    • + *
    + */ + ResourceType?: ResourceTypeValues; + + /** + * @public + *

    + * [Default policies only] Specifies how often the policy should run and create snapshots or AMIs. + * The creation frequency can range from 1 to 7 days. If you do not specify a value, the + * default is 1.

    + *

    Default: 1

    + */ + CreateInterval?: number; + + /** + * @public + *

    + * [Default policies only] Specifies how long the policy should retain snapshots or AMIs before + * deleting them. The retention period can range from 2 to 14 days, but it must be greater + * than the creation frequency to ensure that the policy retains at least 1 snapshot or + * AMI at any given time. If you do not specify a value, the default is 7.

    + *

    Default: 7

    + */ + RetainInterval?: number; + + /** + * @public + *

    + * [Default policies only] Indicates whether the policy should copy tags from the source resource + * to the snapshot or AMI. If you do not specify a value, the default is false.

    + *

    Default: false

    + */ + CopyTags?: boolean; + + /** + * @public + *

    + * [Default policies only] Specifies destination Regions for snapshot or AMI copies. You can specify + * up to 3 destination Regions. If you do not want to create cross-Region copies, omit this + * parameter.

    + */ + CrossRegionCopyTargets?: CrossRegionCopyTarget[]; + + /** + * @public + *

    + * [Default policies only] Defines the snapshot or AMI retention behavior for the policy if the + * source volume or instance is deleted, or if the policy enters the error, disabled, or + * deleted state.

    + *

    By default (ExtendDeletion=false):

    + *
      + *
    • + *

      If a source resource is deleted, Amazon Data Lifecycle Manager will continue to delete previously + * created snapshots or AMIs, up to but not including the last one, based on the + * specified retention period. If you want Amazon Data Lifecycle Manager to delete all snapshots or AMIs, + * including the last one, specify true.

      + *
    • + *
    • + *

      If a policy enters the error, disabled, or deleted state, Amazon Data Lifecycle Manager stops deleting + * snapshots and AMIs. If you want Amazon Data Lifecycle Manager to continue deleting snapshots or AMIs, + * including the last one, if the policy enters one of these states, specify + * true.

      + *
    • + *
    + *

    If you enable extended deletion (ExtendDeletion=true), + * you override both default behaviors simultaneously.

    + *

    If you do not specify a value, the default is false.

    + *

    Default: false

    + */ + ExtendDeletion?: boolean; + + /** + * @public + *

    + * [Default policies only] Specifies exclusion parameters for volumes or instances for which you + * do not want to create snapshots or AMIs. The policy will not create snapshots or AMIs + * for target resources that match any of the specified exclusion parameters.

    + */ + Exclusions?: Exclusions; } /** @@ -1083,21 +1267,119 @@ export interface CreateLifecyclePolicyRequest { /** * @public - *

    The desired activation state of the lifecycle policy after creation.

    + *

    The activation state of the lifecycle policy after creation.

    */ State: SettablePolicyStateValues | undefined; /** * @public *

    The configuration details of the lifecycle policy.

    + * + *

    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.

    + *
    */ - PolicyDetails: PolicyDetails | undefined; + PolicyDetails?: PolicyDetails; /** * @public *

    The tags to apply to the lifecycle policy during creation.

    */ Tags?: Record; + + /** + * @public + *

    + * [Default policies only] Specify the type of default policy to create.

    + *
      + *
    • + *

      To create a default policy for EBS snapshots, that creates snapshots of all volumes in the + * Region that do not have recent backups, specify VOLUME.

      + *
    • + *
    • + *

      To create a default policy for EBS-backed AMIs, that creates EBS-backed + * AMIs from all instances in the Region that do not have recent backups, specify + * INSTANCE.

      + *
    • + *
    + */ + DefaultPolicy?: DefaultPolicyTypeValues; + + /** + * @public + *

    + * [Default policies only] Specifies how often the policy should run and create snapshots or AMIs. + * The creation frequency can range from 1 to 7 days. If you do not specify a value, the + * default is 1.

    + *

    Default: 1

    + */ + CreateInterval?: number; + + /** + * @public + *

    + * [Default policies only] Specifies how long the policy should retain snapshots or AMIs before + * deleting them. The retention period can range from 2 to 14 days, but it must be greater + * than the creation frequency to ensure that the policy retains at least 1 snapshot or + * AMI at any given time. If you do not specify a value, the default is 7.

    + *

    Default: 7

    + */ + RetainInterval?: number; + + /** + * @public + *

    + * [Default policies only] Indicates whether the policy should copy tags from the source resource + * to the snapshot or AMI. If you do not specify a value, the default is false.

    + *

    Default: false

    + */ + CopyTags?: boolean; + + /** + * @public + *

    + * [Default policies only] Defines the snapshot or AMI retention behavior for the policy if the + * source volume or instance is deleted, or if the policy enters the error, disabled, or + * deleted state.

    + *

    By default (ExtendDeletion=false):

    + *
      + *
    • + *

      If a source resource is deleted, Amazon Data Lifecycle Manager will continue to delete previously + * created snapshots or AMIs, up to but not including the last one, based on the + * specified retention period. If you want Amazon Data Lifecycle Manager to delete all snapshots or AMIs, + * including the last one, specify true.

      + *
    • + *
    • + *

      If a policy enters the error, disabled, or deleted state, Amazon Data Lifecycle Manager stops deleting + * snapshots and AMIs. If you want Amazon Data Lifecycle Manager to continue deleting snapshots or AMIs, + * including the last one, if the policy enters one of these states, specify + * true.

      + *
    • + *
    + *

    If you enable extended deletion (ExtendDeletion=true), + * you override both default behaviors simultaneously.

    + *

    If you do not specify a value, the default is false.

    + *

    Default: false

    + */ + ExtendDeletion?: boolean; + + /** + * @public + *

    + * [Default policies only] Specifies destination Regions for snapshot or AMI copies. You can specify + * up to 3 destination Regions. If you do not want to create cross-Region copies, omit this + * parameter.

    + */ + CrossRegionCopyTargets?: CrossRegionCopyTarget[]; + + /** + * @public + *

    + * [Default policies only] Specifies exclusion parameters for volumes or instances for which you + * do not want to create snapshots or AMIs. The policy will not create snapshots or AMIs + * for target resources that match any of the specified exclusion parameters.

    + */ + Exclusions?: Exclusions; } /** @@ -1203,6 +1485,21 @@ export class LimitExceededException extends __BaseException { } } +/** + * @public + * @enum + */ +export const DefaultPoliciesTypeValues = { + ALL: "ALL", + INSTANCE: "INSTANCE", + VOLUME: "VOLUME", +} as const; + +/** + * @public + */ +export type DefaultPoliciesTypeValues = (typeof DefaultPoliciesTypeValues)[keyof typeof DefaultPoliciesTypeValues]; + /** * @public */ @@ -1307,6 +1604,27 @@ export interface GetLifecyclePoliciesRequest { *

    These user-defined tags are added in addition to the Amazon Web Services-added lifecycle tags.

    */ TagsToAdd?: string[]; + + /** + * @public + *

    + * [Default policies only] Specifies the type of default policy to get. Specify one of the following:

    + *
      + *
    • + *

      + * VOLUME - To get only the default policy for EBS snapshots

      + *
    • + *
    • + *

      + * INSTANCE - To get only the default policy for EBS-backed AMIs

      + *
    • + *
    • + *

      + * ALL - To get all default policies

      + *
    • + *
    + */ + DefaultPolicyType?: DefaultPoliciesTypeValues; } /** @@ -1347,6 +1665,23 @@ export interface LifecyclePolicySummary { * snapshot copies for snapshots that are shared with your account.

    */ PolicyType?: PolicyTypeValues; + + /** + * @public + *

    + * [Default policies only] The type of default policy. Values include:

    + *
      + *
    • + *

      + * VOLUME - Default policy for EBS snapshots

      + *
    • + *
    • + *

      + * INSTANCE - Default policy for EBS-backed AMIs

      + *
    • + *
    + */ + DefaultPolicy?: boolean; } /** @@ -1374,7 +1709,7 @@ export interface GetLifecyclePolicyRequest { /** * @public *

    - * [All policy types] Detailed information about a snapshot, AMI, or event-based lifecycle policy.

    + * [Custom policies only] Detailed information about a snapshot, AMI, or event-based lifecycle policy.

    */ export interface LifecyclePolicy { /** @@ -1437,6 +1772,23 @@ export interface LifecyclePolicy { *

    The Amazon Resource Name (ARN) of the policy.

    */ PolicyArn?: string; + + /** + * @public + *

    + * [Default policies only] The type of default policy. Values include:

    + *
      + *
    • + *

      + * VOLUME - Default policy for EBS snapshots

      + *
    • + *
    • + *

      + * INSTANCE - Default policy for EBS-backed AMIs

      + *
    • + *
    + */ + DefaultPolicy?: boolean; } /** @@ -1551,6 +1903,77 @@ export interface UpdateLifecyclePolicyRequest { * resource type.

    */ PolicyDetails?: PolicyDetails; + + /** + * @public + *

    + * [Default policies only] Specifies how often the policy should run and create snapshots or AMIs. + * The creation frequency can range from 1 to 7 days.

    + */ + CreateInterval?: number; + + /** + * @public + *

    + * [Default policies only] Specifies how long the policy should retain snapshots or AMIs before + * deleting them. The retention period can range from 2 to 14 days, but it must be greater + * than the creation frequency to ensure that the policy retains at least 1 snapshot or + * AMI at any given time.

    + */ + RetainInterval?: number; + + /** + * @public + *

    + * [Default policies only] Indicates whether the policy should copy tags from the source resource + * to the snapshot or AMI.

    + */ + CopyTags?: boolean; + + /** + * @public + *

    + * [Default policies only] Defines the snapshot or AMI retention behavior for the policy if the + * source volume or instance is deleted, or if the policy enters the error, disabled, or + * deleted state.

    + *

    By default (ExtendDeletion=false):

    + *
      + *
    • + *

      If a source resource is deleted, Amazon Data Lifecycle Manager will continue to delete previously + * created snapshots or AMIs, up to but not including the last one, based on the + * specified retention period. If you want Amazon Data Lifecycle Manager to delete all snapshots or AMIs, + * including the last one, specify true.

      + *
    • + *
    • + *

      If a policy enters the error, disabled, or deleted state, Amazon Data Lifecycle Manager stops deleting + * snapshots and AMIs. If you want Amazon Data Lifecycle Manager to continue deleting snapshots or AMIs, + * including the last one, if the policy enters one of these states, specify + * true.

      + *
    • + *
    + *

    If you enable extended deletion (ExtendDeletion=true), + * you override both default behaviors simultaneously.

    + *

    Default: false

    + */ + ExtendDeletion?: boolean; + + /** + * @public + *

    + * [Default policies only] Specifies destination Regions for snapshot or AMI copies. You can specify + * up to 3 destination Regions. If you do not want to create cross-Region copies, omit this + * parameter.

    + */ + CrossRegionCopyTargets?: CrossRegionCopyTarget[]; + + /** + * @public + *

    + * [Default policies only] Specifies exclusion parameters for volumes or instances for which you + * do not want to create snapshots or AMIs. The policy will not create snapshots or AMIs + * for target resources that match any of the specified exclusion parameters.

    + */ + Exclusions?: Exclusions; } /** diff --git a/clients/client-dlm/src/protocols/Aws_restJson1.ts b/clients/client-dlm/src/protocols/Aws_restJson1.ts index eb3154de00aa4..2bdf06145d363 100644 --- a/clients/client-dlm/src/protocols/Aws_restJson1.ts +++ b/clients/client-dlm/src/protocols/Aws_restJson1.ts @@ -4,6 +4,7 @@ import { _json, collectBody, decorateServiceException as __decorateServiceException, + expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, @@ -54,10 +55,12 @@ import { CrossRegionCopyDeprecateRule, CrossRegionCopyRetainRule, CrossRegionCopyRule, + CrossRegionCopyTarget, DeprecateRule, EncryptionConfiguration, EventParameters, EventSource, + Exclusions, FastRestoreRule, InternalServerException, InvalidRequestException, @@ -91,9 +94,16 @@ export const se_CreateLifecyclePolicyCommand = async ( let body: any; body = JSON.stringify( take(input, { + CopyTags: [], + CreateInterval: [], + CrossRegionCopyTargets: (_) => _json(_), + DefaultPolicy: [], Description: [], + Exclusions: (_) => _json(_), ExecutionRoleArn: [], + ExtendDeletion: [], PolicyDetails: (_) => _json(_), + RetainInterval: [], State: [], Tags: (_) => _json(_), }) @@ -151,6 +161,7 @@ export const se_GetLifecyclePoliciesCommand = async ( ], targetTags: [() => input.TargetTags !== void 0, () => (input.TargetTags! || []).map((_entry) => _entry as any)], tagsToAdd: [() => input.TagsToAdd !== void 0, () => (input.TagsToAdd! || []).map((_entry) => _entry as any)], + defaultPolicyType: [, input.DefaultPolicyType!], }); let body: any; return new __HttpRequest({ @@ -287,9 +298,15 @@ export const se_UpdateLifecyclePolicyCommand = async ( let body: any; body = JSON.stringify( take(input, { + CopyTags: [], + CreateInterval: [], + CrossRegionCopyTargets: (_) => _json(_), Description: [], + Exclusions: (_) => _json(_), ExecutionRoleArn: [], + ExtendDeletion: [], PolicyDetails: (_) => _json(_), + RetainInterval: [], State: [], }) ); @@ -832,6 +849,10 @@ const de_ResourceNotFoundExceptionRes = async ( // se_CrossRegionCopyRules omitted. +// se_CrossRegionCopyTarget omitted. + +// se_CrossRegionCopyTargetList omitted. + // se_DeprecateRule omitted. // se_EncryptionConfiguration omitted. @@ -842,6 +863,12 @@ const de_ResourceNotFoundExceptionRes = async ( // se_ExcludeDataVolumeTagList omitted. +// se_ExcludeTagsList omitted. + +// se_ExcludeVolumeTypesList omitted. + +// se_Exclusions omitted. + // se_FastRestoreRule omitted. // se__Parameters omitted. @@ -910,6 +937,10 @@ const de_ResourceNotFoundExceptionRes = async ( // de_CrossRegionCopyRules omitted. +// de_CrossRegionCopyTarget omitted. + +// de_CrossRegionCopyTargetList omitted. + // de_DeprecateRule omitted. // de_EncryptionConfiguration omitted. @@ -920,6 +951,12 @@ const de_ResourceNotFoundExceptionRes = async ( // de_ExcludeDataVolumeTagList omitted. +// de_ExcludeTagsList omitted. + +// de_ExcludeVolumeTypesList omitted. + +// de_Exclusions omitted. + // de_FastRestoreRule omitted. /** @@ -929,6 +966,7 @@ const de_LifecyclePolicy = (output: any, context: __SerdeContext): LifecyclePoli return take(output, { DateCreated: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), DateModified: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)), + DefaultPolicy: __expectBoolean, Description: __expectString, ExecutionRoleArn: __expectString, PolicyArn: __expectString, diff --git a/codegen/sdk-codegen/aws-models/dlm.json b/codegen/sdk-codegen/aws-models/dlm.json index e2cdfa61255b7..6038220be0199 100644 --- a/codegen/sdk-codegen/aws-models/dlm.json +++ b/codegen/sdk-codegen/aws-models/dlm.json @@ -88,7 +88,7 @@ } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies only] Specifies information about the archive storage tier retention period.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies only] Specifies information about the archive storage tier retention period.

    " } }, "com.amazonaws.dlm#ArchiveRule": { @@ -104,7 +104,7 @@ } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies only] Specifies a snapshot archiving rule for a schedule.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies only] Specifies a snapshot archiving rule for a schedule.

    " } }, "com.amazonaws.dlm#AvailabilityZone": { @@ -164,6 +164,14 @@ } } }, + "com.amazonaws.dlm#CreateInterval": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1 + } + } + }, "com.amazonaws.dlm#CreateLifecyclePolicy": { "type": "operation", "input": { @@ -184,7 +192,7 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates a policy to manage the lifecycle of the specified Amazon Web Services resources. You can\n\t\t\tcreate up to 100 lifecycle policies.

    ", + "smithy.api#documentation": "

    Creates an Amazon Data Lifecycle Manager lifecycle policy. Amazon Data Lifecycle Manager supports the following policy types:

    \n
      \n
    • \n

      Custom EBS snapshot policy

      \n
    • \n
    • \n

      Custom EBS-backed AMI policy

      \n
    • \n
    • \n

      Cross-account copy event policy

      \n
    • \n
    • \n

      Default policy for EBS snapshots

      \n
    • \n
    • \n

      Default policy for EBS-backed AMIs

      \n
    • \n
    \n

    For more information, see \n\t\t\tDefault policies vs custom policies.

    \n \n

    If you create a default policy, you can specify the request parameters either in \n\t\t\t\tthe request body, or in the PolicyDetails request structure, but not both.

    \n
    ", "smithy.api#http": { "method": "POST", "uri": "/policies", @@ -215,16 +223,14 @@ "target": "com.amazonaws.dlm#SettablePolicyStateValues", "traits": { "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

    The desired activation state of the lifecycle policy after creation.

    ", + "smithy.api#documentation": "

    The activation state of the lifecycle policy after creation.

    ", "smithy.api#required": {} } }, "PolicyDetails": { "target": "com.amazonaws.dlm#PolicyDetails", "traits": { - "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

    The configuration details of the lifecycle policy.

    ", - "smithy.api#required": {} + "smithy.api#documentation": "

    The configuration details of the lifecycle policy.

    \n \n

    If you create a default policy, you can specify the request parameters either in \n\t\t\t\tthe request body, or in the PolicyDetails request structure, but not both.

    \n
    " } }, "Tags": { @@ -232,6 +238,48 @@ "traits": { "smithy.api#documentation": "

    The tags to apply to the lifecycle policy during creation.

    " } + }, + "DefaultPolicy": { + "target": "com.amazonaws.dlm#DefaultPolicyTypeValues", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specify the type of default policy to create.

    \n
      \n
    • \n

      To create a default policy for EBS snapshots, that creates snapshots of all volumes in the\n\t\t\t\t\tRegion that do not have recent backups, specify VOLUME.

      \n
    • \n
    • \n

      To create a default policy for EBS-backed AMIs, that creates EBS-backed \n\t\t\t\t\tAMIs from all instances in the Region that do not have recent backups, specify \n\t\t\t\t\tINSTANCE.

      \n
    • \n
    " + } + }, + "CreateInterval": { + "target": "com.amazonaws.dlm#CreateInterval", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies how often the policy should run and create snapshots or AMIs. \n\t\t\tThe creation frequency can range from 1 to 7 days. If you do not specify a value, the \n\t\t\tdefault is 1.

    \n

    Default: 1

    " + } + }, + "RetainInterval": { + "target": "com.amazonaws.dlm#RetainInterval", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies how long the policy should retain snapshots or AMIs before \n\t\t\tdeleting them. The retention period can range from 2 to 14 days, but it must be greater \n\t\t\tthan the creation frequency to ensure that the policy retains at least 1 snapshot or \n\t\t\tAMI at any given time. If you do not specify a value, the default is 7.

    \n

    Default: 7

    " + } + }, + "CopyTags": { + "target": "com.amazonaws.dlm#CopyTagsNullable", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Indicates whether the policy should copy tags from the source resource \n\t\t\tto the snapshot or AMI. If you do not specify a value, the default is false.

    \n

    Default: false

    " + } + }, + "ExtendDeletion": { + "target": "com.amazonaws.dlm#ExtendDeletion", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Defines the snapshot or AMI retention behavior for the policy if the \n\t\t\tsource volume or instance is deleted, or if the policy enters the error, disabled, or \n\t\t\tdeleted state.

    \n

    By default (ExtendDeletion=false):

    \n
      \n
    • \n

      If a source resource is deleted, Amazon Data Lifecycle Manager will continue to delete previously \n\t\t\t\tcreated snapshots or AMIs, up to but not including the last one, based on the \n\t\t\t\tspecified retention period. If you want Amazon Data Lifecycle Manager to delete all snapshots or AMIs, \n\t\t\t\tincluding the last one, specify true.

      \n
    • \n
    • \n

      If a policy enters the error, disabled, or deleted state, Amazon Data Lifecycle Manager stops deleting \n\t\t\t\t\tsnapshots and AMIs. If you want Amazon Data Lifecycle Manager to continue deleting snapshots or AMIs, \n\t\t\t\t\tincluding the last one, if the policy enters one of these states, specify \n\t\t\t\t\ttrue.

      \n
    • \n
    \n

    If you enable extended deletion (ExtendDeletion=true), \n\t\t\tyou override both default behaviors simultaneously.

    \n

    If you do not specify a value, the default is false.

    \n

    Default: false

    " + } + }, + "CrossRegionCopyTargets": { + "target": "com.amazonaws.dlm#CrossRegionCopyTargetList", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies destination Regions for snapshot or AMI copies. You can specify \n\t\t\tup to 3 destination Regions. If you do not want to create cross-Region copies, omit this \n\t\t\tparameter.

    " + } + }, + "Exclusions": { + "target": "com.amazonaws.dlm#Exclusions", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies exclusion parameters for volumes or instances for which you \n\t\t\tdo not want to create snapshots or AMIs. The policy will not create snapshots or AMIs \n\t\t\tfor target resources that match any of the specified exclusion parameters.

    " + } } }, "traits": { @@ -258,7 +306,7 @@ "Location": { "target": "com.amazonaws.dlm#LocationValues", "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies only] Specifies the destination for snapshots created by the policy. To create \n\t\t\tsnapshots in the same Region as the source resource, specify CLOUD. To create \n\t\t\tsnapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL. \n\t\t\tIf you omit this parameter, CLOUD is used by default.

    \n

    If the policy targets resources in an Amazon Web Services Region, then you must create \n\t\t\tsnapshots in the same Region as the source resource. If the policy targets resources on an \n\t\t\tOutpost, then you can create snapshots on the same Outpost as the source resource, or in \n\t\t\tthe Region of that Outpost.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies only] Specifies the destination for snapshots created by the policy. To create \n\t\t\tsnapshots in the same Region as the source resource, specify CLOUD. To create \n\t\t\tsnapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL. \n\t\t\tIf you omit this parameter, CLOUD is used by default.

    \n

    If the policy targets resources in an Amazon Web Services Region, then you must create \n\t\t\tsnapshots in the same Region as the source resource. If the policy targets resources on an \n\t\t\tOutpost, then you can create snapshots on the same Outpost as the source resource, or in \n\t\t\tthe Region of that Outpost.

    " } }, "Interval": { @@ -288,12 +336,12 @@ "Scripts": { "target": "com.amazonaws.dlm#ScriptsList", "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies that target instances only] Specifies pre and/or post scripts for a snapshot lifecycle policy \n\t\t\tthat targets instances. This is useful for creating application-consistent snapshots, or for \n\t\t\tperforming specific administrative tasks before or after Amazon Data Lifecycle Manager initiates snapshot creation.

    \n

    For more information, see Automating \n\t\t\t\tapplication-consistent snapshots with pre and post scripts.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies that target instances only] Specifies pre and/or post scripts for a snapshot lifecycle policy \n\t\t\tthat targets instances. This is useful for creating application-consistent snapshots, or for \n\t\t\tperforming specific administrative tasks before or after Amazon Data Lifecycle Manager initiates snapshot creation.

    \n

    For more information, see Automating \n\t\t\t\tapplication-consistent snapshots with pre and post scripts.

    " } } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot and AMI policies only] Specifies when the policy should create snapshots or AMIs.

    \n \n
      \n
    • \n

      You must specify either CronExpression, or \n\t\t\t\t\t\tInterval, IntervalUnit, \n\t\t\t\t\t\tand Times.

      \n
    • \n
    • \n

      If you need to specify an ArchiveRule \n\t\t\t\t\t\tfor the schedule, then you must specify a creation frequency of at least \n\t\t\t\t\t\t28 days.

      \n
    • \n
    \n
    " + "smithy.api#documentation": "

    \n [Custom snapshot and AMI policies only] Specifies when the policy should create snapshots or AMIs.

    \n \n
      \n
    • \n

      You must specify either CronExpression, or \n\t\t\t\t\t\tInterval, IntervalUnit, \n\t\t\t\t\t\tand Times.

      \n
    • \n
    • \n

      If you need to specify an ArchiveRule \n\t\t\t\t\t\tfor the schedule, then you must specify a creation frequency of at least \n\t\t\t\t\t\t28 days.

      \n
    • \n
    \n
    " } }, "com.amazonaws.dlm#CronExpression": { @@ -362,7 +410,7 @@ } }, "traits": { - "smithy.api#documentation": "

    \n [AMI policies only] Specifies an AMI deprecation rule for cross-Region AMI copies created by an AMI policy.

    " + "smithy.api#documentation": "

    \n [Custom AMI policies only] Specifies an AMI deprecation rule for cross-Region AMI copies created by an AMI policy.

    " } }, "com.amazonaws.dlm#CrossRegionCopyRetainRule": { @@ -391,13 +439,13 @@ "TargetRegion": { "target": "com.amazonaws.dlm#TargetRegion", "traits": { - "smithy.api#documentation": "\n

    Use this parameter for AMI policies only. For snapshot policies, use \n\t\t\t\tTarget instead. For snapshot policies \n\t\t\t\tcreated before the Target parameter \n\t\t\t\twas introduced, this parameter indicates the target Region for snapshot \n\t\t\t\tcopies.

    \n

    \n
    \n

    \n [AMI policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the \n\t\t\tsnapshot copies.

    " + "smithy.api#documentation": "\n

    Use this parameter for AMI policies only. For snapshot policies, use \n\t\t\t\tTarget instead. For snapshot policies \n\t\t\t\tcreated before the Target parameter \n\t\t\t\twas introduced, this parameter indicates the target Region for snapshot \n\t\t\t\tcopies.

    \n

    \n
    \n

    \n [Custom AMI policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the \n\t\t\tsnapshot copies.

    " } }, "Target": { "target": "com.amazonaws.dlm#Target", "traits": { - "smithy.api#documentation": "\n

    Use this parameter for snapshot policies only. For AMI policies, use \n\t\t\t\tTargetRegion instead.

    \n
    \n

    \n [Snapshot policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the \n\t\t\tsnapshot copies.

    " + "smithy.api#documentation": "\n

    Use this parameter for snapshot policies only. For AMI policies, use \n\t\t\t\tTargetRegion instead.

    \n
    \n

    \n [Custom snapshot policies only] The target Region or the Amazon Resource Name (ARN) of the target Outpost for the \n\t\t\tsnapshot copies.

    " } }, "Encrypted": { @@ -429,12 +477,12 @@ "DeprecateRule": { "target": "com.amazonaws.dlm#CrossRegionCopyDeprecateRule", "traits": { - "smithy.api#documentation": "

    \n [AMI policies only] The AMI deprecation rule for cross-Region AMI copies created by the rule.

    " + "smithy.api#documentation": "

    \n [Custom AMI policies only] The AMI deprecation rule for cross-Region AMI copies created by the rule.

    " } } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot and AMI policies only] Specifies a cross-Region copy rule for a snapshot and AMI policies.

    \n \n

    To specify a cross-Region copy action for event-based polices, use \n\t\t\t\tCrossRegionCopyAction.

    \n
    " + "smithy.api#documentation": "

    \n [Custom snapshot and AMI policies only] Specifies a cross-Region copy rule for a snapshot and AMI policies.

    \n \n

    To specify a cross-Region copy action for event-based polices, use \n\t\t\t\tCrossRegionCopyAction.

    \n
    " } }, "com.amazonaws.dlm#CrossRegionCopyRules": { @@ -449,6 +497,75 @@ } } }, + "com.amazonaws.dlm#CrossRegionCopyTarget": { + "type": "structure", + "members": { + "TargetRegion": { + "target": "com.amazonaws.dlm#TargetRegion", + "traits": { + "smithy.api#documentation": "

    The target Region, for example us-east-1.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies a destination Region for cross-Region copy actions.

    " + } + }, + "com.amazonaws.dlm#CrossRegionCopyTargetList": { + "type": "list", + "member": { + "target": "com.amazonaws.dlm#CrossRegionCopyTarget" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 3 + } + } + }, + "com.amazonaws.dlm#DefaultPoliciesTypeValues": { + "type": "enum", + "members": { + "VOLUME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VOLUME" + } + }, + "INSTANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INSTANCE" + } + }, + "ALL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ALL" + } + } + } + }, + "com.amazonaws.dlm#DefaultPolicy": { + "type": "boolean" + }, + "com.amazonaws.dlm#DefaultPolicyTypeValues": { + "type": "enum", + "members": { + "VOLUME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VOLUME" + } + }, + "INSTANCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INSTANCE" + } + } + } + }, "com.amazonaws.dlm#DeleteLifecyclePolicy": { "type": "operation", "input": { @@ -523,7 +640,7 @@ } }, "traits": { - "smithy.api#documentation": "

    \n [AMI policies only] Specifies an AMI deprecation rule for AMIs created by an AMI lifecycle policy.

    \n

    For age-based schedules, you must specify Interval and \n\t\t\tIntervalUnit. For count-based schedules, you must specify \n\t\t\tCount.

    " + "smithy.api#documentation": "

    \n [Custom AMI policies only] Specifies an AMI deprecation rule for AMIs created by an AMI lifecycle policy.

    \n

    For age-based schedules, you must specify Interval and \n\t\t\tIntervalUnit. For count-based schedules, you must specify \n\t\t\tCount.

    " } }, "com.amazonaws.dlm#DescriptionRegex": { @@ -646,6 +763,9 @@ "com.amazonaws.dlm#ExcludeBootVolume": { "type": "boolean" }, + "com.amazonaws.dlm#ExcludeBootVolumes": { + "type": "boolean" + }, "com.amazonaws.dlm#ExcludeDataVolumeTagList": { "type": "list", "member": { @@ -658,6 +778,56 @@ } } }, + "com.amazonaws.dlm#ExcludeTagsList": { + "type": "list", + "member": { + "target": "com.amazonaws.dlm#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.dlm#ExcludeVolumeTypesList": { + "type": "list", + "member": { + "target": "com.amazonaws.dlm#VolumeTypeValues" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 6 + } + } + }, + "com.amazonaws.dlm#Exclusions": { + "type": "structure", + "members": { + "ExcludeBootVolumes": { + "target": "com.amazonaws.dlm#ExcludeBootVolumes", + "traits": { + "smithy.api#documentation": "

    \n [Default policies for EBS snapshots only] Indicates whether to exclude volumes that are attached to \n\t\t\tinstances as the boot volume. If you exclude boot volumes, only volumes attached as data \n\t\t\t(non-boot) volumes will be backed up by the policy. To exclude boot volumes, specify \n\t\t\ttrue.

    " + } + }, + "ExcludeVolumeTypes": { + "target": "com.amazonaws.dlm#ExcludeVolumeTypesList", + "traits": { + "smithy.api#documentation": "

    \n [Default policies for EBS snapshots only] Specifies the volume types to exclude. Volumes of the specified \n\t\t\ttypes will not be targeted by the policy.

    " + } + }, + "ExcludeTags": { + "target": "com.amazonaws.dlm#ExcludeTagsList", + "traits": { + "smithy.api#documentation": "

    \n [Default policies for EBS-backed AMIs only] Specifies whether to exclude volumes that have specific tags.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies exclusion parameters for volumes or instances for which you \n\t\t\tdo not want to create snapshots or AMIs. The policy will not create snapshots or AMIs \n\t\t\tfor target resources that match any of the specified exclusion parameters.

    " + } + }, "com.amazonaws.dlm#ExecuteOperationOnScriptFailure": { "type": "boolean" }, @@ -692,6 +862,9 @@ "smithy.api#pattern": "^arn:aws(-[a-z]{1,3}){0,2}:iam::\\d+:role/" } }, + "com.amazonaws.dlm#ExtendDeletion": { + "type": "boolean" + }, "com.amazonaws.dlm#FastRestoreRule": { "type": "structure", "members": { @@ -723,7 +896,7 @@ } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies only] Specifies a rule for enabling fast snapshot restore for snapshots created by\n\t\t\tsnapshot policies. You can enable fast snapshot restore based on either a count or a\n\t\t\ttime interval.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies only] Specifies a rule for enabling fast snapshot restore for snapshots created by\n\t\t\tsnapshot policies. You can enable fast snapshot restore based on either a count or a\n\t\t\ttime interval.

    " } }, "com.amazonaws.dlm#GetLifecyclePolicies": { @@ -794,6 +967,13 @@ "smithy.api#documentation": "

    The tags to add to objects created by the policy.

    \n

    Tags are strings in the format key=value.

    \n

    These user-defined tags are added in addition to the Amazon Web Services-added lifecycle tags.

    ", "smithy.api#httpQuery": "tagsToAdd" } + }, + "DefaultPolicyType": { + "target": "com.amazonaws.dlm#DefaultPoliciesTypeValues", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies the type of default policy to get. Specify one of the following:

    \n
      \n
    • \n

      \n VOLUME - To get only the default policy for EBS snapshots

      \n
    • \n
    • \n

      \n INSTANCE - To get only the default policy for EBS-backed AMIs

      \n
    • \n
    • \n

      \n ALL - To get all default policies

      \n
    • \n
    ", + "smithy.api#httpQuery": "defaultPolicyType" + } } }, "traits": { @@ -1020,10 +1200,16 @@ "traits": { "smithy.api#documentation": "

    The Amazon Resource Name (ARN) of the policy.

    " } + }, + "DefaultPolicy": { + "target": "com.amazonaws.dlm#DefaultPolicy", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] The type of default policy. Values include:

    \n
      \n
    • \n

      \n VOLUME - Default policy for EBS snapshots

      \n
    • \n
    • \n

      \n INSTANCE - Default policy for EBS-backed AMIs

      \n
    • \n
    " + } } }, "traits": { - "smithy.api#documentation": "

    \n [All policy types] Detailed information about a snapshot, AMI, or event-based lifecycle policy.

    " + "smithy.api#documentation": "

    \n [Custom policies only] Detailed information about a snapshot, AMI, or event-based lifecycle policy.

    " } }, "com.amazonaws.dlm#LifecyclePolicySummary": { @@ -1058,6 +1244,12 @@ "traits": { "smithy.api#documentation": "

    The type of policy. EBS_SNAPSHOT_MANAGEMENT indicates that the policy \n\t\t\tmanages the lifecycle of Amazon EBS snapshots. IMAGE_MANAGEMENT \n\t\t\tindicates that the policy manages the lifecycle of EBS-backed AMIs. \n\t\t\tEVENT_BASED_POLICY indicates that the policy automates cross-account \n\t\t\tsnapshot copies for snapshots that are shared with your account.

    " } + }, + "DefaultPolicy": { + "target": "com.amazonaws.dlm#DefaultPolicy", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] The type of default policy. Values include:

    \n
      \n
    • \n

      \n VOLUME - Default policy for EBS snapshots

      \n
    • \n
    • \n

      \n INSTANCE - Default policy for EBS-backed AMIs

      \n
    • \n
    " + } } }, "traits": { @@ -1185,24 +1377,24 @@ "ExcludeBootVolume": { "target": "com.amazonaws.dlm#ExcludeBootVolume", "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies that target instances only] Indicates whether to exclude the root volume from multi-volume \n\t\t\tsnapshot sets. The default is false. If you specify true, \n\t\t\tthen the root volumes attached to targeted instances will be excluded from the multi-volume \n\t\t\tsnapshot sets created by the policy.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies that target instances only] Indicates whether to exclude the root volume from multi-volume \n\t\t\tsnapshot sets. The default is false. If you specify true, \n\t\t\tthen the root volumes attached to targeted instances will be excluded from the multi-volume \n\t\t\tsnapshot sets created by the policy.

    " } }, "NoReboot": { "target": "com.amazonaws.dlm#NoReboot", "traits": { - "smithy.api#documentation": "

    \n [AMI policies only] Indicates whether targeted instances are rebooted when the lifecycle policy \n\t\t\truns. true indicates that targeted instances are not rebooted when the policy \n\t\t\truns. false indicates that target instances are rebooted when the policy runs. \n\t\t\tThe default is true (instances are not rebooted).

    " + "smithy.api#documentation": "

    \n [Custom AMI policies only] Indicates whether targeted instances are rebooted when the lifecycle policy \n\t\t\truns. true indicates that targeted instances are not rebooted when the policy \n\t\t\truns. false indicates that target instances are rebooted when the policy runs. \n\t\t\tThe default is true (instances are not rebooted).

    " } }, "ExcludeDataVolumeTags": { "target": "com.amazonaws.dlm#ExcludeDataVolumeTagList", "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies that target instances only] The tags used to identify data (non-root) volumes to exclude from \n\t\t\tmulti-volume snapshot sets.

    \n

    If you create a snapshot lifecycle policy that targets instances and you specify tags for \n\t\t\tthis parameter, then data volumes with the specified tags that are attached to targeted \n\t\t\tinstances will be excluded from the multi-volume snapshot sets created by the policy.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies that target instances only] The tags used to identify data (non-root) volumes to exclude from \n\t\t\tmulti-volume snapshot sets.

    \n

    If you create a snapshot lifecycle policy that targets instances and you specify tags for \n\t\t\tthis parameter, then data volumes with the specified tags that are attached to targeted \n\t\t\tinstances will be excluded from the multi-volume snapshot sets created by the policy.

    " } } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot and AMI policies only] Specifies optional parameters for snapshot and AMI policies. The \n\t\t\tset of valid parameters depends on the combination of policy type and target resource \n\t\t\ttype.

    \n

    If you choose to exclude boot volumes and you specify tags that consequently exclude \n\t\t\tall of the additional data volumes attached to an instance, then Amazon Data Lifecycle Manager will not create \n\t\t\tany snapshots for the affected instance, and it will emit a SnapshotsCreateFailed \n\t\t\tAmazon CloudWatch metric. For more information, see Monitor your policies \n\t\t\t\tusing Amazon CloudWatch.

    " + "smithy.api#documentation": "

    \n [Custom snapshot and AMI policies only] Specifies optional parameters for snapshot and AMI policies. The \n\t\t\tset of valid parameters depends on the combination of policy type and target resource \n\t\t\ttype.

    \n

    If you choose to exclude boot volumes and you specify tags that consequently exclude \n\t\t\tall of the additional data volumes attached to an instance, then Amazon Data Lifecycle Manager will not create \n\t\t\tany snapshots for the affected instance, and it will emit a SnapshotsCreateFailed \n\t\t\tAmazon CloudWatch metric. For more information, see Monitor your policies \n\t\t\t\tusing Amazon CloudWatch.

    " } }, "com.amazonaws.dlm#PolicyArn": { @@ -1231,37 +1423,37 @@ "PolicyType": { "target": "com.amazonaws.dlm#PolicyTypeValues", "traits": { - "smithy.api#documentation": "

    \n [All policy types] The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT \n\t\t\tto create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT \n\t\t\tto create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY \n\t\t\tto create an event-based policy that performs specific actions when a defined event occurs in your Amazon Web Services account.

    \n

    The default is EBS_SNAPSHOT_MANAGEMENT.

    " + "smithy.api#documentation": "

    \n [Custom policies only] The valid target resource types and actions a policy can manage. Specify EBS_SNAPSHOT_MANAGEMENT \n\t\t\tto create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT \n\t\t\tto create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY \n\t\t\tto create an event-based policy that performs specific actions when a defined event occurs in your Amazon Web Services account.

    \n

    The default is EBS_SNAPSHOT_MANAGEMENT.

    " } }, "ResourceTypes": { "target": "com.amazonaws.dlm#ResourceTypeValuesList", "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies. Use VOLUME to \n\t\t\tcreate snapshots of individual volumes or use INSTANCE to create multi-volume \n\t\t\tsnapshots from the volumes for an instance.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies only] The target resource type for snapshot and AMI lifecycle policies. Use VOLUME to \n\t\t\tcreate snapshots of individual volumes or use INSTANCE to create multi-volume \n\t\t\tsnapshots from the volumes for an instance.

    " } }, "ResourceLocations": { "target": "com.amazonaws.dlm#ResourceLocationList", "traits": { - "smithy.api#documentation": "

    \n [Snapshot and AMI policies only] The location of the resources to backup. If the source resources are located in an \n\t\t\tAmazon Web Services Region, specify CLOUD. If the source resources are located on an Outpost \n\t\t\tin your account, specify OUTPOST.

    \n

    If you specify OUTPOST, Amazon Data Lifecycle Manager backs up all resources \n\t\t\t\tof the specified type with matching target tags across all of the Outposts in your account.

    " + "smithy.api#documentation": "

    \n [Custom snapshot and AMI policies only] The location of the resources to backup. If the source resources are located in an \n\t\t\tAmazon Web Services Region, specify CLOUD. If the source resources are located on an Outpost \n\t\t\tin your account, specify OUTPOST.

    \n

    If you specify OUTPOST, Amazon Data Lifecycle Manager backs up all resources \n\t\t\t\tof the specified type with matching target tags across all of the Outposts in your account.

    " } }, "TargetTags": { "target": "com.amazonaws.dlm#TargetTagList", "traits": { - "smithy.api#documentation": "

    \n [Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.

    " + "smithy.api#documentation": "

    \n [Custom snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.

    " } }, "Schedules": { "target": "com.amazonaws.dlm#ScheduleList", "traits": { - "smithy.api#documentation": "

    \n [Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy \n\t\t\tcan have up to four schedules—one mandatory schedule and up to three optional schedules.

    " + "smithy.api#documentation": "

    \n [Custom snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle policies. A policy \n\t\t\tcan have up to four schedules—one mandatory schedule and up to three optional schedules.

    " } }, "Parameters": { "target": "com.amazonaws.dlm#Parameters", "traits": { - "smithy.api#documentation": "

    \n [Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.

    \n \n

    If you are modifying a policy that was created or previously modified using the Amazon \n\t\t\t\tData Lifecycle Manager console, then you must include this parameter and specify either \n\t\t\t\tthe default values or the new values that you require. You can't omit this parameter or \n\t\t\t\tset its values to null.

    \n
    " + "smithy.api#documentation": "

    \n [Custom snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.

    \n \n

    If you are modifying a policy that was created or previously modified using the Amazon \n\t\t\t\tData Lifecycle Manager console, then you must include this parameter and specify either \n\t\t\t\tthe default values or the new values that you require. You can't omit this parameter or \n\t\t\t\tset its values to null.

    \n
    " } }, "EventSource": { @@ -1275,10 +1467,58 @@ "traits": { "smithy.api#documentation": "

    \n [Event-based policies only] The actions to be performed when the event-based policy is activated. You can specify \n\t\t\tonly one action per policy.

    " } + }, + "PolicyLanguage": { + "target": "com.amazonaws.dlm#PolicyLanguageValues", + "traits": { + "smithy.api#documentation": "

    The type of policy to create. Specify one of the following:

    \n
      \n
    • \n

      \n SIMPLIFIED To create a default policy.

      \n
    • \n
    • \n

      \n STANDARD To create a custom policy.

      \n
    • \n
    " + } + }, + "ResourceType": { + "target": "com.amazonaws.dlm#ResourceTypeValues", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specify the type of default policy to create.

    \n
      \n
    • \n

      To create a default policy for EBS snapshots, that creates snapshots of all volumes in the\n\t\t\t\t\tRegion that do not have recent backups, specify VOLUME.

      \n
    • \n
    • \n

      To create a default policy for EBS-backed AMIs, that creates EBS-backed \n\t\t\t\t\tAMIs from all instances in the Region that do not have recent backups, specify \n\t\t\t\t\tINSTANCE.

      \n
    • \n
    " + } + }, + "CreateInterval": { + "target": "com.amazonaws.dlm#CreateInterval", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies how often the policy should run and create snapshots or AMIs. \n\t\t\tThe creation frequency can range from 1 to 7 days. If you do not specify a value, the \n\t\t\tdefault is 1.

    \n

    Default: 1

    " + } + }, + "RetainInterval": { + "target": "com.amazonaws.dlm#RetainInterval", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies how long the policy should retain snapshots or AMIs before \n\t\t\tdeleting them. The retention period can range from 2 to 14 days, but it must be greater \n\t\t\tthan the creation frequency to ensure that the policy retains at least 1 snapshot or \n\t\t\tAMI at any given time. If you do not specify a value, the default is 7.

    \n

    Default: 7

    " + } + }, + "CopyTags": { + "target": "com.amazonaws.dlm#CopyTagsNullable", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Indicates whether the policy should copy tags from the source resource \n\t\t\tto the snapshot or AMI. If you do not specify a value, the default is false.

    \n

    Default: false

    " + } + }, + "CrossRegionCopyTargets": { + "target": "com.amazonaws.dlm#CrossRegionCopyTargetList", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies destination Regions for snapshot or AMI copies. You can specify \n\t\t\tup to 3 destination Regions. If you do not want to create cross-Region copies, omit this \n\t\t\tparameter.

    " + } + }, + "ExtendDeletion": { + "target": "com.amazonaws.dlm#ExtendDeletion", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Defines the snapshot or AMI retention behavior for the policy if the \n\t\t\tsource volume or instance is deleted, or if the policy enters the error, disabled, or \n\t\t\tdeleted state.

    \n

    By default (ExtendDeletion=false):

    \n
      \n
    • \n

      If a source resource is deleted, Amazon Data Lifecycle Manager will continue to delete previously \n\t\t\t\t\tcreated snapshots or AMIs, up to but not including the last one, based on the \n\t\t\t\t\tspecified retention period. If you want Amazon Data Lifecycle Manager to delete all snapshots or AMIs, \n\t\t\t\t\tincluding the last one, specify true.

      \n
    • \n
    • \n

      If a policy enters the error, disabled, or deleted state, Amazon Data Lifecycle Manager stops deleting \n\t\t\t\t\tsnapshots and AMIs. If you want Amazon Data Lifecycle Manager to continue deleting snapshots or AMIs, \n\t\t\t\t\tincluding the last one, if the policy enters one of these states, specify \n\t\t\t\t\ttrue.

      \n
    • \n
    \n

    If you enable extended deletion (ExtendDeletion=true), \n\t\t\tyou override both default behaviors simultaneously.

    \n

    If you do not specify a value, the default is false.

    \n

    Default: false

    " + } + }, + "Exclusions": { + "target": "com.amazonaws.dlm#Exclusions", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies exclusion parameters for volumes or instances for which you \n\t\t\tdo not want to create snapshots or AMIs. The policy will not create snapshots or AMIs \n\t\t\tfor target resources that match any of the specified exclusion parameters.

    " + } } }, "traits": { - "smithy.api#documentation": "

    \n [All policy types] Specifies the configuration of a lifecycle policy.

    " + "smithy.api#documentation": "

    Specifies the configuration of a lifecycle policy.

    " } }, "com.amazonaws.dlm#PolicyId": { @@ -1288,7 +1528,7 @@ "min": 0, "max": 64 }, - "smithy.api#pattern": "^policy-[A-Za-z0-9]+$" + "smithy.api#pattern": "^policy-[a-f0-9]+$" } }, "com.amazonaws.dlm#PolicyIdList": { @@ -1297,6 +1537,23 @@ "target": "com.amazonaws.dlm#PolicyId" } }, + "com.amazonaws.dlm#PolicyLanguageValues": { + "type": "enum", + "members": { + "SIMPLIFIED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SIMPLIFIED" + } + }, + "STANDARD": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "STANDARD" + } + } + } + }, "com.amazonaws.dlm#PolicyTypeValues": { "type": "enum", "members": { @@ -1406,6 +1663,14 @@ } } }, + "com.amazonaws.dlm#RetainInterval": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1 + } + } + }, "com.amazonaws.dlm#RetainRule": { "type": "structure", "members": { @@ -1429,7 +1694,7 @@ } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot and AMI policies only] Specifies a retention rule for snapshots created by snapshot policies, or for AMIs \n\t\t\tcreated by AMI policies.

    \n \n

    For snapshot policies that have an ArchiveRule, this retention rule\n\t\t\t\tapplies to standard tier retention. When the retention threshold is met, snapshots\n\t\t\t\tare moved from the standard to the archive tier.

    \n

    For snapshot policies that do not have an ArchiveRule, snapshots \n\t\t\t\tare permanently deleted when this retention threshold is met.

    \n
    \n

    You can retain snapshots based on either a count or a time interval.

    \n
      \n
    • \n

      \n Count-based retention\n

      \n

      You must specify Count. \n\t\t\t\t\tIf you specify an ArchiveRule for the schedule, then you can specify a retention count of \n\t\t\t\t\t0 to archive snapshots immediately after creation. If you specify a FastRestoreRule, \n\t\t\t\t\tShareRule, or a \n\t\t\t\t\tCrossRegionCopyRule, then you must specify a retention count \n\t\t\t\t\tof 1 or more.

      \n
    • \n
    • \n

      \n Age-based retention\n

      \n

      You must specify Interval \n\t\t\t\t\tand IntervalUnit. If you specify an ArchiveRule for the \n\t\t\t\t\tschedule, then you can specify a retention interval of 0 days to archive snapshots immediately \n\t\t\t\t\tafter creation. If you specify a FastRestoreRule, ShareRule, or a \n\t\t\t\t\tCrossRegionCopyRule, \n\t\t\t\t\tthen you must specify a retention interval of 1 day or \n\t\t\t\t\tmore.

      \n
    • \n
    " + "smithy.api#documentation": "

    \n [Custom snapshot and AMI policies only] Specifies a retention rule for snapshots created by snapshot policies, or for AMIs \n\t\t\tcreated by AMI policies.

    \n \n

    For snapshot policies that have an ArchiveRule, this retention rule\n\t\t\t\tapplies to standard tier retention. When the retention threshold is met, snapshots\n\t\t\t\tare moved from the standard to the archive tier.

    \n

    For snapshot policies that do not have an ArchiveRule, snapshots \n\t\t\t\tare permanently deleted when this retention threshold is met.

    \n
    \n

    You can retain snapshots based on either a count or a time interval.

    \n
      \n
    • \n

      \n Count-based retention\n

      \n

      You must specify Count. \n\t\t\t\t\tIf you specify an ArchiveRule for the schedule, then you can specify a retention count of \n\t\t\t\t\t0 to archive snapshots immediately after creation. If you specify a FastRestoreRule, \n\t\t\t\t\tShareRule, or a \n\t\t\t\t\tCrossRegionCopyRule, then you must specify a retention count \n\t\t\t\t\tof 1 or more.

      \n
    • \n
    • \n

      \n Age-based retention\n

      \n

      You must specify Interval \n\t\t\t\t\tand IntervalUnit. If you specify an ArchiveRule for the \n\t\t\t\t\tschedule, then you can specify a retention interval of 0 days to archive snapshots immediately \n\t\t\t\t\tafter creation. If you specify a FastRestoreRule, ShareRule, or a \n\t\t\t\t\tCrossRegionCopyRule, \n\t\t\t\t\tthen you must specify a retention interval of 1 day or \n\t\t\t\t\tmore.

      \n
    • \n
    " } }, "com.amazonaws.dlm#RetentionArchiveTier": { @@ -1455,7 +1720,7 @@ } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies only] Describes the retention rule for archived snapshots. Once the archive \n\t\t\tretention threshold is met, the snapshots are permanently deleted from the archive tier.

    \n \n

    The archive retention rule must retain snapshots in the archive tier for a minimum \n\t\t\t\tof 90 days.

    \n
    \n

    For count-based schedules, you must specify Count. For age-based\n\t\t\t\tschedules, you must specify Interval and\n\t\t\t\t IntervalUnit.

    \n

    For more information about using snapshot archiving, see Considerations for \n\t\t\tsnapshot lifecycle policies.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies only] Describes the retention rule for archived snapshots. Once the archive \n\t\t\tretention threshold is met, the snapshots are permanently deleted from the archive tier.

    \n \n

    The archive retention rule must retain snapshots in the archive tier for a minimum \n\t\t\t\tof 90 days.

    \n
    \n

    For count-based schedules, you must specify Count. For age-based\n\t\t\t\tschedules, you must specify Interval and\n\t\t\t\t IntervalUnit.

    \n

    For more information about using snapshot archiving, see Considerations for \n\t\t\tsnapshot lifecycle policies.

    " } }, "com.amazonaws.dlm#RetentionIntervalUnitValues": { @@ -1529,7 +1794,7 @@ "FastRestoreRule": { "target": "com.amazonaws.dlm#FastRestoreRule", "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies only] The rule for enabling fast snapshot restore.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies only] The rule for enabling fast snapshot restore.

    " } }, "CrossRegionCopyRules": { @@ -1541,24 +1806,24 @@ "ShareRules": { "target": "com.amazonaws.dlm#ShareRules", "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies only] The rule for sharing snapshots with other Amazon Web Services accounts.

    " } }, "DeprecateRule": { "target": "com.amazonaws.dlm#DeprecateRule", "traits": { - "smithy.api#documentation": "

    \n [AMI policies only] The AMI deprecation rule for the schedule.

    " + "smithy.api#documentation": "

    \n [Custom AMI policies only] The AMI deprecation rule for the schedule.

    " } }, "ArchiveRule": { "target": "com.amazonaws.dlm#ArchiveRule", "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies that target volumes only] The snapshot archiving rule for the schedule. When you specify an archiving \n\t\t\trule, snapshots are automatically moved from the standard tier to the archive tier once the schedule's \n\t\t\tretention threshold is met. Snapshots are then retained in the archive tier for the archive retention \n\t\t\tperiod that you specify.

    \n

    For more information about using snapshot archiving, see Considerations for \n\t\t\t\tsnapshot lifecycle policies.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule. When you specify an archiving \n\t\t\trule, snapshots are automatically moved from the standard tier to the archive tier once the schedule's \n\t\t\tretention threshold is met. Snapshots are then retained in the archive tier for the archive retention \n\t\t\tperiod that you specify.

    \n

    For more information about using snapshot archiving, see Considerations for \n\t\t\t\tsnapshot lifecycle policies.

    " } } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.

    " + "smithy.api#documentation": "

    \n [Custom snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.

    " } }, "com.amazonaws.dlm#ScheduleList": { @@ -1626,7 +1891,7 @@ } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies that target instances only] Information about pre and/or post scripts for a \n\t\t\tsnapshot lifecycle policy that targets instances. For more information, see \n\t\t\t\n\t\t\t\tAutomating application-consistent snapshots with pre and post scripts.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies that target instances only] Information about pre and/or post scripts for a \n\t\t\tsnapshot lifecycle policy that targets instances. For more information, see \n\t\t\t\n\t\t\t\tAutomating application-consistent snapshots with pre and post scripts.

    " } }, "com.amazonaws.dlm#ScriptExecutionTimeout": { @@ -1701,7 +1966,7 @@ } }, "traits": { - "smithy.api#documentation": "

    \n [Snapshot policies only] Specifies a rule for sharing snapshots across Amazon Web Services accounts.

    " + "smithy.api#documentation": "

    \n [Custom snapshot policies only] Specifies a rule for sharing snapshots across Amazon Web Services accounts.

    " } }, "com.amazonaws.dlm#ShareRules": { @@ -2166,6 +2431,42 @@ "traits": { "smithy.api#documentation": "

    The configuration of the lifecycle policy. You cannot update the policy type or the\n\t\t\tresource type.

    " } + }, + "CreateInterval": { + "target": "com.amazonaws.dlm#CreateInterval", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies how often the policy should run and create snapshots or AMIs. \n\t\t\tThe creation frequency can range from 1 to 7 days.

    " + } + }, + "RetainInterval": { + "target": "com.amazonaws.dlm#RetainInterval", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies how long the policy should retain snapshots or AMIs before \n\t\t\tdeleting them. The retention period can range from 2 to 14 days, but it must be greater \n\t\t\tthan the creation frequency to ensure that the policy retains at least 1 snapshot or \n\t\t\tAMI at any given time.

    " + } + }, + "CopyTags": { + "target": "com.amazonaws.dlm#CopyTagsNullable", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Indicates whether the policy should copy tags from the source resource \n\t\t\tto the snapshot or AMI.

    " + } + }, + "ExtendDeletion": { + "target": "com.amazonaws.dlm#ExtendDeletion", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Defines the snapshot or AMI retention behavior for the policy if the \n\t\t\tsource volume or instance is deleted, or if the policy enters the error, disabled, or \n\t\t\tdeleted state.

    \n

    By default (ExtendDeletion=false):

    \n
      \n
    • \n

      If a source resource is deleted, Amazon Data Lifecycle Manager will continue to delete previously \n\t\t\t\t\tcreated snapshots or AMIs, up to but not including the last one, based on the \n\t\t\t\t\tspecified retention period. If you want Amazon Data Lifecycle Manager to delete all snapshots or AMIs, \n\t\t\t\t\tincluding the last one, specify true.

      \n
    • \n
    • \n

      If a policy enters the error, disabled, or deleted state, Amazon Data Lifecycle Manager stops deleting \n\t\t\t\t\tsnapshots and AMIs. If you want Amazon Data Lifecycle Manager to continue deleting snapshots or AMIs, \n\t\t\t\t\tincluding the last one, if the policy enters one of these states, specify \n\t\t\t\t\ttrue.

      \n
    • \n
    \n

    If you enable extended deletion (ExtendDeletion=true), \n\t\t\tyou override both default behaviors simultaneously.

    \n

    Default: false

    " + } + }, + "CrossRegionCopyTargets": { + "target": "com.amazonaws.dlm#CrossRegionCopyTargetList", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies destination Regions for snapshot or AMI copies. You can specify \n\t\t\tup to 3 destination Regions. If you do not want to create cross-Region copies, omit this \n\t\t\tparameter.

    " + } + }, + "Exclusions": { + "target": "com.amazonaws.dlm#Exclusions", + "traits": { + "smithy.api#documentation": "

    \n [Default policies only] Specifies exclusion parameters for volumes or instances for which you \n\t\t\tdo not want to create snapshots or AMIs. The policy will not create snapshots or AMIs \n\t\t\tfor target resources that match any of the specified exclusion parameters.

    " + } } }, "traits": { @@ -2191,6 +2492,9 @@ } } }, + "com.amazonaws.dlm#VolumeTypeValues": { + "type": "string" + }, "com.amazonaws.dlm#dlm_20180112": { "type": "service", "version": "2018-01-12", @@ -3195,17 +3499,6 @@ "expect": { "error": "Invalid Configuration: Missing Region" } - }, - { - "documentation": "Partition doesn't support DualStack", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": true - } } ], "version": "1.0"