ReadOnlyDBInstance
This class encapsulates and extends the ROS resource type ALIYUN::RDS::ReadOnlyDBInstance
, which is used to create a read-only ApsaraDB RDS instance.
Initializers
import ros_cdk_rds
ros_cdk_rds.ReadOnlyDBInstance(
scope: Construct,
id: str,
db_instance_class: typing.Union[str, IResolvable],
db_instance_id: typing.Union[str, IResolvable],
db_instance_storage: typing.Union[typing.Union[int, float], IResolvable],
engine_version: typing.Union[str, IResolvable],
zone_id: typing.Union[str, IResolvable],
auto_renew: typing.Union[bool, IResolvable] = None,
category: typing.Union[str, IResolvable] = None,
db_instance_description: typing.Union[str, IResolvable] = None,
db_instance_storage_type: typing.Union[str, IResolvable] = None,
dedicated_host_group_id: typing.Union[str, IResolvable] = None,
deletion_protection: 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,
private_ip_address: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
tags: typing.Mapping[typing.Any] = None,
target_dedicated_host_id_for_master: typing.Union[str, IResolvable] = None,
vpc_id: typing.Union[str, IResolvable] = None,
v_switch_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: The type of the instance. |
db_instance_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceId: The ID of the master instance. |
db_instance_storage |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property dbInstanceStorage: The storage space of the instance. |
engine_version |
typing.Union[str, ros_cdk_core.IResolvable] |
Property engineVersion: The version of the database. |
zone_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property zoneId: The ID of the zone. |
auto_renew |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property autoRenew: Specifies whether to enable auto-renewal. |
category |
typing.Union[str, ros_cdk_core.IResolvable] |
Property category: The RDS edition of the read-only instance. |
db_instance_description |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceDescription: Description of created database instance. |
db_instance_storage_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dbInstanceStorageType: The type of storage media that is used by the instance. |
dedicated_host_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property dedicatedHostGroupId: The ID of the dedicated cluster to which the read-only instance belongs. |
deletion_protection |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property deletionProtection: Specifies whether to enable the release protection feature for the read-only instance. |
pay_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property payType: The billing method. |
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. |
private_ip_address |
typing.Union[str, ros_cdk_core.IResolvable] |
Property privateIpAddress: The private IP address of the read-only instance. |
resource_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property resourceGroupId: Resource group id. |
tags |
typing.Mapping[typing.Any] |
Property tags: The tags of an instance. |
target_dedicated_host_id_for_master |
typing.Union[str, ros_cdk_core.IResolvable] |
Property targetDedicatedHostIdForMaster: The ID of the host on which the primary instance resides. |
vpc_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property vpcId: The ID of the VPC. |
v_switch_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property vSwitchId: The ID of the VSwitch. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
db_instance_class
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceClass: The type of the instance.
For more information, see Instance type list. The type of the read-only instance must be no less than that of the master instance. Otherwise, the read-only instance incurs high latency and high load.
db_instance_id
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceId: The ID of the master instance.
db_instance_storage
Required
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property dbInstanceStorage: The storage space of the instance.
Value range: 5 to 3000. The value must be a multiple of 5. Unit: GB.
engine_version
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property engineVersion: The version of the database.
The database and the master instance must have the same database version. Valid values: 5.6, 5.7, 8.0, 2017_ent, 2019_ent
zone_id
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property zoneId: The ID of the zone.
You can call the DescribeRegions API operation to view the latest zones.
auto_renew
Optional
- 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.
category
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property category: The RDS edition of the read-only instance.
Valid values: Basic: Basic Edition. HighAvailability: High-availability Edition. This is the default value. AlwaysOn: Cluster Edition. Finance: Enterprise Edition. This edition is available only on the China site (aliyun.com).
db_instance_description
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceDescription: Description of created database instance.
db_instance_storage_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceStorageType: The type of storage media that is used by the instance.
Valid values: local_ssd: local SSDs cloud_ssd: standard SSDs cloud_essd: ESSDs of performance level 1 (PL1) cloud_essd2: ESSDs of PL2 cloud_essd3: ESSDs of PL3
dedicated_host_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dedicatedHostGroupId: The ID of the dedicated cluster to which the read-only instance belongs.
This parameter is valid when you create the read-only instance in a dedicated cluster.
deletion_protection
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property deletionProtection: Specifies whether to enable the release protection feature for the read-only instance.
Valid values:- true: enables the feature.- false (default): disables the feature.
pay_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property payType: The billing method.
period
Optional
- 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_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property periodType: Charge period for created instances.
private_ip_address
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property privateIpAddress: The private IP address of the read-only instance.
It must be within the IP address range provided by the switch. The system automatically assigns an IP address based on the VPCId and VSwitchId by default.
resource_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: Resource group id.
tags
Optional
- 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 5 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_master
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property targetDedicatedHostIdForMaster: The ID of the host on which the primary instance resides.
This parameter is valid when you create the read-only instance in a dedicated cluster.
vpc_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vpcId: The ID of the VPC.
v_switch_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vSwitchId: The ID of the VSwitch.
enable_resource_property_constraint
Optional
- 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.ReadOnlyDBInstance.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_connection_string |
ros_cdk_core.IResolvable |
Attribute ConnectionString: DB instance connection url by Intranet. |
attr_db_instance_id |
ros_cdk_core.IResolvable |
Attribute DBInstanceId: The instance id of created database instance. |
attr_port |
ros_cdk_core.IResolvable |
Attribute Port: Intranet port of created DB instance. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_connection_string
Required
attr_connection_string: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ConnectionString: DB instance connection url by Intranet.
attr_db_instance_id
Required
attr_db_instance_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute DBInstanceId: The instance id of created database instance.
attr_port
Required
attr_port: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Port: Intranet port of created DB instance.