Updated on 2026-01-08 GMT+08:00

Enabling or Disabling Monitoring by Seconds

API Description

This API is used to enable or disable monitoring by seconds for a specified instance.

Restrictions

  • Only instances with four or more CPUs are supported.

URI

  • URI format
    PUT https://{Endpoint}/v3/{project_id}/instances/{instance_id}/monitoring-by-seconds/switch
    Table 1 Path parameters

    Name

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

    instance_id

    Yes

    String

    Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

Request Parameters

Table 2 Request header parameters

Name

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Table 3 Request body parameters

Name

Mandatory

Type

Description

enabled

Yes

Boolean

Whether to enable monitoring by seconds. true: enables the function. false: disables the function.

  • Request example

    Example of enabling monitoring by seconds

    { 
      "enabled" : true 
    }

Response Parameters

  • Parameter description

    None

  • Example response

    None

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.