Backup / Client / update_recovery_point_lifecycle

update_recovery_point_lifecycle#

Backup.Client.update_recovery_point_lifecycle(**kwargs)#

Sets the transition lifecycle of a recovery point.

The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup transitions and expires backups automatically according to the lifecycle that you define.

Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.

Resource types that are able to be transitioned to cold storage are listed in the “Lifecycle to cold storage” section of the Feature availability by resource table. Backup ignores this expression for other resource types.

This operation does not support continuous backups.

See also: AWS API Documentation

Request Syntax

response = client.update_recovery_point_lifecycle(
    BackupVaultName='string',
    RecoveryPointArn='string',
    Lifecycle={
        'MoveToColdStorageAfterDays': 123,
        'DeleteAfterDays': 123
    }
)
Parameters:
  • BackupVaultName (string) –

    [REQUIRED]

    The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Amazon Web Services Region where they are created. They consist of lowercase letters, numbers, and hyphens.

  • RecoveryPointArn (string) –

    [REQUIRED]

    An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

  • Lifecycle (dict) –

    The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup transitions and expires backups automatically according to the lifecycle that you define.

    Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.

    • MoveToColdStorageAfterDays (integer) –

      Specifies the number of days after creation that a recovery point is moved to cold storage.

    • DeleteAfterDays (integer) –

      Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays.

Return type:

dict

Returns:

Response Syntax

{
    'BackupVaultArn': 'string',
    'RecoveryPointArn': 'string',
    'Lifecycle': {
        'MoveToColdStorageAfterDays': 123,
        'DeleteAfterDays': 123
    },
    'CalculatedLifecycle': {
        'MoveToColdStorageAt': datetime(2015, 1, 1),
        'DeleteAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • BackupVaultArn (string) –

      An ARN that uniquely identifies a backup vault; for example, arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.

    • RecoveryPointArn (string) –

      An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

    • Lifecycle (dict) –

      The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup transitions and expires backups automatically according to the lifecycle that you define.

      Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.

      Resource types that are able to be transitioned to cold storage are listed in the “Lifecycle to cold storage” section of the Feature availability by resource table. Backup ignores this expression for other resource types.

      • MoveToColdStorageAfterDays (integer) –

        Specifies the number of days after creation that a recovery point is moved to cold storage.

      • DeleteAfterDays (integer) –

        Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus MoveToColdStorageAfterDays.

    • CalculatedLifecycle (dict) –

      A CalculatedLifecycle object containing DeleteAt and MoveToColdStorageAt timestamps.

      • MoveToColdStorageAt (datetime) –

        A timestamp that specifies when to transition a recovery point to cold storage.

      • DeleteAt (datetime) –

        A timestamp that specifies when to delete a recovery point.

Exceptions

  • Backup.Client.exceptions.ResourceNotFoundException

  • Backup.Client.exceptions.InvalidParameterValueException

  • Backup.Client.exceptions.InvalidRequestException

  • Backup.Client.exceptions.MissingParameterValueException

  • Backup.Client.exceptions.ServiceUnavailableException