All Products
Search
Document Center

Application Real-Time Monitoring Service:ListSilencePolicies

Last Updated:Nov 05, 2024

Queries the information of a silence policy list.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringNo

The name of the silence policy.

silencepolicy_test
PagelongYes

The number of the page to return.

1
SizelongYes

The number of entries to return on each page.

20
IsDetailbooleanNo

Specifies whether to query the details of a silence policy. Valid values:

  • true: Details of the silence policy are queried.
  • false: Details about notification policies are not queried.
true
RegionIdstringNo

The ID of the region.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

78901766-3806-4E96-8E47-CFEF59E4****
PageBeanobject

The returned pages.

Totallong

The number of silence policies that were returned.

1
Pagelong

The number of the page returned.

1
Sizelong

The number of entries returned per page.

20
SilencePoliciesarray<object>

The queried silence policies.

policiesobject

The silence policy.

Idlong

The ID of the silence policy.

123
Namestring

The name of the silence policy.

silencepolicy_test
MatchingRulesarray<object>

The matching rules.

matchingRulesobject

The matching rule.

MatchingConditionsarray<object>

The matching conditions.

matchingConditionsobject

An array of matching condition objects.

Keystring

The key of the matching condition.

altertname
Valuestring

The value of the matching condition.

test
Operatorstring

The logical operator of the matching condition. Valid values:

  • eq: equal to
  • neq: not equal to
  • in: contains
  • nin: does not contain
  • re: regular expression match
  • nre: regular expression mismatch
eq
Statestring

Indicates whether the silence policy is enabled. Valid values: enable and disable.

enable

Examples

Sample success responses

JSONformat

{
  "RequestId": "78901766-3806-4E96-8E47-CFEF59E4****",
  "PageBean": {
    "Total": 1,
    "Page": 1,
    "Size": 20,
    "SilencePolicies": [
      {
        "Id": 123,
        "Name": "silencepolicy_test",
        "MatchingRules": [
          {
            "MatchingConditions": [
              {
                "Key": "altertname",
                "Value": "test",
                "Operator": "eq"
              }
            ]
          }
        ],
        "State": "enable",
        "TimeSlots": "",
        "TimePeriod": "",
        "EffectiveTimeType": ""
      }
    ]
  }
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-08-12The response structure of the API has changedView Change Details
2024-05-24The response structure of the API has changedView Change Details
2022-02-24Add OperationView Change Details