All Products
Search
Document Center

PolarDB:TransformDBClusterPayType

Last Updated:Jun 10, 2026

Mengubah metode penagihan kluster PolarDB Basis Data Relasional Cloud-Native.

Deskripsi operasi

Catatan
  • PolarDB clusters support two billing methods: subscription and pay-as-you-go. You can change the billing method of a cluster from subscription to pay-as-you-go, or from pay-as-you-go to subscription. For more information, see Change the billing method from subscription to pay-as-you-go and Change the billing method from pay-as-you-go to subscription.

  • You cannot change the billing method from pay-as-you-go to subscription if your Alibaba Cloud account has an insufficient balance.

  • When you change the billing method from subscription to pay-as-you-go, the system automatically refunds your remaining prepaid fees.

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

polardb:TransformDBClusterPayType

update

*DBCluster

acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

ID kluster PolarDB Basis Data Relasional Cloud-Native.

pc-bp10gr51qasnl****

PayType

string

Yes

Metode penagihan instans. Nilai valid:

  • Postpaid: pay-as-you-go

  • Prepaid: langganan.

Prepaid

RegionId

string

Yes

ID Wilayah.

cn-hangzhou

UsedTime

string

No

Durasi langganan. Nilai valid:

  • Jika Anda mengatur Period ke Year, nilai UsedTime dapat berupa 1, 2, atau 3.

  • Jika Anda mengatur Period ke Month, nilai UsedTime dapat berupa bilangan bulat dari 1 hingga 9.

Catatan

Parameter ini wajib diisi ketika Anda mengatur PayType ke Prepaid.

1

Period

string

No

Satuan durasi langganan. Nilai valid:

  • Year

  • Month

Catatan

Parameter ini wajib diisi ketika Anda mengatur PayType ke Prepaid.

Month

ResourceGroupId

string

No

ID kelompok sumber daya.

rg-acfm3f4un32****

ClientToken

string

No

Token Klien yang digunakan untuk memastikan idempotensi permintaan. Klien membuat token, tetapi Anda harus memastikan token tersebut unik di antara permintaan yang berbeda. Token bersifat case-sensitive dan dapat berisi hingga 64 karakter ASCII.

6000170000591aed949d0f5********************

AutoUseCoupon

boolean

No

PromotionCode

string

No

727xxxxxx934

Elemen respons

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

5E71541A-6007-4DCC-A38A-F872C31FEB45

ChargeType

string

The billing method of the instance. Valid values:

  • Postpaid: pay-as-you-go

  • Prepaid: subscription

Prepaid

DBClusterId

string

The ID of the PolarDB cluster.

pc-bp10gr51qasnl****

ExpiredTime

string

The expiration time of the instance.

Catatan

This parameter is returned only when PayType is set to Prepaid.

2020-04-20T10:00:00Z

OrderId

string

The order ID.

20515760028****

Contoh

Respons sukses

JSONformat

{
  "RequestId": "5E71541A-6007-4DCC-A38A-F872C31FEB45",
  "ChargeType": "Prepaid",
  "DBClusterId": "pc-bp10gr51qasnl****",
  "ExpiredTime": "2020-04-20T10:00:00Z",
  "OrderId": "20515760028****"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidOrderCharge.NotSupport The specified order charge does not support in PolarDB.
400 InvalidOrderTask.NotSupport The Current ClusterId exist Order Task in PolarDB.
400 InvalidPaymentMethod.Incomplete No payment method is specified for your account. We recommend that you add a payment method.
400 InvalidPayType.Malformed The specified parameter PayType is not valid.
400 InvalidPeriod.Malformed The specified parameter Period is not valid.
400 InvalidUsedTime.Malformed The specified parameter UsedTime is not valid.
400 InvalidPeriodUnit.Malformed The specified parameter PeriodUnit is not valid.
403 OperationDenied.LockMode The operation is not permitted when the instance is locked.
403 OperationDenied.DBClusterDeletionLock The operation is not permitted due to the deletion lock of cluster.
404 InvalidDBCluster.NotFound The specified DBClusterId is not found.
404 InvalidDBClusterId.Malformed The specified parameter DBClusterId is not valid.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.