DBInstance
This class encapsulates and extends the ROS resource type ALIYUN::RDS::DBInstance, which is used to create an ApsaraDB RDS instance.
Initializers
import ros_cdk_rds
ros_cdk_rds.DBInstance(
scope: Construct,
id: str,
db_instance_class: typing.Union[str, IResolvable],
db_instance_storage: typing.Union[typing.Union[int, float], IResolvable],
engine: typing.Union[str, IResolvable],
engine_version: typing.Union[str, IResolvable],
security_ip_list: typing.Union[str, IResolvable],
allocate_public_connection: typing.Union[bool, IResolvable] = None,
archive_backup_keep_count: typing.Union[typing.Union[int, float], IResolvable] = None,
archive_backup_keep_policy: typing.Union[str, IResolvable] = None,
archive_backup_retention_period: typing.Union[typing.Union[int, float], IResolvable] = None,
auto_renew: typing.Union[bool, IResolvable] = None,
back_up_category: typing.Union[str, IResolvable] = None,
backup_policy_mode: typing.Union[str, IResolvable] = None,
backup_retention_period: typing.Union[typing.Union[int, float], IResolvable] = None,
bursting_enabled: typing.Union[bool, IResolvable] = None,
category: typing.Union[str, IResolvable] = None,
cold_data_enabled: typing.Union[bool, IResolvable] = None,
compress_type: typing.Union[typing.Union[int, float], IResolvable] = None,
connection_mode: typing.Union[str, IResolvable] = None,
connection_string_prefix: typing.Union[str, IResolvable] = None,
connection_string_type: typing.Union[str, IResolvable] = None,
db_instance_description: typing.Union[str, IResolvable] = None,
db_instance_net_type: typing.Union[str, IResolvable] = None,
db_instance_storage_type: typing.Union[str, IResolvable] = None,
db_is_ignore_case: typing.Union[typing.Union[int, float], IResolvable] = None,
db_mappings: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, DBMappingsProperty]]] = None,
db_param_group_id: typing.Union[str, IResolvable] = None,
db_time_zone: typing.Union[str, IResolvable] = None,
dedicated_host_group_id: typing.Union[str, IResolvable] = None,
deletion_protection: typing.Union[bool, IResolvable] = None,
enable_backup_log: typing.Union[bool, IResolvable] = None,
encryption_key: typing.Union[str, IResolvable] = None,
high_space_usage_protection: typing.Union[str, IResolvable] = None,
instance_network_type: typing.Union[str, IResolvable] = None,
io_acceleration_enabled: typing.Union[str, IResolvable] = None,
local_log_retention_hours: typing.Union[typing.Union[int, float], IResolvable] = None,
local_log_retention_space: typing.Union[typing.Union[int, float], IResolvable] = None,
log_backup_frequency: typing.Union[str, IResolvable] = None,
log_backup_local_retention_number: typing.Union[typing.Union[int, float], IResolvable] = None,
log_backup_retention_period: typing.Union[typing.Union[int, float], IResolvable] = None,
maintain_time: typing.Union[str, IResolvable] = None,
master_username: typing.Union[str, IResolvable] = None,
master_user_password: typing.Union[str, IResolvable] = None,
master_user_type: typing.Union[str, IResolvable] = None,
multi_az: typing.Union[bool, IResolvable] = None,
pay_type: typing.Union[str, IResolvable] = None,
period: typing.Union[typing.Union[int, float], IResolvable] = None,
period_type: typing.Union[str, IResolvable] = None,
port: typing.Union[typing.Union[int, float], IResolvable] = None,
preferred_backup_period: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
preferred_backup_time: typing.Union[str, IResolvable] = None,
private_ip_address: typing.Union[str, IResolvable] = None,
released_keep_policy: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
role_arn: typing.Union[str, IResolvable] = None,
security_group_id: typing.Union[str, IResolvable] = None,
serverless_config: typing.Union[IResolvable, ServerlessConfigProperty] = None,
slave_zone_ids: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
sql_collector_status: typing.Union[str, IResolvable] = None,
ssl_setting: typing.Union[str, IResolvable] = None,
storage_auto_scale: typing.Union[str, IResolvable] = None,
storage_threshold: typing.Union[typing.Union[int, float], IResolvable] = None,
storage_upper_bound: typing.Union[typing.Union[int, float], IResolvable] = None,
tags: typing.Mapping[typing.Any] = None,
target_dedicated_host_id_for_log: typing.Union[str, IResolvable] = None,
target_dedicated_host_id_for_master: typing.Union[str, IResolvable] = None,
target_dedicated_host_id_for_slave: typing.Union[str, IResolvable] = None,
vpc_id: typing.Union[str, IResolvable] = None,
v_switch_id: typing.Union[str, IResolvable] = None,
zone_id: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
| Name | Type | Description |
|---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
db_instance_class |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceClass: Database instance type. |
db_instance_storage |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property dbInstanceStorage: The storage capacity of the instance. |
engine |
typing.Union[str, ros_cdk_core.IResolvable] |
Property engine: Database instance engine type. |
engine_version |
typing.Union[str, ros_cdk_core.IResolvable] |
Property engineVersion: Database instance version of the relative engine type. |
security_ip_list |
typing.Union[str, ros_cdk_core.IResolvable] |
Property securityIpList: Security ip to access the database instance, combine with comma, 0.0.0.0\/0 means no limitation. |
allocate_public_connection |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property allocatePublicConnection: If true, allocate public connection automate. |
archive_backup_keep_count |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property archiveBackupKeepCount: The number of archived backups that can be retained. |
archive_backup_keep_policy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property archiveBackupKeepPolicy: The period for which to retain archived backups. |
archive_backup_retention_period |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property archiveBackupRetentionPeriod: The number of days for which to retain archived backups. |
auto_renew |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property autoRenew: Specifies whether to enable auto-renewal. |
back_up_category |
typing.Union[str, ros_cdk_core.IResolvable] |
Property backUpCategory: Specifies whether to enable the second-level backup function. |
backup_policy_mode |
typing.Union[str, ros_cdk_core.IResolvable] |
Property backupPolicyMode: Backup type, DataBackupPolicy: data backup LogBackupPolicy: log backup. |
backup_retention_period |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property backupRetentionPeriod: The retention period of the data backup. |
bursting_enabled |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property burstingEnabled: Whether to enable bursting. |
category |
typing.Union[str, ros_cdk_core.IResolvable] |
Property category: The edition of the instance. |
cold_data_enabled |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property coldDataEnabled: Whether to enable cold data storage. |
compress_type |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property compressType: The format used to compress backups. |
connection_mode |
typing.Union[str, ros_cdk_core.IResolvable] |
Property connectionMode: Connection Mode for database instance,support 'Standard' and 'Safe' mode. |
connection_string_prefix |
typing.Union[str, ros_cdk_core.IResolvable] |
Property connectionStringPrefix: The prefix of the endpoint. |
connection_string_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property connectionStringType: The endpoint type of the instance, allow values: Inner, Public. |
db_instance_description |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceDescription: Description of created database instance. |
db_instance_net_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceNetType: Database instance net type, default is Intranet.Internet for public access, Intranet for private access. |
db_instance_storage_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceStorageType: The storage type of the instance. |
db_is_ignore_case |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property dbIsIgnoreCase: Specifies whether table names are case-sensitive. |
db_mappings |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, DBMappingsProperty]]] |
Property dbMappings: Database mappings to attach to db instance. |
db_param_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbParamGroupId: The ID of the parameter template used by the instance. |
db_time_zone |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbTimeZone: The UTC time zone of the instance. |
dedicated_host_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dedicatedHostGroupId: The ID of the host group to which the instance belongs if you create an instance in a host group. |
deletion_protection |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property deletionProtection: Specifies whether to enable the release protection feature for the instance. |
enable_backup_log |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property enableBackupLog: Specifies whether to enable the log backup function. |
encryption_key |
typing.Union[str, ros_cdk_core.IResolvable] |
Property encryptionKey: The ID of the encryption key that is used to encrypt data on SSDs in the region. |
high_space_usage_protection |
typing.Union[str, ros_cdk_core.IResolvable] |
Property highSpaceUsageProtection: Specifies whether to forcibly delete log backup files when the space usage of the instance exceeds 80% or the remaining space is less than 5 GB. |
instance_network_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceNetworkType: Instance network type, VPC or Classic. |
io_acceleration_enabled |
typing.Union[str, ros_cdk_core.IResolvable] |
Property ioAccelerationEnabled: Whether to enable IO Acceleration, 1 for enable 0 for disable. |
local_log_retention_hours |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property localLogRetentionHours: The number of hours for which to retain log backup files on the instance. |
local_log_retention_space |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property localLogRetentionSpace: The maximum percentage of space that is allowed to store log backup files on the instance. |
log_backup_frequency |
typing.Union[str, ros_cdk_core.IResolvable] |
Property logBackupFrequency: The frequency at which to back up logs. |
log_backup_local_retention_number |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property logBackupLocalRetentionNumber: The number of log backup files that can be retained on the instance. |
log_backup_retention_period |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property logBackupRetentionPeriod: The number of days for which to retain log backup files. |
maintain_time |
typing.Union[str, ros_cdk_core.IResolvable] |
Property maintainTime: The period during which the maintenance performs. |
master_username |
typing.Union[str, ros_cdk_core.IResolvable] |
Property masterUsername: The master user name for the database instance. |
master_user_password |
typing.Union[str, ros_cdk_core.IResolvable] |
Property masterUserPassword: The master password for the database instance. |
master_user_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property masterUserType: Privilege type of account. |
multi_az |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property multiAz: Specifies if the database instance is a multiple Availability Zone deployment. |
pay_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property payType: The charge type of created instance. |
period |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property period: The subscription duration. |
period_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property periodType: Charge period for created instances. |
port |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property port: The port of the database service. |
preferred_backup_period |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] |
Property preferredBackupPeriod: The backup period. |
preferred_backup_time |
typing.Union[str, ros_cdk_core.IResolvable] |
Property preferredBackupTime: The time when the backup task is performed. |
private_ip_address |
typing.Union[str, ros_cdk_core.IResolvable] |
Property privateIpAddress: The private ip for created instance. |
released_keep_policy |
typing.Union[str, ros_cdk_core.IResolvable] |
Property releasedKeepPolicy: The policy used to retain archived backups if the instance is released. |
resource_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property resourceGroupId: Resource group id. |
role_arn |
typing.Union[str, ros_cdk_core.IResolvable] |
Property roleArn: The Alibaba Cloud Resource Name (ARN) provided to the service account of the instance by your Alibaba Cloud account to connect to KMS. |
security_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property securityGroupId: The ID of the ECS security groups. |
serverless_config |
typing.Union[ros_cdk_core.IResolvable, ServerlessConfigProperty] |
Property serverlessConfig: The config of RDS serverless instance. |
slave_zone_ids |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] |
Property slaveZoneIds: List of slave zone ids can specify slave zone ids when creating the high-availability or enterprise edition instance. |
sql_collector_status |
typing.Union[str, ros_cdk_core.IResolvable] |
Property sqlCollectorStatus: Specifies whether to enable or disable the SQL Explorer (SQL audit) feature. |
ssl_setting |
typing.Union[str, ros_cdk_core.IResolvable] |
Property sslSetting: Secure Sockets Layer (SSL) link setting of the instance. |
storage_auto_scale |
typing.Union[str, ros_cdk_core.IResolvable] |
Property storageAutoScale: Storage space automatic expansion switch, only supported by MySQL and PostgreSQL. |
storage_threshold |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property storageThreshold: Storage space automatic expansion trigger threshold (percentage). |
storage_upper_bound |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property storageUpperBound: The total storage space upper limit for automatic storage space expansion, that is, automatic expansion will not cause the total storage space of the instance to exceed this value. |
tags |
typing.Mapping[typing.Any] |
Property tags: The tags of an instance. |
target_dedicated_host_id_for_log |
typing.Union[str, ros_cdk_core.IResolvable] |
Property targetDedicatedHostIdForLog: The ID of the host to which the instance belongs if you create a log instance in a host group. |
target_dedicated_host_id_for_master |
typing.Union[str, ros_cdk_core.IResolvable] |
Property targetDedicatedHostIdForMaster: The ID of the host to which the instance belongs if you create a primary instance in a host group. |
target_dedicated_host_id_for_slave |
typing.Union[str, ros_cdk_core.IResolvable] |
Property targetDedicatedHostIdForSlave: The ID of the host to which the instance belongs if you create a secondary instance in a host group. |
vpc_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property vpcId: The VPC id of created database instance. |
v_switch_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property vSwitchId: The vSwitch id of created instance. |
zone_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property zoneId: selected zone to create database instance. |
enable_resource_property_constraint |
bool |
No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
db_instance_classRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceClass: Database instance type.
Refer the RDS database instance type reference, such as 'rds.mys2.large', 'rds.mss1.large', 'rds.pg.s1.small' etc
db_instance_storageRequired
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property dbInstanceStorage: The storage capacity of the instance.
Unit: GB. The storage capacity increases in increments of 5 GB. You can call the DescribeAvailableResource operation to query the storage capacity range that is supported for a specified instance type in a region.
engineRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property engine: Database instance engine type.
Support MySQL/SQLServer/PostgreSQL/PPAS/MariaDB now.
engine_versionRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property engineVersion: Database instance version of the relative engine type.
Support: Valid values when you set the Engine parameter to MySQL: 5.5, 5.6, 5.7, and 8.0 Valid values when you set the Engine parameter to SQL Server: 2008r2, 08r2_ent_ha, 2012, 2012_ent_ha, 2012_std_ha, 2012_web, 2014_std_ha, 2016_ent_ha, 2016_std_ha, 2016_web, 2017_std_ha, 2017_ent, 2019_std_ha, and 2019_ent Valid values when you set the Engine parameter to PostgreSQL: 10.0, 11.0, 12.0, 13.0, and 14.0 Valid values when you set the Engine parameter to MariaDB: 10.3
security_ip_listRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property securityIpList: Security ip to access the database instance, combine with comma, 0.0.0.0\/0 means no limitation.
allocate_public_connectionOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property allocatePublicConnection: If true, allocate public connection automate.
archive_backup_keep_countOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property archiveBackupKeepCount: The number of archived backups that can be retained.
Default value: 1. Valid values: The value of this parameter ranges from 1 to 31 when the ArchiveBackupKeepPolicy parameter is set to ByMonth. The value of this parameter ranges from 1 to 7 when the ArchiveBackupKeepPolicy parameter is set to ByWeek. Note You do not need to specify this parameter when the ArchiveBackupKeepPolicy parameter is set to KeepAll.
archive_backup_keep_policyOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property archiveBackupKeepPolicy: The period for which to retain archived backups.
The number of archived backups that can be retained within the specified period is determined by the ArchiveBackupKeepCount parameter. Default value: 0. Valid values: ByMonth ByWeek KeepAll
archive_backup_retention_periodOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property archiveBackupRetentionPeriod: The number of days for which to retain archived backups.
The default value 0 specifies not to enable the backup archiving function. Valid values: 30 to 1095.
auto_renewOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property autoRenew: Specifies whether to enable auto-renewal.
Valid values: true and false. Note :Monthly subscription: The auto-renewal cycle is one month. Annual subscription: The auto-renewal cycle is one year.
back_up_categoryOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property backUpCategory: Specifies whether to enable the second-level backup function.
This function allows a backup to be completed within seconds. Valid values: Flash: specifies to enable the second-level backup function. Standard: specifies to disable the second-level backup function.
backup_policy_modeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property backupPolicyMode: Backup type, DataBackupPolicy: data backup LogBackupPolicy: log backup.
backup_retention_periodOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property backupRetentionPeriod: The retention period of the data backup.
Value range: 7 to 730. The default value is the original value. Note When the BackupPolicyMode parameter is set to LogBackupPolicy, this parameter is required.
bursting_enabledOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property burstingEnabled: Whether to enable bursting.
categoryOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property category: The edition of the instance.
Valid values: Basic: RDS Basic Edition HighAvailability: RDS High-availability Edition cluster: RDS Cluster Edition AlwaysOn: RDS Cluster Edition for SQL Server Finance: RDS Enterprise Edition serverless_basic: RDS Serverless Basic Edition
cold_data_enabledOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property coldDataEnabled: Whether to enable cold data storage.
compress_typeOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property compressType: The format used to compress backups.
Valid values: 1: The zlib tool is used to compress backups into .tar.gz files. 4: The QuickLZ tool is used to compress backups into .xb.gz files. This compression format is supported only when the instance runs MySQL 5.6 or 5.7. It can be used to restore individual databases and tables. 8: The QuickLZ tool is used to compress backups into .xb.gz files. This compression format is supported only when the instance runs MySQL 8.0. It cannot be used to restore individual databases or tables.
connection_modeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property connectionMode: Connection Mode for database instance,support 'Standard' and 'Safe' mode.
Default is RDS system assigns.
connection_string_prefixOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property connectionStringPrefix: The prefix of the endpoint.
Only the prefix of the CurrentConnectionString parameter value can be modified. The prefix must be 8 to 64 characters in length and can contain letters, digits, and hyphens (-).
connection_string_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property connectionStringType: The endpoint type of the instance, allow values: Inner, Public.
db_instance_descriptionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceDescription: Description of created database instance.
db_instance_net_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceNetType: Database instance net type, default is Intranet.Internet for public access, Intranet for private access.
db_instance_storage_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceStorageType: The storage type of the instance.
Valid values: local_ssd: specifies to use local SSDs. This is the recommended storage type. cloud_ssd: specifies to use standard SSDs. cloud_essd: enhanced SSD of performance level (PL)1. cloud_essd2: enhanced SSD of PL2. cloud_essd3: enhanced SSD of PL3.
db_is_ignore_caseOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property dbIsIgnoreCase: Specifies whether table names are case-sensitive.
Valid values: 1: Table names are not case-sensitive. This is the default value. 0: Table names are case-sensitive.
db_mappingsOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, DBMappingsProperty]]]
Property dbMappings: Database mappings to attach to db instance.
db_param_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbParamGroupId: The ID of the parameter template used by the instance.
db_time_zoneOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbTimeZone: The UTC time zone of the instance.
Valid values: -12:00 to +12:00. The time zone must be an integer value such as +08:00. Values such as +08:30 are not allowed.
dedicated_host_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dedicatedHostGroupId: The ID of the host group to which the instance belongs if you create an instance in a host group.
deletion_protectionOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property deletionProtection: Specifies whether to enable the release protection feature for the instance.
This feature is available only for pay-as-you-go instances. Default is false.
enable_backup_logOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property enableBackupLog: Specifies whether to enable the log backup function.
Valid values: True: specifies to enable the log backup function. False: specifies to disable the log backup function. Note You must specify this parameter when the BackupPolicyMode parameter is set to LogBackupPolicy.
encryption_keyOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property encryptionKey: The ID of the encryption key that is used to encrypt data on SSDs in the region.
You can view the encryption key ID in the Key Management Service (KMS) console. You can also create an encryption key.
high_space_usage_protectionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property highSpaceUsageProtection: Specifies whether to forcibly delete log backup files when the space usage of the instance exceeds 80% or the remaining space is less than 5 GB.
Valid values: Enable and Disable. You can retain the default value. Note You must specify this parameter when the BackupPolicyMode parameter is set to LogBackupPolicy.
instance_network_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceNetworkType: Instance network type, VPC or Classic.
io_acceleration_enabledOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property ioAccelerationEnabled: Whether to enable IO Acceleration, 1 for enable 0 for disable.
local_log_retention_hoursOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property localLogRetentionHours: The number of hours for which to retain log backup files on the instance.
Valid values: 0 to 168. The value 0 specifies not to retain log backup files on the instance. You can retain the default value. Note You must specify this parameter when the BackupPolicyMode parameter is set to LogBackupPolicy.
local_log_retention_spaceOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property localLogRetentionSpace: The maximum percentage of space that is allowed to store log backup files on the instance.
If the space usage for log backup files exceeds this percentage, the system deletes earlier log backup files until the space usage falls below this percentage. Valid values:0 to 50. You can retain the default value. Note You must specify this parameter when the BackupPolicyMode parameter is set to LogBackupPolicy.
log_backup_frequencyOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property logBackupFrequency: The frequency at which to back up logs.
Valid values: The value LogInterval specifies to back up logs every 30 minutes. The default value of this parameter is the same as the data backup frequency. Note The value LogInterval is supported only when the instance runs SQL Server.
log_backup_local_retention_numberOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property logBackupLocalRetentionNumber: The number of log backup files that can be retained on the instance.
Default value: 60. Valid values: 6 to 100.
log_backup_retention_periodOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property logBackupRetentionPeriod: The number of days for which to retain log backup files.
Valid values: 7 to 730. The log backup retention period cannot be longer than the data backup retention period.Note If you enable the log backup function, you can specify the log backup retention period. This applies only when the instance runs MySQL, PostgreSQL, or PPAS.
maintain_timeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property maintainTime: The period during which the maintenance performs.
The format is HH:mmZ-HH:mmZ.
master_usernameOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property masterUsername: The master user name for the database instance.
master_user_passwordOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property masterUserPassword: The master password for the database instance.
master_user_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property masterUserType: Privilege type of account.
Normal: Common privilege. Super: High privilege. Sysadmin: Super privileges (SA) (only supported by SQL Server) The default value is Normal.
multi_azOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property multiAz: Specifies if the database instance is a multiple Availability Zone deployment.
pay_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property payType: The charge type of created instance.
periodOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property period: The subscription duration.
Valid values: When PeriodType is Month, it could be from 1 to 12, 24, 36, 48, 60. When PeriodType is Year, it could be from 1 to 5.
period_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property periodType: Charge period for created instances.
portOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property port: The port of the database service.
preferred_backup_periodOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]
Property preferredBackupPeriod: The backup period.
Separate multiple values with commas (,). The default value is the original value. Valid values:Monday Tuesday Wednesday Thursday Friday Saturday Sunday Note When the BackupPolicyMode parameter is set to DataBackupPolicy, this parameter is required.
preferred_backup_timeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property preferredBackupTime: The time when the backup task is performed.
Format: yyyy-MM-ddZ-HH:mm:ssZ.Note When the BackupPolicyMode parameter is set to DataBackupPolicy, this parameter is required.
private_ip_addressOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property privateIpAddress: The private ip for created instance.
released_keep_policyOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property releasedKeepPolicy: The policy used to retain archived backups if the instance is released.
Default value: None. Valid values: Lastest: Only the last archived backup is retained. All: All of the archived backups are retained.
resource_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: Resource group id.
role_arnOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property roleArn: The Alibaba Cloud Resource Name (ARN) provided to the service account of the instance by your Alibaba Cloud account to connect to KMS.
You can copy the ARN from the RAM console.
security_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property securityGroupId: The ID of the ECS security groups.
Each RDS instance can be associated with up to three ECS security groups. You must separate them with commas (,). To delete an ECS Security group, leave this parameter empty.
serverless_configOptional
- Type: typing.Union[ros_cdk_core.IResolvable, ServerlessConfigProperty]
Property serverlessConfig: The config of RDS serverless instance.
This is required when creating serverless instance.
slave_zone_idsOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]
Property slaveZoneIds: List of slave zone ids can specify slave zone ids when creating the high-availability or enterprise edition instance.
Meanwhile, VSwitchId needs to pass in the corresponding vswitch id to the slave zone by order. For example, ZoneId = "zone-a" and SlaveZoneIds = ["zone-c", "zone-b"], then the VSwitchId must be "vsw-zone-a,vsw-zone-c,vsw-zone-b".
sql_collector_statusOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property sqlCollectorStatus: Specifies whether to enable or disable the SQL Explorer (SQL audit) feature.
Valid values:Enable | Disabled.
ssl_settingOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property sslSetting: Secure Sockets Layer (SSL) link setting of the instance.
Valid values: Disabled: Disable SSL EnabledForPublicConnection: Public connection address will be protected by the SSL certificate. It requires AllocatePublicConnection is true. EnabledForInnerConnection: Private connection address will be protected by the SSL certificate. Default value is Disabled.
storage_auto_scaleOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property storageAutoScale: Storage space automatic expansion switch, only supported by MySQL and PostgreSQL.
storage_thresholdOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property storageThreshold: Storage space automatic expansion trigger threshold (percentage).
storage_upper_boundOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property storageUpperBound: The total storage space upper limit for automatic storage space expansion, that is, automatic expansion will not cause the total storage space of the instance to exceed this value.
tagsOptional
- Type: typing.Mapping[typing.Any]
Property tags: The tags of an instance.
You should input the information of the tag with the format of the Key-Value, such as {"key1":"value1","key2":"value2", ... "key5":"value5"}. At most 20 tags can be specified. Key It can be up to 64 characters in length. Cannot begin with aliyun. Cannot begin with http:// or https://. Cannot be a null string. Value It can be up to 128 characters in length. Cannot begin with aliyun. Cannot begin with http:// or https://. Can be a null string.
target_dedicated_host_id_for_logOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property targetDedicatedHostIdForLog: The ID of the host to which the instance belongs if you create a log instance in a host group.
target_dedicated_host_id_for_masterOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property targetDedicatedHostIdForMaster: The ID of the host to which the instance belongs if you create a primary instance in a host group.
target_dedicated_host_id_for_slaveOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property targetDedicatedHostIdForSlave: The ID of the host to which the instance belongs if you create a secondary instance in a host group.
vpc_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vpcId: The VPC id of created database instance.
For VPC network, the property is required.
v_switch_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vSwitchId: The vSwitch id of created instance.
For VPC network, the property is required.
zone_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property zoneId: selected zone to create database instance.
You cannot set the ZoneId parameter if the MultiAZ parameter is set to true.
enable_resource_property_constraintOptional
- Type: bool
Methods
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset
as they participate in synthesizing the cloud assembly.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
| Name | Description |
|---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_rds
ros_cdk_rds.DBInstance.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
| Name | Type | Description |
|---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_db_instance_id |
ros_cdk_core.IResolvable |
Attribute DBInstanceId: The instance id of created database instance. |
attr_inner_connection_string |
ros_cdk_core.IResolvable |
Attribute InnerConnectionString: DB instance connection url by Intranet. |
attr_inner_ip_address |
ros_cdk_core.IResolvable |
Attribute InnerIPAddress: IP Address for created DB instance of Intranet. |
attr_inner_port |
ros_cdk_core.IResolvable |
Attribute InnerPort: Intranet port of created DB instance. |
attr_public_connection_string |
ros_cdk_core.IResolvable |
Attribute PublicConnectionString: DB instance connection url by Internet. |
attr_public_ip_address |
ros_cdk_core.IResolvable |
Attribute PublicIPAddress: IP Address for created DB instance of Internet. |
attr_public_port |
ros_cdk_core.IResolvable |
Attribute PublicPort: Internet port of created DB instance. |
nodeRequired
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
refRequired
ref: str
- Type: str
stackRequired
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resourceOptional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_db_instance_idRequired
attr_db_instance_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute DBInstanceId: The instance id of created database instance.
attr_inner_connection_stringRequired
attr_inner_connection_string: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InnerConnectionString: DB instance connection url by Intranet.
attr_inner_ip_addressRequired
attr_inner_ip_address: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InnerIPAddress: IP Address for created DB instance of Intranet.
attr_inner_portRequired
attr_inner_port: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute InnerPort: Intranet port of created DB instance.
attr_public_connection_stringRequired
attr_public_connection_string: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute PublicConnectionString: DB instance connection url by Internet.
attr_public_ip_addressRequired
attr_public_ip_address: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute PublicIPAddress: IP Address for created DB instance of Internet.
attr_public_portRequired
attr_public_port: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute PublicPort: Internet port of created DB instance.