Calls the CreateMetricRuleResources operation to create a resource associated with an alert rule.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:CreateMetricRuleResources |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RuleId |
string |
No |
The ID of the alert rule. |
i-2ze3w55tr2rcpejpcfap_59c96b85-0339-4f35-ba66-ae4e34d3**** |
| Overwrite |
string |
No |
Specifies whether to overwrite. Valid values:
|
false |
| Resources |
string |
Yes |
The associated resources. The value is in the JSON array format. Note
A maximum of 100 resource instances can be added at a time, and an alert rule can be associated with a maximum of 3,000 instances. |
[{"instanceId":"i-a2d5q7pm3f9yr29e****"}] |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. Note
The value 200 indicates success. |
200 |
| Message |
string |
The returned message. |
success |
| RequestId |
string |
The request ID. |
0671A721-0D7A-4F11-BB77-2416325D65AB |
| Success |
boolean |
Indicates whether the operation was successful. The value true indicates success, and the value false indicates failure. |
true |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "success",
"RequestId": "0671A721-0D7A-4F11-BB77-2416325D65AB",
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | %s | %s | |
| 500 | %s | %s | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | %s | %s | |
| 404 | %s | %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.