Mengkueri aturan daur ulang fragmen otomatis dari instance database.
Deskripsi operasi
Sebelum Anda memanggil operasi ini, perhatikan hal-hal berikut:
-
Jika Anda menggunakan SDK untuk memanggil operasi API Database Autonomy Service (DAS), Anda harus mengatur ID region ke cn-shanghai.
-
Instance database adalah instance ApsaraDB RDS for MySQL dari High-availability Edition.
-
Instance database memiliki empat core atau lebih, dan innodb_file_per_table diatur ke ON.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:GetAutoResourceOptimizeRules |
none |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| ConsoleContext |
string |
No |
Parameter yang dicadangkan. |
None |
| InstanceIds |
string |
No |
ID instance database.
|
['rm-2ze8g2am97624****','rm-2vc54m2a6pd6p****','rm-2ze9xrhze0709****','rm-2ze8g2am97627****'] |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter respons. |
||
| Code |
integer |
Kode status HTTP yang dikembalikan. |
200 |
| Message |
string |
Pesan yang dikembalikan. Catatan
Jika permintaan berhasil, Successful akan dikembalikan. Jika permintaan gagal, pesan kesalahan seperti kode kesalahan akan dikembalikan. |
Successful |
| Data |
object |
Data yang dikembalikan. |
|
| TotalAutoResourceOptimizeRulesCount |
integer |
Jumlah instance database yang fitur daur ulang fragmen otomatisnya telah diaktifkan. |
3 |
| EnableAutoResourceOptimizeCount |
integer |
Jumlah instance database yang fitur daur ulang fragmen otomatisnya saat ini diaktifkan. |
1 |
| TurnOffAutoResourceOptimizeCount |
integer |
Jumlah instance database yang fitur daur ulang fragmen otomatisnya pernah diaktifkan tetapi saat ini dinonaktifkan. |
1 |
| HasEnableRuleButNotDasProCount |
integer |
Jumlah instance database yang fitur daur ulang fragmen otomatisnya diaktifkan dan DAS Enterprise Edition-nya dinonaktifkan. |
1 |
| EnableAutoResourceOptimizeList |
array<object> |
Instance database yang fitur daur ulang fragmen otomatisnya saat ini diaktifkan. |
|
|
object |
|||
| InstanceId |
string |
The database instance ID. |
rm-2ze8g2am97624**** |
| AutoDefragment |
boolean |
Indicates whether the automatic fragment recycling feature is enabled. Valid values:
|
true |
| TableSpaceSize |
number |
The minimum storage usage of a single physical table for which the automatic fragment recycling feature is enabled. Unit: GB. |
10 |
| DasProOn |
boolean |
Indicates whether DAS Enterprise Edition is enabled. Valid values:
|
true |
| TableFragmentationRatio |
number |
The fragmentation rate of a single physical table for which the automatic fragment recycling feature is enabled. |
0.2 |
| UserId |
string |
The ID of the Alibaba Cloud account that is used to create the database instance. |
140692647406**** |
| TurnOffAutoResourceOptimizeList |
array<object> |
Instance database yang fitur daur ulang fragmen otomatisnya pernah diaktifkan tetapi saat ini dinonaktifkan. |
|
|
object |
|||
| InstanceId |
string |
The database instance ID. |
rm-2vc54m2a6pd6p**** |
| AutoDefragment |
boolean |
Indicates whether the automatic fragment recycling feature is enabled. Valid values:
|
false |
| TableSpaceSize |
number |
The minimum storage usage of a single physical table for which the automatic fragment recycling feature is enabled. Unit: GB. |
10 |
| DasProOn |
boolean |
Indicates whether DAS Enterprise Edition is enabled. Valid values:
|
true |
| TableFragmentationRatio |
number |
The fragmentation rate of a single physical table for which the automatic fragment recycling feature is enabled. |
0.2 |
| UserId |
string |
The ID of the Alibaba Cloud account that is used to create the database instance. |
140692647406**** |
| HasEnableRuleButNotDasProList |
array<object> |
Instance database yang fitur daur ulang fragmen otomatisnya diaktifkan dan DAS Enterprise Edition-nya dinonaktifkan. Catatan
Tugas daur ulang fragmen otomatis hanya dijalankan pada jenis instance database ini jika DAS Enterprise Edition diaktifkan kembali untuk instance database tersebut. |
|
|
object |
|||
| InstanceId |
string |
The database instance ID. |
rm-2ze9xrhze0709**** |
| AutoDefragment |
boolean |
Indicates whether the automatic fragment recycling feature is enabled. Valid values:
|
true |
| TableSpaceSize |
number |
The minimum storage usage of a single physical table for which the automatic fragment recycling feature is enabled. Unit: GB. |
10 |
| DasProOn |
boolean |
Indicates whether DAS Enterprise Edition is enabled. Valid values:
|
false |
| TableFragmentationRatio |
number |
The fragmentation rate of a single physical table for which the automatic fragment recycling feature is enabled. |
0.2 |
| UserId |
string |
The ID of the Alibaba Cloud account that is used to create the database instance. |
140692647406**** |
| NeverEnableAutoResourceOptimizeOrReleasedInstanceCount |
integer |
Jumlah instance database yang tidak ada atau yang fitur daur ulang fragmen otomatisnya tidak pernah diaktifkan. Catatan
Jika instance database tidak ada, instance tersebut telah dirilis atau ID instance yang ditentukan tidak valid. |
1 |
| NeverEnableAutoResourceOptimizeOrReleasedInstanceIdList |
array |
Instance database yang tidak ada atau yang fitur daur ulang fragmen otomatisnya tidak pernah diaktifkan. |
|
|
string |
ID instance database. |
rm-2ze8g2am97624**** |
|
| RequestId |
string |
ID permintaan. |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Success |
boolean |
Menunjukkan apakah permintaan berhasil. Nilai yang valid:
|
true |
Contoh
Respons sukses
JSONformat
{
"Code": 200,
"Message": "Successful",
"Data": {
"TotalAutoResourceOptimizeRulesCount": 3,
"EnableAutoResourceOptimizeCount": 1,
"TurnOffAutoResourceOptimizeCount": 1,
"HasEnableRuleButNotDasProCount": 1,
"EnableAutoResourceOptimizeList": [
{
"InstanceId": "rm-2ze8g2am97624****",
"AutoDefragment": true,
"TableSpaceSize": 10,
"DasProOn": true,
"TableFragmentationRatio": 0.2,
"UserId": "140692647406****"
}
],
"TurnOffAutoResourceOptimizeList": [
{
"InstanceId": "rm-2vc54m2a6pd6p****",
"AutoDefragment": false,
"TableSpaceSize": 10,
"DasProOn": true,
"TableFragmentationRatio": 0.2,
"UserId": "140692647406****"
}
],
"HasEnableRuleButNotDasProList": [
{
"InstanceId": "rm-2ze9xrhze0709****",
"AutoDefragment": true,
"TableSpaceSize": 10,
"DasProOn": false,
"TableFragmentationRatio": 0.2,
"UserId": "140692647406****"
}
],
"NeverEnableAutoResourceOptimizeOrReleasedInstanceCount": 1,
"NeverEnableAutoResourceOptimizeOrReleasedInstanceIdList": [
"rm-2ze8g2am97624****"
]
},
"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.