获取告警模板列表-GetAlarmTemplateList

获取告警模板列表

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口No
Limitint返回数据长度,默认为20No
Offsetint列表起始位置偏移量,默认为0No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
TotalCountint总数量Yes
DataSetarray告警模板列表Yes

AlarmTemplate

Parameter nameTypeDescriptionRequired
IsDefaultstring是否为默认模板Yes
AlarmTemplateIdint告警模板idYes
AlarmTemplateNamestring告警模板名称Yes
Remarkstring备注No
ResourceTypestring资源类型Yes
BoundResourceCountint绑定的资源数量Yes

Request Example

https://api.ucloud.cn/?Action=GetAlarmTemplateList
&Region=DGdSoave
&ProjectId=EzXfGltN
&Limit=30
&Offset=0
``
`
#Response Example

{

  "TotalCount": 4,
  "DataSet": [
      {
          "IsDefault": "Yes",
          "AlarmTemplateId": 1,
          "AlarmTemplateName": "THwnZpbV",
          "Remark": "pJavCcAz",
          "ResourceType": "UaCrdVJM",
          "BoundResourceCount": 8
      },
      {
          "IsDefault": "Yes",
          "AlarmTemplateId": 9,
          "AlarmTemplateName": "nDCuUndt",
          "Remark": "zhMGrkaK",
          "ResourceType": "KPJLDerL",
          "BoundResourceCount": 2
      },
      {
          "IsDefault": "Yes",
          "AlarmTemplateId": 4,
          "AlarmTemplateName": "ZRHjuLLX",
          "Remark": "wpGNxXwu",
          "ResourceType": "tzJzMuuz",
          "BoundResourceCount": 4
      },
      {
          "IsDefault": "Yes",
          "AlarmTemplateId": 4,
          "AlarmTemplateName": "zbiIKPnV",
          "Remark": "sIHLdiXA",
          "ResourceType": "kduqaLUb",
          "BoundResourceCount": 6
      },
      {
          "IsDefault": "Yes",
          "AlarmTemplateId": 6,
          "AlarmTemplateName": "DBMweHYH",
          "Remark": "YJqRXyiC",
          "ResourceType": "zfqEzXCT",
          "BoundResourceCount": 8
      },
      {
          "IsDefault": "Yes",
          "AlarmTemplateId": 6,
          "AlarmTemplateName": "zDtcJJXm",
          "Remark": "DsZQaLGz",
          "ResourceType": "rKvQzdmV",
          "BoundResourceCount": 1
      },
      {
          "IsDefault": "Yes",
          "AlarmTemplateId": 3,
          "AlarmTemplateName": "PHdOzEwQ",
          "Remark": "bXJvUkBz",
          "ResourceType": "JXXAlxSz",
          "BoundResourceCount": 9
      },
      {
          "IsDefault": "Yes",
          "AlarmTemplateId": 6,
          "AlarmTemplateName": "AnQVcuMA",
          "Remark": "oNaALals",
          "ResourceType": "OFddPTcu",
          "BoundResourceCount": 9
      }
  ],
  "RetCode": 0,
  "Action": "GetAlarmTemplateListResponse"

} ```