All Products
Search
Document Center

Elastic Compute Service:ModifyDiskSpec

Last Updated:Mar 19, 2024

You can call this operation to change the category of a disk or modify the performance level of an enhanced SSD (ESSD).

Operation description

Usage notes

Take note of the following items:

  • To modify the performance level of an ESSD, take note of the following items:

    • For a subscription ESSD, you can only upgrade its performance level.
    • For a pay-as-you-go ESSD, you can upgrade or downgrade its performance level. However, you cannot downgrade the performance level to PL0.
    • The ESSD must be in the In Use (In_Use) or Unattached (Available) state.
    • If the ESSD is attached to an Elastic Compute Service (ECS) instance, the instance must be in the Running (Running) or Stopped (Stopped) state. The instance cannot be in the Expired state or stopped due to an overdue payment.
    • If you cannot upgrade the performance level of the ESSD due to the capacity limit, resize the ESSD by calling the ResizeDisk operation and then try again. For more information, see ESSDs .
  • For information about the limits on changing the category of a disk, see the "Limits" section of the Change the category of a disk topic.

The new disk category or performance level takes effect immediately after this operation is performed. Alibaba Cloud calculates the bill based on the new disk category and performance level.

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
DiskIdstringYes

The disk ID.

d-bp131n0q38u3a4zi****
PerformanceLevelstringNo

The new performance level of the ESSD. Valid values:

  • PL0: An ESSD can deliver up to 10,000 random read/write IOPS.
  • PL1: An ESSD can deliver up to 50,000 random read/write IOPS.
  • PL2: An ESSD can deliver up to 100,000 random read/write IOPS.
  • PL3: An ESSD delivers up to 1,000,000 random read/write IOPS.

Default value: PL1.

PL2
DiskCategorystringNo

The new category of the disk. Valid values:

  • cloud_essd: ESSD
  • cloud_auto: ESSD AutoPL disk
  • cloud_ssd: standard SSD
  • cloud_efficiency: ultra disk

This parameter is empty by default, which indicates that the disk category is not changed.

Note The preceding values are listed in descending order of disk performance. Subscription disks cannot be downgraded.
cloud_essd
DryRunbooleanNo

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, service limits, and insufficient ECS resources. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • false: performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.

Default value: false.

false
ProvisionedIopslongNo

The provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS}

Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}

Note This parameter is available only if the DiskCategory parameter is set to cloud_auto. For more information, see ESSD AutoPL disks and Modify the performance configurations of an ESSD AutoPL disk.
50000
PerformanceControlOptionsobjectNo

A collection of disk performance control parameters

IOPSintegerNo

The new IOPS of the disk. You can modify the IOPS of only disks in dedicated block storage clusters.

Valid values: 900 to maximum IOPS per disk (with an increment of 100).

For more information, see EBS performance.

2000
ThroughputintegerNo

The new throughput of the disk. You can modify the throughput of only disks in dedicated block storage clusters. Unit: MB/s.

Valid values: 60 to maximum throughput per disk.

For more information, see EBS performance.

200
RecoverstringNo

The new IOPS and throughput of the disk. This parameter is valid only when the disk is in a dedicated block storage cluster.

After you specify this parameter, PerformanceControlOptions.IOPS and PerformanceControlOptions.Throughput do not take effect.

Set the value to All, which indicates that the IOPS and throughput of the disk is reset to the initial values.

All

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

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

The ID of the disk category change task.

Note If you only modify the performance level of an ESSD, this parameter is not returned.
t-bp67acfmxazb4p****
OrderIdstring

The order ID.

Note This parameter is returned only when the category of a subscription disk or the performance level of a subscription ESSD is modified.
20413515388****

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TaskId": "t-bp67acfmxazb4p****",
  "OrderId": "20413515388****"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidPerformanceLevel.MalformedThe specified parameter PerformanceLevel is not valid.The specified PerformanceLevel parameter is invalid.
400InvalidDiskCategory.ValueNotSupportedThe specified parameter "DiskCategory" is not valid.-
400InvalidPerformanceLevelParam.MismatchThe specified parameter PerformanceLevel should be null when DiskCategory is not cloud_essd.-
400OperationDenied.DiskInDedicatedBlockStorageClusterThe disk in dedicated block storage cluster is not allowed to do this operation.-
400IncorrectDiskStatus.ReplicationStatusNotFoundDisk replication status not found.-
400IncorrectDiskStatus.InReplicationDisk already in replication.-
400ProvisionedIopsForDiskCategoryUnsupportedThe specified disk category does not support provisioned iops.-
400InvalidProvisionedIops.LimitExceedThe provisioned iops exceeds the limit.-
400QuotaExceed.DiskCapacityThe used capacity of disk type has exceeded the quota in the zone, %s.The capacity of disks that belong to the specified disk category exceeds the quota limit for the zone.
400MalformedParameter.PerformanceControlOptionsParameter invalid, %s.-
400InvalidPerformanceControlOptions.ModifyOperationUnsupportedThe specified performance control options are conflicts with disk category or performance level or ProvisionIOPS.-
403DiskInArrearsThe specified operation is denied as your disk owing fee.Your account has overdue payments for the specified disk.
403InstanceExpiredOrInArrearsThe specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).The subscription instance has expired. You must renew the instance before you can proceed.
403IncorrectDiskStatusThe current disk status does not support this operation.The disk is in a state that does not support the current operation. Make sure that the disk is available and that your account has no overdue payments.
403DiskCreatingSnapshotThe operation is denied due to a snapshot of the specified disk is not completed yet.A snapshot is being created for the specified disk.
403OperationDeniedThe type of the disk does not support the operation.The disk category does not support the specified operation.
403InvalidPerformanceLevel.TooLowSpecified new performance level is lower than the original performance level.-
403OperationDenied.PerformanceLevelNotMatchThe specified PerformanceLevel and disk size do not match.The specified performance level and disk size do not match.
403UserNotInTheWhiteListThe user is not in modify disk category white list.-
403InvalidRegion.NotSupportThe specified region does not support modify disk category.-
403InvalidDiskCategory.ValueNotSupportedThe current disk category of the resource does not support this operation.-
403Downgrade.NotSupportedDowngrade operation for prepay resource is not supported.-
403InvalidInstanceType.NotSupportDiskCategoryThe instanceType of the specified instance does not support this disk category.The instance type does not support the current disk category. Try another instance type. For information about the disk categories supported by instance types, see the instance family documentation.
403ModifyingDiskCategoryLimitExceedThe amount of modifying disk category exceeds the limit.-
403DiskInCoolingPeriodThere is a cooling period after the disk is successfully modified.-
403DiskHasFlashSnapshotThe specified disk with flash snapshots do not support modify disk category.-
403NoChangeInDiskCategoryAndPerformanceLevelThere is no change between the parameters transmitted and the current.-
403OperationDenied.NoStockThe requested resource is sold out in the specified zone; try other types of resources or other regions and zones.The requested resources are insufficient.
403InvalidOperation.MultiAttachDiskMulti attach disk does not support this operation.Disks for which the multi-attach feature is enabled do not support the operation.
403OperationDenied.DiskExpansionUnfinishedThe instance has not been restarted after a previous disk expansion.-
403InvalidDiskCategory.NotSupportedThe specified disk category is not supported.The specified disk category does not support this operation.
403InvalidPerformanceParameter.DiskNotInDedicatedStorageClusterThe specified disk not in dedicated storage cluster, can not modify performance control options.-
403InvalidStatus.DiskUnderPerformanceControlThe specified disk is under performance control, any modifications to the category or performance level of the specified disk are unsupported..-
403InvalidStatus.DiskNotReadyThis specified disk is not ready, status needs to be either In_use or Available.-
404InvalidDiskId.NotFoundThe specified disk does not exist.The specified disk does not exist. Check whether the disk ID is correct.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The specified instance does not exist.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred. Try again later.

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

Change history

Change timeSummary of changesOperation
2024-01-29The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
2023-10-18The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
2023-05-16The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
2023-04-17The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 403 change
    delete Error Codes: 404
    delete Error Codes: 500
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: PerformanceControlOptions