All Products
Search
Document Center

Elastic Compute Service:ModifyDiskSpec

Last Updated:Sep 29, 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

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:ModifyDiskSpecupdate
  • Disk
    acs:ecs:{#regionId}:{#accountId}:disk/{#diskId}
    none
none

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: enhanced SSD (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 you set DiskCategory to cloud_auto. For more information, see ESSD AutoPL disks and Modify the performance configurations of an ESSD AutoPL disk.
50000
PerformanceControlOptionsobjectNo

The disk performance specifications.

IOPSintegerNo

The new IOPS rate of the disk. You can modify the IOPS rate 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 Block storage 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 Block storage performance.

200
RecoverstringNo

Specifies whether to reset the IOPS rate and throughput of the disk. This parameter takes effect only when the disk belongs to 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 rate and throughput of the disk are 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.-
400NoPermission.PriceThe operation requires price permission. Please either apply for permission from your main account, or set the parameter AutoPay as true.-
400NoPermission.RefundThe operation requires refund permission. Please apply for permission from your main account.-
400InvalidOperation.InstanceRenewWithDowngradeInPlanThe operation is denied due to the specified instance has renew with downgrade record in plan.There are renewal downgrade orders that have not yet taken effect. This operation is not allowed before the order takes effect.
400InvalidParameter.Conflict%sThe specified parameter is invalid. Check whether parameter conflicts exist. %s is a variable. An error message is dynamically returned based on call conditions.
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.
404InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred. Try again later.
404InvalidDiskCategory.ValueUnauthorizedThe specified DiskCategory is not authorized.The disk type is unauthorized.

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

Change history

Change timeSummary of changesOperation
2024-08-23The Error code has changedView Change Details
2024-07-31The Error code has changedView Change Details
2024-01-29The Error code has changedView Change Details
2023-10-18The Error code has changedView Change Details
2023-05-16The Error code has changedView Change Details
2023-04-17The Error code has changed. The request parameters of the API has changedView Change Details