DBCluster
- Implements: IDBCluster
This class encapsulates and extends the ROS resource type ALIYUN::ADB::DBClusterUse the , which resource type to create an AnalyticDB for MySQL cluster.
Initializers
import ros_cdk_adb
ros_cdk_adb.DBCluster(
scope: Construct,
id: str,
db_cluster_category: typing.Union[str, IResolvable],
db_cluster_version: typing.Union[str, IResolvable],
mode: typing.Union[str, IResolvable],
pay_type: typing.Union[str, IResolvable],
vpc_id: typing.Union[str, IResolvable],
v_switch_id: typing.Union[str, IResolvable],
compute_resource: typing.Union[str, IResolvable] = None,
db_cluster_class: typing.Union[str, IResolvable] = None,
db_cluster_description: typing.Union[str, IResolvable] = None,
db_node_group_count: typing.Union[typing.Union[int, float], IResolvable] = None,
db_node_storage: typing.Union[typing.Union[int, float], IResolvable] = None,
disk_encryption: typing.Union[bool, IResolvable] = None,
elastic_io_resource: typing.Union[typing.Union[int, float], IResolvable] = None,
enable_ssl: typing.Union[bool, IResolvable] = None,
executor_count: typing.Union[typing.Union[int, float], IResolvable] = None,
kms_id: typing.Union[str, IResolvable] = None,
period: typing.Union[typing.Union[int, float], IResolvable] = None,
period_type: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
tags: typing.List[TagsProperty] = 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_cluster_category | typing.Union[str, ros_cdk_core.IResolvable] | Property dbClusterCategory: The edition of the cluster. |
db_cluster_version | typing.Union[str, ros_cdk_core.IResolvable] | Property dbClusterVersion: The version of the cluster. |
mode | typing.Union[str, ros_cdk_core.IResolvable] | Property mode: The mode of the cluster. |
pay_type | typing.Union[str, ros_cdk_core.IResolvable] | Property payType: The billing method of the cluster. |
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. |
compute_resource | typing.Union[str, ros_cdk_core.IResolvable] | Property computeResource: The computing resource of the cluster. |
db_cluster_class | typing.Union[str, ros_cdk_core.IResolvable] | Property dbClusterClass: The specification of the cluster. |
db_cluster_description | typing.Union[str, ros_cdk_core.IResolvable] | Property dbClusterDescription: The description of the cluster. |
db_node_group_count | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property dbNodeGroupCount: The number of node groups. |
db_node_storage | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property dbNodeStorage: The storage space of the node. |
disk_encryption | typing.Union[bool, ros_cdk_core.IResolvable] | Property diskEncryption: Whether to enable cloud disk encryption. Value:. |
elastic_io_resource | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property elasticIoResource: Elastic IO Unit Note the flexible mode cluster will use this parameter. |
enable_ssl | typing.Union[bool, ros_cdk_core.IResolvable] | Property enableSsl: Whether to enable SSL link encryption function, value:. |
executor_count | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property executorCount: ExecutorCount. |
kms_id | typing.Union[str, ros_cdk_core.IResolvable] | Property kmsId: The kmsId used for cloud disk encryption, effective only when DiskEncryption is true. |
period | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property period: Valid values when the Period parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9. |
period_type | typing.Union[str, ros_cdk_core.IResolvable] | Property periodType: The subscription period for the cluster. |
resource_group_id | typing.Union[str, ros_cdk_core.IResolvable] | Property resourceGroupId: The ID of the resource group. |
tags | typing.List[TagsProperty] | Property tags: Tags to attach to instance. |
zone_id | typing.Union[str, ros_cdk_core.IResolvable] | Property zoneId: The zone ID of the cluster. |
enable_resource_property_constraint | bool | No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
db_cluster_categoryRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbClusterCategory: The edition of the cluster.
Valid values when the cluster is in reserved mode: Basic Cluster When the cluster is in elastic mode, set the value to MixedStorage.
db_cluster_versionRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbClusterVersion: The version of the cluster.
Set the value to 3.0.
modeRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property mode: The mode of the cluster.
Valid values: Reserver: the reserved mode Flexible: the elastic mode
pay_typeRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property payType: The billing method of the cluster.
Valid values: Postpaid: pay-as-you-go Prepaid: subscription
vpc_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vpcId: The ID of the VPC.
v_switch_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vSwitchId: The ID of the vSwitch.
compute_resourceOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property computeResource: The computing resource of the cluster.
This parameter is required in elastic mode.
db_cluster_classOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbClusterClass: The specification of the cluster.
This parameter is required in reserved mode. Valid values: Basic Edition: T8, T16, T32, and T52 Cluster Edition: C8 and C32
db_cluster_descriptionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbClusterDescription: The description of the cluster.
db_node_group_countOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property dbNodeGroupCount: The number of node groups.
This parameter is required in reserved mode. Valid values: T8, T16, T32, and T52: 1 C8 and C32: 1 to 128
db_node_storageOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property dbNodeStorage: The storage space of the node.
This parameter is required in reserved mode. Unit: GB. Valid values: T8: 100 to 500 T16 and T32: 100 to 2000 T52: 100 to 4000 C8: 100 to 1000 C32: 100 to 8000 Note The storage space less than 1,000 GB increases in increments of 100 GB. The storage space greater than 1,000 GB increases in increments of 1,000 GB.
disk_encryptionOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property diskEncryption: Whether to enable cloud disk encryption. Value:.
- true: yes.
- false: no.
elastic_io_resourceOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property elasticIoResource: Elastic IO Unit Note the flexible mode cluster will use this parameter.
enable_sslOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property enableSsl: Whether to enable SSL link encryption function, value:.
- true: open.
- false: close.
executor_countOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property executorCount: ExecutorCount.
kms_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property kmsId: The kmsId used for cloud disk encryption, effective only when DiskEncryption is true.
periodOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property period: Valid values when the Period parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
Valid values when the Period parameter is set to Year: 1, 2, and 3.
period_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property periodType: The subscription period for the cluster.
This parameter is required if the PayType parameter is set to Prepaid. Valid values: Year: subscription on a yearly basis Month: subscription on a monthly basis
resource_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: The ID of the resource group.
tagsOptional
- Type: typing.List[TagsProperty]
Property tags: Tags to attach to instance.
Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.
zone_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property zoneId: The zone ID of the cluster.
You can call the DescribeRegions operation to query the most recent zone list.
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.
- 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
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
- 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_adb
ros_cdk_adb.DBCluster.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. |
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_arn | typing.Union[str, ros_cdk_core.IResolvable] | Attribute Arn: The Alibaba Cloud Resource Name (ARN). |
attr_connection_string | typing.Union[str, ros_cdk_core.IResolvable] | Attribute ConnectionString: Vpc connection string. |
attr_db_cluster_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute DBClusterId: The ID of the cluster. |
attr_order_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute OrderId: The ID of the order. |
props | DBClusterProps | 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_arnRequired
attr_arn: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attr_connection_stringRequired
attr_connection_string: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute ConnectionString: Vpc connection string.
attr_db_cluster_idRequired
attr_db_cluster_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute DBClusterId: The ID of the cluster.
attr_order_idRequired
attr_order_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute OrderId: The ID of the order.
propsRequired
props: DBClusterProps
- Type: DBClusterProps