ModifyDesktopSpec - 变更云电脑规格

更新时间:
复制 MD 格式

变更云电脑的实例规格,并扩容云电脑的系统盘和数据盘。

接口说明

Changing the configurations of a cloud computer includes changing the instance type of the cloud computer and scaling up the disks of the cloud computer.

  • Before you change the configurations of a cloud computer, you must understand the instance types and disk sizes supported by cloud computers. For more information, see Cloud computer types. You can call the DescribeDesktopTypes operation to query the instance types supported by cloud computers.

  • You must change at least one of the following configurations: instance type, system disk size, and data disk size of the cloud computer. You must specify at least one of the following parameters: DesktopType, RootDiskSizeGib, and UserDiskSizeGib. Take note of the following items:

    • The instance type of a cloud computer includes the configurations of vCPUs, memory, and GPUs. You can only change an instance type to another. You cannot change only one of the configurations.

    • You cannot change a cloud computer between the General Office type and the non-General Office type. You cannot yet change a cloud computer between the Graphics type and the non-Graphics type.

    • The system disk and data disks of a cloud computer can only be scaled up and cannot be scaled down.

    • If the billing method of the cloud computer is subscription, the system calculates the price difference based on the configuration difference between the original cloud computer and the new cloud computer. You must make up for the price difference or receive a refund for the price difference.

    • We recommend that you do not change the configurations of a cloud computer twice within 5 minutes.

    • When you change the configurations of a cloud computer, the cloud computer must be in the Stopped state.

  • After you change the configurations of a cloud computer, the personal data on the cloud computer is not affected.

调试

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

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

ecd:ModifyDesktopSpec

update

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

RegionId

string

地域 ID。您可以调用 DescribeRegions 查询最新的地域列表。

cn-hangzhou

DesktopId

string

云电脑 ID。

ecd-4543qyik164a4****

DesktopType

string

目标实例规格。您可以调用 DescribeDesktopTypes 查询云电脑支持的实例规格。

eds.general.2c8g

RootDiskSizeGib

integer

变更后的系统盘大小。单位:GiB。取值范围:80~500 GiB,且必须是 10 的整数倍。

80

UserDiskSizeGib

integer

变更后的数据盘大小。单位:GiB。

  • 非图形型云电脑的数据盘大小取值范围:20~1020 GiB,且必须是 10 的整数倍。

  • 图形型云电脑的数据盘大小取值范围:40~1020 GiB,且必须是 10 的整数倍。

100

AutoPay

boolean

是否自动付费。

默认值:true。取值范围:

  • true:自动付费。请确保阿里云账号余额充足,否则订单会产生异常。

  • false:只生成订单,不自动付费。

枚举值:

  • true :
  • false :

false

UserDiskPerformanceLevel

string

数据盘的性能等级(PL)。默认值:PL0。

取值范围:

  • PL0

  • PL1

  • PL2

  • PL3

枚举值:

  • PL1 :

    PL1

  • PL0 :

    PL0

  • PL3 :

    PL3

  • PL2 :

    PL2

PL0

PromotionId

string

促销活动 ID。

500033080110596

ResourceSpecs

array<object>

资源规格模板数组。

object

The resource specification template.

DesktopId

string

云电脑 ID。

ecd-4543qyik164a4****

RootDiskSizeGib

integer

目标系统盘大小。取值范围:80~500 GiB,且必须是 10 的整数倍。

80

UserDiskSizeGib

integer

目标数据盘大小。取值范围:80~500 GiB,且必须是 10 的整数倍。

20

ResourceType

string

资源类型。

说明

非包年包月云电脑可不传该参数。

枚举值:

  • DesktopMonthPackage :

    按月购买云电脑

DesktopMonthPackage

ResellerOwnerUid

integer

转售模式的资源归属用户 ID,非转售模式无需填写该参数。

1422724566551XXX

返回参数

名称

类型

描述

示例值

object

Schema of response.

OrderId

string

订单 ID。

123456789

RequestId

string

请求 ID。

1CBAFFAB-B697-4049-A9B1-67E1FC5F****

OrderIds

array

订单 ID 数组。

integer

订单 ID。

123456789

示例

正常返回示例

JSON格式

{
  "OrderId": "123456789",
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "OrderIds": [
    123456789
  ]
}

错误码

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

变更历史

更多信息,参考变更详情