You can call this operation to query the maintenance attributes of an instance.


The operation is used to query the specified maintenance policy of an instance, which contains the following two major maintenance attributes:

  • Maintenance window: the time period that you specify for O&M.
  • Maintenance action: the policy that you specify in response to instance shutdown.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String No DescribeInstanceMaintenanceAttributes

The operation that you want to perform. For API requests using the HTTP and HTTPS methods, this parameter is required. Set the value to DescribeInstanceMaintenanceAttributes.

RegionId String Yes cn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

InstanceId.N RepeatList No i-bp67acfmxazb4ph***

The IDs of N instances. Valid values of N: 1 to 100.

PageNumber Long No 1

The number of the page to return.

Pages start from page 1.

Default value: 1.

PageSize Long No 10

The number of entries to return on each page. Valid values: 1 to 100.

Default value: 10.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

TotalCount Integer 100

The total number of queried maintenance attributes.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

MaintenanceAttributes Array

The collection of O&M attributes.

InstanceId String i-bp67acfmxazb4ph***

The ID of the instance.

MaintenanceWindows Array

The list of instances in the O&M window.

StartTime String 02:00:00

The start time of the maintenance window.

EndTime String 18:00:00

The end time of the maintenance window.

ActionOnMaintenance Struct

The attribute of the maintenance action of the instance.

Value String Stop

The current value of maintenance action. Valid values:

  • Stop: shutdown.
  • AutoRecover: automatic recovery.
  • AutoRedeploy: Data is migrated in case of shutdown, which may cause the damage of the data disk.
DefaultValue String AutoRecover

The default value of maintenance action.

SupportedValues List "SupportedValue": ["Stop", "AutoRecover"]

The array that consists of supported maintenance actions.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
    "PageNumber": 1,
    "PageSize": 10,
    "TotalCount": 100,
    "InstanceMaintenanceAttributes": {
        "InstanceMaintenanceAttribute": [{
            "InstanceId": "i-bp67acfmxazb4ph***",
            "MaintenanceWindows ": {
                "MaintenanceWindow": [{
                    "StartTime": "02:00:00",
                    "EndTime": "18:00:00"
            "ActionOnMaintenance": {
                "Value": "Stop",
                "DefaultValue": "AutoRecover",
                "SupportedValues": {
                    "SupportedValue": ["Stop", "AutoRecover"]

Error codes

HTTP status code Error code Error message Description
400 MissingParameter %s The error message returned because a required parameter is not specified.
403 InvalidParameter %s The error message returned because the specified parameter value is invalid.
403 InstanceIdLimitExceeded %s The error message returned because the number of values specified for the InstanceId parameter is more than 100.
403 OperationDenied.NotInWhiteList %s The error message returned because no whitelist is specified, which cause the operation to be denied.

For a list of error codes, visit the API Error Center.