DBInstance
- Implements: IDBInstance
This class encapsulates and extends the ROS resource type ALIYUN::GPDB::DBInstanceUse the , which resource to create an AnalyticDB for PostgreSQL instance in reserved storage mode.
Initializers
import ros_cdk_gpdb
ros_cdk_gpdb.DBInstance(
scope: Construct,
id: str,
engine_version: typing.Union[str, IResolvable],
v_switch_id: typing.Union[str, IResolvable],
zone_id: typing.Union[str, IResolvable],
ai_node_spec_infos: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, AINodeSpecInfosProperty]]] = None,
backup_id: typing.Union[str, IResolvable] = None,
cache_storage_size: typing.Union[str, IResolvable] = None,
create_sample_data: typing.Union[bool, IResolvable] = None,
db_instance_category: typing.Union[str, IResolvable] = None,
db_instance_class: typing.Union[str, IResolvable] = None,
db_instance_description: typing.Union[str, IResolvable] = None,
db_instance_group_count: typing.Union[typing.Union[int, float], IResolvable] = None,
db_instance_mode: typing.Union[str, IResolvable] = None,
deploy_mode: typing.Union[str, IResolvable] = None,
enable_ssl: typing.Union[bool, IResolvable] = None,
encryption_key: typing.Union[str, IResolvable] = None,
encryption_type: typing.Union[str, IResolvable] = None,
idle_time: typing.Union[typing.Union[int, float], IResolvable] = None,
instance_spec: typing.Union[str, IResolvable] = None,
master_ai_spec: typing.Union[str, IResolvable] = None,
master_cu: typing.Union[typing.Union[int, float], IResolvable] = None,
master_node_num: typing.Union[typing.Union[int, float], IResolvable] = None,
pay_type: typing.Union[str, IResolvable] = None,
period: typing.Union[typing.Union[int, float], IResolvable] = None,
period_unit: typing.Union[str, IResolvable] = None,
private_ip_address: typing.Union[str, IResolvable] = None,
prod_type: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
security_ip_list: typing.Union[str, IResolvable] = None,
seg_disk_performance_level: typing.Union[str, IResolvable] = None,
seg_node_num: typing.Union[typing.Union[int, float], IResolvable] = None,
seg_storage_type: typing.Union[str, IResolvable] = None,
serverless_mode: typing.Union[str, IResolvable] = None,
serverless_resource: typing.Union[typing.Union[int, float], IResolvable] = None,
src_db_instance_name: typing.Union[str, IResolvable] = None,
standby_v_switch_id: typing.Union[str, IResolvable] = None,
standby_zone_id: typing.Union[str, IResolvable] = None,
storage_size: typing.Union[typing.Union[int, float], IResolvable] = None,
tags: typing.List[TagsProperty] = None,
vector_configuration_status: typing.Union[str, IResolvable] = None,
vpc_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. |
engine_version | typing.Union[str, ros_cdk_core.IResolvable] | Property engineVersion: The version of the database engine. |
v_switch_id | typing.Union[str, ros_cdk_core.IResolvable] | Property vSwitchId: The vSwitch ID of the instance. |
zone_id | typing.Union[str, ros_cdk_core.IResolvable] | Property zoneId: The zone ID of the instance, such as cn-hangzhou-d. |
ai_node_spec_infos | typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, AINodeSpecInfosProperty]]] | Property aiNodeSpecInfos: AI node spec infos. |
backup_id | typing.Union[str, ros_cdk_core.IResolvable] | Property backupId: Backup set ID. |
cache_storage_size | typing.Union[str, ros_cdk_core.IResolvable] | Property cacheStorageSize: Cache storage size. |
create_sample_data | typing.Union[bool, ros_cdk_core.IResolvable] | Property createSampleData: Whether to load the sample data set after the instance is created. |
db_instance_category | typing.Union[str, ros_cdk_core.IResolvable] | Property dbInstanceCategory: DB instance category, valid values: Basic, HighAvailability. |
db_instance_class | typing.Union[str, ros_cdk_core.IResolvable] | Property dbInstanceClass: The instance type. |
db_instance_description | typing.Union[str, ros_cdk_core.IResolvable] | Property dbInstanceDescription: The description of the instance. |
db_instance_group_count | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property dbInstanceGroupCount: The number of compute nodes in the instance. |
db_instance_mode | typing.Union[str, ros_cdk_core.IResolvable] | Property dbInstanceMode: The db instance mode. |
deploy_mode | typing.Union[str, ros_cdk_core.IResolvable] | Property deployMode: The deployment mode of the instance. |
enable_ssl | typing.Union[bool, ros_cdk_core.IResolvable] | Property enableSsl: Whether to enable SSL encryption. |
encryption_key | typing.Union[str, 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. |
encryption_type | typing.Union[str, ros_cdk_core.IResolvable] | Property encryptionType: The type of the encryption. |
idle_time | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property idleTime: Idle release wait time. |
instance_spec | typing.Union[str, ros_cdk_core.IResolvable] | Property instanceSpec: The specification of segment nodes. |
master_ai_spec | typing.Union[str, ros_cdk_core.IResolvable] | Property masterAiSpec: If you need to change the Master node to MasterAI node, specify this parameter. |
master_cu | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property masterCu: Master resources. |
master_node_num | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property masterNodeNum: The number of master nodes. |
pay_type | typing.Union[str, ros_cdk_core.IResolvable] | Property payType: The billing method of the instance. |
period | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property period: The subscription period. |
period_unit | typing.Union[str, ros_cdk_core.IResolvable] | Property periodUnit: Unit of subscription period, it could be Month\/Year. |
private_ip_address | typing.Union[str, ros_cdk_core.IResolvable] | Property privateIpAddress: Private IP address. |
prod_type | typing.Union[str, ros_cdk_core.IResolvable] | Property prodType: Prod type. |
resource_group_id | typing.Union[str, ros_cdk_core.IResolvable] | Property resourceGroupId: The ID of the resource group. |
security_ip_list | typing.Union[str, ros_cdk_core.IResolvable] | Property securityIpList: The whitelist of IP addresses that are allowed to access the instance. |
seg_disk_performance_level | typing.Union[str, ros_cdk_core.IResolvable] | Property segDiskPerformanceLevel: Seg disk performance level. |
seg_node_num | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property segNodeNum: Calculate the number of nodes. |
seg_storage_type | typing.Union[str, ros_cdk_core.IResolvable] | Property segStorageType: The disk type of segment nodes. |
serverless_mode | typing.Union[str, ros_cdk_core.IResolvable] | Property serverlessMode: Mode of the Serverless instance. |
serverless_resource | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property serverlessResource: Computing resource threshold. |
src_db_instance_name | typing.Union[str, ros_cdk_core.IResolvable] | Property srcDbInstanceName: Clone source instance ID. |
standby_v_switch_id | typing.Union[str, ros_cdk_core.IResolvable] | Property standbyVSwitchId: The standby VSwitch ID of the instance. |
standby_zone_id | typing.Union[str, ros_cdk_core.IResolvable] | Property standbyZoneId: The standby zone ID of the instance. |
storage_size | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property storageSize: The storage capacity of per segment node. |
tags | typing.List[TagsProperty] | Property tags: The list of instance tags in the form of key\/value pairs. |
vector_configuration_status | typing.Union[str, ros_cdk_core.IResolvable] | Property vectorConfigurationStatus: the status of vector configuration. |
vpc_id | typing.Union[str, ros_cdk_core.IResolvable] | Property vpcId: The VPC ID of the instance. |
enable_resource_property_constraint | bool | No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
engine_versionRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property engineVersion: The version of the database engine.
For example: 6.0、7.0
v_switch_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vSwitchId: The vSwitch ID of the instance.
zone_idRequired
- Type: typing.Union[str, 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.
ai_node_spec_infosOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, AINodeSpecInfosProperty]]]
Property aiNodeSpecInfos: AI node spec infos.
backup_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property backupId: Backup set ID.
You can call DescribeDataBackups to view the backup set IDs of all backup sets under the target instance.
cache_storage_sizeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property cacheStorageSize: Cache storage size.
create_sample_dataOptional
- Type: typing.Union[bool, 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
db_instance_categoryOptional
- Type: typing.Union[str, 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.
db_instance_classOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceClass: The instance type.
db_instance_descriptionOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceDescription: The description of the instance.
The description cannot exceed 256 characters in length.
db_instance_group_countOptional
- Type: typing.Union[typing.Union[int, float], 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.
db_instance_modeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dbInstanceMode: The db instance mode.
Valid values: StorageElastic, Serverless, Classic.
deploy_modeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property deployMode: The deployment mode of the instance.
enable_sslOptional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property enableSsl: Whether to enable SSL encryption.
Valid values: true: Enable SSL encryption. false (default): Do not enable SSL encryption.
encryption_keyOptional
- Type: typing.Union[str, 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.
encryption_typeOptional
- Type: typing.Union[str, 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.
idle_timeOptional
- Type: typing.Union[typing.Union[int, float], 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.
instance_specOptional
- Type: typing.Union[str, 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.
master_ai_specOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property masterAiSpec: If you need to change the Master node to MasterAI node, specify this parameter.
This parameter cannot be specified at the same time as MasterCU. Only some regions and availability zones support changing the Master node to MasterAI node. Only Basic edition instances of AnalyticDB PostgreSQL 7.0 support MasterAI nodes. You can query all possible values of this parameter on the Master node reconfiguration sales page.
master_cuOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property masterCu: Master resources.
Default is 8.
master_node_numOptional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property masterNodeNum: The number of master nodes.
Minimum is 1, max is 2.
pay_typeOptional
- Type: typing.Union[str, 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: typing.Union[typing.Union[int, float], 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.
period_unitOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property periodUnit: Unit of subscription period, it could be Month\/Year.
Default value is Month.
private_ip_addressOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property privateIpAddress: Private IP address.
prod_typeOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property prodType: Prod type.
The value can be: standard, cost-effective. The default value is standard.
resource_group_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: The ID of the resource group.
security_ip_listOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property securityIpList: The whitelist of IP addresses that are allowed to access the instance.
Default value: 127.0.0.1.
seg_disk_performance_levelOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property segDiskPerformanceLevel: Seg disk performance level.
The value can be: pl0、pl1 and pl2
seg_node_numOptional
- Type: typing.Union[typing.Union[int, float], 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.
seg_storage_typeOptional
- Type: typing.Union[str, 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.
serverless_modeOptional
- Type: typing.Union[str, 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.
serverless_resourceOptional
- Type: typing.Union[typing.Union[int, float], 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.
src_db_instance_nameOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property srcDbInstanceName: Clone source instance ID.
You can call the DescribeDBInstances interface to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
standby_v_switch_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property standbyVSwitchId: The standby VSwitch ID of the instance.
standby_zone_idOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property standbyZoneId: The standby zone ID of the instance.
storage_sizeOptional
- Type: typing.Union[typing.Union[int, float], 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
- Type: typing.List[TagsProperty]
Property tags: The list of instance tags in the form of key\/value pairs.
You can define a maximum of 20 tags for instance.
vector_configuration_statusOptional
- Type: typing.Union[str, 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).
vpc_idOptional
- Type: typing.Union[str, 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.
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_gpdb
ros_cdk_gpdb.DBInstance.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_connection_string | typing.Union[str, ros_cdk_core.IResolvable] | Attribute ConnectionString: The endpoint of the instance. |
attr_db_instance_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute DBInstanceId: The ID of the instance. |
attr_order_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute OrderId: The order ID of the instance. |
attr_port | typing.Union[str, ros_cdk_core.IResolvable] | Attribute Port: The port used to connect to the instance. |
props | DBInstanceProps | 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_connection_stringRequired
attr_connection_string: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute ConnectionString: The endpoint of the instance.
attr_db_instance_idRequired
attr_db_instance_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute DBInstanceId: The ID of the instance.
attr_order_idRequired
attr_order_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute OrderId: The order ID of the instance.
attr_portRequired
attr_port: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute Port: The port used to connect to the instance.
propsRequired
props: DBInstanceProps
- Type: DBInstanceProps