• Cloud Eye

ces
  1. Help Center
  2. Cloud Eye
  3. API Reference
  4. API Description
  5. Alarm Rule Management
  6. Enabling or Disabling an Alarm Rule

Enabling or Disabling an Alarm Rule

Function

This API is used to enable or disable an alarm rule.

URI

PUT /V1.0/{project_id}/alarms/{alarm_id}/action

  • Parameter description
    Table 1 Parameter description

    Parameter

    Description

    project_id

    Indicates the project ID.

    alarm_id

    Indicates the alarm rule ID.

  • Example
    /V1.0/{project_id}/alarms/al1441967036681YkazZ0deN/action

Request

  • Request parameters
    Table 2 Request parameters

    Parameter

    Mandatory

    Type

    Description

    alarm_enabled

    Yes

    Boolean

    Indicates whether the alarm rule is enabled.

    true: indicates that the alarm rule is enabled.

    false: indicates that the alarm rule is disabled.

  • Example request
    {
        "alarm_enabled":true
    }

Response

The response has no message body.

Returned Values

  • Normal

    204

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error

    401 Unauthorized

    The authentication information is not provided or is incorrect.

    403 Forbidden

    You are forbidden to access the page requested.

    408 Request Timeout

    The request timed out.

    429 Too Many Requests

    Concurrent requests are excessive.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    503 Service Unavailable

    The service is currently unavailable.

Error Code

For details, see Error Codes.