Mengaktifkan Pembatasan SQL untuk mengontrol jumlah permintaan akses database dan pernyataan SQL bersamaan.
Deskripsi operasi
This operation supports the following database engines:
-
ApsaraDB RDS for MySQL
-
PolarDB for MySQL
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:EnableSqlConcurrencyControl |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ConsoleContext |
string |
No |
Parameter cadangan. |
None |
| InstanceId |
string |
Yes |
ID instans. Catatan
Anda harus menentukan ID instans hanya jika Instansiasi basis data Anda adalah instans ApsaraDB RDS for MySQL atau kluster PolarDB Basis Data Relasional Cloud-Native for MySQL. |
rm-2ze1jdv45i7l6**** |
| SqlType |
string |
Yes |
Tipe pernyataan SQL. Nilai valid:
|
SELECT |
| MaxConcurrency |
integer |
Yes |
Jumlah maksimum pernyataan SQL bersamaan. Atur parameter ini ke bilangan bulat positif. Catatan
Ketika jumlah pernyataan SQL bersamaan yang berisi kata kunci yang ditentukan mencapai batas atas ini, aturan pembatasan kecepatan akan dipicu. |
3 |
| SqlKeywords |
string |
Yes |
Kata kunci yang digunakan untuk mengidentifikasi pernyataan SQL yang perlu dibatasi. Catatan
Jika Anda menentukan beberapa kata kunci SQL, pisahkan dengan tanda tilde (~). Jika jumlah pernyataan SQL bersamaan yang berisi semua kata kunci SQL yang ditentukan mencapai batas atas yang ditentukan, aturan pembatasan kecepatan akan dipicu. |
call~open~api~test~4~from~POP |
| ConcurrencyControlTime |
integer |
Yes |
Durasi di mana aturan pembatasan SQL berlaku. Unit: detik. Catatan
Aturan pembatasan kecepatan hanya berlaku dalam durasi ini. |
300 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| Code |
string |
The HTTP status code returned. |
200 |
| Message |
string |
The returned message. Catatan
If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned. |
Successful |
| Data |
string |
The detailed information, including the error codes and the number of entries that are returned. |
Null |
| RequestId |
string |
The request ID. |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
Contoh
Respons sukses
JSONformat
{
"Code": "200",
"Message": "Successful",
"Data": "Null",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success": "true"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.