DatabaseInstanceFromSnapshotProps

class aws_cdk.aws_rds.DatabaseInstanceFromSnapshotProps(*, instance_class, vpc, auto_minor_version_upgrade=None, availability_zone=None, backup_retention=None, cloudwatch_logs_exports=None, cloudwatch_logs_retention=None, cloudwatch_logs_retention_role=None, copy_tags_to_snapshot=None, delete_automated_backups=None, deletion_protection=None, enable_performance_insights=None, iam_authentication=None, instance_identifier=None, iops=None, monitoring_interval=None, monitoring_role=None, multi_az=None, option_group=None, performance_insight_kms_key=None, performance_insight_retention=None, port=None, preferred_backup_window=None, preferred_maintenance_window=None, processor_features=None, removal_policy=None, security_groups=None, storage_type=None, vpc_placement=None, engine, allocated_storage=None, allow_major_version_upgrade=None, database_name=None, engine_version=None, license_model=None, master_user_password=None, parameter_group=None, secret_kms_key=None, timezone=None, snapshot_identifier, generate_master_user_password=None, master_username=None)

Bases: aws_cdk.aws_rds.DatabaseInstanceSourceProps

__init__(*, instance_class, vpc, auto_minor_version_upgrade=None, availability_zone=None, backup_retention=None, cloudwatch_logs_exports=None, cloudwatch_logs_retention=None, cloudwatch_logs_retention_role=None, copy_tags_to_snapshot=None, delete_automated_backups=None, deletion_protection=None, enable_performance_insights=None, iam_authentication=None, instance_identifier=None, iops=None, monitoring_interval=None, monitoring_role=None, multi_az=None, option_group=None, performance_insight_kms_key=None, performance_insight_retention=None, port=None, preferred_backup_window=None, preferred_maintenance_window=None, processor_features=None, removal_policy=None, security_groups=None, storage_type=None, vpc_placement=None, engine, allocated_storage=None, allow_major_version_upgrade=None, database_name=None, engine_version=None, license_model=None, master_user_password=None, parameter_group=None, secret_kms_key=None, timezone=None, snapshot_identifier, generate_master_user_password=None, master_username=None)

Construction properties for a DatabaseInstanceFromSnapshot.

Parameters
  • instance_class (InstanceType) – The name of the compute and memory capacity classes.

  • vpc (IVpc) – The VPC network where the DB subnet group should be created.

  • auto_minor_version_upgrade (Optional[bool]) – Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window. Default: true

  • availability_zone (Optional[str]) – The name of the Availability Zone where the DB instance will be located. Default: - no preference

  • backup_retention (Optional[Duration]) – The number of days during which automatic DB snapshots are retained. Set to zero to disable backups. Default: Duration.days(1)

  • cloudwatch_logs_exports (Optional[List[str]]) – The list of log types that need to be enabled for exporting to CloudWatch Logs. Default: - no log exports

  • cloudwatch_logs_retention (Optional[RetentionDays]) – The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn’t remove the log retention policy. To remove the retention policy, set the value to Infinity. Default: - logs never expire

  • cloudwatch_logs_retention_role (Optional[IRole]) – The IAM role for the Lambda function associated with the custom resource that sets the retention policy. Default: - a new role is created.

  • copy_tags_to_snapshot (Optional[bool]) – Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance. Default: true

  • delete_automated_backups (Optional[bool]) – Indicates whether automated backups should be deleted or retained when you delete a DB instance. Default: false

  • deletion_protection (Optional[bool]) – Indicates whether the DB instance should have deletion protection enabled. Default: true

  • enable_performance_insights (Optional[bool]) – Whether to enable Performance Insights for the DB instance. Default: false

  • iam_authentication (Optional[bool]) – Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. Default: false

  • instance_identifier (Optional[str]) – A name for the DB instance. If you specify a name, AWS CloudFormation converts it to lowercase. Default: - a CloudFormation generated name

  • iops (Union[int, float, None]) – The number of I/O operations per second (IOPS) that the database provisions. The value must be equal to or greater than 1000. Default: - no provisioned iops

  • monitoring_interval (Optional[Duration]) – The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance. Default: - no enhanced monitoring

  • monitoring_role (Optional[IRole]) – Role that will be used to manage DB instance monitoring. Default: - A role is automatically created for you

  • multi_az (Optional[bool]) – Specifies if the database instance is a multiple Availability Zone deployment. Default: false

  • option_group (Optional[IOptionGroup]) – The option group to associate with the instance. Default: - no option group

  • performance_insight_kms_key (Optional[IKey]) – The AWS KMS key for encryption of Performance Insights data. Default: - default master key

  • performance_insight_retention (Optional[PerformanceInsightRetention]) – The amount of time, in days, to retain Performance Insights data. Default: 7

  • port (Union[int, float, None]) – The port for the instance. Default: - the default port for the chosen engine.

  • preferred_backup_window (Optional[str]) – The daily time range during which automated backups are performed. Constraints: - Must be in the format hh24:mi-hh24:mi. - Must be in Universal Coordinated Time (UTC). - Must not conflict with the preferred maintenance window. - Must be at least 30 minutes. Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow

  • preferred_maintenance_window (Optional[str]) – The weekly time range (in UTC) during which system maintenance can occur. Format: ddd:hh24:mi-ddd:hh24:mi Constraint: Minimum 30-minute window Default: - a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#Concepts.DBMaintenance

  • processor_features (Optional[ProcessorFeatures]) – The number of CPU cores and the number of threads per core. Default: - the default number of CPU cores and threads per core for the chosen instance class. See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor

  • removal_policy (Optional[RemovalPolicy]) – The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update. Default: RemovalPolicy.Retain

  • security_groups (Optional[List[ISecurityGroup]]) – The security groups to assign to the DB instance. Default: - a new security group is created

  • storage_type (Optional[StorageType]) – The storage type. Default: GP2

  • vpc_placement (Optional[SubnetSelection]) – The type of subnets to add to the created DB subnet group. Default: - private subnets

  • engine (DatabaseInstanceEngine) – The database engine.

  • allocated_storage (Union[int, float, None]) – The allocated storage size, specified in gigabytes (GB). Default: 100

  • allow_major_version_upgrade (Optional[bool]) – Whether to allow major version upgrades. Default: false

  • database_name (Optional[str]) – The name of the database. Default: - no name

  • engine_version (Optional[str]) – The engine version. To prevent automatic upgrades, be sure to specify the full version number. Default: - RDS default engine version

  • license_model (Optional[LicenseModel]) – The license model. Default: - RDS default license model

  • master_user_password (Optional[SecretValue]) – The master user password. Default: - a Secrets Manager generated password

  • parameter_group (Optional[IParameterGroup]) – The DB parameter group to associate with the instance. Default: - no parameter group

  • secret_kms_key (Optional[IKey]) – The KMS key to use to encrypt the secret for the master user password. Default: - default master key

  • timezone (Optional[str]) – The time zone of the instance. Default: - RDS default timezone

  • snapshot_identifier (str) – The name or Amazon Resource Name (ARN) of the DB snapshot that’s used to restore the DB instance. If you’re restoring from a shared manual DB snapshot, you must specify the ARN of the snapshot.

  • generate_master_user_password (Optional[bool]) – Whether to generate a new master user password and store it in Secrets Manager. masterUsername must be specified with the current master user name of the snapshot when this property is set to true. Default: false

  • master_username (Optional[str]) – The master user name. Specify this prop with the current master user name of the snapshot only when generating a new master user password with generateMasterUserPassword. The value will be set in the generated secret attached to the instance. It is not possible to change the master user name of a RDS instance. Default: - inherited from the snapshot

stability :stability: experimental

Attributes

allocated_storage

The allocated storage size, specified in gigabytes (GB).

default :default: 100

stability :stability: experimental

Return type

Union[int, float, None]

allow_major_version_upgrade

Whether to allow major version upgrades.

default :default: false

stability :stability: experimental

Return type

Optional[bool]

auto_minor_version_upgrade

Indicates that minor engine upgrades are applied automatically to the DB instance during the maintenance window.

default :default: true

stability :stability: experimental

Return type

Optional[bool]

availability_zone

The name of the Availability Zone where the DB instance will be located.

default :default: - no preference

stability :stability: experimental

Return type

Optional[str]

backup_retention

The number of days during which automatic DB snapshots are retained.

Set to zero to disable backups.

default :default: Duration.days(1)

stability :stability: experimental

Return type

Optional[Duration]

cloudwatch_logs_exports

The list of log types that need to be enabled for exporting to CloudWatch Logs.

default :default: - no log exports

stability :stability: experimental

Return type

Optional[List[str]]

cloudwatch_logs_retention

The number of days log events are kept in CloudWatch Logs.

When updating this property, unsetting it doesn’t remove the log retention policy. To remove the retention policy, set the value to Infinity.

default :default: - logs never expire

stability :stability: experimental

Return type

Optional[RetentionDays]

cloudwatch_logs_retention_role

The IAM role for the Lambda function associated with the custom resource that sets the retention policy.

default :default: - a new role is created.

stability :stability: experimental

Return type

Optional[IRole]

copy_tags_to_snapshot

Indicates whether to copy all of the user-defined tags from the DB instance to snapshots of the DB instance.

default :default: true

stability :stability: experimental

Return type

Optional[bool]

database_name

The name of the database.

default :default: - no name

stability :stability: experimental

Return type

Optional[str]

delete_automated_backups

Indicates whether automated backups should be deleted or retained when you delete a DB instance.

default :default: false

stability :stability: experimental

Return type

Optional[bool]

deletion_protection

Indicates whether the DB instance should have deletion protection enabled.

default :default: true

stability :stability: experimental

Return type

Optional[bool]

enable_performance_insights

Whether to enable Performance Insights for the DB instance.

default :default: false

stability :stability: experimental

Return type

Optional[bool]

engine

The database engine.

stability :stability: experimental

Return type

DatabaseInstanceEngine

engine_version

The engine version.

To prevent automatic upgrades, be sure to specify the full version number.

default :default: - RDS default engine version

stability :stability: experimental

Return type

Optional[str]

generate_master_user_password

Whether to generate a new master user password and store it in Secrets Manager.

masterUsername must be specified with the current master user name of the snapshot when this property is set to true.

default :default: false

stability :stability: experimental

Return type

Optional[bool]

iam_authentication

Whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts.

default :default: false

stability :stability: experimental

Return type

Optional[bool]

instance_class

The name of the compute and memory capacity classes.

stability :stability: experimental

Return type

InstanceType

instance_identifier

A name for the DB instance.

If you specify a name, AWS CloudFormation converts it to lowercase.

default :default: - a CloudFormation generated name

stability :stability: experimental

Return type

Optional[str]

iops

The number of I/O operations per second (IOPS) that the database provisions.

The value must be equal to or greater than 1000.

default :default: - no provisioned iops

stability :stability: experimental

Return type

Union[int, float, None]

license_model

The license model.

default :default: - RDS default license model

stability :stability: experimental

Return type

Optional[LicenseModel]

master_user_password

The master user password.

default :default: - a Secrets Manager generated password

stability :stability: experimental

Return type

Optional[SecretValue]

master_username

The master user name.

Specify this prop with the current master user name of the snapshot only when generating a new master user password with generateMasterUserPassword. The value will be set in the generated secret attached to the instance.

It is not possible to change the master user name of a RDS instance.

default :default: - inherited from the snapshot

stability :stability: experimental

Return type

Optional[str]

monitoring_interval

The interval, in seconds, between points when Amazon RDS collects enhanced monitoring metrics for the DB instance.

default :default: - no enhanced monitoring

stability :stability: experimental

Return type

Optional[Duration]

monitoring_role

Role that will be used to manage DB instance monitoring.

default :default: - A role is automatically created for you

stability :stability: experimental

Return type

Optional[IRole]

multi_az

Specifies if the database instance is a multiple Availability Zone deployment.

default :default: false

stability :stability: experimental

Return type

Optional[bool]

option_group

The option group to associate with the instance.

default :default: - no option group

stability :stability: experimental

Return type

Optional[IOptionGroup]

parameter_group

The DB parameter group to associate with the instance.

default :default: - no parameter group

stability :stability: experimental

Return type

Optional[IParameterGroup]

performance_insight_kms_key

The AWS KMS key for encryption of Performance Insights data.

default :default: - default master key

stability :stability: experimental

Return type

Optional[IKey]

performance_insight_retention

The amount of time, in days, to retain Performance Insights data.

default :default: 7

stability :stability: experimental

Return type

Optional[PerformanceInsightRetention]

port

The port for the instance.

default :default: - the default port for the chosen engine.

stability :stability: experimental

Return type

Union[int, float, None]

preferred_backup_window

The daily time range during which automated backups are performed.

Constraints:

  • Must be in the format hh24:mi-hh24:mi.

  • Must be in Universal Coordinated Time (UTC).

  • Must not conflict with the preferred maintenance window.

  • Must be at least 30 minutes.

default :default:

stability :stability: experimental

Return type

Optional[str]

preferred_maintenance_window

The weekly time range (in UTC) during which system maintenance can occur.

Format: ddd:hh24:mi-ddd:hh24:mi Constraint: Minimum 30-minute window

default :default:

stability :stability: experimental

Return type

Optional[str]

processor_features

The number of CPU cores and the number of threads per core.

default :default:

  • the default number of CPU cores and threads per core for the chosen instance class.

See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html#USER_ConfigureProcessor

stability :stability: experimental

Return type

Optional[ProcessorFeatures]

removal_policy

The CloudFormation policy to apply when the instance is removed from the stack or replaced during an update.

default :default: RemovalPolicy.Retain

stability :stability: experimental

Return type

Optional[RemovalPolicy]

secret_kms_key

The KMS key to use to encrypt the secret for the master user password.

default :default: - default master key

stability :stability: experimental

Return type

Optional[IKey]

security_groups

The security groups to assign to the DB instance.

default :default: - a new security group is created

stability :stability: experimental

Return type

Optional[List[ISecurityGroup]]

snapshot_identifier

The name or Amazon Resource Name (ARN) of the DB snapshot that’s used to restore the DB instance.

If you’re restoring from a shared manual DB snapshot, you must specify the ARN of the snapshot.

stability :stability: experimental

Return type

str

storage_type

The storage type.

default :default: GP2

stability :stability: experimental

Return type

Optional[StorageType]

timezone

The time zone of the instance.

default :default: - RDS default timezone

stability :stability: experimental

Return type

Optional[str]

vpc

The VPC network where the DB subnet group should be created.

stability :stability: experimental

Return type

IVpc

vpc_placement

The type of subnets to add to the created DB subnet group.

default :default: - private subnets

stability :stability: experimental

Return type

Optional[SubnetSelection]