All Products
Search
Document Center

AnalyticDB:CreateDBInstance

Last Updated:Nov 04, 2024
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Create Instance

Operation description

Before using this interface, please make sure you have fully understood the billing method and pricing of the AnalyticDB for PostgreSQL product.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
gpdb:CreateDBInstancecreate
  • DBInstance
    acs:gpdb:{#regionId}:{#accountId}:dbinstance/*
  • gpdb:EncryptionType
  • gpdb:EnableSSL
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

Region ID.

Note You can call the DescribeRegions interface to view available region IDs.
cn-hangzhou
ZoneIdstringYes

Zone ID.

Note You can call the DescribeRegions interface to view available zone IDs.
cn-hangzhou-i
EngineVersionstringYes

Engine version. The values are as follows:

  • 6.0: Version 6.0.
  • 7.0: Version 7.0.
6.0
EnginestringYes

Database engine, with the value gpdb.

gpdb
DBInstanceClassstringNo

Instance type. For more details, see the supplementary description of the DBInstanceClass parameter.

Note This parameter is required when creating a reserved storage mode instance.
gpdb.group.segsdx1
DBInstanceGroupCountstringNo

Number of compute groups. The values are: 2, 4, 8, 12, 16, 24, 32, 64, 96, 128.

Note This parameter is required when creating a reserved storage mode instance.
2
DBInstanceDescriptionstringNo

Instance description.

test
SecurityIPListstringNo

IP whitelist.

127.0.0.1 indicates that no external IP addresses are allowed to access. You can modify the IP whitelist by calling the ModifySecurityIps interface after the instance is created.

127.0.0.1
PayTypestringNo

Billing type. The values are as follows:

  • Postpaid: Pay-as-you-go
  • Prepaid: Subscription
Note
  • If not specified, it will default to pay-as-you-go.
  • When using the subscription billing model, there may be discounts for purchasing one year or longer at once. It is recommended to choose the billing type according to your needs.
  • Prepaid
    PeriodstringNo

    Unit of the duration for which resources are purchased. The values are as follows:

    • Month: Month
    • Year: Year
    Note This parameter is required when creating a subscription-billed instance.
    Month
    UsedTimestringNo

    Duration for which resources are purchased. The values are as follows:

    • When Period is Month, the value ranges from 1 to 9.
    • When Period is Year, the value ranges from 1 to 3.
    Note This parameter is required when creating a subscription-billed instance.
    1
    ClientTokenstringNo

    Idempotence check. For more information, see How to Ensure Idempotence.

    0c593ea1-3bea-11e9-b96b-88**********
    InstanceNetworkTypestringNo

    Instance network type, with the value VPC.

    Note
  • Only VPC networks are supported in public cloud.
  • If not specified, it defaults to VPC type.
  • VPC
    VPCIdstringNo

    VPC ID.

    Note
  • VPCId is required.
  • The region of the VPC must be consistent with RegionId.
  • vpc-bp19ame5m1r3oejns****
    VSwitchIdstringNo

    vSwitch ID.

    Note
  • vSwitchId is required.
  • The availability zone of the vSwitch must be consistent with ZoneId.
  • vsw-bp1cpq8mr64paltkb****
    PrivateIpAddressstringNo

    This parameter is deprecated and should not be passed.

    null
    SegStorageTypestringNo

    Disk storage type, currently only ESSD cloud disks are supported, with the value cloud_essd.

    Note This parameter is required when creating an elastic storage mode instance.
    cloud_essd
    SegDiskPerformanceLevelstringNo

    ESSD cloud disk performance level. The values are as follows:

    • pl0: PL0 level.
    • pl1: PL1 level.
    • pl2: PL2 level.
    Note
  • This parameter is effective only if the disk storage type is ESSD cloud disk.
  • If not specified, it defaults to PL1 level.
  • pl1
    InstanceSpecstringNo

    Compute node specifications.

    For high-availability versions of the elastic storage mode, the values are as follows:

    • 2C16G
    • 4C32G
    • 16C128G

    For basic versions of the elastic storage mode, the values are as follows:

    • 2C8G
    • 4C16G
    • 8C32G
    • 16C64G

    For Serverless mode, the values are as follows:

    • 4C16G
    • 8C32G
    Note This parameter is required when creating an elastic storage mode instance or a Serverless mode instance.
    2C16G
    SegNodeNumstringNo

    The number of compute nodes. The value description is as follows:

    • For the high-availability version of the storage elastic mode, the value range is 4 to 512, and the value must be a multiple of 4.
    • For the basic version of the storage elastic mode, the value range is 2 to 512, and the value must be a multiple of 2.
    • For the Serverless mode, the value range is 2 to 512, and the value must be a multiple of 2.
    Note This parameter is required when creating instances in the storage elastic mode or Serverless mode.
    4
    MasterNodeNumstringNo

    This parameter is deprecated and should not be passed.

    null
    DBInstanceModestringYes

    Instance resource type. The value description is as follows:

    • StorageElastic: Storage elastic mode.
    • Serverless: Serverless mode.
    • Classic: Storage reserved mode.
    Note This parameter is required.
    StorageElastic
    StorageTypestringNo

    This parameter is deprecated and should not be passed.

    null
    DBInstanceCategorystringNo

    Instance series. The value description is as follows:

    • HighAvailability: High availability version.
    • Basic: Basic version.
    Note This parameter is required when creating an instance in the storage elastic mode.
    HighAvailability
    ResourceGroupIdstringNo

    The ID of the enterprise resource group where the instance is located.

    rg-bp67acfmxazb4p****
    StorageSizelongNo

    The size of the storage space, in GB, with a value range of 50~6000.

    Note This parameter is required when creating an instance in the storage elastic mode.
    200
    CreateSampleDatabooleanNo

    Whether to load sample datasets after the instance is created. The values are as follows:

    • true: Load sample datasets.
    • false: Do not load sample datasets.
    Note If this parameter is not specified, it defaults to not loading sample datasets.
    false
    Tagarray<object>No

    The Nth tag. The value of N ranges from 1 to 20.

    objectNo

    The Nth tag. The value of N ranges from 1 to 20.

    KeystringNo

    Tag key. The restrictions are as follows:

    • It cannot be an empty string.
    • It supports up to 128 characters.
    • It cannot start with aliyun or acs:, and it cannot contain http:// or https://.
    TestKey
    ValuestringNo

    Tag value. The restrictions are as follows:

    • It can be an empty string.
    • It supports up to 128 characters.
    • It cannot start with acs:, and it cannot contain http:// or https://.
    TestValue
    ServerlessResourceintegerNo

    The threshold for computing resources. The value range is 8 to 32, with a step of 8, and the unit is ACU. The default value is 32.

    Note This parameter is required only for Serverless auto-scheduling mode instances.
    32
    IdleTimeintegerNo

    The idle release wait time. When the duration without business traffic reaches the specified time, the instance will enter the idle state. The unit is seconds, with a minimum value of 60, and the default value is 600.

    Note This parameter is required only for Serverless auto-scheduling mode instances.
    600
    ServerlessModestringNo

    The mode of the Serverless instance. The values are as follows:

    • Manual: Manual scheduling (default).
    • Auto: Auto scheduling.
    Note This parameter is required only for Serverless mode instances.
    Auto
    EncryptionTypestringNo

    Encryption type. The value description is as follows:

    • NULL: No encryption (default).
    • CloudDisk: Enable cloud disk encryption and specify the key through the EncryptionKey parameter.
    Note Once cloud disk encryption is enabled, it cannot be disabled.
    CloudDisk
    EncryptionKeystringNo

    Key ID.

    Note If the value of the EncryptionType parameter is CloudDisk, you need to specify the encryption key ID within the same region through this parameter; otherwise, it should be empty.
    0d2470df-da7b-4786-b981-88888888****
    VectorConfigurationStatusstringNo

    Whether to enable vector engine optimization. The value description is as follows:

    • enabled: Enable vector engine optimization.
    • disabled (default): Do not enable vector engine optimization.
    Note
  • For mainstream analysis scenarios, data warehouse scenarios, and real-time data warehouse scenarios, it is recommended to not enable vector engine optimization.
  • For users using the vector analysis engine for AIGC, vector retrieval, and other scenarios, it is recommended to enable vector engine optimization.
  • enabled
    MasterCUintegerNo

    Master resources, with the following values:

    • 2 CU
    • 4 CU
    • 8 CU
    • 16 CU
    • 32 CU
    Note Master resources above 8 CU will incur charges.
    8 CU
    SrcDbInstanceNamestringNo

    ID of the source instance to be cloned.

    Note You can call the DescribeDBInstances interface to view details of all AnalyticDB for PostgreSQL instances in the target region, including the instance ID.
    gp-bp***************
    BackupIdstringNo

    Backup set ID.

    Note You can call the DescribeDataBackups interface to view the backup set IDs of all backup sets under the target instance.
    1111111111
    EnableSSLbooleanNo

    Indicates whether to enable SSL encryption. The values are as follows:

    • true: Enable SSL encryption.
    • false (default): Do not enable SSL encryption.
    false
    ProdTypestringNo

    Product type. The values are as follows:

    • standard: Standard Edition.
    • cost-effective: Cost-Effective Edition.
    Note If this parameter is not specified, the default value is Standard Edition.
    standard
    DeployModestringNo

    Deployment mode. The values are as follows:

    • multiple: Multi-zone deployment.
    • single: Single-zone deployment.
    Note
  • If this parameter is not specified, the default value is single-zone deployment.
  • Currently, only single-zone deployment is supported.
  • single
    StandbyZoneIdstringNo

    ID of the standby zone.

    Note
  • This parameter is required for multi-zone deployment.
  • You can call the DescribeRegions interface to view available zone IDs.
  • The ID of the standby zone must be different from the ID of the primary zone.
  • cn-hangzhou-j
    StandbyVSwitchIdstringNo

    VSwitch ID of the standby zone.

    Note
  • This parameter is required for multi-zone deployment.
  • The VSwitch ID of the standby zone must be in the same zone as the StandbyZoneId.
  • vsw-bp1cpq8mr64paltkb****

    DBInstanceClass Parameter Supplement

    Currently, AnalyticDB for PostgreSQL supports the following two types of instance specifications:

    • High Performance: The specification name starts with gpdb.group.segsdx, characterized by providing better I/O capabilities, leading to higher performance.
    • High Capacity: The specification name starts with gpdb.group.seghdx, characterized by offering larger and more cost-effective space, meeting higher storage needs.

    Therefore, when choosing an instance specification, it is recommended that you select based on the required storage space and computing power.

    Additionally, AnalyticDB for PostgreSQL supports external table expansion based on OSS, and data compression on external storage can be achieved through gzip. Data that does not need to participate in real-time computation can be stored externally to further save on storage costs.

    High Performance Instance Specifications are as shown in the table below:


    [High Performance] Specification

    CPU

    Memory

    Storage Space

    gpdb.group.segsdx1

    1 Core

    8 GB

    80 GB SSD

    gpdb.group.segsdx2

    2 Cores

    16 GB

    160 GB SSD

    gpdb.group.segsdx16

    16 Cores

    128 GB

    1.28 TB SSD

    High Capacity Instance Specifications are as shown in the table below:


    [High Capacity] Specification

    CPU

    Memory

    Storage Space

    gpdb.group.seghdx4

    4 Cores

    32 GB

    2 TB HDD

    gpdb.group.seghdx36

    36 Cores

    288 GB

    18 TB HDD

    Response parameters

    ParameterTypeDescriptionExample
    object
    RequestIdstring

    Request ID.

    5414A4E5-4C36-4461-95FC-************
    DBInstanceIdstring

    Instance ID.

    gp-bp12ga6v69h86****
    Portstring

    This parameter is deprecated and will not return a value.

    You can use the DescribeDBInstanceAttribute interface to view the port number of the instance.

    3432
    ConnectionStringstring

    This parameter is deprecated and will not return a value.

    You can use the DescribeDBInstanceAttribute interface to view the connection address of the instance.

    gp-bp12ga6v69h86****.gpdb.rds.aliyuncs.com
    OrderIdstring

    Order ID.

    111111111111

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "5414A4E5-4C36-4461-95FC-************",
      "DBInstanceId": "gp-bp12ga6v69h86****",
      "Port": "3432",
      "ConnectionString": "gp-bp12ga6v69h86****.gpdb.rds.aliyuncs.com",
      "OrderId": "111111111111"
    }

    Error codes

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2024-10-11The request parameters of the API has changedView Change Details
    2024-05-13The internal configuration of the API is changed, but the call is not affectedView Change Details
    2024-01-04The request parameters of the API has changedView Change Details
    2023-12-18The request parameters of the API has changedView Change Details
    2023-09-18The internal configuration of the API is changed, but the call is not affectedView Change Details
    2023-08-17The request parameters of the API has changedView Change Details
    2023-08-17The request parameters of the API has changedView Change Details
    2023-05-23The request parameters of the API has changedView Change Details
    2023-05-04The request parameters of the API has changedView Change Details
    2023-04-18The request parameters of the API has changedView Change Details