diff --git a/docs/ces/api-ref/ALL_META.TXT.json b/docs/ces/api-ref/ALL_META.TXT.json index 1dc6e25b6..3d1059831 100644 --- a/docs/ces/api-ref/ALL_META.TXT.json +++ b/docs/ces/api-ref/ALL_META.TXT.json @@ -27,7 +27,7 @@ "code":"2", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", - "kw":"API Description", + "kw":"API V1", "search_title":"", "metedata":[ { @@ -35,7 +35,7 @@ "prodname":"ces" } ], - "title":"API Description", + "title":"API V1", "githuburl":"" }, { @@ -236,11 +236,101 @@ "title":"Creating an Alarm Rule", "githuburl":"" }, + { + "uri":"ces_03_0062.html", + "node_id":"ces_03_0062.xml", + "product_code":"ces", + "code":"14", + "des":"This API is used to create a custom alarm template to add alarm rules for one or more metrics.POST /V1.0/{project_id}/alarm-templateParameter descriptionParameter descrip", + "doc_type":"api", + "kw":"Creating a Custom Alarm Template,Alarm Rules,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Creating a Custom Alarm Template", + "githuburl":"" + }, + { + "uri":"ces_03_0063.html", + "node_id":"ces_03_0063.xml", + "product_code":"ces", + "code":"15", + "des":"This API is used to delete a custom alarm template.DELETE /V1.0/{project_id}/alarm-template/{template_id}Parameter descriptionParameter descriptionParameterMandatoryDescr", + "doc_type":"api", + "kw":"Deleting a Custom Alarm Template,Alarm Rules,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Deleting a Custom Alarm Template", + "githuburl":"" + }, + { + "uri":"ces_03_0064.html", + "node_id":"ces_03_0064.xml", + "product_code":"ces", + "code":"16", + "des":"This API is used to query the alarm history of an alarm rule based on the alarm rule ID.GET /V1.0/{project_id}/alarm-historiesQuerying parameter descriptionQuerying param", + "doc_type":"api", + "kw":"Querying the Alarm History of an Alarm Rule,Alarm Rules,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying the Alarm History of an Alarm Rule", + "githuburl":"" + }, + { + "uri":"ces_03_0066.html", + "node_id":"ces_03_0066.xml", + "product_code":"ces", + "code":"17", + "des":"This API is used to update a custom alarm template.PUT /V1.0/{project_id}/alarm-template/{template_id}Parameter descriptionParameter descriptionParameterMandatoryDescript", + "doc_type":"api", + "kw":"Updating a Custom Alarm Template,Alarm Rules,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Updating a Custom Alarm Template", + "githuburl":"" + }, + { + "uri":"ces_03_0069.html", + "node_id":"ces_03_0069.xml", + "product_code":"ces", + "code":"18", + "des":"This API is used to modify an alarm rule.PUT /V1.0/{project_id}/alarms/{alarm_id}Parameter descriptionParameter descriptionParameterMandatoryDescriptionproject_idYesSpeci", + "doc_type":"api", + "kw":"Modifying an Alarm Rule,Alarm Rules,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Modifying an Alarm Rule", + "githuburl":"" + }, { "uri":"ces_03_0032.html", "node_id":"ces_03_0032.xml", "product_code":"ces", - "code":"14", + "code":"19", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Monitoring Data", @@ -258,7 +348,7 @@ "uri":"ces_03_0033.html", "node_id":"ces_03_0033.xml", "product_code":"ces", - "code":"15", + "code":"20", "des":"This API is used to query the monitoring data of a specified metric at a specified granularity in a specified time range. You can specify the dimension of data to be quer", "doc_type":"api", "kw":"Querying Monitoring Data of a Metric,Monitoring Data,API Reference", @@ -276,7 +366,7 @@ "uri":"en-us_topic_0032831274.html", "node_id":"en-us_topic_0032831274.xml", "product_code":"ces", - "code":"16", + "code":"21", "des":"This API is used to add one or more pieces of custom metric monitoring data to solve the problem that the system metrics cannot meet specific service requirements.For det", "doc_type":"api", "kw":"Adding Monitoring Data,Monitoring Data,API Reference", @@ -294,8 +384,8 @@ "uri":"ces_03_0034.html", "node_id":"ces_03_0034.xml", "product_code":"ces", - "code":"17", - "des":"You can query the monitoring data of specified metrics within a specified time range and at a specified granularity. You can query the monitoring data of up to 10 metrics", + "code":"22", + "des":"You can query the data of specified metrics within a specified time range and at a specified granularity. You can query the monitoring data of up to 10 metrics in one bat", "doc_type":"api", "kw":"Querying Monitoring Data of Multiple Metrics,Monitoring Data,API Reference", "search_title":"", @@ -312,7 +402,7 @@ "uri":"ces_03_0035.html", "node_id":"ces_03_0035.xml", "product_code":"ces", - "code":"18", + "code":"23", "des":"This API is used to query the host configuration for a specified event type in a specified time range. You can specify the dimension of data to be queried.This API is pro", "doc_type":"api", "kw":"Querying the Host Configuration,Monitoring Data,API Reference", @@ -330,7 +420,7 @@ "uri":"ces_03_0036.html", "node_id":"ces_03_0036.xml", "product_code":"ces", - "code":"19", + "code":"24", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Quotas", @@ -348,7 +438,7 @@ "uri":"ces_03_0037.html", "node_id":"ces_03_0037.xml", "product_code":"ces", - "code":"20", + "code":"25", "des":"This API is used to query the alarm rule quota and the number of alarm rules that have been created.GET /V1.0/{project_id}/quotasParameter descriptionParameter descriptio", "doc_type":"api", "kw":"Querying Quotas,Quotas,API Reference", @@ -362,11 +452,119 @@ "title":"Querying Quotas", "githuburl":"" }, + { + "uri":"ces_03_0067.html", + "node_id":"ces_03_0067.xml", + "product_code":"ces", + "code":"26", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Resource Groups", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Resource Groups", + "githuburl":"" + }, + { + "uri":"ces_03_0068.html", + "node_id":"ces_03_0068.xml", + "product_code":"ces", + "code":"27", + "des":"This API is used to query resources in a resource group based on the resource group ID.GET /V1.0/{project_id}/resource-groups/{group_id}Parameter descriptionParameter de", + "doc_type":"api", + "kw":"Querying Resources in a Resource Group,Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Resources in a Resource Group", + "githuburl":"" + }, + { + "uri":"ces_03_0070.html", + "node_id":"ces_03_0070.xml", + "product_code":"ces", + "code":"28", + "des":"This API is used to create a resource group. You can use resource groups to manage resources by service, and view monitoring and alarm information by group to ease O&M.PO", + "doc_type":"api", + "kw":"Creating a Resource Group,Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Creating a Resource Group", + "githuburl":"" + }, + { + "uri":"ces_03_0071.html", + "node_id":"ces_03_0071.xml", + "product_code":"ces", + "code":"29", + "des":"This API is used to update a resource group. You can use resource groups to manage resources by service, and view monitoring and alarm information by group to ease O&M.PU", + "doc_type":"api", + "kw":"Updating a Resource Group,Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Updating a Resource Group", + "githuburl":"" + }, + { + "uri":"ces_03_0072.html", + "node_id":"ces_03_0072.xml", + "product_code":"ces", + "code":"30", + "des":"This API is used to delete a resource group.DELETE /V1.0/{project_id}/resource-groups/{group_id}Parameter descriptionParameter descriptionParameterTypeMandatoryDescripti", + "doc_type":"api", + "kw":"Deleting a Resource Group,Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Deleting a Resource Group", + "githuburl":"" + }, + { + "uri":"ces_03_0073.html", + "node_id":"ces_03_0073.xml", + "product_code":"ces", + "code":"31", + "des":"This API is used to query all resource groups you created.GET /V1.0/{project_id}/resource-groupsParameter descriptionParameter descriptionParameterTypeMandatoryDescripti", + "doc_type":"api", + "kw":"Query Resource Groups,Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Query Resource Groups", + "githuburl":"" + }, { "uri":"ces_03_0038.html", "node_id":"ces_03_0038.xml", "product_code":"ces", - "code":"21", + "code":"32", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Event Monitoring", @@ -384,7 +582,7 @@ "uri":"en-us_topic_0109034020.html", "node_id":"en-us_topic_0109034020.xml", "product_code":"ces", - "code":"22", + "code":"33", "des":"An API for reporting custom events is provided, which helps you collect and report abnormal events or important change events to Cloud Eye.POST /V1.0/{project_id}/eventsP", "doc_type":"api", "kw":"Reporting Events,Event Monitoring,API Reference", @@ -402,7 +600,7 @@ "uri":"ces_03_0074.html", "node_id":"ces_03_0074.xml", "product_code":"ces", - "code":"23", + "code":"34", "des":"This API is used to query events, including system events and custom events.GET /V1.0/{project_id}/eventsParameter descriptionParameter descriptionParameterTypeMandatoryD", "doc_type":"api", "kw":"Querying Events,Event Monitoring,API Reference", @@ -420,7 +618,7 @@ "uri":"ces_03_0075.html", "node_id":"ces_03_0075.xml", "product_code":"ces", - "code":"24", + "code":"35", "des":"This API is used to query details of an event based on the event name.GET /V1.0/{project_id}/event/{event_name}Parameter descriptionParameter descriptionParameterTypeMand", "doc_type":"api", "kw":"Querying Details of an Event,Event Monitoring,API Reference", @@ -434,11 +632,875 @@ "title":"Querying Details of an Event", "githuburl":"" }, + { + "uri":"ces_03_0042.html", + "node_id":"ces_03_0042.xml", + "product_code":"ces", + "code":"36", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"API V2", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"API V2", + "githuburl":"" + }, + { + "uri":"topic_300000000.html", + "node_id":"topic_300000000.xml", + "product_code":"ces", + "code":"37", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Alarm Rules", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Alarm Rules", + "githuburl":"" + }, + { + "uri":"CreateAlarmRules.html", + "node_id":"createalarmrules.xml", + "product_code":"ces", + "code":"38", + "des":"This API is used to create an alarm rule (recommended).POST /v2/{project_id}/alarmsStatus code: 201Status code: 400Status code: 500Create an alarm rule whose name is alar", + "doc_type":"api", + "kw":"Creating an Alarm Rule (Recommended),Alarm Rules,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Creating an Alarm Rule (Recommended)", + "githuburl":"" + }, + { + "uri":"BatchDeleteAlarmRules.html", + "node_id":"batchdeletealarmrules.xml", + "product_code":"ces", + "code":"39", + "des":"This API (V2) is used to batch delete alarm rules.POST /v2/{project_id}/alarms/batch-deleteStatus code: 200Status code: 400Status code: 500Batch deleting alarm rulesStatu", + "doc_type":"api", + "kw":"Deleting Alarm Rules in Batches,Alarm Rules,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Deleting Alarm Rules in Batches", + "githuburl":"" + }, + { + "uri":"BatchEnableAlarmRules.html", + "node_id":"batchenablealarmrules.xml", + "product_code":"ces", + "code":"40", + "des":"This API is used to enable or disable alarm rules in batches.POST /v2/{project_id}/alarms/actionStatus code: 200Status code: 400Status code: 500Enable or disable alarm ru", + "doc_type":"api", + "kw":"Enabling or Disabling Alarm Rules in Batches,Alarm Rules,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Enabling or Disabling Alarm Rules in Batches", + "githuburl":"" + }, + { + "uri":"ListAlarmRules.html", + "node_id":"listalarmrules.xml", + "product_code":"ces", + "code":"41", + "des":"This API is used to query alarm rules.GET /v2/{project_id}/alarmsStatus code: 200Status code: 400Status code: 500Querying alarm rulesStatus code: 200Query succeeded.See E", + "doc_type":"api", + "kw":"Querying Alarm Rules (Recommended),Alarm Rules,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Alarm Rules (Recommended)", + "githuburl":"" + }, + { + "uri":"topic_300000001.html", + "node_id":"topic_300000001.xml", + "product_code":"ces", + "code":"42", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Resources in an Alarm Rule", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Resources in an Alarm Rule", + "githuburl":"" + }, + { + "uri":"AddAlarmRuleResources.html", + "node_id":"addalarmruleresources.xml", + "product_code":"ces", + "code":"43", + "des":"This API is used to batch add resources to an alarm rule. This API does not support alarm rules with Monitoring Scope set to Resource groups or All resources. To modify r", + "doc_type":"api", + "kw":"Batch Adding Resources to an Alarm Rule,Resources in an Alarm Rule,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Adding Resources to an Alarm Rule", + "githuburl":"" + }, + { + "uri":"DeleteAlarmRuleResources.html", + "node_id":"deletealarmruleresources.xml", + "product_code":"ces", + "code":"44", + "des":"This API is used to batch delete resources to an alarm rule. This API does not support alarm rules with Monitoring Scope set to Resource groups. To modify resources in su", + "doc_type":"api", + "kw":"Deleting Resources from an Alarm Rule,Resources in an Alarm Rule,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Deleting Resources from an Alarm Rule", + "githuburl":"" + }, + { + "uri":"ListAlarmRuleResources.html", + "node_id":"listalarmruleresources.xml", + "product_code":"ces", + "code":"45", + "des":"This API is used to query resources in an alarm rule by its ID.GET /v2/{project_id}/alarms/{alarm_id}/resourcesStatus code: 200Status code: 400Status code: 500Querying re", + "doc_type":"api", + "kw":"Querying Resources in an Alarm Rule,Resources in an Alarm Rule,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Resources in an Alarm Rule", + "githuburl":"" + }, + { + "uri":"topic_300000002.html", + "node_id":"topic_300000002.xml", + "product_code":"ces", + "code":"46", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Alarm Policies", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Alarm Policies", + "githuburl":"" + }, + { + "uri":"UpdateAlarmRulePolicies.html", + "node_id":"updatealarmrulepolicies.xml", + "product_code":"ces", + "code":"47", + "des":"This API is used to modify alarm policies in an alarm rule.PUT /v2/{project_id}/alarms/{alarm_id}/policiesStatus code: 200Status code: 400Status code: 500Modifying an ala", + "doc_type":"api", + "kw":"Modifying Policies in an Alarm Rule,Alarm Policies,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Modifying Policies in an Alarm Rule", + "githuburl":"" + }, + { + "uri":"ListAlarmRulePolicies.html", + "node_id":"listalarmrulepolicies.xml", + "product_code":"ces", + "code":"48", + "des":"This API is used to query alarm policies by alarm rule ID.GET /v2/{project_id}/alarms/{alarm_id}/policiesStatus code: 200Status code: 400Status code: 404Status code: 500Q", + "doc_type":"api", + "kw":"Querying Alarm Policies in an Alarm Rule,Alarm Policies,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Alarm Policies in an Alarm Rule", + "githuburl":"" + }, + { + "uri":"topic_300000004.html", + "node_id":"topic_300000004.xml", + "product_code":"ces", + "code":"49", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Alarm Records", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Alarm Records", + "githuburl":"" + }, + { + "uri":"ListAlarmHistories.html", + "node_id":"listalarmhistories.xml", + "product_code":"ces", + "code":"50", + "des":"This API is used to query alarm records.GET /v2/{project_id}/alarm-historiesStatus code: 200Status code: 400Status code: 500Querying alarm records whose alarm_name is ala", + "doc_type":"api", + "kw":"Querying Alarm Records,Alarm Records,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Alarm Records", + "githuburl":"" + }, + { + "uri":"topic_300000005.html", + "node_id":"topic_300000005.xml", + "product_code":"ces", + "code":"51", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Alarm Templates", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Alarm Templates", + "githuburl":"" + }, + { + "uri":"CreateAlarmTemplate.html", + "node_id":"createalarmtemplate.xml", + "product_code":"ces", + "code":"52", + "des":"This API is used to create a custom alarm template.POST /v2/{project_id}/alarm-templatesStatus code: 201Status code: 400Status code: 401Status code: 403Status code: 500Cr", + "doc_type":"api", + "kw":"Creating a Custom Alarm Template,Alarm Templates,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Creating a Custom Alarm Template", + "githuburl":"" + }, + { + "uri":"BatchDeleteAlarmTemplates.html", + "node_id":"batchdeletealarmtemplates.xml", + "product_code":"ces", + "code":"53", + "des":"This API is used to delete custom alarm templates in batches.POST /v2/{project_id}/alarm-templates/batch-deleteStatus code: 200Status code: 400Status code: 401Status code", + "doc_type":"api", + "kw":"Batch Deleting Custom Alarm Templates,Alarm Templates,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Deleting Custom Alarm Templates", + "githuburl":"" + }, + { + "uri":"UpdateAlarmTemplate.html", + "node_id":"updatealarmtemplate.xml", + "product_code":"ces", + "code":"54", + "des":"This API is used to modify a custom alarm template.PUT /v2/{project_id}/alarm-templates/{template_id}Status code: 400Status code: 401Status code: 403Status code: 404Statu", + "doc_type":"api", + "kw":"Modifying a Custom Alarm Template,Alarm Templates,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Modifying a Custom Alarm Template", + "githuburl":"" + }, + { + "uri":"ListAlarmTemplates.html", + "node_id":"listalarmtemplates.xml", + "product_code":"ces", + "code":"55", + "des":"This API is used to query alarm templates.GET /v2/{project_id}/alarm-templatesStatus code: 200Status code: 400Status code: 401Status code: 403Status code: 500Querying ala", + "doc_type":"api", + "kw":"Querying Alarm Templates,Alarm Templates,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Alarm Templates", + "githuburl":"" + }, + { + "uri":"ShowAlarmTemplate.html", + "node_id":"showalarmtemplate.xml", + "product_code":"ces", + "code":"56", + "des":"This API is used to query details of an alarm template.GET /v2/{project_id}/alarm-templates/{template_id}Status code: 200Status code: 400Status code: 401Status code: 403S", + "doc_type":"api", + "kw":"Querying Details of an Alarm Template,Alarm Templates,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Details of an Alarm Template", + "githuburl":"" + }, + { + "uri":"topic_300000006.html", + "node_id":"topic_300000006.xml", + "product_code":"ces", + "code":"57", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Alarm Rules Associated with an Alarm Template", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Alarm Rules Associated with an Alarm Template", + "githuburl":"" + }, + { + "uri":"ListAlarmTemplateAssociationAlarms.html", + "node_id":"listalarmtemplateassociationalarms.xml", + "product_code":"ces", + "code":"58", + "des":"This API is used to query alarm rules associated with an alarm template.GET /v2/{project_id}/alarm-templates/{template_id}/association-alarmsStatus code: 200Status code: ", + "doc_type":"api", + "kw":"Querying Alarm Rules Associated with an Alarm Template,Alarm Rules Associated with an Alarm Template", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Alarm Rules Associated with an Alarm Template", + "githuburl":"" + }, + { + "uri":"topic_300000007.html", + "node_id":"topic_300000007.xml", + "product_code":"ces", + "code":"59", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Resource Groups", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Resource Groups", + "githuburl":"" + }, + { + "uri":"CreateResourceGroup.html", + "node_id":"createresourcegroup.xml", + "product_code":"ces", + "code":"60", + "des":"This API is used to create a resource group (recommended).POST /v2/{project_id}/resource-groupsStatus code: 200Status code: 400Status code: 401Status code: 403Status code", + "doc_type":"api", + "kw":"Creating a Resource Group (Recommended),Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Creating a Resource Group (Recommended)", + "githuburl":"" + }, + { + "uri":"BatchDeleteResourceGroups.html", + "node_id":"batchdeleteresourcegroups.xml", + "product_code":"ces", + "code":"61", + "des":"This API is used to delete resource groups in batches.POST /v2/{project_id}/resource-groups/batch-deleteStatus code: 200Status code: 400Status code: 401Status code: 403St", + "doc_type":"api", + "kw":"Batch Deleting Resource Groups,Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Deleting Resource Groups", + "githuburl":"" + }, + { + "uri":"UpdateResourceGroup.html", + "node_id":"updateresourcegroup.xml", + "product_code":"ces", + "code":"62", + "des":"This API is used to modify a resource group.PUT /v2/{project_id}/resource-groups/{group_id}Status code: 400Status code: 401Status code: 403Status code: 404Status code: 50", + "doc_type":"api", + "kw":"Modifying a Resource Group,Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Modifying a Resource Group", + "githuburl":"" + }, + { + "uri":"ShowResourceGroup.html", + "node_id":"showresourcegroup.xml", + "product_code":"ces", + "code":"63", + "des":"This API is used to query details of a resource group.GET /v2/{project_id}/resource-groups/{group_id}Status code: 200Status code: 400Status code: 401Status code: 403Statu", + "doc_type":"api", + "kw":"Querying Details of a Resource Group,Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Details of a Resource Group", + "githuburl":"" + }, + { + "uri":"ListResourceGroups.html", + "node_id":"listresourcegroups.xml", + "product_code":"ces", + "code":"64", + "des":"This API is used to query resource groups.GET /v2/{project_id}/resource-groupsStatus code: 200Status code: 400Status code: 401Status code: 403Status code: 500Querying res", + "doc_type":"api", + "kw":"Querying Resource Groups,Resource Groups,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Resource Groups", + "githuburl":"" + }, + { + "uri":"topic_300000008.html", + "node_id":"topic_300000008.xml", + "product_code":"ces", + "code":"65", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Resources in a Resource Group", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Resources in a Resource Group", + "githuburl":"" + }, + { + "uri":"BatchCreateResources.html", + "node_id":"batchcreateresources.xml", + "product_code":"ces", + "code":"66", + "des":"This API is used to batch add associated resources to a custom resource group whose type is Manual.POST /v2/{project_id}/resource-groups/{group_id}/resources/batch-create", + "doc_type":"api", + "kw":"Batch Adding Associated Resources to a Custom Resource Group,Resources in a Resource Group,API Refer", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Adding Associated Resources to a Custom Resource Group", + "githuburl":"" + }, + { + "uri":"BatchDeleteResources.html", + "node_id":"batchdeleteresources.xml", + "product_code":"ces", + "code":"67", + "des":"This API is used to batch delete associated resources from a custom resource group whose type is Manual.POST /v2/{project_id}/resource-groups/{group_id}/resources/batch-d", + "doc_type":"api", + "kw":"Batch Deleting Associated Resources from a Custom Resource Group,Resources in a Resource Group,API R", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Deleting Associated Resources from a Custom Resource Group", + "githuburl":"" + }, + { + "uri":"ListResourceGroupsServicesResources.html", + "node_id":"listresourcegroupsservicesresources.xml", + "product_code":"ces", + "code":"68", + "des":"This API is used to query resources of a specified dimension for a specified resource type in a resource group.GET /v2/{project_id}/resource-groups/{group_id}/services/{s", + "doc_type":"api", + "kw":"Querying Resources of a Specified Dimension for a Specified Service Type in a Resource Group,Resourc", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Resources of a Specified Dimension for a Specified Service Type in a Resource Group", + "githuburl":"" + }, + { + "uri":"topic_300000009.html", + "node_id":"topic_300000009.xml", + "product_code":"ces", + "code":"69", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"One-Click Monitoring", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"One-Click Monitoring", + "githuburl":"" + }, + { + "uri":"CreateOneClickAlarm.html", + "node_id":"createoneclickalarm.xml", + "product_code":"ces", + "code":"70", + "des":"This API is used to enable one-click monitoring.POST /v2/{project_id}/one-click-alarmsStatus code: 201Status code: 400Status code: 401Status code: 403Status code: 500Stat", + "doc_type":"api", + "kw":"Enabling One-Click Monitoring,One-Click Monitoring,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Enabling One-Click Monitoring", + "githuburl":"" + }, + { + "uri":"ListOneClickAlarms.html", + "node_id":"listoneclickalarms.xml", + "product_code":"ces", + "code":"71", + "des":"This API is used to query services and resources in one-click monitoring.GET /v2/{project_id}/one-click-alarmsStatus code: 200Status code: 400Status code: 401Status code:", + "doc_type":"api", + "kw":"Querying Services and Resources in One-Click Monitoring,One-Click Monitoring,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Services and Resources in One-Click Monitoring", + "githuburl":"" + }, + { + "uri":"ListOneClickAlarmRules.html", + "node_id":"listoneclickalarmrules.xml", + "product_code":"ces", + "code":"72", + "des":"This API is used to query alarm rules for one service in one-click monitoring.GET /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/alarmsStatus code: 200Status code", + "doc_type":"api", + "kw":"Querying Alarm Rules for One Service in One-Click Monitoring,One-Click Monitoring,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Alarm Rules for One Service in One-Click Monitoring", + "githuburl":"" + }, + { + "uri":"BatchUpdateOneClickAlarmsEnabledState.html", + "node_id":"batchupdateoneclickalarmsenabledstate.xml", + "product_code":"ces", + "code":"73", + "des":"This API is used to batch enable or disable alarm rules for one service that has one-click monitoring enabled.PUT /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/a", + "doc_type":"api", + "kw":"Batch Enabling or Disabling Alarm Rules of One Service in One-Click Monitoring,One-Click Monitoring,", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Enabling or Disabling Alarm Rules of One Service in One-Click Monitoring", + "githuburl":"" + }, + { + "uri":"BatchDeleteOneClickAlarms.html", + "node_id":"batchdeleteoneclickalarms.xml", + "product_code":"ces", + "code":"74", + "des":"This API is used to batch disable one-click monitoring.POST /v2/{project_id}/one-click-alarms/batch-deleteStatus code: 200Status code: 400Status code: 401Status code: 403", + "doc_type":"api", + "kw":"Batch Disabling One-Click Monitoring,One-Click Monitoring,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Disabling One-Click Monitoring", + "githuburl":"" + }, + { + "uri":"UpdateOneClickAlarmNotifications.html", + "node_id":"updateoneclickalarmnotifications.xml", + "product_code":"ces", + "code":"75", + "des":"This API is used to batch modify alarm notifications in alarm rules for one service with one-click monitoring enabled.PUT /v2/{project_id}/one-click-alarms/{one_click_ala", + "doc_type":"api", + "kw":"Batch Modifying Alarm Notifications in Alarm Rules for One Service with One-Click Monitoring Enabled", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Modifying Alarm Notifications in Alarm Rules for One Service with One-Click Monitoring Enabled", + "githuburl":"" + }, + { + "uri":"BatchUpdateOneClickAlarmPoliciesEnabledState.html", + "node_id":"batchupdateoneclickalarmpoliciesenabledstate.xml", + "product_code":"ces", + "code":"76", + "des":"This API is used to batch enable or disable alarm policies in alarm rules for one service with one-click monitoring enabled.PUT /v2/{project_id}/one-click-alarms/{one_cli", + "doc_type":"api", + "kw":"Batch Enabling or Disabling Alarm Policies in Alarm Rules for One Service with One-Click Monitoring ", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Enabling or Disabling Alarm Policies in Alarm Rules for One Service with One-Click Monitoring Enabled", + "githuburl":"" + }, + { + "uri":"topic_300000011.html", + "node_id":"topic_300000011.xml", + "product_code":"ces", + "code":"77", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Dashboards", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Dashboards", + "githuburl":"" + }, + { + "uri":"CreateOneDashboard.html", + "node_id":"createonedashboard.xml", + "product_code":"ces", + "code":"78", + "des":"This API is used to create or copy a dashboard.POST /v2/{project_id}/dashboardsStatus code: 201Status code: 400Status code: 401Status code: 500Create a dashboard.Copy a d", + "doc_type":"api", + "kw":"Creating or Copying a Dashboard,Dashboards,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Creating or Copying a Dashboard", + "githuburl":"" + }, + { + "uri":"ListDashboardInfos.html", + "node_id":"listdashboardinfos.xml", + "product_code":"ces", + "code":"79", + "des":"This API is used to query dashboards.GET /v2/{project_id}/dashboardsStatus code: 200Status code: 400Status code: 401Status code: 500NoneStatus code: 200OKSee Error Codes.", + "doc_type":"api", + "kw":"Querying Dashboards,Dashboards,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Dashboards", + "githuburl":"" + }, + { + "uri":"UpdateDashboard.html", + "node_id":"updatedashboard.xml", + "product_code":"ces", + "code":"80", + "des":"This API is used to modify a dashboard.PUT /v2/{project_id}/dashboards/{dashboard_id}Status code: 400Status code: 401Status code: 500NoneSee Error Codes.", + "doc_type":"api", + "kw":"Modifying a Dashboard,Dashboards,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Modifying a Dashboard", + "githuburl":"" + }, + { + "uri":"DeleteDashboards.html", + "node_id":"deletedashboards.xml", + "product_code":"ces", + "code":"81", + "des":"This API is used to delete dashboards in batches.POST /v2/{project_id}/dashboards/batch-deleteStatus code: 200Status code: 400Status code: 401Status code: 500Status code:", + "doc_type":"api", + "kw":"Batch Deleting Dashboards,Dashboards,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Batch Deleting Dashboards", + "githuburl":"" + }, + { + "uri":"topic_300000014.html", + "node_id":"topic_300000014.xml", + "product_code":"ces", + "code":"82", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Metric Management", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Metric Management", + "githuburl":"" + }, + { + "uri":"ListAgentDimensionInfo.html", + "node_id":"listagentdimensioninfo.xml", + "product_code":"ces", + "code":"83", + "des":"This API is used to query metrics based on the ECS or BMS ID and from the following dimensions: disk, mount point, process, graphics card, and RAID controller. The NPU di", + "doc_type":"api", + "kw":"Querying Server Monitoring Metrics,Metric Management,API Reference", + "search_title":"", + "metedata":[ + { + "documenttype":"api", + "prodname":"ces" + } + ], + "title":"Querying Server Monitoring Metrics", + "githuburl":"" + }, { "uri":"ces_03_0045.html", "node_id":"ces_03_0045.xml", "product_code":"ces", - "code":"25", + "code":"84", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Permissions Policies and Supported Actions", @@ -456,7 +1518,7 @@ "uri":"ces_03_0046.html", "node_id":"ces_03_0046.xml", "product_code":"ces", - "code":"26", + "code":"85", "des":"This chapter describes fine-grained permissions management for your Cloud Eye. If your account does not need individual IAM users, then you may skip over this chapter.Po", "doc_type":"api", "kw":"Introduction,Permissions Policies and Supported Actions,API Reference", @@ -474,7 +1536,7 @@ "uri":"ces_03_0047.html", "node_id":"ces_03_0047.xml", "product_code":"ces", - "code":"27", + "code":"86", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Supported Actions of the API Version Management APIs,Permissions Policies and Supported Actions,API ", @@ -492,7 +1554,7 @@ "uri":"ces_03_0048.html", "node_id":"ces_03_0048.xml", "product_code":"ces", - "code":"28", + "code":"87", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Supported Actions of the Metric Management API,Permissions Policies and Supported Actions,API Refere", @@ -510,7 +1572,7 @@ "uri":"ces_03_0049.html", "node_id":"ces_03_0049.xml", "product_code":"ces", - "code":"29", + "code":"88", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Supported Actions of the Alarm Rule Management APIs,Permissions Policies and Supported Actions,API R", @@ -528,7 +1590,7 @@ "uri":"ces_03_0050.html", "node_id":"ces_03_0050.xml", "product_code":"ces", - "code":"30", + "code":"89", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Supported Actions of the Monitoring Data Management APIs,Permissions Policies and Supported Actions,", @@ -546,7 +1608,7 @@ "uri":"ces_03_0051.html", "node_id":"ces_03_0051.xml", "product_code":"ces", - "code":"31", + "code":"90", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Supported Actions of the Quota Management API,Permissions Policies and Supported Actions,API Referen", @@ -564,7 +1626,7 @@ "uri":"ces_03_0052.html", "node_id":"ces_03_0052.xml", "product_code":"ces", - "code":"32", + "code":"91", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Supported Actions of the Event Monitoring API,Permissions Policies and Supported Actions,API Referen", @@ -582,7 +1644,7 @@ "uri":"ces_03_0053.html", "node_id":"ces_03_0053.xml", "product_code":"ces", - "code":"33", + "code":"92", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Common Parameters", @@ -600,7 +1662,7 @@ "uri":"ces_03_0055.html", "node_id":"ces_03_0055.xml", "product_code":"ces", - "code":"34", + "code":"93", "des":"NormalReturned ValueDescription200 OKThe results of GET and PUT operations are returned as expected.201 CreatedThe results of the POST operation are returned as expected.", "doc_type":"api", "kw":"Status Codes,Common Parameters,API Reference", @@ -618,7 +1680,7 @@ "uri":"ErrorCode.html", "node_id":"errorcode.xml", "product_code":"ces", - "code":"35", + "code":"94", "des":"If an error occurs during API calling, the system returns error information. This section describes the error codes contained in the error information for Cloud Eye APIs.", "doc_type":"api", "kw":"Error Codes,Common Parameters,API Reference", @@ -636,7 +1698,7 @@ "uri":"ces_03_0057.html", "node_id":"ces_03_0057.xml", "product_code":"ces", - "code":"36", + "code":"95", "des":"A project ID is required for some URLs when an API is called. Therefore, you need to obtain a project ID in advance. Two methods are available:Obtain the Project ID by Ca", "doc_type":"api", "kw":"Obtaining a Project ID,Common Parameters,API Reference", @@ -654,7 +1716,7 @@ "uri":"ces_03_0058.html", "node_id":"ces_03_0058.xml", "product_code":"ces", - "code":"37", + "code":"96", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Appendix", @@ -672,8 +1734,8 @@ "uri":"ces_03_0059.html", "node_id":"ces_03_0059.xml", "product_code":"ces", - "code":"38", - "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "code":"97", + "des":"In addition to the preceding cloud services, the following cloud services also support event monitoring. For details about monitored events, see Events Supported by Event", "doc_type":"api", "kw":"Services Interconnected with Cloud Eye,Appendix,API Reference", "search_title":"", @@ -690,8 +1752,8 @@ "uri":"ces_01_0054.html", "node_id":"ces_01_0054.xml", "product_code":"ces", - "code":"39", - "des":"Events in Event Monitoring come from operations on cloud service resources and are not collected by the Agent in Server Monitoring.Once a physical host running ECSs break", + "code":"98", + "des":"Events in Event Monitoring come from operations on cloud service resources and are not collected by the Agent in Server Monitoring.The name of a resource that supports ev", "doc_type":"api", "kw":"Events Supported by Event Monitoring,Appendix,API Reference", "search_title":"", @@ -708,7 +1770,7 @@ "uri":"ces_03_0060.html", "node_id":"ces_03_0060.xml", "product_code":"ces", - "code":"40", + "code":"99", "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", "doc_type":"api", "kw":"Change History,API Reference", diff --git a/docs/ces/api-ref/AddAlarmRuleResources.html b/docs/ces/api-ref/AddAlarmRuleResources.html new file mode 100644 index 000000000..108f7775e --- /dev/null +++ b/docs/ces/api-ref/AddAlarmRuleResources.html @@ -0,0 +1,315 @@ + + +
This API is used to batch add resources to an alarm rule. This API does not support alarm rules with Monitoring Scope set to Resource groups or All resources. To modify resources in such alarm rules, use the resource group management APIs.
+POST /v2/{project_id}/alarms/{alarm_id}/resources/batch-create
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
alarm_id + |
+Yes + |
+String + |
+Alarm rule ID. +Regular expression matching: al([a-z]|[A-Z]|[0-9]){22}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+No + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+No + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
resources + |
+Yes + |
+Array of arrays of Dimension objects + |
+Resource information. +Array length: 0 to 1000 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
name + |
+Yes + |
+String + |
+Dimension of a resource. For example, the dimension of an ECS can be instance_id. A maximum of four dimensions are supported. For the metric dimension of each resource, see Service Metric Dimensions. +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
value + |
+No + |
+String + |
+Resource dimension value, that is, the instance ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. +Regular expression matching: +^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*)|\*){1,256}$
+
+ NOTE:
+To add a resource, you need to specify the value. If no value is specified, the API skips the addition without returning an error. + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Adding resources to an alarm rule
+{
+ "resources" : [ [ {
+ "name" : "rds_cluster_id",
+ "value" : "rds000000000001"
+ } ] ]
+}
+None
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Resources added. + |
+
400 + |
+Parameter verification failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to batch add associated resources to a custom resource group whose type is Manual.
+POST /v2/{project_id}/resource-groups/{group_id}/resources/batch-create
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
group_id + |
+Yes + |
+String + |
+Resource group ID. The value starts with rg and is followed by 22 characters of letters, digits, or a combination of both. +Minimum: 24 +Maximum: 24 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
resources + |
+Yes + |
+Array of Resource objects + |
+Resource information. +Array length: 1 to 1000 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
namespace + |
+Yes + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
dimensions + |
+Yes + |
+Array of Dimension objects + |
+Resource dimension information. +Array length: 1 to 4 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
name + |
+Yes + |
+String + |
+Dimension of a resource. For example, the dimension of an ECS can be instance_id. A maximum of four dimensions are supported. For the metric dimension of each resource, see Service Metric Dimensions. +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
value + |
+Yes + |
+String + |
+Resource dimension value, which is an instance ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. +Regular expression matching: +^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*)|\*){1,256}$
+ |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
succeed_count + |
+Integer + |
+Number of resources that were added. +Minimum: 0 +Maximum: 1000 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Batch adding associated resources to a custom resource group
+{
+ "resources" : [ {
+ "namespace" : "SYS.ECS",
+ "dimensions" : [ {
+ "name" : "instance_id",
+ "value" : "4270ff17-aba3-4138-89fa-820594c39755"
+ } ]
+ } ]
+}
+Status code: 200
+Resources added.
+{
+ "succeed_count" : 1
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Resources added. + |
+
400 + |
+Parameter verification failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API (V2) is used to batch delete alarm rules.
+POST /v2/{project_id}/alarms/batch-delete
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+No + |
+String + |
+MIME type of the request body. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+No + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
alarm_ids + |
+Yes + |
+Array of strings + |
+IDs of the alarm rules to be deleted in batches. +Array length: 1 to 10 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_ids + |
+Array of strings + |
+IDs of the alarm rules that are deleted. +Array length: 1 to 10 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Batch deleting alarm rules
+{
+ "alarm_ids" : [ "al12345678901234567890" ]
+}
+Status code: 200
+Alarm rule deleted.
+{
+ "alarm_ids" : [ "alCzk8o9dtSQHtiDgb44Eepw" ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Alarm rule deleted. + |
+
400 + |
+Parameter verification failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to delete custom alarm templates in batches.
+POST /v2/{project_id}/alarm-templates/batch-delete
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
template_ids + |
+Yes + |
+Array of strings + |
+IDs of the alarm templates to be deleted in batches. Alarm templates that are not associated with alarm rules can be deleted in batches. For alarm templates that are associated with alarm rules, you can delete only one alarm template at a time. If you delete multiple ones, an exception will be returned. +Array length: 1 to 100 + |
+
delete_associate_alarm + |
+Yes + |
+Boolean + |
+Whether alarm rules associated with an alarm template will be deleted when you delete the alarm template. true indicates that the alarm rules will be deleted. false indicates that only the alarm template will be deleted. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
template_ids + |
+Array of strings + |
+IDs of alarm templates that were deleted. +Array length: 1 to 100 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Deleting custom alarm templates in batches
+{
+ "template_ids" : [ "at1628592157541dB1klWgY6" ],
+ "delete_associate_alarm" : false
+}
+Status code: 200
+IDs of the templates deleted.
+{
+ "template_ids" : [ "at1628592157541dB1klWgY6" ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+IDs of the templates deleted. + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to batch disable one-click monitoring.
+POST /v2/{project_id}/one-click-alarms/batch-delete
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
one_click_alarm_ids + |
+Yes + |
+Array of strings + |
+IDs of services that need to disable one-click monitoring. +Array length: 1 to 100 +Range: 1 to 64 characters +Regular expression matching: ^([a-z]|[A-Z]|[0-9]){1,64}$ + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
one_click_alarm_ids + |
+Array of strings + |
+IDs of services for which one-click monitoring was disabled. +Array length: 1 to 100 +Range: 1 to 64 characters +Regular expression matching: ^([a-z]|[A-Z]|[0-9]){1,64}$ + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Batch disable one-click motoring.
+POST /v2/{project_id}/one-click-alarms/batch-delete
+Request body:
+{
+ "one_click_alarm_ids" : [ "o1619578505263QkW3b66yo" ]
+}
+Status code: 200
+Operation succeeded.
+{
+ "one_click_alarm_ids" : [ "o1619578505263QkW3b66yo" ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Operation succeeded. + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to delete resource groups in batches.
+POST /v2/{project_id}/resource-groups/batch-delete
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
group_ids + |
+Yes + |
+Array of strings + |
+IDs of resource groups to be deleted in batches. +Array length: 1 to 100 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
group_ids + |
+Array of strings + |
+IDs of resource groups that were deleted. +Array length: 1 to 100 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Batch deleting resource groups
+{
+ "group_ids" : [ "rg1761380163308Dxxxxxxxx" ]
+}
+Status code: 200
+IDs of resource groups that were deleted
+{
+ "group_ids" : [ "rg1761380163308Dxxxxxxxx" ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+IDs of resource groups that were successfully deleted. + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to batch delete associated resources from a custom resource group whose type is Manual.
+POST /v2/{project_id}/resource-groups/{group_id}/resources/batch-delete
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
group_id + |
+Yes + |
+String + |
+Resource group ID. The value starts with rg and is followed by 22 characters of letters, digits, or a combination of both. +Minimum: 24 +Maximum: 24 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
resources + |
+Yes + |
+Array of Resource objects + |
+Resource information. +Array length: 1 to 1000 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
namespace + |
+Yes + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
dimensions + |
+Yes + |
+Array of Dimension objects + |
+Resource dimension information. +Array length: 1 to 4 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
name + |
+Yes + |
+String + |
+Dimension of a resource. For example, the dimension of an ECS can be instance_id. A maximum of four dimensions are supported. For the metric dimension of each resource, see Service Metric Dimensions. +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
value + |
+Yes + |
+String + |
+Resource dimension value, which is an instance ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. +Regular expression matching: +^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*)|\*){1,256}$
+ |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
succeed_count + |
+Integer + |
+Number of resources that were deleted. +Minimum: 0 +Maximum: 1000 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Batch deleting associated resources from a custom resource group
+{
+ "resources" : [ {
+ "namespace" : "SYS.ECS",
+ "dimensions" : [ {
+ "name" : "instance_id",
+ "value" : "4270ff17-aba3-4138-89fa-820594c39755"
+ } ]
+ } ]
+}
+Status code: 200
+Resources deleted.
+{
+ "succeed_count" : 1
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Resources deleted. + |
+
400 + |
+Parameter verification failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to enable or disable alarm rules in batches.
+POST /v2/{project_id}/alarms/action
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+No + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+No + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
alarm_ids + |
+Yes + |
+Array of strings + |
+IDs of alarm rules to be enabled or disabled in batches. +Array length: 1 to 100 + |
+
alarm_enabled + |
+Yes + |
+Boolean + |
+Whether to generate alarms when the alarm triggering conditions are met. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_ids + |
+Array of strings + |
+IDs of alarm rules that were enabled or disabled. +Array length: 1 to 100 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Enable or disable alarm rules in batches.
+{
+ "alarm_ids" : [ "al12345678901234567890" ],
+ "alarm_enabled" : true
+}
+Status code: 200
+Alarm rules enabled or disabled.
+{
+ "alarm_ids" : [ "alCzk8o9dtSQHtiDgb44Eepw" ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Alarm rules enabled or disabled. + |
+
400 + |
+Parameter verification failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to batch enable or disable alarm policies in alarm rules for one service with one-click monitoring enabled.
+PUT /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/alarms/{alarm_id}/policies/action
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
one_click_alarm_id + |
+Yes + |
+String + |
+One-click monitoring ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^([a-z]|[A-Z]|[0-9]){1,64}$ + |
+
alarm_id + |
+Yes + |
+String + |
+Alarm rule ID. +Minimum: 24 +Maximum: 24 +Regular expression matching: ^al([0-9A-Za-z]){22}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
alarm_policy_ids + |
+Yes + |
+Array of strings + |
+IDs of alarm policies to be enabled or disabled in batches in an alarm rule. +Array length: 1 to 100 +Regular expression matching: ^([a-z]|[A-Z]|[0-9]|-)+$ + |
+
enabled + |
+Yes + |
+Boolean + |
+Whether to enable the function. The value can be true (enable) or false (disable). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_policy_ids + |
+Array of strings + |
+IDs of alarm policies that were enabled or disabled in batches in an alarm rule. +Array length: 1 to 100 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Batch enable or disable alarm policies in alarm rules for one service that has one-click monitoring enabled.
+POST /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/alarms/{alarm_id}/policies/action
+Request body:
+{
+ "alarm_policy_ids" : [ "alxdxxxdsw12321321" ],
+ "enabled" : true
+}
+Status code: 200
+Alarm policies enabled or disabled.
+{
+ "alarm_policy_ids" : [ "alxdxxxdsw12321321" ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Alarm policies enabled or disabled. + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to batch enable or disable alarm rules for one service that has one-click monitoring enabled.
+PUT /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/alarm-rules/action
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
one_click_alarm_id + |
+Yes + |
+String + |
+One-click monitoring ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^([a-z]|[A-Z]|[0-9]){1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
alarm_ids + |
+Yes + |
+Array of strings + |
+IDs of alarm rules to be enabled or disabled in batches. +Array length: 1 to 100 + |
+
alarm_enabled + |
+Yes + |
+Boolean + |
+Whether to generate alarms when the alarm triggering conditions are met. The value can be true (enable) or false (disable). + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_ids + |
+Array of strings + |
+IDs of alarm rules that were enabled or disabled. +Array length: 1 to 100 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Batch enable or disable alarm rules for a service in one-click monitoring.
+PUT /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/alarm-rules/action
+Request body:
+{
+ "alarm_ids" : [ "al1759030688878rovaxxxxx" ],
+ "alarm_enabled" : true
+}
+Status code: 200
+Alarm rules enabled or disabled.
+{
+ "alarm_ids" : [ "al1759030688878rovaxxxxx" ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Alarm rules enabled or disabled. + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to create an alarm rule (recommended).
+POST /v2/{project_id}/alarms
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+No + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
name + |
+Yes + |
+String + |
+Name of an alarm rule. The name allows 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-). + |
+
description + |
+No + |
+String + |
+Alarm rule description. The value can contain 0 to 256 characters. + |
+
namespace + |
+Yes + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. The values of service and item must start with a letter and can only contain letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
resource_group_id + |
+No + |
+String + |
+Resource group ID. This parameter is mandatory when the monitoring scope is set to Resource groups. + |
+
resources + |
+Yes + |
+Array of arrays of Dimension objects + |
+Resource list. If an alarm rule is created for all resources or resources in a resource group, leave the resource dimension blank. If the alarm rule is created for specified resources, the resource dimension value is mandatory, and you can specify multiple resources to be monitored at a time. +Array length: 0 to 1000 + |
+
policies + |
+No + |
+Array of Policy objects + |
+Alarm policies. +Array length: 1 to 50 + NOTE:
+Either policies or alarm_template_id must be set. If both are specified, the policy in the alarm template is used. + |
+
type + |
+Yes + |
+String + |
+Alarm rule type. +The value can be: +
|
+
alarm_notifications + |
+No + |
+Array of Notification objects + |
+Action to be triggered by the alarm. Array length: 0 to 10 + |
+
ok_notifications + |
+No + |
+Array of Notification objects + |
+Action to be triggered after an alarm is cleared. Array length: 0 to 10 + |
+
notification_begin_time + |
+No + |
+String + |
+Time when the alarm notification was enabled. Example: 12:00 +Regular expression matching: ^([01][0-9]|2[0-3]):([0-5][0-9])$ + |
+
notification_end_time + |
+No + |
+String + |
+Time when the alarm notification was disabled. Example: 12:00 +Regular expression matching: ^([1][0-9]|2[0-3]):([0-5][0-9])$ + |
+
enterprise_project_id + |
+No + |
+String + |
+Enterprise project ID. The value allows 36 characters. It can only contain lowercase letters, hyphens (-), and underscores (_). You can customize an enterprise project ID. The value can also be 0 (default enterprise project ID). +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
enabled + |
+Yes + |
+Boolean + |
+Whether to generate alarms when the alarm triggering conditions are met. + |
+
notification_enabled + |
+Yes + |
+Boolean + |
+Whether to enable alarm notification. + |
+
alarm_template_id + |
+No + |
+String + |
+ID of an alarm template associated with an alarm rule. If this parameter is specified, the policy associated with the alarm rule changes accordingly with the alarm template policy. +Minimum: 0 +Maximum: 64 +Regular expression matching: ^at([0-9A-Za-z]){0,62}$ + NOTE:
+Either policies or alarm_template_id must be set. If both are specified, the policy in the alarm template is used. + |
+
tags + |
+No + |
+Array of ResourceTag objects + |
+Tenant tags. +Array length: 0 to 20 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
name + |
+Yes + |
+String + |
+Dimension of a resource. For example, the dimension of an ECS can be instance_id. A maximum of four dimensions are supported. For the metric dimension of each resource, see Service Metric Dimensions. +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
value + |
+No + |
+String + |
+Resource dimension value, which is an instance ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. +Regular expression matching: +^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*)|\*){1,256}$
+ |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
metric_name + |
+Yes + |
+String + |
+Metric name of a resource. The name must start with a letter and contain only digits, letters, and underscores (_). The length ranges from 1 to 64 characters. For example, cpu_util of an ECS indicates the CPU usage of the ECS. mongo001_command_ps in DDS indicates the command execution frequency. For details about the metric name of each service, see Service Metric Names. +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
period + |
+Yes + |
+Integer + |
+Monitoring period of a metric, in seconds. The default value is 0. For an event alarm, set this parameter to 0. 1 indicates the original aggregation period of a metric. For example, if the original aggregation period of an RDS metric is 60s, its data point is calculated every 60 seconds. For details about the original aggregation period of each cloud service metric, see Services Interconnected with Cloud Eye. 300 indicates that the metric aggregation period is 5 minutes. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
filter + |
+Yes + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+Yes + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+No + |
+Number + |
+Alarm threshold. Supported range: 0 to Number.MAX_VALUE (1.7976931348623157e+108) For detailed thresholds, see the value range of each metric in the appendix. For example, you can set ECS cpu_util to 80. +Minimum: 0 +Maximum: 1.7976931348623157e+108 + |
+
unit + |
+No + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
count + |
+Yes + |
+Integer + |
+Number of times that the alarm triggering conditions are met. For event alarms, the value ranges from 1 to 180. For metric and website alarms, the value can be 1, 2, 3, 4, 5, 10, 15, 30, 60, 90, 120, or 180. + |
+
suppress_duration + |
+No + |
+Integer + |
+Alarm suppression time, in seconds. This parameter corresponds to the last field in the alarm policy when an alarm rule is created on the Cloud Eye console. This field is used to avoid frequent alarms. 0 indicates that the alarm is not suppressed and alarms are generated as long as the conditions are met. 300 indicates that an alarm is generated every 5 minutes as long as the alarm triggering conditions are met. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
level + |
+No + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (informational). The default value is 2. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
type + |
+Yes + |
+String + |
+Notification type. +The value can be: +notification: topic subscriptions. Notifications are sent using SMN topics. +contact: cloud account contact. Notifications are sent to the mobile number and email address registered for your account. + |
+
notification_list + |
+Yes + |
+Array of strings + |
+List of objects to be notified of alarm status changes. The value of topicUrn can be obtained from SMN. For details, see section "Querying Topics." When type is set to notification, notification_list cannot be left blank. If you set alarm_action_enabled to true, you must specify either alarm_actions or ok_actions. If alarm_actions and ok_actions coexist, their notification_list must be the same. +Array length: 0 to 20 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
key + |
+Yes + |
+String + |
+Tag key. A tag key can contain a maximum of 128 Unicode characters. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^((?!\s)(?!_sys_)[\p{L}\p{Z}\p{N}_.:=+\-@]*)(?<!\s)$ + |
+
value + |
+Yes + |
+String + |
+Tag value. Each tag value can contain a maximum of 255 Unicode characters. +Minimum: 0 +Maximum: 255 +Regular expression matching: ^([\p{L}\p{Z}\p{N}_.:\/=+\-@]*)$ + |
+
Status code: 201
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_id + |
+String + |
+ID of an alarm rule, which starts with al and is followed by 22 characters of letters, digits, or a combination of both. + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Create an alarm rule whose name is alarm-lxy-rg-RDS, type is RESOURCE_GROUP, suppress_duration is 86400, and level is 2.
+{
+ "name" : "alarm-lxy-rg-RDS",
+ "description" : "",
+ "namespace" : "SYS.RDS",
+ "type" : "RESOURCE_GROUP",
+ "resources" : [ [ {
+ "name" : "rds_cluster_id",
+ "value" : "rdsxxx"
+ } ] ],
+ "policies" : [ {
+ "metric_name" : "rds001_cpu_util",
+ "period" : 1,
+ "filter" : "average",
+ "comparison_operator" : ">=",
+ "value" : 0,
+ "unit" : "%",
+ "count" : 1,
+ "suppress_duration" : 86400,
+ "level" : 2
+ } ],
+ "enabled" : true,
+ "notification_enabled" : false,
+ "resource_group_id" : "rg1623429506587NbRweoa3J",
+ "enterprise_project_id" : "a9d919b7-0456-4bb8-b470-6a23b64f4f7e",
+ "alarm_template_id" : "at1628592157541dB1klWgY6"
+}
+{
+ "name" : "alarm-event-test-05",
+ "namespace" : "SYS.ECS",
+ "resources" : [ [ {
+ "name" : "resource_id",
+ "value" : "2ffxxx"
+ } ] ],
+ "policies" : [ {
+ "metric_name" : "instance_resize_executing",
+ "period" : 0,
+ "filter" : "average",
+ "comparison_operator" : ">=",
+ "unit" : "count",
+ "count" : 1,
+ "suppress_duration" : 0,
+ "level" : 2
+ } ],
+ "type" : "EVENT.SYS",
+ "enabled" : true,
+ "notification_enabled" : false
+}
+Status code: 201
+Alarm rule created.
+{
+ "alarm_id" : "alCzk8o9dtSQHtiDgb44Eepw"
+}
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Alarm rule created. + |
+
400 + |
+Parameter verification failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to create a custom alarm template.
+POST /v2/{project_id}/alarm-templates
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
template_name + |
+Yes + |
+String + |
+Alarm template name. It must start with a letter and can contain letters, digits, underscores (_), hyphens (-), parentheses, and periods (.). Fuzzy match is supported. +Minimum: 1 +Maximum: 128 +Regular expression matching: +^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-|\(|\)|\.|\s)+$+ |
+
template_type + |
+No + |
+Integer + |
+Type of a custom alarm template. +The value can be: + + |
+
template_description + |
+No + |
+String + |
+Supplementary information about an alarm template. The description can contain 0 to 256 characters and is left blank by default. + |
+
policies + |
+Yes + |
+Array of Policies objects + |
+Alarm policies in an alarm template. +Array length: 1 to 50 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
namespace + |
+Yes + |
+String + |
+Namespace. +Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
dimension_name + |
+No + |
+String + |
+Resource dimension, which must start with a letter. A dimension allows a maximum of 32 characters can only contain digits, letters, underscores (_), and hyphens (-). If there are multiple dimensions, use commas (,) to separate them. DimensionName in event alarm templates must be left blank. + |
+
metric_name + |
+Yes + |
+String + |
+Metric name of a resource. For details about the metrics of each service, see Service Metric Names. The value must start with a letter and can only contain digits, letters, underscores (_), and hyphens (-). It allows 1 to 96 characters. For example, the ECS metric cpu_util indicates the CPU usage of an ECS. The DDS metric mongo001_command_ps indicates the command execution frequency. +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
period + |
+Yes + |
+Integer + |
+Interval (seconds) for checking whether the alarm rule conditions are met. +0: default value. For example, this value can be used for event alarms. +1: original aggregation period of a metric. For example, if the original aggregation period of an RDS metric is 60s, its data point is calculated every 60 seconds. For details about the original aggregation period of each cloud service metric, see Services Interconnected with Cloud Eye. +300: The metric data is collected and calculated every 5 minutes. +1200: The metric data is collected and calculated every 20 minutes. +3600: The metric data is collected and calculated every 1 hour. +14400: The metric data is collected and calculated every 4 hours. +86400: The metric data is collected and calculated every day. +The value can be: + + |
+
filter + |
+Yes + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+Yes + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+No + |
+Number + |
+Alarm threshold. +Minimum: 0 +Maximum: Number.MAX_VALUE (1.7976931348623156E108) + |
+
unit + |
+No + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
count + |
+Yes + |
+Integer + |
+Number of consecutive alarm triggering times. For event alarms, the value ranges from 1 to 180. For metric and website alarms, the value can be 1, 2, 3, 4, 5, 10, 15, 30, 60, 90, 120, or 180. + |
+
alarm_level + |
+No + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (warning). The default value is 2. + |
+
suppress_duration + |
+Yes + |
+Integer + |
+Alarm suppression period, in seconds. When the period is 0, only one alarm is generated. +The value can be: + + |
+
Status code: 201
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
template_id + |
+String + |
+ID of an alarm template. The ID starts with at and is followed by letters, digits, or a combination of both. The value can contain a maximum of 64 characters. + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
{
+ "template_name" : "my_template",
+ "template_description" : "hello world",
+ "policies" : [ {
+ "namespace" : "SYS.ECS",
+ "dimension_name" : "instance_id",
+ "metric_name" : "cpu_util",
+ "period" : 300,
+ "filter" : "sum",
+ "comparison_operator" : ">",
+ "value" : 2,
+ "unit" : "bit/s",
+ "count" : 2,
+ "alarm_level" : 2,
+ "suppress_duration" : 300
+ } ],
+ "template_type": 0
+}
+Creating an event template whose template_name is my_event_template, metric_name is rebootServer, count is 1, and alarm_level is 2
+{
+ "template_name" : "my_event_template",
+ "template_description" : "hello world",
+ "policies" : [ {
+ "namespace" : "SYS.ECS",
+ "dimension_name" : "",
+ "metric_name" : "rebootServer",
+ "period" : 0,
+ "filter" : "average",
+ "comparison_operator" : ">=",
+ "value" : 1,
+ "unit" : "count",
+ "count" : 1,
+ "alarm_level" : 2,
+ "suppress_duration" : 0
+ } ],
+ "template_type": 2
+}
+Status code: 201
+Created
+{
+ "template_id" : "at1628592157541dB1klWgY6"
+}
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Created + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to enable one-click monitoring.
+POST /v2/{project_id}/one-click-alarms
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
one_click_alarm_id + |
+Yes + |
+String + |
+One-click monitoring ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^([a-z]|[A-Z]|[0-9]){1,64}$ + |
+
dimension_name + |
+Yes + |
+DimensionNames object + |
+Dimensions in metric and event alarm rules that have one-click monitoring enabled. One-click monitoring must be enabled for at least one type of alarm rules. + |
+
notification_enabled + |
+Yes + |
+Boolean + |
+Whether to enable alarm notifications. The value can be true (enabled) or false (disabled). + |
+
alarm_notifications + |
+No + |
+Array of Notification objects + |
+Action to be triggered by the alarm. Array length: 0 to 10 + |
+
ok_notifications + |
+No + |
+Array of Notification objects + |
+Action to be triggered after an alarm is cleared. Array length: 0 to 10 + |
+
notification_begin_time + |
+No + |
+String + |
+Time when the alarm notification was enabled. Example: 09:00 +Regular expression matching: ^([01][0-9]|2[0-3]):([0-5][0-9])$ + |
+
notification_end_time + |
+No + |
+String + |
+Time when the alarm notification was disabled. Example: 12:00 +Regular expression matching: ^([01][0-9]|2[0-3]):([0-5][0-9])$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
metric + |
+Yes + |
+Array of strings + |
+Dimensions in metric alarm rules that have one-click monitoring enabled. One-click monitoring are disabled by default for unspecified dimensions. +You must specify either metric or event. +Array length: 0 to 100 +The value is a list of character strings. Each element contains 1 to 131 characters. +Regular expression matching: +^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-|,)*$
+ |
+
event + |
+Yes + |
+Array of strings + |
+Dimensions in event alarm rules that have one-click monitoring enabled. One-click monitoring are disabled by default for unspecified dimensions. "" indicates enable one-click monitoring for all dimensions. +You must specify either metric or event. +Array length: 0 to 100 +The value is a list of character strings. Each element contains 0 to 131 characters. +Regular expression matching: +^([a-z]|[A-Z]|[0-9]|_|-|,)*$+ |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
type + |
+Yes + |
+String + |
+Notification type. +The value can be: +notification: topic subscriptions. Notifications are sent using SMN topics. +contact: cloud account contacts. Notifications are sent using the mobile number and email address registered for your account. + |
+
notification_list + |
+Yes + |
+Array of strings + |
+List of objects to be notified of alarm status changes. The value of topicUrn can be obtained from SMN. For details, see section Querying Topics. If type is set to notification, the value of notificationList cannot be empty. If type is set to autoscaling, the value of notificationList must be empty. If you set alarm_action_enabled to true, you must specify either alarm_actions or ok_actions. If alarm_actions and ok_actions coexist, their notificationList must be the same. +Array length: 0 to 20 + |
+
Status code: 201
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
one_click_alarm_id + |
+String + |
+One-click monitoring ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^([a-z]|[A-Z]|[0-9]){1,64}$ + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
{
+ "one_click_alarm_id" : "o1234567890123456789012",
+ "dimension_names" : {
+ "metric" : [ "disk", "instance_id" ],
+ "event" : [ "resource_id" ]
+ },
+ "notification_enabled" : true,
+ "alarm_notifications" : [ {
+ "type" : "notification",
+ "notification_list" : [ "urn:smn:123" ]
+ } ],
+ "ok_notifications" : [ {
+ "type" : "notification",
+ "notification_list" : [ "urn:smn:123" ]
+ } ],
+ "notification_begin_time" : "00:00",
+ "notification_end_time" : "23:59"
+}
+Status code: 201
+Created
+{
+ "one_click_alarm_id" : "o1234567890123456789012"
+}
+Status Code + |
+Description + |
+
|---|---|
201 + |
+Created + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to create or copy a dashboard.
+POST /v2/{project_id}/dashboards
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. application/json is recommended. +Default value: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
dashboard_name + |
+Yes + |
+String + |
+Custom dashboard name. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
enterprise_id + |
+No + |
+String + |
+Enterprise project ID. +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
dashboard_id + |
+No + |
+String + |
+Dashboard ID. If a dashboard ID is specified, the dashboard will be copied. +Regular expression matching: ^db([a-z]|[A-Z]|[0-9]){22} + |
+
row_widget_num + |
+No + |
+Integer + |
+How a graph is displayed. 0 indicates that you can customize top and left of the graph. 1 indicates one graph per row. +Minimum: 0 +Maximum: 3 +Default: 0 + |
+
Status code: 201
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
dashboard_id + |
+String + |
+Dashboard ID. +Regular expression matching: ^db([a-z]|[A-Z]|[0-9]){22} + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Create a dashboard.
+{
+ "dashboard_name" : "dashboard_name",
+ "enterprise_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
+ "row_widget_num" : 3
+}
+Copy a dashboard.
+{
+ "dashboard_name" : "dashboard_name",
+ "enterprise_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
+ "dashboard_id" : "dbxxxxxxxxxxxxxxxxxxxxxx",
+ "row_widget_num" : 3
+}
+Status code: 201
+OK
+Create a dashboard.
+{
+ "dashboard_id" : "dbxxxxxxxxx"
+}
+Copy a dashboard.
+{
+ "dashboard_id" : "dbxxxxxxxxx"
+}
+Status Code + |
+Description + |
+
|---|---|
201 + |
+OK + |
+
400 + |
+The server failed to process the request. + |
+
401 + |
+Token authentication is required. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to create a resource group (recommended).
+POST /v2/{project_id}/resource-groups
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
group_name + |
+Yes + |
+String + |
+Resource group name. The value allows a maximum of 128 characters and can only contain letters, digits, hyphens (-), and underscores (_). +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
enterprise_project_id + |
+No + |
+String + |
+ID of the enterprise project that a resource group belongs to. +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
type + |
+No + |
+String + |
+Method for adding resources to a resource group. The value can only be EPS (synchronizing resources from enterprise projects), TAG (dynamic tag matching), or Manual (manually adding resources). If this parameter is not specified, resources are manually added. +Regular expression matching: ^(EPS|TAG|Manual)$ + |
+
tags + |
+No + |
+Array of ResourceGroupTagRelation objects + |
+Associated tag during dynamic tag matching. This parameter is mandatory when type is set to TAG. +Array length: 1 to 10 + |
+
association_ep_ids + |
+No + |
+Array of strings + |
+ID of the enterprise project from which resources in the resource group come. This parameter is mandatory when type is set to EPS. +Array length: 1 to 10 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
key + |
+Yes + |
+String + |
+Tag key. +Minimum: 1 +Maximum: 36 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
value + |
+No + |
+String + |
+Tag value. +Minimum: 0 +Maximum: 43 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
group_id + |
+String + |
+Resource group ID. The value starts with rg and is followed by 22 characters of letters, digits, or a combination of both. + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Creating a resource group whose group _name is rg_test and type is TAG
+{
+ "group_name" : "rg_test",
+ "enterprise_project_id" : "0",
+ "type" : "TAG",
+ "tags" : [ {
+ "key" : "key1",
+ "value" : "value1"
+ } ],
+ "association_ep_ids" : [ "d61d4705-5658-42f5-8e0c-70eb34d17b02" ]
+}
+Status code: 200
+Created
+{
+ "group_id" : "rg1761380163308Dxxxxxxxx"
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Created + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to batch delete resources to an alarm rule. This API does not support alarm rules with Monitoring Scope set to Resource groups. To modify resources in such alarm rules, use the resource group management APIs.
+POST /v2/{project_id}/alarms/{alarm_id}/resources/batch-delete
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
alarm_id + |
+Yes + |
+String + |
+Alarm rule ID. +Regular expression matching: al([a-z]|[A-Z]|[0-9]){22}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+No + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+No + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
resources + |
+Yes + |
+Array of arrays of Dimension objects + |
+Resource information. +Array length: 0 to 1000 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
name + |
+Yes + |
+String + |
+Dimension of a resource. For example, the dimension of an ECS can be instance_id. A maximum of four dimensions are supported. For the metric dimension of each resource, see Service Metric Dimensions. +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
value + |
+No + |
+String + |
+Resource dimension value, that is, the instance ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. +Regular expression matching: +^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*)|\*){1,256}$
+
+ NOTE:
+To delete a resource, you need to specify the value. If no value is specified, the API skips the deletion without returning an error. + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Deleting resources from an alarm rule
+{
+ "resources" : [ [ {
+ "name" : "rds_cluster_id",
+ "value" : "rds000000000001"
+ } ] ]
+}
+None
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Resources deleted. + |
+
400 + |
+Parameter verification failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to delete dashboards in batches.
+POST /v2/{project_id}/dashboards/batch-delete
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. application/json is recommended. +Default value: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
dashboard_ids + |
+No + |
+Array of strings + |
+Dashboard ID list. +Array length: 1 to 30 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
dashboards + |
+Array of BatchDeleteDashboardRespInfo objects + |
+Response body for deleting dashboards in batches. +Array length: 1 to 100 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
dashboard_id + |
+String + |
+Dashboard ID. +Regular expression matching: ^db([a-z]|[A-Z]|[0-9]){22} + |
+
ret_status + |
+String + |
+Operation result. The value can be successful or error. +The value can be: + + |
+
error_msg + |
+String + |
+Error message. +Minimum: 0 +Maximum: 128 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
{
+ "dashboard_ids" : [ "dbxxxxxxxxxxxxxxxxxxxxxx", "dbXXXXXXXXXXXXXXXXXXXXXX" ]
+}
+Status code: 200
+OK
+{
+ "dashboards" : [ {
+ "dashboard_id" : "dbxxxxxxxxxxxxxxxxxxxxxx",
+ "ret_status" : "successful"
+ }, {
+ "dashboard_id" : "dbXXXXXXXXXXXXXXXXXXXXXX",
+ "ret_status" : "error",
+ "error_msg" : "record not found"
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+The server failed to process the request. + |
+
401 + |
+Token authentication is required. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query metrics based on the ECS or BMS ID and from the following dimensions: disk, mount point, process, graphics card, and RAID controller. The NPU dimension is the original value, so there's no need to call this API to obtain the metric information.
+GET /v2/{project_id}/instances/{instance_id}/agent-dimensions
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
instance_id + |
+Yes + |
+String + |
+Resource ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. +Minimum: 36 +Maximum: 36 +Regular expression matching: +^([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*$
+ |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
dim_name + |
+Yes + |
+String + |
+Dimension name. +The value can be: + + |
+
dim_value + |
+No + |
+String + |
+Dimension value, which contains 32 characters, for example, 2e84018fc8b4484b94e89aae212fe615. Minimum: 32 +Maximum: 32 +Regular expression matching: ([a-f\d]{32}|[A-F\d]{32}) + |
+
offset + |
+No + |
+Integer + |
+Pagination offset. +Minimum: 0 +Maximum: 2147483647 +Default: 0 +Regular expression matching: ^(0|[1-9][0-9]*)$ + |
+
limit + |
+No + |
+Integer + |
+Number of records displayed on each page. +Minimum: 1 +Maximum: 1000 +Default: 1000 +Regular expression matching: ^([1-9]|[1-9][0-9]|[1-9][0-9][0-9]|1000)$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
dimensions + |
+Array of AgentDimension objects + |
+Dimension information. +Array length: 0 to 2147483647 + |
+
count + |
+Integer + |
+Total number of dimensions. +Minimum: 0 +Maximum: 2147483647 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
name + |
+String + |
+Dimension name. +The value can be: + + |
+
value + |
+String + |
+Dimension value, which contains 32 characters, for example, 2e84018fc8b4484b94e89aae212fe615. +Minimum: 32 +Maximum: 32 +Regular expression matching: ([a-f\d]{32}|[A-F\d]{32}) + |
+
origin_value + |
+String + |
+Actual dimension information. The value is a character string, for example, vda. +Minimum: 1 +Maximum: 1024 +Regular expression matching: +^([a-z]|[A-Z]|[0-9]|_|-|~|\\.|/|:)*$+ |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Error code. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Error code. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Error code. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying metrics collected by Agent from a server whose instance_id is 4270ff17-aba3-4138-89fa-820594c39755
+/v2/{project_id}/instances/4270ff17-aba3-4138-89fa-820594c39755/agent-dimensions?offset=0&limit=10&dim_name=disk
+Status code: 200
+Query succeeded.
+{
+ "dimensions" : [ {
+ "name" : "disk",
+ "value" : "2e84018fc8b4484b94e89aae212fe615",
+ "origin_value" : "vda"
+ }, {
+ "name" : "disk",
+ "value" : "6a1b2de69eeb9a037ea23de6b529394d",
+ "origin_value" : "vdc"
+ } ],
+ "count" : 10
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Query succeeded. + |
+
400 + |
+Parameter verification failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query alarm records.
+GET /v2/{project_id}/alarm-histories
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
alarm_id + |
+No + |
+String + |
+Alarm rule ID, which starts with al and is followed by 22 characters of letters, digits, or a combination of both. +Minimum: 24 +Maximum: 24 + |
+
name + |
+No + |
+String + |
+Alarm rule name. +Minimum: 0 +Maximum: 128 + |
+
status + |
+No + |
+String + |
+Alarm rule status. The value can be ok, alarm, or invalid. +Regular expression matching: ^(ok|alarm|invalid)$ + |
+
level + |
+No + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (warning). +Minimum: 1 +Maximum: 4 + |
+
namespace + |
+No + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
resource_id + |
+No + |
+String + |
+ID of a resource in an alarm rule. If the resource has multiple dimensions, the resource IDs are sorted in ascending alphabetical order and separated by commas (,). +Minimum: 0 +Maximum: 2048 +Regular expression matching: +^([a-z]|[A-Z]|[0-9]|_|-|:|,|\.|)+$+ |
+
from + |
+No + |
+String + |
+Start of the time window for querying alarm records based on their end time (end_time in the response body, equal to or later than from). from must be earlier than to. Example: 2022-02-10T10:05:46+08:00 +Minimum: 0 +Maximum: 64 + NOTE:
+If the format of the from and to parameters is incorrect, alarm records in the past week are displayed. + |
+
to + |
+No + |
+String + |
+End of the time window for querying alarm records based on their end time (end_time in the response body, earlier than to). Example: 2022-02-10T10:05:47+08:00 +Minimum: 0 +Maximum: 64 + NOTE:
+If the format of the from and to parameters is incorrect, alarm records in the past week are displayed. + |
+
offset + |
+No + |
+Integer + |
+Pagination offset. +Minimum: 0 +Maximum: 999 +Default: 0 +Regular expression matching: ^(0|[1-9]|[1-9][0-9])$ + |
+
limit + |
+No + |
+Integer + |
+Number of records displayed on each page. +Minimum: 1 +Maximum: 100 +Default: 100 +Regular expression matching: ^([1-9]|[1-9][0-9]|100)$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_histories + |
+Array of AlarmHistoryItemV2 objects + |
+Alarm records. +Array length: 0 to 100 + |
+
count + |
+Integer + |
+Total number of alarm records. +Minimum: 0 +Maximum: 2147483647 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
record_id + |
+String + |
+Alarm record ID. +Minimum: 24 +Maximum: 24 + |
+
alarm_id + |
+String + |
+Alarm rule ID, for example, al1603131199286dzxpqK3Ez. +Minimum: 24 +Maximum: 24 + |
+
name + |
+String + |
+Alarm rule name, for example, alarm-test01. +Minimum: 1 +Maximum: 128 + |
+
status + |
+String + |
+Status of the alarm record. +The value can be: + + |
+
level + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (warning). +The value can be: + + |
+
type + |
+String + |
+Alarm rule type. +The value can be: +
|
+
action_enabled + |
+Boolean + |
+Whether to send a notification. The value can be true or false. + |
+
begin_time + |
+String + |
+Alarm generation time (UTC time). + |
+
end_time + |
+String + |
+Alarm end time (UTC time). + |
+
first_alarm_time + |
+String + |
+UTC time when the alarm was generated for the first time. + |
+
last_alarm_time + |
+String + |
+UTC time when the alarm was generated for the last time. + |
+
alarm_recovery_time + |
+String + |
+UTC time when the alarm was cleared. + |
+
metric + |
+Metric object + |
+Metric information. + |
+
condition + |
+AlarmCondition object + |
+Alarm triggering condition. + |
+
additional_info + |
+AdditionalInfo object + |
+Additional field of an alarm record, which applies only to alarm records generated in event monitoring scenarios. + |
+
alarm_actions + |
+Array of Notification objects + |
+Action to be triggered by the alarm. +The structure is as follows: +{ "type": "notification", "notification_list": ["urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd"] } +The value of type can be: +
notificationList indicates list of recipients to be notified of alarm status changes. +Array length: 0 to 10 + |
+
ok_actions + |
+Array of Notification objects + |
+Action to be triggered after an alarm is cleared. A structure example is {"type": "notification", "notification_list": ["urn:smn:southchina:68438a86d98e427e907e0097b7e35d47:sd"] }. The type value can be notification (a notification action will be triggered). notification_list indicates list of objects to be notified of alarm status changes. +Array length: 0 to 10 + |
+
data_points + |
+Array of DataPointInfo objects + |
+Time when the resource monitoring data is reported and the monitoring data in the alarm record. +Array length: 0 to 2147483647 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
namespace + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
metric_name + |
+String + |
+Metric name of a resource. The name must start with a letter and contain only digits, letters, and underscores (_). The length ranges from 1 to 64 characters. For example, cpu_util of an ECS indicates the CPU usage of the ECS. mongo001_command_ps in DDS indicates the command execution frequency. For details about the metric name of each service, see Service Metric Names. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
dimensions + |
+Array of Dimension objects + |
+Metric dimension. A maximum of four dimensions can be added. +Array length: 0 to 4 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
name + |
+String + |
+Dimension of a resource. For example, the dimension of an ECS can be instance_id. A maximum of four dimensions are supported. For the metric dimension of each resource, see Service Metric Dimensions. +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
value + |
+String + |
+Resource dimension value, which is an instance ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. +Regular expression matching: +^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*)|\*){1,256}$
+ |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
period + |
+Integer + |
+Monitoring period of a metric, in seconds. The default value is 0. For an event alarm, set this parameter to 0. 1 indicates the original aggregation period of a metric. For example, if the original aggregation period of an RDS metric is 60s, its data point is calculated every 60 seconds. For details about the original aggregation period of each cloud service metric, see Services Interconnected with Cloud Eye. 300 indicates that the metric aggregation period is 5 minutes. +The value can be: + + |
+
filter + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+Double + |
+Alarm threshold. Supported range: 0 to Number. MAX_VALUE (1.7976931348623157e+108) For detailed thresholds, see the value range of each metric in the appendix. For example, you can set ECS cpu_util to 80. +Minimum: 0 +Maximum: 1.7976931348623157e+108 + |
+
unit + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
count + |
+Integer + |
+Number of occurrences. +Minimum: 1 +Maximum: 180 + |
+
suppress_duration + |
+Integer + |
+Alarm suppression time, in seconds. This parameter corresponds to the last field in the alarm policy when an alarm rule is created on the Cloud Eye console. This field is used to avoid frequent alarms. 0 indicates that the alarm is not suppressed and alarms are generated as long as the conditions are met. 300 indicates that an alarm is generated every 5 minutes as long as the alarm triggering conditions are met. +The value can be: + +Regular expression matching: ^(0|300|600|900|1800|3600|10800|21600|43200|86400)$ + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
resource_id + |
+String + |
+Resource ID corresponding to the alarm record, for example, 22d98f6c-16d2-4c2d-b424-50e79d82838f. +Minimum: 0 +Maximum: 128 + |
+
resource_name + |
+String + |
+Resource name corresponding to the alarm record, for example, ECS-Test01. +Minimum: 0 +Maximum: 128 + |
+
event_id + |
+String + |
+ID of the event in the alarm record, for example, ev16031292300990kKN8p17J. +Minimum: 24 +Maximum: 24 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
type + |
+String + |
+Notification type. +The value can be: +notification: topic subscriptions. Notifications are sent using SMN topics. +contact: cloud account contacts. Notifications are sent to the mobile number and email address registered for your account. + |
+
notification_list + |
+Array of strings + |
+List of objects to be notified of alarm status changes. The value of topicUrn can be obtained from SMN. For details, see Querying Topics. When type is set to notification, notification_list cannot be left blank. If you set alarm_action_enabled to true, you must specify either alarm_actions or ok_actions. If alarm_actions and ok_actions coexist, their notification_list must be the same. +Array length: 0 to 20 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
time + |
+String + |
+UTC time when the resource monitoring data of the alarm record is reported. +Minimum: 1 +Maximum: 64 + |
+
value + |
+Double + |
+Resource monitoring data of the alarm record at the time point, for example, 7.019. +Minimum: 0 +Maximum: 1.7976931348623157E308 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying alarm records whose alarm_name is alarm-test01, and from and to are 2022-02-10T10:05:46+08:00.
+/v2/{project_id}/alarm-histories?limit=10&offset=0&from=2022-02-10T10:05:46+08:00&to=2022-02-10T12:05:46+08:00&name=alarm-test01
+Status code: 200
+Query succeeded.
+{
+ "alarm_histories" : [ {
+ "alarm_id" : "al1604473987569z6n6nkpm1",
+ "record_id" : "ah1655717086704DEnBrJ999",
+ "name" : "TC_CES_FunctionBaseline_Alarm_008",
+ "metric" : {
+ "namespace" : "SYS.VPC",
+ "dimensions" : [ {
+ "name" : "bandwidth_id",
+ "value" : "79a9cc0c-f626-4f15-bf99-a1f184107f88"
+ } ],
+ "metric_name" : "downstream_bandwidth"
+ },
+ "condition" : {
+ "period" : 1,
+ "filter" : "average",
+ "comparison_operator" : ">=",
+ "value" : 0,
+ "count" : 3,
+ "suppress_duration" : 3600
+ },
+ "level" : 2,
+ "type" : "ALL_INSTANCE",
+ "begin_time" : "2024-02-11T05:48:08+08:00",
+ "end_time" : "2024-02-11T08:48:08+08:00",
+ "action_enabled" : false,
+ "alarm_actions" : [ ],
+ "ok_actions" : [ ],
+ "status" : "alarm",
+ "data_points" : [ {
+ "time" : "2022-06-22T16:38:02+08:00",
+ "value" : 873.1507798960139
+ }, {
+ "time" : "2022-06-22T16:28:02+08:00",
+ "value" : 883.1507798960139
+ }, {
+ "time" : "2022-06-22T16:18:02+08:00",
+ "value" : 873.4
+ } ],
+ "additional_info" : {
+ "resource_id" : "",
+ "resource_name" : "",
+ "event_id" : ""
+ }
+ } ],
+ "count" : 103
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Query succeeded. + |
+
400 + |
+Parameter verification failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query alarm policies by alarm rule ID.
+GET /v2/{project_id}/alarms/{alarm_id}/policies
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
alarm_id + |
+Yes + |
+String + |
+Alarm rule ID. +Regular expression matching: ^al([0-9A-Za-z]){22}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
offset + |
+No + |
+Integer + |
+Pagination offset. +Minimum: 0 +Maximum: 10000 +Default: 0 +Regular expression matching: ^([0]|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|10000)$ + |
+
limit + |
+No + |
+Integer + |
+Number of records displayed on each page. +Minimum: 1 +Maximum: 100 +Default: 10 +Regular expression matching: ^([1-9]|[1-9][0-9]|100)$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+No + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+No + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
policies + |
+Array of ListPolicy objects + |
+Policy information. +Array length: 0 to 100 + |
+
count + |
+Integer + |
+Total number of policies in an alarm rule. +Minimum: 0 +Maximum: 100 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
metric_name + |
+String + |
+Metric name of a resource. The name must start with a letter and contain only digits, letters, and underscores (_). The length ranges from 1 to 64 characters. For example, cpu_util of an ECS indicates the CPU usage of the ECS. mongo001_command_ps in DDS indicates the command execution frequency. For details about the metric name of each service, see Service Metric Names. +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
extra_info + |
+MetricExtraInfo object + |
+Additional information about an alarm policy. This parameter is left blank by default. + |
+
period + |
+Integer + |
+Monitoring period of a metric, in seconds. The default value is 0. For an event alarm, set this parameter to 0. 1 indicates the original aggregation period of a metric. For example, if the original aggregation period of an RDS metric is 60s, its data point is calculated every 60 seconds. For details about the original aggregation period of each cloud service metric, see Services Interconnected with Cloud Eye. 300 indicates that the metric aggregation period is 5 minutes. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
filter + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+Number + |
+Alarm threshold. Supported range: 0 to Number.MAX_VALUE (1.7976931348623157e+108) For detailed thresholds, see the value range of each metric in the appendix. For example, you can set ECS cpu_util to 80. +Minimum: 0 +Maximum: 1.7976931348623157e+108 + |
+
unit + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
type + |
+String + |
+Alarm policy type. This parameter is left blank by default. +The value can be: + + NOTE:
+This parameter has been discarded. It has no impact on APIs. It is still retained in this document for compatibility with earlier versions. + |
+
count + |
+Integer + |
+Number of times that the alarm triggering conditions are met. For event alarms, the value ranges from 1 to 180. For metric and website alarms, the value can be 1, 2, 3, 4, 5, 10, 15, 30, 60, 90, 120, or 180. + |
+
suppress_duration + |
+Integer + |
+Alarm suppression time, in seconds. This parameter corresponds to the last field in the alarm policy when an alarm rule is created on the Cloud Eye console. This field is used to avoid frequent alarms. 0 indicates that the alarm is not suppressed and alarms are generated as long as the conditions are met. 300 indicates that an alarm is generated every 5 minutes as long as the alarm triggering conditions are met. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
level + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (informational). The default value is 2. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
origin_metric_name + |
+String + |
+Original metric name. +Minimum: 0 +Maximum: 64 + |
+
metric_prefix + |
+String + |
+Metric name prefix. +Minimum: 0 +Maximum: 8 + |
+
custom_proc_name + |
+String + |
+Name of a user process. +Minimum: 0 +Maximum: 64 + |
+
metric_type + |
+String + |
+Metric type. +Minimum: 0 +Maximum: 16 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying alarm policies of an alarm rule whose alarm_id is alCzk8o9dtSQHtiDgb44Eepw and limit is 10
+/v2/{project_id}/alarms/alCzk8o9dtSQHtiDgb44Eepw/policies?offset=0&limit=10
+Status code: 200
+Query succeeded.
+{
+ "policies" : [ {
+ "metric_name" : "disk_device_read_bytes_rate",
+ "extra_info" : { },
+ "period" : 1,
+ "filter" : "average",
+ "comparison_operator" : ">",
+ "value" : 75,
+ "unit" : "byte/s",
+ "count" : 3,
+ "type" : "",
+ "suppress_duration" : 10800,
+ "level" : 2
+ } ],
+ "count" : 10
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Query succeeded. + |
+
400 + |
+Parameter verification failed. + |
+
404 + |
+Alarm rule not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query resources in an alarm rule by its ID.
+GET /v2/{project_id}/alarms/{alarm_id}/resources
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
alarm_id + |
+Yes + |
+String + |
+Alarm rule ID. +Regular expression matching: al([a-z]|[A-Z]|[0-9]){22}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
offset + |
+No + |
+Integer + |
+Pagination offset. +Minimum: 0 +Maximum: 10000 +Default: 0 +Regular expression matching: ^([0]|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|10000)$ + |
+
limit + |
+No + |
+Integer + |
+Number of records displayed on each page. +Minimum: 1 +Maximum: 100 +Default: 10 +Regular expression matching: ^([1-9]|[1-9][0-9]|100)$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+No + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+No + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
resources + |
+Array of arrays of Dimension objects + |
+Resource information. +Array length: 0 to 1000 + |
+
count + |
+Integer + |
+Total number of resources. +Minimum: 0 +Maximum: 2147483647 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
name + |
+String + |
+Dimension of a resource. For example, the dimension of an ECS can be instance_id. A maximum of four dimensions are supported. For the metric dimension of each resource, see Service Metric Dimensions. +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
value + |
+String + |
+Resource dimension value, which is an instance ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. +Regular expression matching: +^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*)|\*){1,256}$
+ |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying resources of an alarm rule whose alarm_id is alCzk8o9dtSQHtiDgb44Eepw and limit is 10
+/v2/{project_id}/alarms/alCzk8o9dtSQHtiDgb44Eepw/resources?offset=0&limit=10
+Status code: 200
+Query succeeded.
+{
+ "resources" : [ [ {
+ "name" : "disk_name"
+ "value" : "4270ff17-aba3-4138-89fa-xxxxxxxxxxxx"
+ } ] ],
+ "count" : 10
+}
+
If the alarm rule applies to all resources types, the returned response will not include the value field.
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Query succeeded. + |
+
400 + |
+Parameter verification failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query alarm rules.
+GET /v2/{project_id}/alarms
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
alarm_id + |
+No + |
+String + |
+Alarm rule ID. +Regular expression matching: ^al([0-9A-Za-z]){22}$ + |
+
name + |
+No + |
+String + |
+Name of an alarm rule. The name allows 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-). +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
namespace + |
+No + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 0 +Maximum: 32 +Regular expression matching: ^((([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_)*\.([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_)*)|)$ + |
+
resource_id + |
+No + |
+String + |
+ID of a resource in an alarm rule. If the resource has multiple dimensions, the resource IDs are sorted in ascending alphabetical order and separated by commas (,). +Maximum: 700 +Regular expression matching: +^([a-z]|[A-Z]|[0-9]|_|-|:|,|\.|)+$+ |
+
enterprise_project_id + |
+No + |
+String + |
+Enterprise project ID. +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
offset + |
+No + |
+Integer + |
+Pagination offset. +Minimum: 0 +Maximum: 10000 +Default: 0 +Regular expression matching: ^([0]|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|10000)$ + |
+
limit + |
+No + |
+Integer + |
+Number of records displayed on each page. +Minimum: 1 +Maximum: 100 +Default: 10 +Regular expression matching: ^([1-9]|[1-9][0-9]|100)$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+No + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarms + |
+Array of alarms objects + |
+Alarm rule list. +Array length: 1 to 100 + |
+
count + |
+Integer + |
+Total number of alarm rules. +Minimum: 0 +Maximum: 10000 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_id + |
+String + |
+ID of an alarm rule, which starts with al and is followed by 22 characters of letters, digits, or a combination of both. + |
+
name + |
+String + |
+Name of an alarm rule. The name allows 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-). + |
+
description + |
+String + |
+Alarm rule description. The value can contain 0 to 256 characters. + |
+
namespace + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 0 +Maximum: 32 +Regular expression matching: ^((([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_)*\.([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_)*)|)$ + |
+
policies + |
+Array of Policy objects + |
+Alarm policies. +Array length: 1 to 100 + |
+
resources + |
+Array of ResourcesInListResp objects + |
+Resource list. Associated resources can be obtained by calling the API for querying resources in an alarm rule. +Array length: 1 to 3000 + |
+
type + |
+String + |
+Alarm rule type. +The value can be: +
|
+
enabled + |
+Boolean + |
+Whether to generate alarms when the alarm triggering conditions are met. + |
+
notification_enabled + |
+Boolean + |
+Whether to enable alarm notification. + |
+
alarm_notifications + |
+Array of Notification objects + |
+Action to be triggered by the alarm. Array length: 0 to 10 + |
+
ok_notifications + |
+Array of Notification objects + |
+Action to be triggered after an alarm is cleared. Array length: 0 to 10 + |
+
notification_begin_time + |
+String + |
+Time when the alarm notification was enabled. Example: 12:00 +Regular expression matching: ^([01][0-9]|2[0-3]):([0-5][0-9])$ + |
+
notification_end_time + |
+String + |
+Time when the alarm notification was disabled. Example: 12:00 +Regular expression matching: ^([01][0-9]|2[0-3]):([0-5][0-9])$ + |
+
enterprise_project_id + |
+String + |
+Enterprise project ID. The value allows 36 characters. It can only contain lowercase letters, hyphens (-), and underscores (_). You can customize an enterprise project ID. The value can also be 0 (default enterprise project ID). +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
alarm_template_id + |
+String + |
+ID of an alarm template associated with an alarm rule. If this parameter is specified, the policy associated with the alarm rule changes accordingly with the alarm template policy. +Minimum: 0 +Maximum: 64 +Regular expression matching: ^at([0-9A-Za-z]){0,62}$ + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
metric_name + |
+String + |
+Metric name of a resource. The name must start with a letter and contain only digits, letters, and underscores (_). The length ranges from 1 to 64 characters. For example, cpu_util of an ECS indicates the CPU usage of the ECS. mongo001_command_ps in DDS indicates the command execution frequency. For details about the metric name of each service, see Service Metric Names. +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
period + |
+Integer + |
+Metric period, in seconds. +The default value is 0. For an event alarm, set this parameter to 0. 1 indicates the original aggregation period of a metric. For example, if the original aggregation period of an RDS metric is 60s, its data point is calculated every 60 seconds. For details about the original aggregation period of each cloud service metric, see Services Interconnected with Cloud Eye. 300 indicates that the metric aggregation period is 5 minutes. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
filter + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+Number + |
+Alarm threshold. Supported range: 0 to Number.MAX_VALUE (1.7976931348623157e+108) For detailed thresholds, see the value range of each metric in the appendix. For example, you can set ECS cpu_util to 80. +Minimum: 0 +Maximum: 1.7976931348623157e+108 + |
+
hierarchical_value + |
+Object + |
+Multi-level alarm threshold. This parameter is not required for the current version. + |
+
unit + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
count + |
+Integer + |
+Number of times that the alarm triggering conditions are met. +For event alarms, the value ranges from 1 to 180. For metric and website alarms, the value can be 1, 2, 3, 4, 5, 10, 15, 30, 60, 90, 120, or 180. + |
+
suppress_duration + |
+Integer + |
+Alarm suppression time, in seconds. This parameter corresponds to the last field in the alarm policy when an alarm rule is created on the Cloud Eye console. This field is used to avoid frequent alarms. 0 indicates that the alarm is not suppressed and alarms are generated as long as the conditions are met. 300 indicates that an alarm is generated every 5 minutes as long as the alarm triggering conditions are met. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
level + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (informational). The default value is 2. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
resource_group_id + |
+String + |
+Resource group ID. This parameter is available when the monitoring scope is set to Resource groups. +Regular expression matching: ^rg([a-z]|[A-Z]|[0-9]){22}$ + |
+
resource_group_name + |
+String + |
+Resource group name. This parameter is available when the monitoring scope is set to Resource groups. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
dimensions + |
+Array of MetricDimension objects + |
+Dimension information. +Array length: 0 to 10000 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
name + |
+String + |
+Metric dimension name. +Minimum: 1 +Maximum: 32 +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
value + |
+String + |
+Metric dimension value. +Minimum: 0 +Maximum: 256 +Regular expression matching: ^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-)*)|){0,256}$ + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
type + |
+String + |
+Notification type. +The value can be: +notification: topic subscriptions. Notifications are sent using SMN topics. +contact: cloud account contact. Notifications are sent to the mobile number and email address registered for your account. + |
+
notification_list + |
+Array of strings + |
+List of objects to be notified of alarm status changes. The value of topicUrn can be obtained from SMN. For details, see section Querying Topics. When type is set to notification, notification_list cannot be left blank. If you set alarm_action_enabled to true, you must specify either alarm_actions or ok_actions. If alarm_actions and ok_actions coexist, their notification_list must be the same. +Array length: 0 to 20 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying alarm rules
+/v2/{project_id}/alarms?offset=0&limit=10
+Status code: 200
+Query succeeded.
+{
+ "alarms" : [ {
+ "alarm_id" : "al16558829757444BVVxr999",
+ "name" : "alarm01",
+ "description" : "",
+ "namespace" : "SYS.ECS",
+ "policies" : [ {
+ "metric_name" : "disk_device_read_bytes_rate",
+ "period" : 1,
+ "filter" : "average",
+ "comparison_operator" : ">",
+ "value" : 75,
+ "hierarchical_value": {},
+ "unit" : "byte/s",
+ "count" : 3,
+ "suppress_duration" : 10800,
+ "level" : 2
+ } ],
+ "resources" : [ {
+ "dimensions" : [ {
+ "name" : "disk_name"
+ } ]
+ } ],
+ "type" : "ALL_INSTANCE",
+ "enabled" : true,
+ "notification_enabled" : true,
+ "alarm_notifications" : [ {
+ "type" : "notification",
+ "notification_list" : [ "urn:smn:xxx:xxx70e7359:topic_xxx" ]
+ } ],
+ "ok_notifications" : [ {
+ "type" : "notification",
+ "notification_list" : [ "urn:smn:xxx:xxx70e7359:topic_xxx" ]
+ } ],
+ "notification_begin_time" : "00:00",
+ "notification_end_time" : "23:59",
+ "enterprise_project_id" : 0
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Query succeeded. + |
+
400 + |
+Parameter verification failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query alarm rules associated with an alarm template.
+GET /v2/{project_id}/alarm-templates/{template_id}/association-alarms
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
template_id + |
+Yes + |
+String + |
+ID of an alarm template. The ID starts with at and is followed by letters, digits, or a combination of both. The value can contain a maximum of 64 characters. +Minimum: 2 +Maximum: 64 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
offset + |
+No + |
+Integer + |
+Start position for pagination query, indicating the sequence number of the data record where the query starts. The default value is 0. +Minimum: 0 +Maximum: 10000 + |
+
limit + |
+No + |
+Integer + |
+Maximum number of query results. The value ranges from 1 to 100 (default). +Minimum: 1 +Maximum: 100 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarms + |
+Array of alarms objects + |
+Alarm rule list. +Array length: 0 to 100 + |
+
count + |
+Integer + |
+Total number of alarm rules. +Minimum: 0 +Maximum: 1000 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_id + |
+String + |
+Alarm rule ID. +Regular expression matching: ^al([0-9A-Za-z]){22}$ + |
+
name + |
+String + |
+Alarm rule name. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
description + |
+String + |
+Description of the alarm rule. +Minimum: 0 +Maximum: 256 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying alarm rules associated with an alarm template
+/v2/{project_id}/alarm-templates/{template_id}/association-alarms
+Status code: 200
+OK
+{
+ "alarms" : [ {
+ "alarm_id" : "al12345678901234567890",
+ "name" : "test",
+ "description": "Alarm rule list."
+ } ],
+ "count" : 100
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query alarm templates.
+GET /v2/{project_id}/alarm-templates
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
offset + |
+No + |
+Integer + |
+Start position for pagination query, indicating the sequence number of the data record where the query starts. The default value is 0. +Minimum: 0 +Maximum: 10000 + |
+
limit + |
+No + |
+Integer + |
+Maximum number of query results. The value ranges from 1 to 100 (default). +Minimum: 1 +Maximum: 100 + |
+
namespace + |
+No + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. +Minimum: 3 +Maximum: 32 +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_)*\.([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_)*$ + |
+
dim_name + |
+No + |
+String + |
+Resource dimension, which must start with a letter. A dimension allows a maximum of 32 characters can only contain digits, letters, underscores (_), and hyphens (-). If there are multiple dimensions, use commas (,) to separate them. +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){0,31}(,([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){0,31}){0,3}$ + |
+
template_type + |
+No + |
+String + |
+Alarm template type. system indicates default alarm templates for metrics, custom indicates the custom alarm templates for metrics, system_event indicates default event templates, custom_event indicates the custom event templates, and system_custom_event indicates all default and custom event templates. If this parameter is not specified, all metric templates are returned. +The value can be: + + |
+
template_name + |
+No + |
+String + |
+Alarm template name. It must start with a letter and can contain letters, digits, underscores (_), hyphens (-), parentheses, and periods (.). Fuzzy match is supported. +Minimum: 1 +Maximum: 128 +Regular expression matching: +^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-|\(|\)|\.|\s)+$+ |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_templates + |
+Array of AlarmTemplates objects + |
+Alarm template list. +Array length: 0 to 100 + |
+
count + |
+Integer + |
+Total number of alarm templates. +Minimum: 0 +Maximum: 9999999 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
template_id + |
+String + |
+ID of an alarm template. The ID starts with at and is followed by letters, digits, or a combination of both. The value can contain a maximum of 64 characters. + |
+
template_name + |
+String + |
+Alarm template name. It must start with a letter and can contain letters, digits, underscores (_), hyphens (-), parentheses, and periods (.). Fuzzy match is supported. +Minimum: 1 +Maximum: 128 +Regular expression matching: +^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-|\(|\)|\.|\s)+$+ |
+
template_type + |
+String + |
+Type of an alarm template. custom indicates custom alarm templates, and system indicates default alarm templates. +The value can be: + + |
+
create_time + |
+String + |
+Time when an alarm template was created. The value is in the 2006-01-02T15:04:05.000Z format. + |
+
template_description + |
+String + |
+Supplementary information about an alarm template. The description can contain 0 to 256 characters and is left blank by default. + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying alarm templates
+/v2/{project_id}/alarm-templates?offset=0&limit=100
+Status code: 200
+OK
+{
+ "alarm_templates" : [ {
+ "template_id" : "at1628592157541dB1klWgY6",
+ "template_name" : "my_template",
+ "template_type" : "custom",
+ "create_time" : "2006-01-02T15:04:05.000Z",
+ "template_description" : "hello world"
+ } ],
+ "count" : 100
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query dashboards.
+GET /v2/{project_id}/dashboards
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
is_favorite + |
+No + |
+Boolean + |
+Whether a dashboard in an enterprise project is added to favorites. The value can be true (added to favorites) and false (not added to favorites). If this parameter is specified, enterprise_id is mandatory. + |
+
dashboard_name + |
+No + |
+String + |
+Dashboard name. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
dashboard_id + |
+No + |
+String + |
+Dashboard ID. +Regular expression matching: ^db([a-z]|[A-Z]|[0-9]){22} + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
dashboards + |
+Array of DashBoardInfo objects + |
+Dashboard list. +Array length: 0 to 10 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
dashboard_id + |
+String + |
+Dashboard ID. +Regular expression matching: ^db([a-z]|[A-Z]|[0-9]){22} + |
+
dashboard_name + |
+String + |
+Custom dashboard name. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
enterprise_id + |
+String + |
+Enterprise project ID. +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
creator_name + |
+String + |
+Name of the user who created the dashboard. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
create_time + |
+Long + |
+Time when the dashboard was created. The value is a timestamp, in milliseconds. +Minimum: 1111111111111 +Maximum: 9999999999999 + |
+
row_widget_num + |
+Integer + |
+How a graph is displayed. 0 indicates that you can customize top and left of the graph. 1 indicates one graph per row. +Minimum: 0 +Maximum: 3 +Default: 3 + |
+
is_favorite + |
+Boolean + |
+Whether a dashboard is added to favorites. The value can be true or false. + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
None
+Status code: 200
+OK
+{
+ "dashboards" : [ {
+ "dashboard_id" : "dbxxxxxxxxxxxxxxxxxxxxxx",
+ "dashboard_name" : "dashboard_name",
+ "enterprise_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
+ "creator_name" : "creator_name",
+ "create_time" : 1111111111111,
+ "row_widget_num" : 3,
+ "is_favorite" : false
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+The server failed to process the request. + |
+
401 + |
+Token authentication is required. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query alarm rules for one service in one-click monitoring.
+GET /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/alarms
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
one_click_alarm_id + |
+Yes + |
+String + |
+One-click monitoring ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^([a-z]|[A-Z]|[0-9]){1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarms + |
+Array of alarms objects + |
+Alarm rule list. +Array length: 1 to 100 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_id + |
+String + |
+ID of an alarm rule, which starts with al and is followed by 22 characters of letters, digits, or a combination of both. + |
+
name + |
+String + |
+Name of an alarm rule. The name allows 1 to 128 characters and can only contain letters, digits, underscores (_), and hyphens (-). + |
+
description + |
+String + |
+Alarm rule description. The value can contain 0 to 256 characters. + |
+
namespace + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). + |
+
policies + |
+Array of Policy objects + |
+Alarm policies. +Array length: 1 to 100 + |
+
resources + |
+Array of Resources object + |
+Resource list. Associated resources can be obtained by calling the API for querying resources in an alarm rule. +Array length: 1 to 3000 + |
+
type + |
+String + |
+Alarm rule type. +The value can be: +
|
+
enabled + |
+Boolean + |
+Whether to generate alarms when the alarm triggering conditions are met. + |
+
notification_enabled + |
+Boolean + |
+Whether to enable alarm notifications. + |
+
alarm_notifications + |
+Array of Notification objects + |
+Action to be triggered by the alarm. Array length: 0 to 10 + |
+
ok_notifications + |
+Array of Notification objects + |
+Action to be triggered after an alarm is cleared. Array length: 0 to 10 + |
+
notification_begin_time + |
+String + |
+Time when the alarm notification was enabled. Example: 09:00 +Regular expression matching: ^([1][0-9]|2[0-3]):([0-5][0-9])$ + |
+
notification_end_time + |
+String + |
+Time when the alarm notification was disabled. Example: 12:00 +Regular expression matching: ^([1][0-9]|2[0-3]):([0-5][0-9])$ + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
alarm_policy_id + |
+String + |
+Alarm policy ID. +Regular expression matching: ^([a-z]|[A-Z]|[0-9]|-)+$ + |
+
metric_name + |
+String + |
+Metric name of a resource. For details about the metrics of each service, see Service Metric Names. The value must start with a letter and can only contain digits, letters, underscores (_), and hyphens (-). It allows 1 to 96 characters. For example, the ECS metric cpu_util indicates the CPU usage of an ECS. The DDS metric mongo001_command_ps indicates the command execution frequency. +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
period + |
+Integer + |
+How often to generate an alarm, in seconds. 1 indicates that alarms are generated based on raw data. When alarm_type is EVENT.SYS or EVENT.CUSTOM, the value may be 0. +The value can be: + + |
+
filter + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+Number + |
+Alarm threshold. Supported range: 0 to Number. MAX_VALUE (1.7976931348623157e+108) For detailed thresholds, see the value range of each metric in the appendix. For example, you can set ECS cpu_util to 80. +Minimum: 0 +Maximum: 1.7976931348623157e+108 + |
+
unit + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
count + |
+Integer + |
+Number of times that the alarm triggering conditions are met. Value range: 1 to 180 + |
+
suppress_duration + |
+Integer + |
+Suppression period, in seconds. 0 indicates that only one alarm is generated. +The value can be: + + |
+
level + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (warning). + |
+
enabled + |
+Boolean + |
+Whether to enable the function. + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
resource_group_id + |
+String + |
+Resource group ID. This parameter is available when the monitoring scope is Resource groups. +Regular expression matching: ^rg([a-z]|[A-Z]|[0-9]){22}$ + |
+
resource_group_name + |
+String + |
+Resource group name. This parameter is available when the monitoring scope is set to Resource groups. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
dimensions + |
+Array of Dimensions objects + |
+Dimension information. +Array length: 0 to 10000 + |
+
Parameter + |
+Description + |
+
|---|---|
name + |
+Metric dimension name. +Minimum: 1 +Maximum: 32 +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
type + |
+String + |
+Notification type. +The value can be: +notification: topic subscriptions. Notifications are sent using SMN topics. +contact: cloud account contacts. Notifications are sent using the mobile number and email address registered for your account. + |
+
notification_list + |
+Array of strings + |
+List of objects to be notified of alarm status changes. The value of topicUrn can be obtained from SMN. For details, see section Querying Topics. If type is set to notification, the value of notificationList cannot be empty. If type is set to autoscaling, the value of notificationList must be empty. If you set alarm_action_enabled to true, you must specify either alarm_actions or ok_actions. If alarm_actions and ok_actions coexist, their notificationList must be the same. +Array length: 0 to 20 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Query alarm rules of a service in one-click monitoring.
+GET /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/alarms
+Status code: 200
+OK
+{
+ "alarms" : [ {
+ "alarm_id" : "al123232232341232132",
+ "name" : "alarm1",
+ "description" : "hello world",
+ "namespace" : "SYS.ECS",
+ "policies" : [ {
+ "alarm_policy_id" : "alxdxxxdsw12321321",
+ "metric_name" : "cpu_util",
+ "period" : 0,
+ "filter" : "max",
+ "comparison_operator" : "",
+ "value" : 1.7976931348623156E108,
+ "unit" : "%",
+ "count" : 100,
+ "suppress_duration" : 0,
+ "level" : 2,
+ "enabled" : true
+ } ],
+ "resources" : [ {
+ "dimensions" : [ {
+ "name" : "string",
+ "value" : "string"
+ } ]
+ } ],
+ "type" : "EVENT.SYS",
+ "enabled" : true,
+ "notification_enabled" : true,
+ "alarm_notifications" : [ {
+ "type" : "notification",
+ "notification_list" : [ "urn:smn:123" ]
+ } ],
+ "ok_notifications" : [ {
+ "type" : "notification",
+ "notification_list" : [ "urn:smn:123" ]
+ } ],
+ "notification_begin_time" : "00:00",
+ "notification_end_time" : "23:59"
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query services and resources in one-click monitoring.
+GET /v2/{project_id}/one-click-alarms
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
one_click_alarms + |
+Array of one_click_alarms objects + |
+Services and resources in one-click monitoring. +Array length: 1 to 1000 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
one_click_alarm_id + |
+String + |
+One-click monitoring ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^([a-z]|[A-Z]|[0-9]){1,64}$ + |
+
namespace + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. The values of service and item must start with a letter and can only contain letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
description + |
+String + |
+Supplementary information about one-click monitoring. The description can contain 0 to 256 characters and is left blank by default. + |
+
enabled + |
+Boolean + |
+Whether to enable one-click monitoring. + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Query services and resources that support one-click monitoring.
+GET /v2/{project_id}/one-click-alarms
+Status code: 200
+OK
+{
+ "one_click_alarms" : [ {
+ "one_click_alarm_id" : "o1234567890123456789012",
+ "namespace" : "SYS.ECS",
+ "description" : "hello world",
+ "enabled" : true
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query resource groups.
+GET /v2/{project_id}/resource-groups
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
enterprise_project_id + |
+No + |
+String + |
+ID of the enterprise project that a resource group belongs to. +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
group_name + |
+No + |
+String + |
+Resource group name. Fuzzy search is supported. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
group_id + |
+No + |
+String + |
+Resource group ID. The value starts with rg and is followed by 22 characters of letters, digits, or a combination of both. +Minimum: 24 +Maximum: 24 + |
+
offset + |
+No + |
+Integer + |
+Start position for pagination query, indicating the sequence number of the data record where the query starts. The default value is 0. +Minimum: 0 +Maximum: 10000 + |
+
limit + |
+No + |
+Integer + |
+Number of items on each page during pagination query. The value ranges from 1 to 100 (default). +Minimum: 1 +Maximum: 100 + |
+
type + |
+No + |
+String + |
+Method for adding resources to a resource group. The value can only be EPS (synchronizing resources from enterprise projects), TAG (dynamic tag matching), or Manual (manually adding resources). If this parameter is not specified, all resource groups are queried. +The value can be: + + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
count + |
+Integer + |
+Total number of resource groups. +Minimum: 0 +Maximum: 1000 + |
+
resource_groups + |
+Array of OneResourceGroupResp objects + |
+Resource group list. +Array length: 0 to 100 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
group_name + |
+String + |
+Resource group name. +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
group_id + |
+String + |
+Resource group ID. The value starts with rg and is followed by 22 characters of letters, digits, or a combination of both. +Minimum: 24 +Maximum: 24 + |
+
create_time + |
+String + |
+Time when the resource group was created. The value is in the 2006-01-02T15:04:05.000Z format. + |
+
enterprise_project_id + |
+String + |
+ID of the enterprise project that a resource group belongs to. +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
type + |
+String + |
+Method for adding resources to a resource group. The value can only be EPS (synchronizing resources from enterprise projects), TAG (dynamic tag matching), or Manual (manually adding resources). +The value can be: + + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying resource groups
+/v2/{project_id}/resource-groups?offset=0&limit=100
+Status code: 200
+OK
+{
+ "resource_groups" : [ {
+ "group_name" : "group1",
+ "create_time" : "2006-01-02T15:04:05.000Z",
+ "group_id" : "rg1761380163308Dxxxxxxxx",
+ "enterprise_project_id" : "0",
+ "type" : "Manual"
+ }, {
+ "group_name" : "band",
+ "type" : "EPS",
+ "create_time" : "2006-01-02T15:04:05.000Z",
+ "group_id" : "rg1761380163309Dxxxxxxxx",
+ "enterprise_project_id" : "d61d4705-5658-42f5-8e0c-70eb34d17b02"
+ }, {
+ "group_name" : "group2",
+ "type" : "TAG",
+ "create_time" : "2006-01-02T15:04:05.000Z",
+ "group_id" : "rg1761380163310Dxxxxxxxx",
+ "enterprise_project_id" : "0"
+ } ],
+ "count" : 3
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query resources of a specified dimension for a specified resource type in a resource group.
+GET /v2/{project_id}/resource-groups/{group_id}/services/{service}/resources
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
group_id + |
+Yes + |
+String + |
+Resource group ID. The value starts with rg and is followed by 22 characters of letters, digits, or a combination of both. +Minimum: 24 +Maximum: 24 + |
+
service + |
+Yes + |
+String + |
+Service type, for example, SYS.ECS. +Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
dim_name + |
+No + |
+String + |
+Resource dimension information. If there are multiple dimensions, they are sorted in alphabetical order and separated by commas (,). This parameter must be used together with namespace. +Regular expression matching: +^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-|,)*$
+ |
+
limit + |
+No + |
+String + |
+Number of items on each page during pagination query. The value ranges from 1 to 1000. The default value is 100. +Minimum: 1 +Maximum: 1000 + |
+
offset + |
+No + |
+Integer + |
+Start position for pagination query, indicating the sequence number of the data record where the query starts. The default value is 0. +Minimum: 0 +Maximum: 10000 + |
+
status + |
+No + |
+String + |
+Resource health status. +The value can be: + + |
+
dim_value + |
+No + |
+String + |
+Resource dimension value. Fuzzy match is not supported. If a resource has multiple dimensions, you can specify one of them. +Minimum: 1 +Maximum: 256 +Regular expression matching: +^([a-z]|[A-Z]|[0-9]|\*|_){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*$
+ |
+
extend_relation_id + |
+No + |
+String + |
+Enterprise project ID. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
count + |
+Integer + |
+Total number of resources. +Minimum: 0 +Maximum: 10000 + |
+
resources + |
+Array of GetResourceGroupResources objects + |
+Resources in a resource group. +Array length: 0 to 100 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
status + |
+String + |
+Resource health status. +The value can be: + + |
+
dimensions + |
+Array of Dimension objects + |
+Resource dimension information. +Array length: 1 to 4 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
name + |
+String + |
+Dimension of a resource. For example, the dimension of an ECS can be instance_id. A maximum of four dimensions are supported. For the metric dimension of each resource, see Service Metric Dimensions. +Regular expression matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-){1,32}$ + |
+
value + |
+String + |
+Resource dimension value, which is an instance ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. +Regular expression matching: +^((([a-z]|[A-Z]|[0-9]){1}([a-z]|[A-Z]|[0-9]|_|-|\.)*)|\*){1,256}$
+ |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying resources of a specified dimension for a specified resource type in a resource group.
+/v2/{project_id}/resource-groups/{group_id}/services/{service}/resources
+Status code: 200
+OK
+{
+ "count" : 1000,
+ "resources" : [ {
+ "status" : "health",
+ "dimensions" : [ {
+ "name" : "instance_id",
+ "value" : "4270ff17-aba3-4138-89fa-820594c39755"
+ } ]
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query details of an alarm template.
+GET /v2/{project_id}/alarm-templates/{template_id}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
template_id + |
+Yes + |
+String + |
+ID of an alarm template. The ID starts with at and is followed by letters, digits, or a combination of both. The value can contain a maximum of 64 characters. +Minimum: 2 +Maximum: 64 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
template_id + |
+String + |
+ID of an alarm template. The ID starts with at and is followed by letters, digits, or a combination of both. The value can contain a maximum of 64 characters. + |
+
template_name + |
+String + |
+Alarm template name. It must start with a letter and can contain letters, digits, underscores (_), hyphens (-), parentheses, and periods (.). Fuzzy match is supported. +Minimum: 1 +Maximum: 128 +Regular expression matching: +^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-|\(|\)|\.|\s)+$+ |
+
template_type + |
+String + |
+Type of an alarm template. custom indicates custom alarm templates, and system indicates default alarm templates. +The value can be: + + |
+
create_time + |
+String + |
+Time when an alarm template was created. The value is in the 2006-01-02T15:04:05.000Z format. + |
+
template_description + |
+String + |
+Supplementary information about an alarm template. The description can contain 0 to 256 characters and is left blank by default. + |
+
policies + |
+Array of policies objects + |
+Alarm policies in an alarm template. +Array length: 1 to 50 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
namespace + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
dimension_name + |
+String + |
+Resource dimension, which must start with a letter. A dimension allows a maximum of 32 characters can only contain digits, letters, underscores (_), and hyphens (-). If there are multiple dimensions, use commas (,) to separate them. DimensionName in event alarm templates must be left blank. + |
+
metric_name + |
+String + |
+Metric name of a resource. For details about the metrics of each service, see Service Metric Names. The value must start with a letter and can only contain digits, letters, underscores (_), and hyphens (-). It allows 1 to 96 characters. For example, the ECS metric cpu_util indicates the CPU usage of an ECS. The DDS metric mongo001_command_ps indicates the command execution frequency. +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
period + |
+Integer + |
+Interval (seconds) for checking whether the alarm rule conditions are met. +The value can be: + + |
+
filter + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+Number + |
+Alarm threshold. +Minimum: 0 +Maximum: 2.34854258277383E108 + |
+
unit + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
count + |
+Integer + |
+Number of consecutive alarm triggering times. For event alarms, the value ranges from 1 to 180. For metric and website alarms, the value can be 1, 2, 3, 4, 5, 10, 15, 30, 60, 90, 120, or 180. + |
+
alarm_level + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (warning). The default value is 2. + |
+
suppress_duration + |
+Integer + |
+Alarm suppression period, in seconds. When the period is 0, only one alarm is generated. +The value can be: + + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying details of an alarm template
+/v2/{project_id}/alarm-templates/{template_id}
+Status code: 200
+OK
+{
+ "template_id" : "at1628592157541dB1klWgY6",
+ "template_name" : "my_template",
+ "template_type" : "custom",
+ "create_time" : "2006-01-02T15:04:05.000Z",
+ "template_description" : "hello world",
+ "policies" : [ {
+ "namespace" : "SYS.ECS",
+ "dimension_name" : "instance_id",
+ "metric_name" : "cpu_util",
+ "period" : 300,
+ "filter" : "sum",
+ "comparison_operator" : ">",
+ "value" : 2,
+ "unit" : "bit/s",
+ "count" : 2,
+ "alarm_level" : 2,
+ "suppress_duration" : 300
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to query details of a resource group.
+GET /v2/{project_id}/resource-groups/{group_id}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
group_id + |
+Yes + |
+String + |
+Resource group ID. The value starts with rg and is followed by 22 characters of letters, digits, or a combination of both. +Minimum: 24 +Maximum: 24 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
group_name + |
+String + |
+Resource group name. +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
group_id + |
+String + |
+Resource group ID. The value starts with rg and is followed by 22 characters of letters, digits, or a combination of both. +Minimum: 24 +Maximum: 24 + |
+
create_time + |
+String + |
+Time when the resource group was created. The value is in the 2006-01-02T15:04:05.000Z format. + |
+
enterprise_project_id + |
+String + |
+ID of the enterprise project that a resource group belongs to. +Regular expression matching: ^((([a-z]|[0-9]){8}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){4}-([a-z]|[0-9]){12})|0)$ + |
+
type + |
+String + |
+Method for adding resources to a resource group. The value can only be EPS (synchronizing resources from enterprise projects), TAG (dynamic tag matching), or Manual (manually adding resources). +The value can be: + + |
+
association_ep_ids + |
+Array of strings + |
+ID of the enterprise project from which resources in the resource group come. This parameter is mandatory when type is set to EPS. +Array length: 1 to 10 + |
+
tags + |
+Array of ResourceGroupTagRelation objects + |
+Associated tag during dynamic tag matching. This parameter must be specified when type is set to TAG. +Array length: 1 to 10 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
key + |
+String + |
+Tag key. +Minimum: 1 +Maximum: 36 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
value + |
+String + |
+Tag value. +Minimum: 0 +Maximum: 43 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|\.|_|-)*$ + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Querying details of a specified resource group
+/v2/{project_id}/resource-groups/{group_id}
+Status code: 200
+OK
+{
+ "group_name" : "band",
+ "type" : "TAG",
+ "tags" : [ {
+ "key" : "Resource",
+ "value" : "VPC"
+ }, {
+ "key" : "Usage",
+ "value" : "Tmp"
+ } ],
+ "create_time" : "2006-01-02T15:04:05.000Z",
+ "group_id" : "rg1761380163308Dxxxxxxxx",
+ "enterprise_project_id" : "0"
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+OK + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to modify alarm policies in an alarm rule.
+PUT /v2/{project_id}/alarms/{alarm_id}/policies
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
alarm_id + |
+Yes + |
+String + |
+Alarm rule ID. +Regular expression matching: ^al([0-9A-Za-z]){22}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+No + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+No + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
policies + |
+Yes + |
+Array of UpdatePolicy objects + |
+Policy information. +Array length: 1 to 50 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
metric_name + |
+Yes + |
+String + |
+Metric name of a resource. The name must start with a letter and contain only digits, letters, and underscores (_). The length ranges from 1 to 64 characters. For example, cpu_util of an ECS indicates the CPU usage of the ECS. mongo001_command_ps in DDS indicates the command execution frequency. For details about the metric name of each service, see Service Metric Names. +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
period + |
+Yes + |
+Integer + |
+Monitoring period of a metric, in seconds. The default value is 0. For an event alarm, set this parameter to 0. 1 indicates the original aggregation period of a metric. For example, if the original aggregation period of an RDS metric is 60s, its data point is calculated every 60 seconds. For details about the original aggregation period of each cloud service metric, see Services Interconnected with Cloud Eye. 300 indicates that the metric aggregation period is 5 minutes. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
filter + |
+Yes + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+Yes + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+No + |
+Number + |
+Alarm threshold. Supported range: 0 to Number.MAX_VALUE (1.7976931348623157e+108) For detailed thresholds, see the value range of each metric in the appendix. For example, you can set ECS cpu_util to 80. +Minimum: 0 +Maximum: 1.7976931348623157e+108 + |
+
unit + |
+No + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
count + |
+Yes + |
+Integer + |
+Number of times that the alarm triggering conditions are met. For event alarms, the value ranges from 1 to 180. For metric and website alarms, the value can be 1, 2, 3, 4, 5, 10, 15, 30, 60, 90, 120, or 180. + |
+
suppress_duration + |
+No + |
+Integer + |
+Alarm suppression time, in seconds. This parameter corresponds to the last field in the alarm policy when an alarm rule is created on the Cloud Eye console. This field is used to avoid frequent alarms. 0 indicates that the alarm is not suppressed and alarms are generated as long as the conditions are met. 300 indicates that an alarm is generated every 5 minutes as long as the alarm triggering conditions are met. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
level + |
+No + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (informational). The default value is 2. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
policies + |
+Array of UpdatePolicy objects + |
+Policy information. +Array length: 1 to 50 + |
+
Parameter + |
+Type + |
+Description + |
+
|---|---|---|
metric_name + |
+String + |
+Metric name of a resource. The name must start with a letter and contain only digits, letters, and underscores (_). The length ranges from 1 to 64 characters. For example, cpu_util of an ECS indicates the CPU usage of the ECS. mongo001_command_ps in DDS indicates the command execution frequency. For details about the metric name of each service, see Service Metric Names. +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
period + |
+Integer + |
+Monitoring period of a metric, in seconds. The default value is 0. For an event alarm, set this parameter to 0. 1 indicates the original aggregation period of a metric. For example, if the original aggregation period of an RDS metric is 60s, its data point is calculated every 60 seconds. For details about the original aggregation period of each cloud service metric, see Services Interconnected with Cloud Eye. 300 indicates that the metric aggregation period is 5 minutes. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
filter + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+Number + |
+Alarm threshold. Supported range: 0 to Number.MAX_VALUE (1.7976931348623157e+108) For detailed thresholds, see the value range of each metric in the appendix. For example, you can set ECS cpu_util to 80. +Minimum: 0 +Maximum: 1.7976931348623157e+108 + |
+
unit + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
type + |
+String + |
+Alarm policy type. This parameter is left blank by default. +The value can be: + + NOTE:
+This parameter has been discarded. It has no impact on APIs. It is still retained in this document for compatibility with earlier versions. + |
+
count + |
+Integer + |
+Number of times that the alarm triggering conditions are met. For event alarms, the value ranges from 1 to 180. For metric and website alarms, the value can be 1, 2, 3, 4, 5, 10, 15, 30, 60, 90, 120, or 180. + |
+
suppress_duration + |
+Integer + |
+Alarm suppression time, in seconds. This parameter corresponds to the last field in the alarm policy when an alarm rule is created on the Cloud Eye console. This field is used to avoid frequent alarms. 0 indicates that the alarm is not suppressed and alarms are generated as long as the conditions are met. 300 indicates that an alarm is generated every 5 minutes as long as the alarm triggering conditions are met. +Minimum: 0 +Maximum: 86400 +The value can be: + + |
+
level + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (informational). The default value is 2. + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Modifying an alarm policy whose metric_name is disk_device_read_bytes_rate
+{
+ "policies" : [ {
+ "metric_name" : "disk_device_read_bytes_rate",
+ "period" : 1,
+ "filter" : "average",
+ "comparison_operator" : ">",
+ "value" : 75,
+ "unit" : "byte/s",
+ "count" : 3,
+ "suppress_duration" : 10800,
+ "level" : 2
+ } ]
+}
+Status code: 200
+Modification succeeded.
+{
+ "policies" : [ {
+ "metric_name" : "disk_device_read_bytes_rate",
+ "period" : 1,
+ "filter" : "average",
+ "comparison_operator" : ">",
+ "value" : 75,
+ "unit" : "byte/s",
+ "count" : 3,
+ "type" : "",
+ "suppress_duration" : 10800,
+ "level" : 2
+ } ]
+}
+Status Code + |
+Description + |
+
|---|---|
200 + |
+Modification succeeded. + |
+
400 + |
+Parameter verification failed. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to modify a custom alarm template.
+PUT /v2/{project_id}/alarm-templates/{template_id}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
template_id + |
+Yes + |
+String + |
+ID of an alarm template. +Minimum: 2 +Maximum: 64 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
template_name + |
+Yes + |
+String + |
+Alarm template name. It must start with a letter and can contain letters, digits, underscores (_), hyphens (-), parentheses, and periods (.). Fuzzy match is supported. +Minimum: 1 +Maximum: 128 +Regular expression matching: +^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-|\(|\)|\.|\s)+$+ |
+
template_type + |
+No + |
+Integer + |
+Type of a custom alarm template. +The value can be: + + |
+
template_description + |
+No + |
+String + |
+Supplementary information about an alarm template. The description can contain 0 to 256 characters and is left blank by default. + |
+
policies + |
+Yes + |
+Array of Policies objects + |
+Alarm policies in an alarm template. +Array length: 1 to 50 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
namespace + |
+Yes + |
+String + |
+Namespace of a service. For details about the namespace of each service, see Service Namespaces. The namespace must be in the service.item format and contain 3 to 32 characters. service and item must start with a letter and can contain only letters, digits, and underscores (_). +Minimum: 3 +Maximum: 32 + |
+
dimension_name + |
+No + |
+String + |
+Resource dimension, which must start with a letter. A dimension allows a maximum of 32 characters can only contain digits, letters, underscores (_), and hyphens (-). If there are multiple dimensions, use commas (,) to separate them. DimensionName in event alarm templates must be left blank. + |
+
metric_name + |
+Yes + |
+String + |
+Metric name of a resource. For details about the metrics of each service, see Service Metric Names. The value must start with a letter and can only contain digits, letters, underscores (_), and hyphens (-). It allows 1 to 96 characters. For example, the ECS metric cpu_util indicates the CPU usage of an ECS. The DDS metric mongo001_command_ps indicates the command execution frequency. +Regular expression matching: ^([A-Za-z]){1}([0-9A-Za-z]|_|-)*$ + |
+
period + |
+Yes + |
+Integer + |
+Interval (seconds) for checking whether the alarm rule conditions are met. +The value can be: + + |
+
filter + |
+Yes + |
+String + |
+Data aggregation method. The value can be: +
|
+
comparison_operator + |
+Yes + |
+String + |
+Operator of an alarm threshold. +Regular expression matching: ^(>|<|>=|<=|=|!=)$ + |
+
value + |
+No + |
+Number + |
+Alarm threshold. +Minimum: 0 +Maximum: Number.MAX_VALUE (1.7976931348623156E108) + |
+
unit + |
+No + |
+String + |
+Data unit. The value can contain a maximum of 32 characters. You can set this parameter based on your service needs. +Minimum: 0 +Maximum: 32 + |
+
count + |
+Yes + |
+Integer + |
+Number of consecutive alarm triggering times. For event alarms, the value ranges from 1 to 180. For metric and website alarms, the value can be 1, 2, 3, 4, 5, 10, 15, 30, 60, 90, 120, or 180. + |
+
alarm_level + |
+No + |
+Integer + |
+Alarm severity, which can be 1 (critical), 2 (major), 3 (minor), or 4 (warning). The default value is 2. + |
+
suppress_duration + |
+Yes + |
+Integer + |
+Alarm suppression period, in seconds. When the period is 0, only one alarm is generated. +The value can be: + + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Modifying a custom template whose template_name is my_template, including its metric period, aggregation method, threshold, unit, count, alarm suppression duration, and alarm severity.
+{
+ "template_name" : "my_template",
+ "template_description" : "hello world",
+ "policies" : [ {
+ "namespace" : "SYS.ECS",
+ "dimension_name" : "instance_id",
+ "metric_name" : "cpu_util",
+ "period" : 300,
+ "filter" : "sum",
+ "comparison_operator" : ">",
+ "value" : 2,
+ "unit" : "bit/s",
+ "count" : 2,
+ "alarm_level" : 2,
+ "suppress_duration" : 300
+ } ]
+}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+No Content + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to modify a dashboard.
+PUT /v2/{project_id}/dashboards/{dashboard_id}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
dashboard_id + |
+Yes + |
+String + |
+Dashboard ID, which starts with db and is followed by 22 characters of letters, digits, or a combination of both. Example: db16564943172807wjOmoLyn. +The value can contain a maximum of 24 characters. +Regular expression matching: ^db([a-z]|[A-Z]|[0-9]){22}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. application/json is recommended. +Default value: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
dashboard_name + |
+No + |
+String + |
+Custom dashboard name. +Minimum: 1 +Maximum: 128 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
is_favorite + |
+No + |
+Boolean + |
+Whether a dashboard is added to favorites. The value can be true or false. + |
+
row_widget_num + |
+No + |
+Integer + |
+How a graph is displayed. 0 indicates that you can customize top and left of the graph. 1 indicates one graph per row. +Minimum: 0 +Maximum: 3 +Default: 3 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
{
+ "dashboard_name" : "dashboard_name_new",
+ "is_favorite" : true,
+ "row_widget_num" : 0
+}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+No Content + |
+
400 + |
+The server failed to process the request. + |
+
401 + |
+Token authentication is required. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to batch modify alarm notifications in alarm rules for one service with one-click monitoring enabled.
+PUT /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/notifications
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
one_click_alarm_id + |
+Yes + |
+String + |
+One-click monitoring ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^([a-z]|[A-Z]|[0-9]){1,64}$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+MIME type of the request body. The default value is application/json; charset=UTF-8. +Default: application/json; charset=UTF-8 +Minimum: 1 +Maximum: 64 + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
notification_enabled + |
+Yes + |
+Boolean + |
+Whether to enable alarm notifications. The value can be true (enable) or false (disable). + |
+
alarm_notifications + |
+No + |
+Array of Notification objects + |
+Action to be triggered by the alarm. Array length: 0 to 10 + |
+
ok_notifications + |
+No + |
+Array of Notification objects + |
+Action to be triggered after an alarm is cleared. Array length: 0 to 10 + |
+
notification_begin_time + |
+No + |
+String + |
+Time when the alarm notification was enabled. Example: 09:00 +Regular expression matching: ^([01][0-9]|2[0-3]):([0-5][0-9])$ + |
+
notification_end_time + |
+No + |
+String + |
+Time when the alarm notification was disabled. Example: 12:00 +Regular expression matching: ^([01][0-9]|2[0-3]):([0-5][0-9])$ + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
type + |
+Yes + |
+String + |
+Notification type. +The value can be: +notification: topic subscriptions. Notifications are sent using SMN topics. +contact: cloud account contacts. Notifications are sent using the mobile number and email address registered for your account. + |
+
notification_list + |
+Yes + |
+Array of strings + |
+List of objects to be notified of alarm status changes. The value of topicUrn can be obtained from SMN. For details, see section Querying Topics. If type is set to notification, the value of notificationList cannot be empty. If type is set to autoscaling, the value of notificationList must be empty. If you set alarm_action_enabled to true, you must specify either alarm_actions or ok_actions. If alarm_actions and ok_actions coexist, their notificationList must be the same. +Array length: 0 to 20 + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Batch modify alarm notifications in alarm rules for one service that has one-click monitoring enabled.
+PUT /v2/{project_id}/one-click-alarms/{one_click_alarm_id}/notifications
+Request body:
+{
+ "notification_enabled" : true,
+ "alarm_notifications" : [ {
+ "type" : "notification",
+ "notification_list" : [ "urn:smn:123" ]
+ } ],
+ "ok_notifications" : [ {
+ "type" : "notification",
+ "notification_list" : [ "urn:smn:123" ]
+ } ],
+ "notification_begin_time" : "00:00",
+ "notification_end_time" : "23:59"
+}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+No Content + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+This API is used to modify a resource group.
+PUT /v2/{project_id}/resource-groups/{group_id}
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID. +For details about how to obtain the project ID, see Obtaining a Project ID. +Minimum: 1 +Maximum: 64 +Regular expression matching: ^[a-zA-Z0-9-]{1,64}$ + |
+
group_id + |
+Yes + |
+String + |
+Resource group ID. The value starts with rg and is followed by 22 characters of letters, digits, or a combination of both. +Minimum: 24 +Maximum: 24 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
X-Auth-Token + |
+Yes + |
+String + |
+User token. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. After a response is returned, the value of X-Subject-Token in the response header is the token. +Minimum: 1 +Maximum: 16384 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
group_name + |
+Yes + |
+String + |
+Resource group name. The value allows a maximum of 128 characters and can only contain letters, digits, hyphens (-), and underscores (_). +Minimum: 1 +Maximum: 128 + |
+
tags + |
+No + |
+Array of ResourceGroupTagRelation objects + |
+Associated tag during dynamic tag matching. This parameter must be specified when type is set to TAG. +Array length: 1 to 10 + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
|---|---|---|---|
key + |
+Yes + |
+String + |
+Tag key. +Minimum: 1 +Maximum: 36 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|_|-)+$ + |
+
value + |
+No + |
+String + |
+Tag value. +Minimum: 0 +Maximum: 43 +Regular expression matching: ^([\u4E00-\u9FFF]|[a-z]|[A-Z]|[0-9]|\.|_|-)*$ + |
+
Status code: 400
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 401
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 403
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 404
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Status code: 500
+ +Parameter + |
+Type + |
+Description + |
+
|---|---|---|
error_code + |
+String + |
+Status code customized by each cloud service when a request error occurs. +Minimum: 0 +Maximum: 256 + |
+
error_msg + |
+String + |
+Request error message. +Minimum: 0 +Maximum: 256 + |
+
request_id + |
+String + |
+Request ID. +Minimum: 0 +Maximum: 256 + |
+
Modifying the resource group named rg_test
+{
+ "group_name" : "test",
+ "tags" : [ {
+ "key" : "key1",
+ "value" : "value1"
+ } ]
+}
+None
+Status Code + |
+Description + |
+
|---|---|
204 + |
+No Content + |
+
400 + |
+Parameter verification failed. + |
+
401 + |
+Authentication failed. + |
+
403 + |
+Authentication failed. + |
+
404 + |
+Resources not found. + |
+
500 + |
+Failed to complete the request because of an internal server error. + |
+
See Error Codes.
+
Events in Event Monitoring come from operations on cloud service resources and are not collected by the Agent in Server Monitoring.
+
Event Source +
Once a physical host running ECSs breaks down, the ECSs are automatically migrated to a functional physical host. During the migration, the ECSs will be restarted. + Automatic recovery: If the hardware where an ECS is located is faulty, the system automatically migrates it to a normal physical host. The ECS will restart during the migration.
|
|---|