Changes the type of a disk or modifies the performance level (PL) of an enterprise SSD (ESSD). Regional Enterprise SSDs (ESSDs), basic disks, elastic ephemeral disks, and local disks do not support disk type changes.
Operation description
To minimize the impact of specification changes on your workloads, perform the changes during off-peak hours.
When you call this operation, note the following:
-
To modify the ESSD performance level (PL) of an enterprise SSD (ESSD):
-
Subscription enterprise SSDs (ESSDs) support only performance level (PL) upgrades.
-
Pay-as-you-go enterprise SSDs (ESSDs) support both upgrades and downgrades of the performance level (PL), but cannot be downgraded to PL0.
-
The enterprise SSD (ESSD) must be in the In Use (In_use) or Available state.
-
If the enterprise SSD (ESSD) is attached to an ECS instance, the instance must be in the Running or Stopped state. The instance cannot be in an expired state or have an overdue payment.
-
Because the ESSD performance level is subject to disk capacity, if you cannot upgrade the performance level, scale out the disk (ResizeDisk) and try again. For more information, see Enterprise SSD.
-
-
For precautions about changing the disk type, see Change the disk type.
-
For information about supported disk type changes, see Supported disk type changes.
After a disk type change, billing changes as follows:
-
Pay-as-you-go disks: billed based on the new disk type.
-
Subscription disks: the additional fee is calculated based on the price difference between the old and new configurations and the remaining days in the billing cycle (from 00:00 the next day to the end of the validity period).
For billing information about disks, see Block storage billing.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyDiskSpec |
update |
*Disk
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DiskId |
string |
Yes |
The ID of the disk. |
d-bp131n0q38u3a4zi**** |
| PerformanceLevel |
string |
No |
The new performance level (PL) of the enterprise SSD (ESSD). Valid values:
Default value: PL1. |
PL2 |
| DiskCategory |
string |
No |
The new disk type. Valid values:
Default value: empty, which means no disk type change is performed. Note
|
cloud_essd |
| DryRun |
boolean |
No |
Specifies whether to perform only a dry run for this request. Valid values:
Default value: false. |
false |
| ProvisionedIops |
integer |
No |
Specifies whether to modify the provisioned read/write IOPS of the ESSD AutoPL disk. Valid values: 0 to min{50,000, 1,000 × capacity - baseline performance}. Baseline performance = min{1,800 + 50 × capacity, 50,000}. Note
This parameter is supported only when DiskCategory is set to cloud_auto. For more information, see ESSD AutoPL disk and Modify the provisioned performance of an ESSD AutoPL disk. |
50000 |
| PerformanceControlOptions |
object |
No |
The collection of disk performance control parameters. |
|
| IOPS |
integer |
No |
The target IOPS of the disk. Only the IOPS of dedicated block storage cluster disks can be modified. Valid values: 900 to the maximum IOPS of a single disk, in increments of 100. For more information, see Disk performance. |
2000 |
| Recover |
string |
No |
Resets the disk performance. This parameter is supported only for dedicated block storage cluster disks. If this parameter is specified, the PerformanceControlOptions.IOPS and PerformanceControlOptions.Throughput parameters do not take effect. Currently, only All is supported, which resets the disk IOPS and throughput to their initial values. |
All |
| Throughput |
integer |
No |
The target throughput of the disk, in MB/s. Only the throughput of dedicated block storage cluster disks can be modified. Valid values: 60 to the maximum throughput of a single disk. For more information, see Disk performance. |
200 |
| DestinationZoneId |
string |
No |
Note
This parameter is currently in invitational preview and is not available for use. |
cn-hangzhou-g |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| OrderId |
string |
The ID of the generated order. Note
An order ID is returned only when a subscription disk is changed or modified. |
20413515388**** |
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TaskId |
string |
The ID of the disk type change task. Note
This parameter is not returned if you only modified the performance level (PL) of an enterprise SSD (ESSD). |
t-bp67acfmxazb4p**** |
Examples
Success response
JSON format
{
"OrderId": "20413515388****",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TaskId": "t-bp67acfmxazb4p****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidPerformanceLevel.Malformed | The specified parameter PerformanceLevel is not valid. | The specified PerformanceLevel parameter is invalid. |
| 400 | InvalidDiskCategory.ValueNotSupported | The specified parameter "DiskCategory" is not valid. | The specified cloud disk type DiskCategory is invalid. |
| 400 | InvalidPerformanceLevelParam.Mismatch | The specified parameter PerformanceLevel should be null when DiskCategory is not cloud_essd. | |
| 400 | OperationDenied.DiskInDedicatedBlockStorageCluster | The disk in dedicated block storage cluster is not allowed to do this operation. | |
| 400 | IncorrectDiskStatus.ReplicationStatusNotFound | Disk replication status not found. | |
| 400 | IncorrectDiskStatus.InReplication | Disk already in replication. | |
| 400 | ProvisionedIopsForDiskCategoryUnsupported | The specified disk category does not support provisioned iops. | The specified disk type does not support provisioned IOPS. |
| 400 | InvalidProvisionedIops.LimitExceed | The provisioned iops exceeds the limit. | The filled ProvisionedIops parameter exceeds the limit. |
| 400 | QuotaExceed.DiskCapacity | The 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. |
| 400 | MalformedParameter.PerformanceControlOptions | Parameter invalid, %s. | The parameter is invalid. |
| 400 | InvalidPerformanceControlOptions.ModifyOperationUnsupported | The specified performance control options are conflicts with disk category or performance level or ProvisionIOPS. | The disk performance control parameters conflict with the disk type, disk performance level, or provisioned IOPS parameters. |
| 400 | NoPermission.Price | The operation requires price permission. Please either apply for permission from your main account or set the parameter AutoPay to true. | |
| 400 | NoPermission.Refund | The operation requires refund permission. Please apply for permission from your main account. | This account does not have permission to operate refund, and the main account needs to authorize refund-related permissions. |
| 400 | InvalidOperation.InstanceRenewWithDowngradeInPlan | The 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. |
| 400 | InvalidOperation.InstanceStatusUnsupported | The specified instance status is not supported for this operation. The expected status is Running or Stopped. | |
| 400 | MissingParameter.DestinationZoneId | The parameter DestinationZoneId must be specified when modifying the disk specification from a regional disk to a zone disk. | The parameter DestinationZoneId must be specified when modifying the disk specification from a regional disk to a zone disk. |
| 400 | InvalidDestinationZoneId.Mismatch | The specified DestinationZoneId of the regional disk with 'In-use' status should remain consistent with the ZoneId of instance. | The specified DestinationZoneId of the regional disk with 'In-use' status should remain consistent with the ZoneId of instance. |
| 400 | InvalidOperation.MultiAttachRegionalDiskUnsupported | The multi-attach regional disk with 'In-use' status attached to more than one instance is not allowed to modify disk spec. | The multi-attach regional disk with 'In-use' status attached to more than one instance is not allowed to modify disk spec. |
| 400 | InvalidDestinationZoneId.DiskCategoryUnsupported | The specified disk category does not allow the DestinationZoneId parameter for this operation. | The disk type of the specified disk does not support specifying DestinationZoneId during a specification change. |
| 400 | IncorrectInstanceStatus | The current status of the instance does not support this operation. | The instance is in a state that does not support the current operation. |
| 400 | InvalidOperation.DiskStatusNotSupported | The specified disk is not in a valid status for the current operation. Ensure the disk is in a valid status before you modify its specification. | |
| 500 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. | |
| 403 | DiskInArrears | The specified operation is denied because the disk has overdue payments. Please settle the outstanding balance. | |
| 403 | InstanceExpiredOrInArrears | The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). | |
| 403 | IncorrectDiskStatus | The current disk status does not support this operation. | |
| 403 | DiskCreatingSnapshot | The operation is denied due to a snapshot of the specified disk is not completed yet. | |
| 403 | OperationDenied | The type of the disk does not support the operation. | The disk category does not support the specified operation. |
| 403 | InvalidPerformanceLevel.TooLow | Specified new performance level is lower than the original performance level. | |
| 403 | OperationDenied.PerformanceLevelNotMatch | The specified PerformanceLevel and disk size do not match. | The specified performance level and disk size do not match. |
| 403 | UserNotInTheWhiteList | The user is not in modify disk category white list. | |
| 403 | InvalidRegion.NotSupport | The specified region does not support modify disk category. | |
| 403 | InvalidDiskCategory.ValueNotSupported | The current disk category of the resource does not support this operation. | The disk type on the specified resource does not support this operation. |
| 403 | Downgrade.NotSupported | Downgrade operation for prepay resource is not supported. | |
| 403 | InvalidInstanceType.NotSupportDiskCategory | The 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. |
| 403 | ModifyingDiskCategoryLimitExceed | The amount of modifying disk category exceeds the limit. | The number of disks being modified in the current region has exceeded the upper limit. |
| 403 | DiskInCoolingPeriod | There is a cooling period after the disk is successfully modified. | The disk is within a specification change cooldown period and cannot be modified again. |
| 403 | DiskHasFlashSnapshot | The specified disk with flash snapshots do not support modify disk category. | |
| 403 | NoChangeInDiskCategoryAndPerformanceLevel | There is no change between the parameters transmitted and the current. | The specified disk category and performance level are the same as those of the current disk. |
| 403 | OperationDenied.NoStock | The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. | The requested resources are insufficient. |
| 403 | InvalidOperation.MultiAttachDisk | Multi attach disk does not support this operation. | Disks for which the multi-attach feature is enabled do not support the operation. |
| 403 | OperationDenied.DiskExpansionUnfinished | The instance has not been restarted after a previous disk expansion. | |
| 403 | InvalidDiskCategory.NotSupported | The specified disk category is not supported. | The specified disk category does not support this operation. |
| 403 | InvalidPerformanceParameter.DiskNotInDedicatedStorageCluster | The specified disk is not in a dedicated storage cluster. Performance control options cannot be modified. | |
| 403 | InvalidStatus.DiskUnderPerformanceControl | The specified disk is under performance control. Any modifications to the category or performance level of the specified disk are unsupported. | |
| 403 | InvalidStatus.DiskNotReady | The specified disk is not ready. The status must be either In_use or Available. | |
| 403 | InvalidOperation.DiskInReplicaPairsUnsupported | The disk in replication pairs does not support this operation. | The disk in replication pairs does not support this operation. |
| 403 | InvalidDisk.DetachedSystemDisk | The specified resource is/has a detached system disk %s , not support current operation. | The specified disk is a detached system disk. This operation is not supported. |
| 403 | InvalidDiskCategory.InstanceTypeUnsupported | The current instance type does not support the specified disk category. Please check the list of disk category supported by the instance type and select an appropriate disk category for configuration. | The current instance type does not support the specified disk class. Check the list of disk types supported by the instance type and select the appropriate disk category to configure. |
| 403 | InvalidOperation.CMKNotEnabled | The specified KMS key must be in an enabled state. Please enable the key in the KMS console and try again. | |
| 403 | InvalidOperation.CMKUnauthorized | The specified KMS key is not authorized for the ECS service. Please grant the ECS service permission to use the key in the KMS console and try again. | |
| 403 | InstanceLockedForSecurity | The instance is locked for security reasons. Please contact Security Technical Support for assistance. | The instance is locked for security reasons. You can contact the security technical support. |
| 404 | InvalidDiskId.NotFound | The specified disk does not exist. | The specified disk does not exist. Check whether the disk ID is correct. |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The specified instanceId is invalid. |
| 404 | InternalError | The request processing has failed due to an internal error and you may retry later or contact support with the request ID. | |
| 404 | InvalidDiskCategory.ValueUnauthorized | The specified DiskCategory is not authorized. | |
| 404 | OperationDenied | The specified InstanceType or Zone is not available or not authorized. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.