CfnBackupVaultPropsMixin
- class aws_cdk.mixins_preview.aws_backup.mixins.CfnBackupVaultPropsMixin(props, *, strategy=None)
Bases:
MixinCreates a logical container where backups are stored.
A
CreateBackupVaultrequest includes a name, optionally one or more resource tags, an encryption key, and a request ID.Do not include sensitive data, such as passport numbers, in the name of a backup vault.
For a sample CloudFormation template, see the AWS Backup Developer Guide .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupvault.html
- CloudformationResource:
AWS::Backup::BackupVault
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_backup import mixins as backup_mixins # access_policy: Any cfn_backup_vault_props_mixin = backup_mixins.CfnBackupVaultPropsMixin(backup_mixins.CfnBackupVaultMixinProps( access_policy=access_policy, backup_vault_name="backupVaultName", backup_vault_tags={ "backup_vault_tags_key": "backupVaultTags" }, encryption_key_arn="encryptionKeyArn", lock_configuration=backup_mixins.CfnBackupVaultPropsMixin.LockConfigurationTypeProperty( changeable_for_days=123, max_retention_days=123, min_retention_days=123 ), notifications=backup_mixins.CfnBackupVaultPropsMixin.NotificationObjectTypeProperty( backup_vault_events=["backupVaultEvents"], sns_topic_arn="snsTopicArn" ) ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Backup::BackupVault.- Parameters:
props (
Union[CfnBackupVaultMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['accessPolicy', 'backupVaultName', 'backupVaultTags', 'encryptionKeyArn', 'lockConfiguration', 'notifications']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
LockConfigurationTypeProperty
- class CfnBackupVaultPropsMixin.LockConfigurationTypeProperty(*, changeable_for_days=None, max_retention_days=None, min_retention_days=None)
Bases:
objectThe
LockConfigurationTypeproperty type specifies configuration for AWS Backup Vault Lock .- Parameters:
changeable_for_days (
Union[int,float,None]) – The AWS Backup Vault Lock configuration that specifies the number of days before the lock date. For example, settingChangeableForDaysto 30 on Jan. 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm UTC. AWS Backup enforces a 72-hour cooling-off period before Vault Lock takes effect and becomes immutable. Therefore, you must setChangeableForDaysto 3 or greater. Before the lock date, you can delete Vault Lock from the vault usingDeleteBackupVaultLockConfigurationor change the Vault Lock configuration usingPutBackupVaultLockConfiguration. On and after the lock date, the Vault Lock becomes immutable and cannot be changed or deleted. If this parameter is not specified, you can delete Vault Lock from the vault usingDeleteBackupVaultLockConfigurationor change the Vault Lock configuration usingPutBackupVaultLockConfigurationat any time.max_retention_days (
Union[int,float,None]) – The AWS Backup Vault Lock configuration that specifies the maximum retention period that the vault retains its recovery points. This setting can be useful if, for example, your organization’s policies require you to destroy certain data after retaining it for four years (1460 days). If this parameter is not included, Vault Lock does not enforce a maximum retention period on the recovery points in the vault. If this parameter is included without a value, Vault Lock will not enforce a maximum retention period. If this parameter is specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or shorter than the maximum retention period. If the job’s retention period is longer than that maximum retention period, then the vault fails the backup or copy job, and you should either modify your lifecycle settings or use a different vault. Recovery points already saved in the vault prior to Vault Lock are not affected.min_retention_days (
Union[int,float,None]) – The AWS Backup Vault Lock configuration that specifies the minimum retention period that the vault retains its recovery points. This setting can be useful if, for example, your organization’s policies require you to retain certain data for at least seven years (2555 days). If this parameter is not specified, Vault Lock will not enforce a minimum retention period. If this parameter is specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or longer than the minimum retention period. If the job’s retention period is shorter than that minimum retention period, then the vault fails that backup or copy job, and you should either modify your lifecycle settings or use a different vault. Recovery points already saved in the vault prior to Vault Lock are not affected.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_backup import mixins as backup_mixins lock_configuration_type_property = backup_mixins.CfnBackupVaultPropsMixin.LockConfigurationTypeProperty( changeable_for_days=123, max_retention_days=123, min_retention_days=123 )
Attributes
- changeable_for_days
The AWS Backup Vault Lock configuration that specifies the number of days before the lock date.
For example, setting
ChangeableForDaysto 30 on Jan. 1, 2022 at 8pm UTC will set the lock date to Jan. 31, 2022 at 8pm UTC.AWS Backup enforces a 72-hour cooling-off period before Vault Lock takes effect and becomes immutable. Therefore, you must set
ChangeableForDaysto 3 or greater.Before the lock date, you can delete Vault Lock from the vault using
DeleteBackupVaultLockConfigurationor change the Vault Lock configuration usingPutBackupVaultLockConfiguration. On and after the lock date, the Vault Lock becomes immutable and cannot be changed or deleted.If this parameter is not specified, you can delete Vault Lock from the vault using
DeleteBackupVaultLockConfigurationor change the Vault Lock configuration usingPutBackupVaultLockConfigurationat any time.
- max_retention_days
The AWS Backup Vault Lock configuration that specifies the maximum retention period that the vault retains its recovery points.
This setting can be useful if, for example, your organization’s policies require you to destroy certain data after retaining it for four years (1460 days).
If this parameter is not included, Vault Lock does not enforce a maximum retention period on the recovery points in the vault. If this parameter is included without a value, Vault Lock will not enforce a maximum retention period.
If this parameter is specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or shorter than the maximum retention period. If the job’s retention period is longer than that maximum retention period, then the vault fails the backup or copy job, and you should either modify your lifecycle settings or use a different vault. Recovery points already saved in the vault prior to Vault Lock are not affected.
- min_retention_days
The AWS Backup Vault Lock configuration that specifies the minimum retention period that the vault retains its recovery points.
This setting can be useful if, for example, your organization’s policies require you to retain certain data for at least seven years (2555 days).
If this parameter is not specified, Vault Lock will not enforce a minimum retention period.
If this parameter is specified, any backup or copy job to the vault must have a lifecycle policy with a retention period equal to or longer than the minimum retention period. If the job’s retention period is shorter than that minimum retention period, then the vault fails that backup or copy job, and you should either modify your lifecycle settings or use a different vault. Recovery points already saved in the vault prior to Vault Lock are not affected.
NotificationObjectTypeProperty
- class CfnBackupVaultPropsMixin.NotificationObjectTypeProperty(*, backup_vault_events=None, sns_topic_arn=None)
Bases:
objectSpecifies an object containing SNS event notification properties for the target backup vault.
- Parameters:
backup_vault_events (
Optional[Sequence[str]]) – An array of events that indicate the status of jobs to back up resources to the backup vault. For valid events, see BackupVaultEvents in the AWS Backup API Guide .sns_topic_arn (
Optional[str]) – An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon SNS) topic; for example,arn:aws:sns:us-west-2:111122223333:MyTopic.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_backup import mixins as backup_mixins notification_object_type_property = backup_mixins.CfnBackupVaultPropsMixin.NotificationObjectTypeProperty( backup_vault_events=["backupVaultEvents"], sns_topic_arn="snsTopicArn" )
Attributes
- backup_vault_events
An array of events that indicate the status of jobs to back up resources to the backup vault.
For valid events, see BackupVaultEvents in the AWS Backup API Guide .
- sns_topic_arn
An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon SNS) topic;
for example,
arn:aws:sns:us-west-2:111122223333:MyTopic.