详情页标题前

阿里云ECS云服务器ResizeDisk-云淘科技

详情页1

调用ResizeDisk扩容一块云盘,支持扩容系统盘和数据盘。

接口说明

说明 扩容前,请务必查询云盘采用的分区格式。如果是MBR格式,不支持扩容到2TiB以上,否则会造成数据丢失。对于MBR分区扩容,建议您重新创建并挂载一块数据盘,采用GPT分区格式后,再将已有数据拷贝至新的数据盘上。更多详情,请参见扩容云盘容量。

  • 支持扩容的云盘类型包括普通云盘(cloud)、高效云盘(cloud_efficiency)、SSD云盘(cloud_ssd)、ESSD云盘(cloud_essd)、ESSD Entry云盘(cloud_essd_entry)和ESSD AutoPL云盘(cloud_auto)。
  • 当云盘正在创建快照时,不允许扩容。
  • 云盘挂载的实例的状态必须为运行中Running)或者已停止Stopped)。
  • 扩容时,不会修改云盘分区和文件系统,您需要在扩容后自行分配存储空间。
  • 开启多重挂载特性的云盘支持在线扩容和离线扩容。离线扩容前,您需要确保所挂载的全部实例均为已停止Stopped)状态。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称

类型

是否必选

示例值

描述

Action String ResizeDisk

系统规定参数。取值:ResizeDisk

DiskId String d-bp67acfmxazb4p****

云盘ID。您可以调用DescribeDisks查询云盘ID。

Type String offline

扩容云盘的方式。取值范围:

  • offline(默认):离线扩容。扩容后,您必须在控制台重启实例或者调用API RebootInstance使操作生效。
  • online:在线扩容,无需重启实例即可完成扩容。云盘类型支持高效云盘、SSD云盘和ESSD云盘。
NewSize Integer 1900

希望扩容到的云盘容量大小。单位为GiB。取值范围如下:

  • 系统盘:
    • 普通云盘:20~500。
    • 其他类型云盘:20~2048。
  • 数据盘:
    • 高效云盘(cloud_efficiency):20~32768。
    • SSD云盘(cloud_ssd):20~32768。
    • ESSD云盘(cloud_essd):具体取值范围与PerformanceLevel的取值有关。可以调用DescribeDisks查询云盘信息,再根据查询结果中的PerformanceLevel参数查看取值。
      • PL0:40~32768。
      • PL1:20~32768。
      • PL2:461~32768。
      • PL3:1261~32768。
    • 普通云盘(cloud):5~2000。
    • ESSD AutoPL云盘(cloud_auto):40~32768。

    • ESSD Entry云盘(cloud_essd_entry):10~32768。

指定的新云盘容量必须比原云盘容量大。

ClientToken String 123e4567-e89b-12d3-a456-426655440000

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken只支持ASCII字符,且不能超过64个字符。更多信息,请参见如何保证幂等性。

返回数据

名称

类型

示例值

描述

OrderId String 20413515388****

生成的订单ID。

说明 仅在扩容包年包月云盘时会返回订单ID。

RequestIdStringF3CD6886-D8D0-4FEE-B93E-1B732396****

请求ID。

示例

请求示例

https://ecs.aliyuncs.com/?Action=ResizeDisk
&DiskId=d-bp67acfmxazb4p****
&NewSize=1900
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml


    20413515388****
    F3CD6886-D8D0-4FEE-B93E-1B732396****

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "OrderId" : "20413515388****",
  "RequestId" : "F3CD6886-D8D0-4FEE-B93E-1B732396****"
}

错误码

HttpCode

错误码

错误信息

描述

400 InvalidDataDiskSize.ValueNotSupported The specified DataDisk.n.Size beyond the permitted range, or the capacity of snapshot exceeds the size limit of the specified disk category. 指定的 DataDisk.n.Size 超出允许范围,或者快照的容量超过指定磁盘类别的大小限制。
400 InvalidDataDiskCategory.ValueNotSupported %s 指定的数据磁盘类型无效。%s为变量,将根据调用API的实际情况动态返回错误信息。
400 InvalidParameter.Conflict %s 您输入的参数无效,请检查参数之间是否冲突。%s为变量,将根据调用API的实际情况动态返回错误信息。
400 InvalidDataDiskSize.ValueNotSupported %s 指定的数据盘容量无效。%s为变量,将根据调用API的实际情况动态返回错误信息。
400 InvalidSystemDiskSize.ValueNotSupported %s 当前操作不支持设置的系统盘大小。
400 IncompleteParamter Some fields can not be null in this request. 请求中缺失参数。
400 InvalidRegionId.MalFormed The specified RegionId is not valid. 指定的 RegionId 不合法。
400 InvalidParam.Type The specified type is not supported. 指定的参数Type无效。
400 LastOrderProcessing The previous order is still processing, please try again later. 订单正在处理中,稍后重试。
400 InvalidSystemDiskSize.ImageNotSupportResize The specified image does not support resize. 指定的镜像不支持扩容。
400 QuotaExceed.DiskCapacity The used capacity of disk type has exceeded the quota in the zone, %s. 指定磁盘类型的已用容量超出可用区配额限制,您可以前往配额中心查询和申请提升磁盘容量配额。
400 InvalidOperation.InstanceRenewWithDowngradeInPlan The operation is denied due to the specified instance has renew with downgrade record in plan. 存在未生效的续费降配订单。订单生效前不允许此操作。
403 OperationDenied The type of the disk does not support the operation. 此磁盘种类不支持指定的操作。
403 OperationDenied The status of the disk or the instance that the disk is attaching with does not support the operation. 此磁盘或实例状态无法执行指定的操作。
403 InvalidDiskSize.TooSmall Specified new disk size is less than the original disk size. 指定的新磁盘小于原始磁盘。
403 InvalidDiskSize.TooLarge Specified new disk size is beyond the permitted range. 指定的新磁盘大小超过限制。
403 InstanceExpiredOrInArrears The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). 实例已过期或者欠费,请您续费或者结清后再进行操作。
403 DiskInArrears The specified operation is denied as your disk owing fee. 指定的磁盘已欠费。
403 IncorrectInstanceStatus The current status of the resource does not support this operation. 该资源目前的状态不支持此操作。
403 DiskCreatingSnapshot The operation is denied due to a snapshot of the specified disk is not completed yet. 指定的磁盘正在创建快照。
403 InvalidDiskSize Specified new disk size is less than or equal the original disk size. 指定的新磁盘大小必须大于原始磁盘大小。
403 Operation.Conflict The operation may conflicts with others. 该操作与其他操作冲突。
403 InstanceLockedForSecurity The instance is locked due to security. 您的资源被安全锁定,拒绝操作。
403 IncorrectDiskStatus The current disk status does not support this operation. 当前的磁盘不支持此操作,请您确认磁盘处于正常使用状态,是否欠费。
403 UserNotInTheWhiteList The user is not in disk white list. 您不在磁盘白名单中,请加入白名单后重试。
403 InvalidDiskCategory.NotSupported The specified disk category is not supported. 指定的云盘类型不支持当前操作。
403 InvalidRegion.NotSupport The specified region does not support resize online. 该地域不支持在线扩容。
403 InvalidDiskCategory.NotSupported The specified disk category does not support resize online. 指定的磁盘类型不支持在线扩容。
403 IncorrectInstanceStatus The current status of the resource does not support resize online. 当前资源的状态不支持此操作。
403 InvalidInstanceStatus.NotRunning The status of instance to which the disk attachs must be running when resizing online. 在线调整磁盘大小时,磁盘连接到的实例的状态必须正在运行。
403 InvalidParameter.KMSKeyId.CMKUnauthorized The CMK needs to be added ECS tag. CMK 未授权
403 InvalidParameter.KMSKeyId.CMKNotEnabled The CMK needs to be enabled. 加密云盘设置了 KMSKeyId 后,CMK必须处于启用状态。您可以调用密钥管理服务的 DescribeKey 接口查询指定CMK的相关信息。
403 InvalidParameter.KMSKeyId.KMSUnauthorized ECS service have no right to access your KMS. ECS 服务无权访问您的 KMS。
403 SecurityRisk.3DVerification We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email. 我们检测到您的默认信用卡或借记卡存在安全风险。请通过电子邮件中的链接进行验证。
403 QuotaExceeded.PostpaidDataDiskCapacity The quota of postpaid data disk capacity exceeds. 按量付费数据盘使用容量超出配额。
403 InvalidOperation.MultiAttachDiskNotSupportResizeOnline Multi attach disk does not support resize online. 开启多重挂载特性的云盘不支持在线扩容。
404 InvalidDiskId.NotFound The specified disk does not exist. 指定的磁盘不存在。请您检查磁盘 ID 是否正确。
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. 指定的实例不存在,请您检查实例ID是否正确。
500 InternalError The request processing has failed due to some unknown error. 内部错误,请重试。
500 InternalError The request processing has failed due to some unknown error, exception or failure. 内部错误,请重试。

访问错误中心查看更多错误码。

腾讯云1折,限时活动,即将结束: 马上收藏
同尘科技为腾讯云授权服务中心。
购买腾讯云产品享受折上折,更有现金返利。同意关联立享优惠

转转请注明出处:https://www.yunxiaoer.com/152464.html

(0)
上一篇 2023年12月9日 下午4:55
下一篇 2023年12月9日 下午4:55
详情页2

相关推荐

  • 阿里云对象存储OSSconfig(创建配置文件)-云淘科技

    您可以通过config命令创建配置文件,用于存储OSS访问信息。您可以在使用其他命令时添加-c选项,ossutil将通过指定的配置来访问OSS。 重要 本文各命令行示例均基于Linux 64位系统,其他系统请将命令开头的./ossutil64替换成对应的Binary名称。详情请参见命令行工具ossutil快速入门。 命令格式 该命令有交互式和非交互式两种用法…

    阿里云对象存储 2023年12月10日
  • 阿里云云原生大数据计算服务 MaxComputePyODPS制作第三方包-云淘科技

    PyODPS自V0.11.3版本开始提供了pyodps-pack命令行工具,用于制作符合PyODPS及DataWorks PyODPS节点标准的三方包,使用方法类似pip命令。您可以使用该工具将所有依赖项目制作成一个后缀为.tar.gz的压缩包,其中包含所有依照MaxCompute或DataWorks环境编译并打包的项目依赖。您也可以使用该工具打包您项目中自…

  • 阿里云对象存储OSS索引切割-云淘科技

    您可以通过索引切割参数,将OSS存储的原图按指定大小分割,并截取需要的图片。本文介绍索引切割所用到的参数及示例。 参数说明 操作名称:indexcrop 参数说明如下: 参数 描述 取值范围 x 指定在x轴切割出的每块区域的长度。x参数与y参数只能任选其一。 [1,图片宽度] y 指定在y轴切割出的每块区域的长度。x参数与y参数只能任选其一。 [1,图片高度…

    2023年12月10日
  • 阿里云ECS云服务器ModifyInstanceNetworkSpec-云淘科技

    调用ModifyInstanceNetworkSpec修改ECS实例的带宽配置。当实例现有网络规格不满足要求时,可以通过修改实例的带宽配置提高网络性能。 接口说明 调用该接口时,您需要注意: 自2020年11月27日起,创建和变配ECS实例时带宽峰值受账户限速策略影响。如需更大带宽峰值,请提交工单。具体限速策略如下: 单个地域下,所有按使用流量计费ECS实例…

    阿里云服务器 2023年12月9日
  • 信息流广告,信息流部分建议宽度830px,只针对默认列表样式,顺序随机
  • 阿里云RDS数据库GrantAccountPrivilege – 授权账号访问数据库-云淘科技

    该接口用于授权数据库账号访问指定的数据库。 接口说明 适用引擎 RDS MySQL RDS PostgreSQL RDS SQL Server RDS MariaDB 相关功能文档 注意 使用该接口前,请仔细阅读功能文档,确保完全了解使用接口的前提条件及使用后造成的影响后,再进行操作。 RDS MySQL修改账号权限 RDS PostgreSQL数据库账号授…

    阿里云数据库 2023年12月9日

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
本站为广大会员提供阿里云、腾讯云、华为云、百度云等一线大厂的购买,续费优惠,保证底价,买贵退差。