Skip to content

DBInstance

This class encapsulates and extends the ROS resource type ALIYUN::GPDB::DBInstance, which is used to create an AnalyticDB for PostgreSQL instance in reserved storage mode.

Initializers

import com.aliyun.ros.cdk.gpdb.DBInstance;
DBInstance.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .engineVersion(java.lang.String)
    .engineVersion(IResolvable)
    .vSwitchId(java.lang.String)
    .vSwitchId(IResolvable)
    .zoneId(java.lang.String)
    .zoneId(IResolvable)
//  .createSampleData(java.lang.Boolean)
//  .createSampleData(IResolvable)
//  .dbInstanceCategory(java.lang.String)
//  .dbInstanceCategory(IResolvable)
//  .dbInstanceClass(java.lang.String)
//  .dbInstanceClass(IResolvable)
//  .dbInstanceDescription(java.lang.String)
//  .dbInstanceDescription(IResolvable)
//  .dbInstanceGroupCount(java.lang.Number)
//  .dbInstanceGroupCount(IResolvable)
//  .dbInstanceMode(java.lang.String)
//  .dbInstanceMode(IResolvable)
//  .encryptionKey(java.lang.String)
//  .encryptionKey(IResolvable)
//  .encryptionType(java.lang.String)
//  .encryptionType(IResolvable)
//  .idleTime(java.lang.Number)
//  .idleTime(IResolvable)
//  .instanceSpec(java.lang.String)
//  .instanceSpec(IResolvable)
//  .masterNodeNum(java.lang.Number)
//  .masterNodeNum(IResolvable)
//  .payType(java.lang.String)
//  .payType(IResolvable)
//  .period(java.lang.Number)
//  .period(IResolvable)
//  .periodUnit(java.lang.String)
//  .periodUnit(IResolvable)
//  .privateIpAddress(java.lang.String)
//  .privateIpAddress(IResolvable)
//  .prodType(java.lang.String)
//  .prodType(IResolvable)
//  .securityIpList(java.lang.String)
//  .securityIpList(IResolvable)
//  .segDiskPerformanceLevel(java.lang.String)
//  .segDiskPerformanceLevel(IResolvable)
//  .segNodeNum(java.lang.Number)
//  .segNodeNum(IResolvable)
//  .segStorageType(java.lang.String)
//  .segStorageType(IResolvable)
//  .serverlessMode(java.lang.String)
//  .serverlessMode(IResolvable)
//  .serverlessResource(java.lang.Number)
//  .serverlessResource(IResolvable)
//  .storageSize(java.lang.Number)
//  .storageSize(IResolvable)
//  .tags(java.util.List<TagsProperty>)
//  .vectorConfigurationStatus(java.lang.String)
//  .vectorConfigurationStatus(IResolvable)
//  .vpcId(java.lang.String)
//  .vpcId(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.
engineVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property engineVersion: The version of the database engine.
vSwitchId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vSwitchId: The vSwitch ID of the instance.
zoneId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property zoneId: The zone ID of the instance, such as cn-hangzhou-d.
createSampleData java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property createSampleData: Whether to load the sample data set after the instance is created.
dbInstanceCategory java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbInstanceCategory: DB instance category, valid values: Basic, HighAvailability.
dbInstanceClass java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbInstanceClass: The instance type.
dbInstanceDescription java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbInstanceDescription: The description of the instance.
dbInstanceGroupCount java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property dbInstanceGroupCount: The number of compute nodes in the instance.
dbInstanceMode java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dbInstanceMode: The db instance mode.
encryptionKey java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property encryptionKey: If the EncryptionType parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region with the disks that is specified by the EncryptionType parameter.
encryptionType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property encryptionType: The type of the encryption.
idleTime java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property idleTime: Idle release wait time.
instanceSpec java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceSpec: The specification of segment nodes.
masterNodeNum java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property masterNodeNum: The number of master nodes.
payType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property payType: The billing method of the instance.
period java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property period: The subscription period.
periodUnit java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property periodUnit: Unit of subscription period, it could be Month\/Year.
privateIpAddress java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property privateIpAddress: Private IP address.
prodType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property prodType: Prod type.
securityIpList java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property securityIpList: The whitelist of IP addresses that are allowed to access the instance.
segDiskPerformanceLevel java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property segDiskPerformanceLevel: Seg disk performance level.
segNodeNum java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property segNodeNum: Calculate the number of nodes.
segStorageType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property segStorageType: The disk type of segment nodes.
serverlessMode java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property serverlessMode: Mode of the Serverless instance.
serverlessResource java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property serverlessResource: Computing resource threshold.
storageSize java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property storageSize: The storage capacity of per segment node.
tags java.util.List<TagsProperty> Property tags: The list of instance tags in the form of key\/value pairs.
vectorConfigurationStatus java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vectorConfigurationStatus: the status of vector configuration.
vpcId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vpcId: The VPC ID of the instance.

scopeRequired

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

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

engineVersionRequired

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

Property engineVersion: The version of the database engine.

For example: 6.0、7.0


vSwitchIdRequired

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

Property vSwitchId: The vSwitch ID of the instance.


zoneIdRequired

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

Property zoneId: The zone ID of the instance, such as cn-hangzhou-d.

You can call the DescribeRegions operation to query the most recent zone list.


createSampleDataOptional

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

Property createSampleData: Whether to load the sample data set after the instance is created.

The value can be: true: load the sample dataset. false: not to load the sample dataset


dbInstanceCategoryOptional

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

Property dbInstanceCategory: DB instance category, valid values: Basic, HighAvailability.

This parameter must be passed in to create a storage reservation mode instance.


dbInstanceClassOptional

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

Property dbInstanceClass: The instance type.


dbInstanceDescriptionOptional

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

Property dbInstanceDescription: The description of the instance.

The description cannot exceed 256 characters in length.


dbInstanceGroupCountOptional

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

Property dbInstanceGroupCount: The number of compute nodes in the instance.

The value can be 2, 4, 8, 12, 16, 24, 32, 64, 96, or 128.


dbInstanceModeOptional

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

Property dbInstanceMode: The db instance mode.

Valid values: StorageElastic, Serverless, Classic.


encryptionKeyOptional

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

Property encryptionKey: If the EncryptionType parameter is set to CloudDisk, you must specify this parameter to the encryption key that is in the same region with the disks that is specified by the EncryptionType parameter.

Otherwise, leave this parameter empty.


encryptionTypeOptional

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

Property encryptionType: The type of the encryption.

Default value: NULL. Valid values: NULL: Encryption is disabled. CloudDisk: Encryption is enabled on disks and the encryption key is specified by using the EncryptionKey parameter. Note: Disk encryption cannot be disabled after it is enabled.


idleTimeOptional

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

Property idleTime: Idle release wait time.

That is, when the period of no service traffic reaches the specified period, the instance becomes idle. The unit is second. The minimum value is 60. The default value is 600.


instanceSpecOptional

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

Property instanceSpec: The specification of segment nodes.

  • When DBInstanceCategory is HighAvailability, Valid values: 2C16G, 4C32G, 8C64G, 16C128G.
  • When DBInstanceCategory is Basic, Valid values: 2C8G, 4C16G, 8C32G, 16C64G.
  • When DBInstanceCategory is Serverless, Valid values: 4C16G, 8C32G. This parameter must be passed to create a storage elastic mode instance and a serverless version instance.

masterNodeNumOptional

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

Property masterNodeNum: The number of master nodes.

Minimum is 1, max is 2.


payTypeOptional

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

Property payType: The billing method of the instance.

Default value: Postpaid. Valid values: Postpaid: pay-as-you-go Prepaid: subscription


periodOptional

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

Property period: The subscription period.

While choose by pay by month, it could be from 1 to 11. While choose pay by year, it could be from 1 to 3.


periodUnitOptional

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

Property periodUnit: Unit of subscription period, it could be Month\/Year.

Default value is Month.


privateIpAddressOptional

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

Property privateIpAddress: Private IP address.


prodTypeOptional

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

Property prodType: Prod type.

The value can be: standard, cost-effective. The default value is standard.


securityIpListOptional

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

Property securityIpList: The whitelist of IP addresses that are allowed to access the instance.

Default value: 127.0.0.1.


segDiskPerformanceLevelOptional

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

Property segDiskPerformanceLevel: Seg disk performance level.

The value can be: pl0、pl1 and pl2


segNodeNumOptional

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

Property segNodeNum: Calculate the number of nodes.

The value can be:

  • When DBInstanceMode is StorageElastic and DBInstanceCategory is HighAvailability, the value ranges from 4 to 512. The value must be a multiple of 4.
  • When DBInstanceMode is StorageElastic and DBInstanceCategory is Basic, the value ranges from 2 to 512. The value must be a multiple of 2.
  • When DBInstanceMode is Serverless, The value ranges from 2 to 512. The value must be a multiple of 2.

segStorageTypeOptional

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

Property segStorageType: The disk type of segment nodes.

For example: cloud_essd, cloud_efficiency. This parameter must be passed in to create a storage elastic mode instance. Storage Elastic Mode Basic Edition instances only support ESSD cloud disks.


serverlessModeOptional

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

Property serverlessMode: Mode of the Serverless instance.

The value can be: Manual: manual scheduling is the default value. Auto: indicates automatic scheduling.


serverlessResourceOptional

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

Property serverlessResource: Computing resource threshold.

The value ranges from 8 to 32. The step length is 8. The unit is ACU. The default value is 32.


storageSizeOptional

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

Property storageSize: The storage capacity of per segment node.

Unit: GB. Minimum is 50, max is 4000, step is 50.


tagsOptional

Property tags: The list of instance tags in the form of key\/value pairs.

You can define a maximum of 20 tags for instance.


vectorConfigurationStatusOptional

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

Property vectorConfigurationStatus: the status of vector configuration.

The value can be:Y: Turn on vector engine optimization.N: Turn off vector engine optimization (default value).


vpcIdOptional

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

Property vpcId: The VPC ID of the instance.

If you set the InstanceNetworkType parameter to VPC, you must also specify the VPCId parameter. The specified region of the VPC must be the same as the RegionId value.


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.gpdb.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: The endpoint of the instance.
attrDbInstanceId com.aliyun.ros.cdk.core.IResolvable Attribute DBInstanceId: The ID of the instance.
attrOrderId com.aliyun.ros.cdk.core.IResolvable Attribute OrderId: The order ID of the instance.
attrPort com.aliyun.ros.cdk.core.IResolvable Attribute Port: The port used to connect to the instance.

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: The endpoint of the instance.


attrDbInstanceIdRequired

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

Attribute DBInstanceId: The ID of the instance.


attrOrderIdRequired

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

Attribute OrderId: The order ID of the instance.


attrPortRequired

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

Attribute Port: The port used to connect to the instance.