Membuat kelompok aplikasi dengan menggunakan kelompok sumber daya.
Deskripsi operasi
This topic provides an example on how to create an application group by using the resource group CloudMonitor and the alert contact group ECS_Group. The region ID of the resource group is cn-hangzhou.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:CreateMonitorGroupByResourceGroupId |
create |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| EnableSubscribeEvent |
boolean |
No |
Apakah kelompok aplikasi akan berlangganan notifikasi event secara otomatis. Jika event dengan tingkat keparahan critical atau warning terjadi pada sumber daya dalam kelompok aplikasi, CloudMonitor mengirimkan notifikasi peringatan. Nilai valid:
|
true |
| EnableInstallAgent |
boolean |
No |
Apakah Agen CloudMonitor akan diinstal secara otomatis untuk kelompok aplikasi. CloudMonitor menentukan apakah Agen CloudMonitor akan diinstal secara otomatis untuk host dalam kelompok aplikasi berdasarkan nilai parameter ini. Nilai valid:
|
true |
| RegionId |
string |
Yes |
ID wilayah tempat kelompok sumber daya berada. Untuk informasi tentang cara mendapatkan ID wilayah tempat kelompok sumber daya berada, lihat GetResourceGroup. |
cn-hangzhou |
| ResourceGroupId |
string |
Yes |
ID kelompok sumber daya. Untuk informasi tentang cara mendapatkan ID kelompok sumber daya, lihat ListResourceGroups. |
rg-acfmw3ty5y7**** |
| ResourceGroupName |
string |
Yes |
Nama kelompok sumber daya. Untuk informasi tentang cara mendapatkan nama kelompok sumber daya, lihat ListResourceGroups. |
CloudMonitor |
| ContactGroupList |
array |
Yes |
Kelompok kontak peringatan. Notifikasi peringatan kelompok aplikasi dikirim ke kontak peringatan yang termasuk dalam kelompok kontak peringatan yang ditentukan. Kelompok kontak peringatan dapat berisi satu atau beberapa kontak peringatan. Untuk informasi tentang cara membuat kontak peringatan dan kelompok kontak peringatan, lihat PutContact dan PutContactGroup. Untuk informasi tentang cara mendapatkan kelompok kontak peringatan, lihat DescribeContactGroupList. |
ECS_Group |
|
string |
No |
The alert contact group. The alert notifications of the application group are sent to the alert contacts that belong to the specified alert contact groups. An alert contact group can contain one or more alert contacts. For information about how to create alert contacts and alert contact groups, see PutContact and PutContactGroup. For information about how to obtain alert contact groups, see DescribeContactGroupList. |
ECS_Group |
Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. Catatan
The status code 200 indicates that the request was successful. |
200 |
| Message |
string |
The error message. |
The specified resource is not found. |
| RequestId |
string |
The request ID. |
784CAB3C-F613-5BCE-8469-6DCB29B18A20 |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Id |
integer |
The ID of the application group. |
3607**** |
Contoh
Respons sukses
JSONformat
{
"Code": "200",
"Message": "The specified resource is not found.",
"RequestId": "784CAB3C-F613-5BCE-8469-6DCB29B18A20",
"Success": true,
"Id": 0
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterInvalid | %s | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | |
| 404 | ResourceNotFound | The specified resource is not found. | |
| 4092 | ParameterInvalid | ResourceGroupId already create group |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.