全部产品
Search
文档中心

ApsaraDB for SelectDB:CreateDBInstance

更新时间:Jan 27, 2026

Membuat instance ApsaraDB for SelectDB.

Deskripsi operasi

Anda tidak dapat menghapus instance subscription.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

selectdb:CreateDBInstance

create

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

ResourceGroupId

string

No

ID kelompok sumber daya.

rg-aekzt2zaluvuvqa_fake

ClientToken

string

No

Token client untuk memastikan idempotensi permintaan. Nilai ini dihasilkan oleh client dan harus unik di antara permintaan yang berbeda. Nilainya dapat terdiri dari maksimal 64 karakter ASCII dan tidak boleh mengandung karakter non-ASCII.

AB

Engine

string

No

Tipe database. Nilai default adalah selectdb.

selectdb

EngineVersion

string

Yes

Versi database. Nilai default adalah 3.0.

3.0

ChargeType

string

Yes

Metode penagihan instans. Nilai yang valid:

  • Postpaid: pay-as-you-go.

  • Prepaid: subscription.

PrePaid

UsedTime

integer

No

Durasi langganan instans subscription. Nilai yang valid:

  • Jika Anda mengatur Period ke Year, nilai yang valid adalah 1, 2, 3, 4, dan 5.

  • Jika Anda mengatur Period ke Month, nilai yang valid adalah bilangan bulat dari 1 hingga 12.

Catatan

Parameter ini wajib dan hanya berlaku jika Anda mengatur ChargeType ke Prepaid.

1

Period

string

No

Unit durasi langganan untuk klaster langganan. Nilai yang valid:

  • Year: Satuannya tahun.

  • Month: Satuannya bulan.

Catatan

Parameter ini wajib dan hanya berlaku jika Anda mengatur ChargeType ke Prepaid.

Month

DBInstanceClass

string

Yes

Tipe instans. Anda dapat memanggil operasi DescribeAllDBInstanceClass untuk menanyakan tipe instans yang tersedia.

selectdb.xlarge

RegionId

string

Yes

ID wilayah.

cn-hangzhou

ZoneId

string

Yes

ID zona.

cn-hangzhou-e

CacheSize

integer

Yes

Ukuran cache yang dipesan.

200GB

VpcId

string

Yes

ID VPC.

vpc-bp175iuvg8nxqraf2****

VSwitchId

string

Yes

ID vSwitch.

vsw-bp1gzt31twhlo0sa5****

DBInstanceDescription

string

No

Deskripsi instans.

新建实例测试

ConnectionString

string

No

Titik akhir database.

selectdb-cn-7213c8y****-public.selectdbfe.pre.rds.aliyuncs.com

SecurityIPList

string

No

Daftar putih alamat IP instans. Pisahkan beberapa alamat IP dengan koma (,).

192.168.1.1

Tag

array<object>

No

Informasi tag instans.

object

No

Daftar tag instans.

Key

string

No

Kunci tag.

testKey

Value

string

No

Nilai tag.

testValue

DeployScheme

string

No

Mode penyebaran instans.

single_az

MultiZone

array<object>

No

Konfigurasi multi-zona.

Catatan
  • Parameter ini wajib dan hanya berlaku jika Anda mengatur DeployScheme ke multi_az.

object

No

Daftar beberapa zona.

ZoneId

string

No

ID zona.

cn-hangzhou-k

VSwitchIds

array

No

Daftar ID vSwitch.

string

No

ID vSwitch.

vsw-bp10dbralpn4bzmgkkh8f

AddVPCIPs

string

No

Menentukan apakah Blok CIDR VPC ditambahkan ke daftar putih. Nilai yang valid:

  • 1: Ya

  • 0: Tidak

1

ClusterNodeType

string

No

ClusterNodeCount

integer

No

ScaleMax

number

No

ScaleMin

number

No

ConfigPatternType

string

No

Elemen respons

Element

Type

Description

Example

object

Schema of Response

RequestId

string

ID permintaan.

4773E4EC-025D-509F-AEA9-D53123FDFB0F

Data

object

Data yang dikembalikan.

DBInstanceId

string

ID instans.

selectdb-cn-7213cjv****

OrderId

integer

ID pesanan.

21137950671****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "4773E4EC-025D-509F-AEA9-D53123FDFB0F",
  "Data": {
    "DBInstanceId": "selectdb-cn-7213cjv****",
    "OrderId": 0
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 COMMODITY.INVALID_COMPONENT Order configuration parameters do not meet the verification conditions, please re-match the product.
400 DocumentConvertFailed.ExceedFileSizeLimit The conversion has been failed, exceed file size limit.
400 Forbidden User not authorized to operate on the specified resource, or this API does not support RAM.
400 InvalidDBName The specified database name is not allowed.
400 CreateOrderFailed Failed to create order.
400 InvalidVSwitchId.Malformed The specified parameter "VSwitchId" is not valid.
400 InvalidMultiZone.NotThreeZones The number of zones must be three.
400 InvalidZoneId.Duplicated The zones cannot be repeated please select different zones.
400 EngineVersionDoNotSupportMultiZone The specified engine version doesn't support multi zone.
400 InvalidChargeType.Malformed The specified parameter "ChargeType" is not valid.
400 InvalidBuyConfigCpuOrCacheSize The specified purchase configuration CPU or cache size is invalid.
400 InvalidZoneId.Malformed The specified parameter "ZoneId" is not valid.
400 InvalidVpcId.Malformed The specified parameter "VpcId" is not valid.
403 DBClusterNotSupported The requested operation can not be performed while the cluster is not sale.
403 IncorrectDBInstanceState Current DB instance state does not support this operation.
403 InstanceEngineType.NotSupport The instance engine and type does not support operations.
403 InvalidDBInstanceState.NotSupport The specified instance state does't support this operation.
403 MoneyLessThan100 The Account Monet less Than 100.
403 OperationDenied.DBNameAndAccountPrivilegeCount The operation is not permitted due to count of database or account privilege.
403 InsufficientResourceCapacity The resource is out of usage.
403 INSUFFICIENT_AVAILABLE_QUOTA Your account available limit is less than 0, please recharge before trying to purchase.
403 OperationDenied.SpecificClassCodeNotSupported The uid is not in specific classcode whitelist.
404 DBInstanceLocked The current instance lock mode does not support this operation.
404 IncorrectVswitchId The specified parameter VSwitchId is not valid.
404 InvalidApi.NotFound Specified api is not found, please check your url and method.
404 InvalidDBInstance.NotFound The specified instance is not found.
404 InvalidDBInstanceClass.NotFound The specified instance classic does not exist.
404 InvalidRegionId.NotFound The provided RegionId does not exist in our records.
404 QueryPrice.Failed The inquiry failed. Contact Alibaba Cloud customer service representatives.
404 InvalidVSwitch.NoIP VSwitch has zero available IP.
404 InvalidDBClusterClass.NotFound The specified cluster class does not exist.
404 InvalidVPC.NotFound VPC or VSwitch is not valid.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.