All Products
Search
Document Center

Elastic Compute Service:DescribeInstanceMaintenanceAttributes

Last Updated:Mar 19, 2024

Queries the maintenance attributes of an instance.

Operation description

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

  • Maintenance window: the time period that you specify for maintenance.
  • Maintenance action: the action that you specify in response to instance shutdown.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
PageNumberlongNo

The page number.

Pages start from page 1.

Default value: 1.

1
PageSizelongNo

The number of entries per page. Valid values: 1 to 100.

Default value: 10.

10
InstanceIdarrayNo

The instance IDs. You can specify up to 100 instance IDs.

stringNo

The instance ID.

i-bp67acfmxazb4p****

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries per page.

10
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
PageNumberinteger

The page number.

1
TotalCountinteger

The total number of queried maintenance attributes.

100
MaintenanceAttributesobject []

The maintenance attributes.

NotifyOnMaintenanceboolean

Indicates whether an event notification was sent before maintenance.

false
InstanceIdstring

The instance ID.

i-bp67acfmxazb4p****
MaintenanceWindowsobject []

The maintenance windows.

EndTimestring

The end time of the maintenance window.

18:00:00
StartTimestring

The start time of the maintenance window.

02:00:00
ActionOnMaintenanceobject

The attributes of the maintenance action of the instance.

DefaultValuestring

The default maintenance action.

AutoRecover
Valuestring

The current maintenance action. Valid values:

  • Stop: stops the instance.
  • AutoRecover: automatically recovers the instance.
  • AutoRedeploy: redeploys the instance, which may damage the data disks attached to the instance.
Stop
SupportedValuesarray

The supported maintenance actions.

string

The supported maintenance action.

Stop

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400MissingParameter%sA parameter is not specified.
403InvalidParameter%sThe specified parameter is invalid.
403InstanceIdLimitExceeded%sMore than 100 instance IDs are specified.
403OperationDenied.NotInWhiteList%sYou are not authorized to perform this operation. Try again when you are authorized.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The specified instance does not exist.

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