DrdsInstance
- Implements: IDrdsInstance
This class encapsulates and extends the ROS resource type ALIYUN::DRDS::DrdsInstance.
Initializers
import ros_cdk_drds
ros_cdk_drds.DrdsInstance(
scope: Construct,
id: str,
description: typing.Union[str, IResolvable],
instance_series: typing.Union[str, IResolvable],
pay_type: typing.Union[str, IResolvable],
specification: typing.Union[str, IResolvable],
type: typing.Union[str, IResolvable],
zone_id: typing.Union[str, IResolvable],
duration: typing.Union[typing.Union[int, float], IResolvable] = None,
is_auto_renew: typing.Union[bool, IResolvable] = None,
my_sql_version: typing.Union[str, IResolvable] = None,
pricing_cycle: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
tags: typing.List[TagsProperty] = None,
vpc_id: typing.Union[str, IResolvable] = None,
vswitch_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. |
description | typing.Union[str, ros_cdk_core.IResolvable] | Property description: Specifies the description of the instance. |
instance_series | typing.Union[str, ros_cdk_core.IResolvable] | Property instanceSeries: Specifies the instance type of the instance. |
pay_type | typing.Union[str, ros_cdk_core.IResolvable] | Property payType: Specifies the billing method of the instance. |
specification | typing.Union[str, ros_cdk_core.IResolvable] | Property specification: Specifies the specification code of the instance. |
type | typing.Union[str, ros_cdk_core.IResolvable] | Property type: Specifies the type of the instance. |
zone_id | typing.Union[str, ros_cdk_core.IResolvable] | Property zoneId: Availability zone, an available zone belongs to a certain zone, such as Hangzhou Availability Zone A (cn-hangzhou-a) belongs to the region Hangzhou (cn-hangzhou). |
duration | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property duration: The number of cycles ordered. |
is_auto_renew | typing.Union[bool, ros_cdk_core.IResolvable] | Property isAutoRenew: Specifies whether to enable automatic renewal. |
my_sql_version | typing.Union[str, ros_cdk_core.IResolvable] | Property mySqlVersion: Specifies the MySQL version that is supported by the instance. |
pricing_cycle | typing.Union[str, ros_cdk_core.IResolvable] | Property pricingCycle: Specifies the unit of the subscription duration of the subscription instance. |
resource_group_id | typing.Union[str, ros_cdk_core.IResolvable] | Property resourceGroupId: Resource group id. |
tags | typing.List[TagsProperty] | Property tags: Tags to attach to instance. |
vpc_id | typing.Union[str, ros_cdk_core.IResolvable] | Property vpcId: Virtual private network ID, must be specified when creating a DRDS for VPC network type. |
vswitch_id | typing.Union[str, ros_cdk_core.IResolvable] | Property vswitchId: Virtual switch ID, must be specified when creating a DRDS for VPC network type. |
enable_resource_property_constraint | bool | No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
descriptionRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property description: Specifies the description of the instance.
The description must meet the following requirements:
- The description cannot contain the prefix http:// or https://.
- The description must start with a letter or a Chinese character, and can contain uppercase and lowercase letters, Chinese characters, digits, underscores (_), and hyphens (-).
- The description must be 2 to 256 characters in length.
instance_seriesRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceSeries: Specifies the instance type of the instance.
Valid values:
- drds.sn2.4c16g: The instance is of the Starter Edition.
- drds.sn2.8c32g: The instance is of the Standard Edition
- drds.sn2.16c64g: The instance is of the Enterprise Edition.
pay_typeRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property payType: Specifies the billing method of the instance.
Valid values:
- drdsPre: The instance uses the subscription billing method.
- drdsPost: The instance uses the pay-as-you-go billing method.
- drdsRo: By default, the pay-as-you-go billing method is used when you create read-only instances.
specificationRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property specification: Specifies the specification code of the instance.
The value consists of the instance type and the specified instance specification. For example, you can set the value to drds.sn2.4c16g.8c32g.
typeRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property type: Specifies the type of the instance.
Set the value to PRIVATE. The value PRIVATE specifies that the instance is a dedicated instance.
You can also set the value to 1 to specify that the instance is a dedicated instance.
zone_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property zoneId: Availability zone, an available zone belongs to a certain zone, such as Hangzhou Availability Zone A (cn-hangzhou-a) belongs to the region Hangzhou (cn-hangzhou).
durationOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property duration: The number of cycles ordered.
When PricingCycle=year, the value is 1-3; when PricingCycle=month, the value is 1-9. The parameter takes effect when the payment type is drdsPre.
is_auto_renewOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property isAutoRenew: Specifies whether to enable automatic renewal.
Valid values:
- true: If the PricingCycle parameter is set to month, the subscription is automatically renewed for one month. If the PricingCycle parameter is set to year, the subscription is automatically renewed for one year.
- false: The auto-renewal feature is disabled for the instance.
This parameter only takes effect when the PayType parameter is set to drdsPre.
my_sql_versionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property mySqlVersion: Specifies the MySQL version that is supported by the instance.
Valid values:
- 5: The instance is fully compatible with MySQL 5.x. This value is the default value.
- 8: The instance is fully compatible with MySQL 8.0.
This parameter only takes effect when you create a primary instance. By default, the MySQL version of the read-only instance is the same as that of the primary instance.
pricing_cycleOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property pricingCycle: Specifies the unit of the subscription duration of the subscription instance.
Valid values:
- year: The unit of the subscription duration is year.
- month: The unit of the subscription duration is month.
This parameter is required if you set the PayType parameter to drdsPre.
resource_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: Resource group id.
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.
vpc_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vpcId: Virtual private network ID, must be specified when creating a DRDS for VPC network type.
vswitch_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vswitchId: Virtual switch ID, must be specified when creating a DRDS for VPC network type.
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_drds
ros_cdk_drds.DrdsInstance.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_drds_instance_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute DrdsInstanceId: instance id. |
attr_internet_endpoint | typing.Union[str, ros_cdk_core.IResolvable] | Attribute InternetEndpoint: Public endpoint. |
attr_intranet_endpoint | typing.Union[str, ros_cdk_core.IResolvable] | Attribute IntranetEndpoint: VPC endpoint. |
attr_order_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute OrderId: order number. |
props | DrdsInstanceProps | 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_drds_instance_idRequired
attr_drds_instance_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute DrdsInstanceId: instance id.
attr_internet_endpointRequired
attr_internet_endpoint: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute InternetEndpoint: Public endpoint.
attr_intranet_endpointRequired
attr_intranet_endpoint: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute IntranetEndpoint: VPC endpoint.
attr_order_idRequired
attr_order_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute OrderId: order number.
propsRequired
props: DrdsInstanceProps
- Type: DrdsInstanceProps