DrdsInstance
- Implements: IDrdsInstance
This class encapsulates and extends the ROS resource type ALIYUN::DRDS::DrdsInstance.
Initializers
import com.aliyun.ros.cdk.drds.DrdsInstance;
DrdsInstance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.description(java.lang.String)
.description(IResolvable)
.instanceSeries(java.lang.String)
.instanceSeries(IResolvable)
.payType(java.lang.String)
.payType(IResolvable)
.specification(java.lang.String)
.specification(IResolvable)
.type(java.lang.String)
.type(IResolvable)
.zoneId(java.lang.String)
.zoneId(IResolvable)
// .duration(java.lang.Number)
// .duration(IResolvable)
// .isAutoRenew(java.lang.Boolean)
// .isAutoRenew(IResolvable)
// .mySqlVersion(java.lang.String)
// .mySqlVersion(IResolvable)
// .pricingCycle(java.lang.String)
// .pricingCycle(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .vpcId(java.lang.String)
// .vpcId(IResolvable)
// .vswitchId(java.lang.String)
// .vswitchId(IResolvable)
.build();
| Name | Type | Description |
|---|---|---|
scope | com.aliyun.ros.cdk.core.Construct | No description. |
id | java.lang.String | No description. |
enableResourcePropertyConstraint | java.lang.Boolean | No description. |
description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: Specifies the description of the instance. |
instanceSeries | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceSeries: Specifies the instance type of the instance. |
payType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property payType: Specifies the billing method of the instance. |
specification | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property specification: Specifies the specification code of the instance. |
type | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property type: Specifies the type of the instance. |
zoneId | java.lang.String OR com.aliyun.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 | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property duration: The number of cycles ordered. |
isAutoRenew | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property isAutoRenew: Specifies whether to enable automatic renewal. |
mySqlVersion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property mySqlVersion: Specifies the MySQL version that is supported by the instance. |
pricingCycle | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property pricingCycle: Specifies the unit of the subscription duration of the subscription instance. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: Resource group id. |
tags | java.util.List<TagsProperty> | Property tags: Tags to attach to instance. |
vpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpcId: Virtual private network ID, must be specified when creating a DRDS for VPC network type. |
vswitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vswitchId: Virtual switch ID, must be specified when creating a DRDS for VPC network type. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
descriptionRequired
- Type: java.lang.String OR com.aliyun.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.
instanceSeriesRequired
- Type: java.lang.String OR com.aliyun.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.
payTypeRequired
- Type: java.lang.String OR com.aliyun.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: java.lang.String OR com.aliyun.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: java.lang.String OR com.aliyun.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.
zoneIdRequired
- Type: java.lang.String OR com.aliyun.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: java.lang.Number OR com.aliyun.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.
isAutoRenewOptional
- Type: java.lang.Boolean OR com.aliyun.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.
mySqlVersionOptional
- Type: java.lang.String OR com.aliyun.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.
pricingCycleOptional
- Type: java.lang.String OR com.aliyun.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.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
tagsOptional
- Type: java.util.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.
vpcIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: Virtual private network ID, must be specified when creating a DRDS for VPC network type.
vswitchIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vswitchId: Virtual switch ID, must be specified when creating a DRDS for VPC network type.
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition | No description. |
addCount | No description. |
addDependency | No description. |
addResourceDesc | No description. |
applyRemovalPolicy | No description. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | No description. |
getAtt | No description. |
setMetadata | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
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: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct | Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.drds.DrdsInstance;
DrdsInstance.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
ref | java.lang.String | No description. |
stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. |
resource | com.aliyun.ros.cdk.core.RosResource | No description. |
attrArn | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Arn: The Alibaba Cloud Resource Name (ARN). |
attrDrdsInstanceId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DrdsInstanceId: instance id. |
attrInternetEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute InternetEndpoint: Public endpoint. |
attrIntranetEndpoint | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute IntranetEndpoint: VPC endpoint. |
attrOrderId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute OrderId: order number. |
props | DrdsInstanceProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.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
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrArnRequired
public java.lang.Object getAttrArn();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attrDrdsInstanceIdRequired
public java.lang.Object getAttrDrdsInstanceId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DrdsInstanceId: instance id.
attrInternetEndpointRequired
public java.lang.Object getAttrInternetEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute InternetEndpoint: Public endpoint.
attrIntranetEndpointRequired
public java.lang.Object getAttrIntranetEndpoint();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute IntranetEndpoint: VPC endpoint.
attrOrderIdRequired
public java.lang.Object getAttrOrderId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute OrderId: order number.
propsRequired
public DrdsInstanceProps getProps();
- Type: DrdsInstanceProps