DBInstance
- Implements: IDBInstance
This class encapsulates and extends the ROS resource type ALIYUN::PolarDBX::DBInstance.
Initializers
import com.aliyun.ros.cdk.polardbx.DBInstance;
DBInstance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.dbNodeClass(java.lang.String)
.dbNodeClass(IResolvable)
.dbNodeCount(java.lang.Number)
.dbNodeCount(IResolvable)
.engineVersion(java.lang.String)
.engineVersion(IResolvable)
.primaryZone(java.lang.String)
.primaryZone(IResolvable)
.topologyType(java.lang.String)
.topologyType(IResolvable)
.vpcId(java.lang.String)
.vpcId(IResolvable)
.vSwitchId(java.lang.String)
.vSwitchId(IResolvable)
// .autoRenew(java.lang.Boolean)
// .autoRenew(IResolvable)
// .dbInstanceDescription(java.lang.String)
// .dbInstanceDescription(IResolvable)
// .payType(java.lang.String)
// .payType(IResolvable)
// .period(java.lang.String)
// .period(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .secondaryZone(java.lang.String)
// .secondaryZone(IResolvable)
// .securityIpConfig(IResolvable)
// .securityIpConfig(SecurityIpConfigProperty)
// .tertiaryZone(java.lang.String)
// .tertiaryZone(IResolvable)
// .usedTime(java.lang.Number)
// .usedTime(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. |
dbNodeClass | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dbNodeClass: Node specifications: - polarx.x4.medium.2e: 2 vCPUs, 8 GB - polarx.x4.large.2e: 4 vCPUs, 16 GB - polarx.x8.large.2e: 4 vCPUs, 32 GB - polarx.x4.xlarge.2e: 8 vCPUs, 32 GB - polarx.x8.xlarge.2e: 8 vCPUs, 64 GB - polarx.x4.2xlarge.2e: 16 vCPUs, 64 GB - polarx.x8.2xlarge.2e: 16 vCPUs, 128 GB - polarx.x4.4xlarge.2e: 32 vCPUs, 128 GB - polarx.x8.4xlarge.2e: 32 vCPUs, 256 GB - polarx.st.8xlarge.2e: 60 vCPUs, 470 GB - polarx.st.12xlarge.2e: 90 vCPUs, 720 GB. |
dbNodeCount | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property dbNodeCount: Number of instance nodes. |
engineVersion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property engineVersion: MySQL engine version, either 5.7 or 8.0. |
primaryZone | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property primaryZone: The primary zone. |
topologyType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property topologyType: The topology type of the instance. |
vpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpcId: The ID of the VPC to which the instance belongs. |
vSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vSwitchId: The ID of the vSwitch. |
autoRenew | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property autoRenew: Specifies whether to enable auto-renewal for the instance. |
dbInstanceDescription | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property dbInstanceDescription: The description of the instance. |
payType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property payType: The billing method of the instance. |
period | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property period: The unit of the billing cycle for the instance. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: Can be empty. |
secondaryZone | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property secondaryZone: The secondary zone. |
securityIpConfig | com.aliyun.ros.cdk.core.IResolvable OR SecurityIpConfigProperty | Property securityIpConfig: Instance whitelist configuration. |
tertiaryZone | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property tertiaryZone: The tertiary zone. |
usedTime | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property usedTime: The subscription period of the instance. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
dbNodeClassRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dbNodeClass: Node specifications: - polarx.x4.medium.2e: 2 vCPUs, 8 GB - polarx.x4.large.2e: 4 vCPUs, 16 GB - polarx.x8.large.2e: 4 vCPUs, 32 GB - polarx.x4.xlarge.2e: 8 vCPUs, 32 GB - polarx.x8.xlarge.2e: 8 vCPUs, 64 GB - polarx.x4.2xlarge.2e: 16 vCPUs, 64 GB - polarx.x8.2xlarge.2e: 16 vCPUs, 128 GB - polarx.x4.4xlarge.2e: 32 vCPUs, 128 GB - polarx.x8.4xlarge.2e: 32 vCPUs, 256 GB - polarx.st.8xlarge.2e: 60 vCPUs, 470 GB - polarx.st.12xlarge.2e: 90 vCPUs, 720 GB.
dbNodeCountRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property dbNodeCount: Number of instance nodes.
Minimum value is 2.
engineVersionRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property engineVersion: MySQL engine version, either 5.7 or 8.0.
primaryZoneRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property primaryZone: The primary zone.
topologyTypeRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property topologyType: The topology type of the instance.
Valid values: 3azones: The instance is deployed in three zones. 1azone: The instance is deployed in only one zone.
vpcIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The ID of the VPC to which the instance belongs.
vSwitchIdRequired
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The ID of the vSwitch.
autoRenewOptional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenew: Specifies whether to enable auto-renewal for the instance.
Default value: true. true: Enable auto-renewal. false: Disable auto-renewal.
dbInstanceDescriptionOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dbInstanceDescription: The description of the instance.
payTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property payType: The billing method of the instance.
Default: POSTPAY.Valid values: PREPAY: subscription POSTPAY: pay-as-you-go
periodOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property period: The unit of the billing cycle for the instance.
The valid values vary based on the billing method. If you use the subscription billing method, set the value to Year or Month. If you use the pay-as-you-go billing method, the value is automatically set to Hour.
resourceGroupIdOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Can be empty.
Resource group ID. Not supported for now.
secondaryZoneOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property secondaryZone: The secondary zone.
securityIpConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR SecurityIpConfigProperty
Property securityIpConfig: Instance whitelist configuration.
tertiaryZoneOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property tertiaryZone: The tertiary zone.
usedTimeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property usedTime: The subscription period of the instance.
Unit: month or year. Note When period is set to year, the supported values of this parameter are 1, 2 and 3.
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.polardbx.DBInstance;
DBInstance.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. |
attrConnectionString | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute ConnectionString: Intranet connection string. |
attrDbInstanceName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute DBInstanceName: The name of the instance that you create. |
attrOrderId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute OrderId: The ID of the order. |
attrPort | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute Port: Intranet connection port. |
props | DBInstanceProps | 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
attrConnectionStringRequired
public java.lang.Object getAttrConnectionString();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute ConnectionString: Intranet connection string.
attrDbInstanceNameRequired
public java.lang.Object getAttrDbInstanceName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute DBInstanceName: The name of the instance that you create.
attrOrderIdRequired
public java.lang.Object getAttrOrderId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute OrderId: The ID of the order.
attrPortRequired
public java.lang.Object getAttrPort();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute Port: Intranet connection port.
propsRequired
public DBInstanceProps getProps();
- Type: DBInstanceProps