Skip to content

DBInstance

This class encapsulates and extends the ROS resource type ALIYUN::PolarDBX::DBInstance, which is used to create a PolarDB for Xscale (PolarDB-X) instance.

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: The specification of the nodes in the instance you want to create.
dbNodeCount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property dbNodeCount: The number of nodes in the instance you want to create.
engineVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property engineVersion: The version of the database engine.
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: The ID of resource group.
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: The specification of the nodes in the instance you want to create.


dbNodeCountRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property dbNodeCount: The number of nodes in the instance you want to create.


engineVersionRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property engineVersion: The version of the database engine.


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: The ID of resource group.


secondaryZoneOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property secondaryZone: The secondary zone.


securityIpConfigOptional

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

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

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

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
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 com.aliyun.ros.cdk.core.IResolvable Attribute ConnectionString: Intranet connection string.
attrDbInstanceName com.aliyun.ros.cdk.core.IResolvable Attribute DBInstanceName: The name of the instance that you create.
attrOrderId com.aliyun.ros.cdk.core.IResolvable Attribute OrderId: The ID of the order.
attrPort com.aliyun.ros.cdk.core.IResolvable Attribute Port: Intranet connection port.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


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 IResolvable getAttrConnectionString();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute ConnectionString: Intranet connection string.


attrDbInstanceNameRequired

public IResolvable getAttrDbInstanceName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute DBInstanceName: The name of the instance that you create.


attrOrderIdRequired

public IResolvable getAttrOrderId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute OrderId: The ID of the order.


attrPortRequired

public IResolvable getAttrPort();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute Port: Intranet connection port.