You can call this operation to delete an alert rule template.

Debugging

You can use API Explorer to perform debugging. API Explorer allows you to perform various operations to simplify API usage. For example, you can call APIs, dynamically generate SDK example code, and retrieve APIs.

Request parameters

Parameter Type Required Example Description
TemplateId String Yes 12345

The ID of the alert template.

Action String No DeleteMetricRuleTemplate

The operation that you want to perform. Set the value to DeleteMetricRuleTemplate.

Response parameters

Parameter Type Example Description
Code Integer 200

The status code. A value of 200 indicates that the call is successful.

Message String success

The error message.

RequestId String 7B63F8CF-D48D-4608-A402-04FB5B2B4B6A

The request ID for troubleshooting.

Resource

The deleted template.

  └TemplateId String 123

The ID of the template.

Success Boolean true

Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.

Examples

Sample requests


http(s)://[Endpoint]/? Action=DeleteMetricRuleTemplate
&<Common request parameters>

Successful response examples

XML format

<DeleteMetricRuleTemplateResponse>
  <Resource>
    <TemplateId>123</TemplateId>
  </Resource>
  <RequestId>7B63F8CF-D48D-4608-A402-04FB5B2B4B6A</RequestId> 
  <Success>true</Success> 
  <Code>200</Code>
</DeleteMetricRuleTemplateResponse>

JSON format

{
	"Resource":{
		"TemplateId":123
	},
	"RequestId":"7B63F8CF-D48D-4608-A402-04FB5B2B4B6A",
	"Success":true,
	"Code":200
}

Error codes

View error codes