DBInstanceClone
This class encapsulates and extends the ROS resource type ALIYUN::RDS::DBInstanceClone, which is used to restore historical data of an instance to a new instance.
The new instance is the clone of the instance.
Initializers
import ros_cdk_rds
ros_cdk_rds.DBInstanceClone(
scope: Construct,
id: str,
db_instance_id: typing.Union[str, IResolvable],
pay_type: typing.Union[str, IResolvable],
allocate_public_connection: typing.Union[bool, IResolvable] = None,
backup_id: typing.Union[str, IResolvable] = None,
backup_retention_period: typing.Union[typing.Union[int, float], IResolvable] = None,
backup_type: typing.Union[str, IResolvable] = None,
category: typing.Union[str, IResolvable] = None,
connection_string_prefix: typing.Union[str, IResolvable] = None,
connection_string_type: typing.Union[str, IResolvable] = None,
db_instance_class: typing.Union[str, IResolvable] = None,
db_instance_description: typing.Union[str, IResolvable] = None,
db_instance_storage: typing.Union[typing.Union[int, float], IResolvable] = None,
db_instance_storage_type: typing.Union[str, IResolvable] = None,
db_mappings: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, DBMappingsProperty]]] = None,
db_names: typing.Union[str, IResolvable] = None,
dedicated_host_group_id: typing.Union[str, IResolvable] = None,
instance_network_type: typing.Union[str, 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,
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,
restore_table: typing.Union[str, IResolvable] = None,
restore_time: typing.Union[str, IResolvable] = None,
security_group_id: typing.Union[str, IResolvable] = None,
security_ip_list: typing.Union[str, IResolvable] = 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,
table_meta: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, TableMetaProperty]]] = None,
tags: typing.Mapping[typing.Any] = None,
timeout_in_minutes: typing.Union[typing.Union[int, float], 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_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceId: Instance id. |
pay_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property payType: The charge type of created instance. |
allocate_public_connection |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property allocatePublicConnection: If true, allocate public connection automate. |
backup_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property backupId: The ID of the backup set that you want to use. |
backup_retention_period |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property backupRetentionPeriod: The retention period of the data backup. |
backup_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property backupType: The type of backup used by the new instance. |
category |
typing.Union[str, ros_cdk_core.IResolvable] |
Property category: The edition of the instance. |
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_class |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceClass: Database instance type. |
db_instance_description |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceDescription: Description of created database instance. |
db_instance_storage |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property dbInstanceStorage: The storage capacity of the instance. |
db_instance_storage_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceStorageType: The storage type of the instance. |
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_names |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbNames: The names of the databases that you want to create on the new 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. |
instance_network_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceNetworkType: The network type of the new instance. |
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. |
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. |
restore_table |
typing.Union[str, ros_cdk_core.IResolvable] |
Property restoreTable: Specifies whether to restore specific databases and tables. |
restore_time |
typing.Union[str, ros_cdk_core.IResolvable] |
Property restoreTime: The point in time to which you want to restore the data of the original instance. |
security_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property securityGroupId: The ID of the ECS security groups. |
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. |
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. |
table_meta |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, TableMetaProperty]]] |
Property tableMeta: The information about the databases and tables that you want to restore. |
tags |
typing.Mapping[typing.Any] |
Property tags: The tags of an instance. |
timeout_in_minutes |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property timeoutInMinutes: The timeout period for creating the clone instance resource. |
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_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceId: Instance id.
pay_typeRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property payType: The charge type of created instance.
allocate_public_connectionOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property allocatePublicConnection: If true, allocate public connection automate.
backup_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property backupId: The ID of the backup set that you want to use.
You can call the DescribeBackups operation to query the most recent backup set list. Note You must specify at least one of the BackupId and RestoreTime parameters.
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.
backup_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property backupType: The type of backup used by the new instance.
Valid values:
- FullBackup: full backup
- IncrementalBackup: incremental backup
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
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_classOptional
- 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_descriptionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceDescription: Description of created database instance.
db_instance_storageOptional
- 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.
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_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_namesOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbNames: The names of the databases that you want to create on the new instance.
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.
instance_network_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceNetworkType: The network type of the new instance.
Valid values:
- VPC
- Classic The default value is the network type of the original instance.
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.
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.
restore_tableOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property restoreTable: Specifies whether to restore specific databases and tables.
The value 1 specifies to restore specific databases and tables. If you do not want to restore specific databases or tables, you can choose not to specify this parameter.
restore_timeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property restoreTime: The point in time to which you want to restore the data of the original instance.
The point in time must fall within the specified log backup retention period. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
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.
security_ip_listOptional
- 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.
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.
table_metaOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, TableMetaProperty]]]
Property tableMeta: The information about the databases and tables that you want to restore.
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.
timeout_in_minutesOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property timeoutInMinutes: The timeout period for creating the clone instance resource.
Unit: Minute. Default: 120.
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.DBInstanceClone.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.