Skip to content

ReadOnlyDBInstance

This class encapsulates and extends the ROS resource type ALIYUN::RDS::ReadOnlyDBInstance.

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.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

db_instance_classRequired

  • 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_idRequired

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property dbInstanceId: The ID of the master instance.


db_instance_storageRequired

  • 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_versionRequired

  • 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_idRequired

  • 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_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.


categoryOptional

  • 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_descriptionOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property dbInstanceDescription: Description of created database instance.


db_instance_storage_typeOptional

  • 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_idOptional

  • 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_protectionOptional

  • 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_typeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property payType: The billing method.


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.


private_ip_addressOptional

  • 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_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resourceGroupId: Resource group id.


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 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_masterOptional

  • 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_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property vpcId: The ID of the VPC.


v_switch_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property vSwitchId: The ID of the VSwitch.


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.
fetch_condition No description.
fetch_dependency No description.
fetch_resource_desc 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.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

fetch_condition

def fetch_condition() -> RosCondition

fetch_dependency

def fetch_dependency() -> typing.List[str]

fetch_resource_desc

def fetch_resource_desc() -> str

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • 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.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
env ros_cdk_core.IResourceEnvironment The environment this resource belongs to.
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 typing.Union[str, ros_cdk_core.IResolvable] Attribute ConnectionString: DB instance connection url by Intranet.
attr_db_instance_id typing.Union[str, ros_cdk_core.IResolvable] Attribute DBInstanceId: The instance id of created database instance.
attr_port typing.Union[str, ros_cdk_core.IResolvable] Attribute Port: Intranet port of created DB instance.
props ReadOnlyDBInstanceProps No description.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


envRequired

env: IResourceEnvironment
  • Type: ros_cdk_core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


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_connection_stringRequired

attr_connection_string: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ConnectionString: DB instance connection url by Intranet.


attr_db_instance_idRequired

attr_db_instance_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute DBInstanceId: The instance id of created database instance.


attr_portRequired

attr_port: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute Port: Intranet port of created DB instance.


propsRequired

props: ReadOnlyDBInstanceProps