All Products
Search
Document Center

Elastic Compute Service:DescribeResourcesModification

Last Updated:Mar 19, 2024

Queries available resources within a specific zone when you upgrade or downgrade instance types or replace system disks.

Operation description

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 ID of the region. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
ResourceIdstringYes

The ID of the resource. For example, when DestinationResource is set to InstanceType, this parameter can be interpreted as InstanceId.

i-bp67acfmxazb4p****
MigrateAcrossZonebooleanNo

Specifies whether cross-cluster instance type upgrades are supported. Valid values:

  • true
  • false

Default value: false.

When MigrateAcrossZone is set to true and you upgrade the instance type of an Elastic Compute Service (ECS) instance based on the returned information, take note of the following items:

  • Instances that reside in the classic network:

    • For retired instance types, when a non-I/O-optimized instance is upgraded to an I/O-optimized instance, the private IP address, disk device names, and software authorization codes of the instance change. For Linux instances, basic disks (cloud) are identified as xvd* such as xvda and xvdb, and ultra disks (cloud_efficiency) and standard SSDs (cloud_ssd) are identified as vd* such as vda and vdb.
    • For instance families available for purchase, when the instance type of an instance is changed, the private IP address of the instance changes.
  • Instances that reside in virtual private clouds (VPCs): For retired instance types, when a non-I/O-optimized instance is upgraded to an I/O-optimized instance, the disk device names and software authorization codes of the instance change. For Linux instances, basic disks (cloud) are identified as xvd* such as xvda and xvdb, and ultra disks (cloud_efficiency) and standard SSDs (cloud_ssd) are identified as vd* such as vda and vdb.

true
DestinationResourcestringYes

The target resource type. Valid values:

  • InstanceType
  • SystemDisk
InstanceType
OperationTypestringNo

The operation of changing resource configurations.

  • Valid values for subscription resources:

    • Upgrade
    • Downgrade
    • RenewDowngrade
    • RenewModify
  • Valid values for pay-as-you-go resources: Upgrade

Default value: Upgrade.

Upgrade
InstanceTypestringNo

The instance type. For more information, see Overview of instance families or call the DescribeInstanceTypes operation to query the most recent instance type list. This parameter is required when DestinationResource is set to SystemDisk.

ecs.g5.large
CoresintegerNo

The number of vCPU cores of the instance type. For information about the values, see Overview of instance families. This parameter takes effect only when DestinationResource is set to InstanceType.

2
MemoryfloatNo

The memory size of the instance type. Unit: GiB. For information about the values, see Overview of instance families. This parameter takes effect only when DestinationResource is set to InstanceType.

8.0
ZoneIdstringNo

The ID of the zone.

cn-hangzhou-e
ConditionsarrayNo

The condition. If you specify this parameter, the system queries the resource types that the resource can be changed to after the resource meets the specified condition.

Set the value to DiskCategory, which indicates a disk category change. When you set this parameter to DiskCategory, the system queries the instance types that the instance can be changed to after a disk category change.

stringNo

The condition. If you specify this parameter, the system queries the resource types that the resource can be changed to after the resource meets the specified condition.

Set the value to DiskCategory, which indicates a disk category change. When you set this parameter to DiskCategory, the system queries the instance types that the instance can be changed to after a disk category change.

DiskCategory

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
AvailableZonesobject []

The information about the queried zones.

ZoneIdstring

The ID of the zone.

cn-hangzhou-e
Statusstring

The status of the resource. Valid values:

  • Available
  • SoldOut
Available
StatusCategorystring

The category of resource based on stock status. Valid values:

  • WithStock: resources that are in sufficient stock
  • ClosedWithStock: resources that are in insufficient stock
  • WithoutStock: resources that are out of stock
WithStock
RegionIdstring

The ID of the region.

cn-hangzhou
AvailableResourcesobject []

The resources that are available in the zone.

Typestring

The type of resource. Valid values:

  • Zone
  • IoOptimized
  • InstanceType
  • SystemDisk
  • DataDisk
  • Network
InstanceType
SupportedResourcesobject []

The information about the resources.

Statusstring

The status of the resource. Valid values:

  • Available
  • SoldOut
Available
Valuestring

The resource type.

ecs.g5.large
Maxinteger

The maximum resource specification value. This parameter is not returned if it has no value.

2
Unitstring

The resource specification unit. This parameter is not returned if it has no value.

null
StatusCategorystring

The category of resource based on stock status. Valid values:

  • WithStock: resources that are in sufficient stock
  • ClosedWithStock: resources that are in insufficient stock
  • WithoutStock: resources that are out of stock
WithStock
Mininteger

The minimum resource specification value. This parameter is not returned if it has no value.

1
ConditionSupportedResourcesobject []

The resource types that resources can be changed to after the resources meet specified conditions.

Conditionsobject []

The conditions.

Keystring

The condition name. Valid value:

DiskCategory, which indicates a disk category change.

DiskCategory
Statusstring

The stock status of the resource. Valid values:

  • Available
  • SoldOut
Available
Valuestring

The resource type.

ecs.g5.large
Maxinteger

The maximum resource specification value. This parameter is not returned if it has no value.

2
Unitstring

The resource specification unit. This parameter is not returned if it has no value.

null
StatusCategorystring

The category of resource based on stock status. Valid values:

  • WithStock: resources that are in sufficient stock
  • ClosedWithStock: resources that are in insufficient stock
  • WithoutStock: resources that are out of stock
WithStock
Mininteger

The minimum resource specification value. This parameter is not returned if it has no value.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "AvailableZones": {
    "AvailableZone": [
      {
        "ZoneId": "cn-hangzhou-e",
        "Status": "Available",
        "StatusCategory": "WithStock",
        "RegionId": "cn-hangzhou",
        "AvailableResources": {
          "AvailableResource": [
            {
              "Type": "InstanceType",
              "SupportedResources": {
                "SupportedResource": [
                  {
                    "Status": "Available",
                    "Value": "ecs.g5.large",
                    "Max": 2,
                    "Unit": "null",
                    "StatusCategory": "WithStock",
                    "Min": 1
                  }
                ]
              },
              "ConditionSupportedResources": {
                "ConditionSupportedResource": [
                  {
                    "Conditions": {
                      "Condition": [
                        {
                          "Key": "DiskCategory"
                        }
                      ]
                    },
                    "Status": "Available",
                    "Value": "ecs.g5.large",
                    "Max": 2,
                    "Unit": "null",
                    "StatusCategory": "WithStock",
                    "Min": 1
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400Invalid.OperationTypeThe specified operationType is not valid.The specified OperationType parameter is invalid.
400Invalid.ParamThe input parameter DestinationResource that is mandatory for processing this request is not supplied.The specified DestinationResource parameter is invalid.
400Invalid.InstanceChargeTypeThe specified InstanceChargeType is not valid.The specified InstanceChargeType parameter is invalid.
400InvalidCondition.MalformedThe specified Condition is not valid.-
403InvalidDedicatedHostId.NotFoundThe specified DedicatedHostId does not exist in our records.-
403InvalidParam.TypeAndCpuMem.ConflictThe specified 'InstanceType' and 'Cores','Memory' are not blank at the same time.-
403InvalidParam.CoresThe specified parameter 'Cores' should be empty.-
403InvalidParam.MemoryThe specified parameter 'Memory' should be empty.-
403InvalidParameter.ResourceOwnerIdThe specified parameter ResourceOwnerId is not available anymore.-
404Invalid.RegionIdThe specified RegionId does not exist.The specified RegionId parameter is invalid.
404InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.The RegionId provided does not exist
404Unavailable.RegionsThe available regions does not exists.-
404Invalid.ResourceTypeThe ResourceType provided does not exist in our records.The specified resource type is invalid.
404Invalid.DestinationResourceThe specified DestinationResource is not valid.The specified DestinationResource parameter is invalid.
404Invalid.IoOptimizedThe specified IoOptimized is not valid.The specified IoOptimized parameter is invalid.
404Invalid.NetworkCategoryThe specified NetworkCategory is not valid.The specified NetworkCategory parameter is invalid.
404Invalid.SpotStrategyThe specified SpotStrategy is not valid.The specified SpotStrategy parameter is invalid.
404Invalid.ResourceIdThe specified ResourceId is not valid.The specified ResourceId parameter is invalid.
404Invalid.InstancePayTypeThe specified InstancePayType is not valid.The specified InstanceChargeType parameter is invalid.
404Invalid.OperationTypeThe specified OperationType is not valid.The specified OperationType parameter is invalid.
404OperationDeniedThe specified operation is denied as this instanceType is not support.The instance type does not support this operation.
404InvalidInstanceId.NotFoundThe specified InstanceId provided does not exist in our records.The specified instance does not exist.
404InvalidResourceId.NotFoundThe specified ResourceId is not found in our records.The specified resource does not exist. Check whether the resource ID is correct.

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

Change history

Change timeSummary of changesOperation
2023-04-14The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Conditions
Output ParametersThe response structure of the API has changed.
2022-09-14The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    Error Codes 404 change
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ZoneId
2022-09-14The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change
    Error Codes 404 change
    delete Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: ZoneId