You can call the DescribeMetricRuleBlackList operation to query blacklist policies.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cms:DescribeMetricRuleBlackList |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Namespace |
string |
No |
The namespace of the Alibaba Cloud service. For more information, see Metrics. |
acs_ecs_dashboard |
| PageNumber |
integer |
No |
The page number. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. Default value: 10. |
100 |
| Order |
integer |
No |
The order in which to sort the results by time. Valid values:
|
DESC |
| Category |
string |
No |
The category of the Alibaba Cloud service. For example, Redis has different editions, such as |
ecs |
| Ids |
array |
No |
The IDs of the blacklist policies. |
|
|
string |
No |
The ID of a blacklist policy. |
a9ad2ac2-3ed9-11ed-b878-0242ac12**** |
|
| Name |
string |
No |
The name of the blacklist policy. Fuzzy queries are supported. |
Blacklist-01 |
| ScopeType |
string |
No |
The scope of the blacklist policy. Valid values:
|
USER |
| IsEnable |
boolean |
No |
The status of the blacklist policy. Valid values:
|
true |
| InstanceIds |
array |
No |
The IDs of instances in the blacklist policy. The value of N can be an integer from 0 to 10. |
|
|
string |
No |
The ID of an instance in the blacklist policy. |
i-2ze2d6j5uhg20x47**** |
For more information about common request parameters, see Common parameters.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
None. |
||
| Code |
string |
The status code. Note
A value of 200 indicates that the request was successful. |
200 |
| Message |
string |
The error message. |
The Request is not authorization. |
| RequestId |
string |
The request ID. |
D63E76CB-29AA-5B9F-88CE-400A6F28D428 |
| Total |
integer |
The total number of blacklist policies. |
1 |
| Success |
boolean |
Indicates whether the operation was successful. Valid values:
|
true |
| DescribeMetricRuleBlackList |
array<object> |
The blacklist policies. |
|
|
array<object> |
The blacklist policies. |
||
| EffectiveTime |
string |
The time range during which the blacklist policy is effective. |
00:00-23:59 |
| UpdateTime |
string |
The timestamp that indicates when the blacklist policy was modified. Unit: milliseconds. |
1665718373000 |
| CreateTime |
string |
The timestamp that indicates when the blacklist policy was created. Unit: milliseconds. |
1665714561000 |
| ScopeType |
string |
The scope of the blacklist policy. Valid values:
|
USER |
| IsEnable |
boolean |
The status of the blacklist policy. Valid values:
|
true |
| Namespace |
string |
The namespace of the Alibaba Cloud service. |
acs_ecs_dashboard |
| Category |
string |
The category of the Alibaba Cloud service. For example, Redis has different editions, such as |
ecs |
| EnableEndTime |
integer |
The timestamp that indicates when the alert blacklist policy is no longer in effect. The timestamp is measured in milliseconds. |
1640608200000 |
| Name |
string |
The name of the blacklist policy. |
Blacklist-01 |
| EnableStartTime |
integer |
The time when the alert blacklist policy expires. This is a UNIX timestamp in milliseconds. |
1640237400000 |
| Id |
string |
The ID of the blacklist policy. |
93514c96-ceb8-47d8-8ee3-93b6d98b**** |
| Metrics |
array<object> |
The metrics of the instance. |
|
|
object |
The metrics of the instance. |
||
| Resource |
string |
The extended dimension of the instance. For example, |
[{"device":"C:"}] |
| MetricName |
string |
The name of the metric. |
disk_utilization |
| Instances |
array |
The instances of the Alibaba Cloud service in the blacklist policy. |
|
|
string |
The instances of the Alibaba Cloud service in the blacklist policy. |
i-rj99xc6cptkk64ml**** |
|
| ScopeValue |
array |
The IDs of the application groups. |
|
|
string |
The IDs of the application groups. The value is a JSON array. Note
This parameter is returned only if |
["67****","78****"] |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "The Request is not authorization.",
"RequestId": "D63E76CB-29AA-5B9F-88CE-400A6F28D428",
"Total": 1,
"Success": true,
"DescribeMetricRuleBlackList": [
{
"EffectiveTime": "00:00-23:59",
"UpdateTime": "1665718373000",
"CreateTime": "1665714561000",
"ScopeType": "USER",
"IsEnable": true,
"Namespace": "acs_ecs_dashboard",
"Category": "ecs",
"EnableEndTime": 1640608200000,
"Name": "Blacklist-01",
"EnableStartTime": 1640237400000,
"Id": "93514c96-ceb8-47d8-8ee3-93b6d98b****",
"Metrics": [
{
"Resource": "[{\"device\":\"C:\"}]",
"MetricName": "disk_utilization"
}
],
"Instances": [
"i-rj99xc6cptkk64ml****"
],
"ScopeValue": [
"[\"67****\",\"78****\"]"
]
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | ParameterInvalid | Illegal parameters. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | |
| 404 | ResourceNotFound | The specified resource is not found. | The specified resource is not found. |
| 409 | ResourceConflict | Concurrent modification of resources. | |
| 409 | ResourceExist | Resources already exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.