AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon Data Lifecycle Manager UpdateLifecyclePolicy API operation.

Syntax

Update-DLMLifecyclePolicy
-PolicyId <String>
-PolicyDetails_Action <Action[]>
-CopyTag <Boolean>
-PolicyDetails_CopyTag <Boolean>
-CreateInterval <Int32>
-PolicyDetails_CreateInterval <Int32>
-CrossRegionCopyTarget <CrossRegionCopyTarget[]>
-PolicyDetails_CrossRegionCopyTarget <CrossRegionCopyTarget[]>
-Description <String>
-Parameters_DescriptionRegex <String>
-Parameters_EventType <EventTypeValues>
-Parameters_ExcludeBootVolume <Boolean>
-Exclusions_ExcludeBootVolume <Boolean>
-PolicyDetails_Exclusions_ExcludeBootVolumes <Boolean>
-Parameters_ExcludeDataVolumeTag <Tag[]>
-Exclusions_ExcludeTag <Tag[]>
-PolicyDetails_Exclusions_ExcludeTags <Tag[]>
-Exclusions_ExcludeVolumeType <String[]>
-PolicyDetails_Exclusions_ExcludeVolumeTypes <String[]>
-ExecutionRoleArn <String>
-ExtendDeletion <Boolean>
-PolicyDetails_ExtendDeletion <Boolean>
-Parameters_NoReboot <Boolean>
-PolicyDetails_PolicyLanguage <PolicyLanguageValues>
-PolicyDetails_PolicyType <PolicyTypeValues>
-PolicyDetails_ResourceLocation <String[]>
-PolicyDetails_SimplifiedResourceType <ResourceTypeValues>
-PolicyDetails_ResourceType <String[]>
-PolicyDetails_RetainInterval <Int32>
-RetainInterval <Int32>
-PolicyDetails_Schedule <Schedule[]>
-Parameters_SnapshotOwner <String[]>
-State <SettablePolicyStateValues>
-PolicyDetails_TargetTag <Tag[]>
-EventSource_Type <EventSourceValues>
-Select <String>
-PassThru <SwitchParameter>
-Force <SwitchParameter>
-ClientConfig <AmazonDLMConfig>

Description

Updates the specified lifecycle policy. For more information about updating a policy, see Modify lifecycle policies.

Parameters

-ClientConfig <AmazonDLMConfig>
Amazon.PowerShell.Cmdlets.DLM.AmazonDLMClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CopyTag <Boolean>
[Default policies only] Indicates whether the policy should copy tags from the source resource to the snapshot or AMI.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesCopyTags
-CreateInterval <Int32>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-CrossRegionCopyTarget <CrossRegionCopyTarget[]>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesCrossRegionCopyTargets
-Description <String>
A description of the lifecycle policy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-EventSource_Type <EventSourceValues>
The source of the event. Currently only managed CloudWatch Events rules are supported.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_EventSource_Type
-Exclusions_ExcludeBootVolume <Boolean>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesExclusions_ExcludeBootVolumes
-Exclusions_ExcludeTag <Tag[]>
[Default policies for EBS-backed AMIs only] Specifies whether to exclude volumes that have specific tags.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesExclusions_ExcludeTags
-Exclusions_ExcludeVolumeType <String[]>
[Default policies for EBS snapshots only] Specifies the volume types to exclude. Volumes of the specified types will not be targeted by the policy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesExclusions_ExcludeVolumeTypes
-ExecutionRoleArn <String>
The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ExtendDeletion <Boolean>
[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
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Parameters_DescriptionRegex <String>
The snapshot description that can trigger the policy. The description pattern is specified using a regular expression. The policy runs only if a snapshot with a description that matches the specified pattern is shared with your account.For example, specifying ^.*Created for policy: policy-1234567890abcdef0.*$ configures the policy to run only if snapshots created by policy policy-1234567890abcdef0 are shared with your account.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_EventSource_Parameters_DescriptionRegex
-Parameters_EventType <EventTypeValues>
The type of event. Currently, only snapshot sharing events are supported.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_EventSource_Parameters_EventType
-Parameters_ExcludeBootVolume <Boolean>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_Parameters_ExcludeBootVolume
-Parameters_ExcludeDataVolumeTag <Tag[]>
[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 instances will be excluded from the multi-volume snapshot sets created by the policy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_Parameters_ExcludeDataVolumeTags
-Parameters_NoReboot <Boolean>
[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).
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_Parameters_NoReboot
-Parameters_SnapshotOwner <String[]>
The IDs of the Amazon Web Services accounts that can trigger policy by sharing snapshots with your account. The policy only runs if one of the specified Amazon Web Services accounts shares a snapshot with your account.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_EventSource_Parameters_SnapshotOwner
-PassThru <SwitchParameter>
Changes the cmdlet behavior to return the value passed to the PolicyId parameter. The -PassThru parameter is deprecated, use -Select '^PolicyId' instead. This parameter will be removed in a future version.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_Action <Action[]>
[Event-based policies only] The actions to be performed when the event-based policy is activated. You can specify only one action per policy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_Actions
-PolicyDetails_CopyTag <Boolean>
[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
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_CopyTags
-PolicyDetails_CreateInterval <Int32>
[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
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_CrossRegionCopyTarget <CrossRegionCopyTarget[]>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_CrossRegionCopyTargets
-PolicyDetails_Exclusions_ExcludeBootVolumes <Boolean>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_Exclusions_ExcludeTags <Tag[]>
[Default policies for EBS-backed AMIs only] Specifies whether to exclude volumes that have specific tags.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_Exclusions_ExcludeVolumeTypes <String[]>
[Default policies for EBS snapshots only] Specifies the volume types to exclude. Volumes of the specified types will not be targeted by the policy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_ExtendDeletion <Boolean>
[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
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_PolicyLanguage <PolicyLanguageValues>
The type of policy to create. Specify one of the following:
  • SIMPLIFIED To create a default policy.
  • STANDARD To create a custom policy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_PolicyType <PolicyTypeValues>
[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.The default is EBS_SNAPSHOT_MANAGEMENT.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_ResourceLocation <String[]>
[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 of the specified type with matching target tags across all of the Outposts in your account.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_ResourceLocations
-PolicyDetails_ResourceType <String[]>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_ResourceTypes
-PolicyDetails_RetainInterval <Int32>
[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
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_Schedule <Schedule[]>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_Schedules
-PolicyDetails_SimplifiedResourceType <ResourceTypeValues>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PolicyDetails_TargetTag <Tag[]>
[Custom snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPolicyDetails_TargetTags
-PolicyId <String>
The identifier of the lifecycle policy.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-RetainInterval <Int32>
[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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The cmdlet doesn't have a return value by default. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.DLM.Model.UpdateLifecyclePolicyResponse). Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
The desired activation state of the lifecycle policy after creation.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet does not generate any output.The service response (type Amazon.DLM.Model.UpdateLifecyclePolicyResponse) can be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z