All Products
Search
Document Center

CloudMonitor:ModifyMetricRuleBlackList

Last Updated:Jul 26, 2024

Modifies a blacklist policy.

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:ModifyMetricRuleBlackListupdate
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
IdstringYes

The ID of the blacklist policy.

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

93514c96-ceb8-47d8-8ee3-93b6d98b****
NamestringYes

The name of the blacklist policy.

Blacklist-02
NamespacestringYes

The namespace of the cloud service.

For more information about the namespaces of cloud services, see Appendix 1: Metrics.

acs_ecs_dashboard
CategorystringYes

The category of the cloud service. For example, ApsaraDB for Redis supports the standard architecture, the cluster architecture, and the read/write splitting architecture. In this case, the valid values of this parameter for ApsaraDB for Redis include kvstore_standard, kvstore_sharding, and kvstore_splitrw.

ecs
ScopeTypestringNo

The effective scope of the blacklist policy. Valid values:

  • USER: The blacklist policy takes effect only within the current Alibaba Cloud account.
  • GROUP (default): The blacklist policy takes effect only within the specified application group. For information about how to obtain the ID of an application group, see DescribeMonitorGroups .
USER
ScopeValuestringNo

The IDs of the application groups.

Note This parameter is required only when ScopeType is set to GROUP.
["67****","78****"]
EnableStartTimestringNo

The timestamp when the blacklist policy starts to take effect.

Unit: milliseconds.

1640237400000
EnableEndTimestringNo

The timestamp when the blacklist policy expires.

Unit: milliseconds.

1640608200000
EffectiveTimestringNo

The time range within which the blacklist policy is effective. Take note of the following information:

  • If you do not configure this parameter, the blacklist policy is permanently effective.

  • If you configure this parameter, the blacklist policy is effective only within the specified time range. Examples:

    • 03:00-04:59: The blacklist policy is effective from 03:00 to 05:00 local time. 05:00 local time is excluded.
    • 03:00-04:59 UTC+0700: The blacklist policy is effective from 03:00 to 05:00 (UTC+7). 05:00 (UTC+7) is excluded.
03:00-04:59
InstancesarrayYes

The IDs of the instances that belong to the specified cloud service.

stringYes

The IDs of the instances that belong to the specified cloud service.

Valid values of N: 1 to 100.

{"instancceId":"i-bp1ew0zfkjblsuwx****"}
Metricsarray<object>No

The metrics of the instance.

  • If you do not configure this parameter, the blacklist policy applies to all metrics of the specified cloud service.
  • If you configure this parameter, the blacklist policy applies only to the current metric.
objectNo

None.

MetricNamestringYes

The name of the metric.

Valid values of N: 1 to 10.

disk_utilization
ResourcestringNo

The extended dimension of the instance. For example, {"device":"C:"} specifies that the blacklist policy is applied to all C disks of the specified Elastic Compute Service (ECS) instance.

Valid values of N: 1 to 10.

{"device":"C:"}

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

Response parameters

ParameterTypeDescriptionExample
object

None.

Codestring

The error 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.

008773AE-1D86-3231-90F9-1AF7F808F9CE
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
Countstring

The number of blacklist policies that are modified.

1

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "The specified resource is not found.",
  "RequestId": "008773AE-1D86-3231-90F9-1AF7F808F9CE",
  "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