All Products
Search
Document Center

CloudMonitor:EnableMetricRuleBlackList

Last Updated:Jul 26, 2024

Enables or disables multiple blacklist policies at a time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cms:EnableMetricRuleBlackListupdate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
IdstringYes

The IDs of the blacklist policies. Separate multiple IDs with commas (,). You can specify up to 50 IDs.

For information about how to obtain the ID of a blacklist policy, see DescribeMetricRuleBlackList .

Note You can also set this parameter to a JSON array. Example: ["a9ad2ac2-3ed9-11ed-b878-0242ac12****","5cb8a9a4-198f-4651-a353-f8b28788****"].
a9ad2ac2-3ed9-11ed-b878-0242ac12****
IsEnablebooleanYes

Specifies whether to enable the blacklist policy. Valid values:

  • true: The blacklist policy is enabled.
  • false (default): The blacklist policy is disabled.
true

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object

None

Codestring

The status code.

Note The status code 200 indicates that the request was successful.
200
Messagestring

The error message.

The specified resource is not found.
RequestIdstring

The request ID.

94869866-1621-3652-BBC9-72A47B2AC2F5
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Countinteger

The number of blacklist policies that are enabled or disabled.

1

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "The specified resource is not found.",
  "RequestId": "94869866-1621-3652-BBC9-72A47B2AC2F5",
  "Success": true,
  "Count": 1
}

Error codes

HTTP status codeError codeError messageDescription
400ParameterInvalidIllegal parameters.-
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
409ResourceConflictConcurrent modification of resources.-
409ResourceExistResources already exist.-
500InternalErrorThe request processing has failed due to some unknown error.-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-06-22Add OperationView Change Details