tencent cloud

云硬盘

新手指引
产品公告
腾讯云云硬盘快照正式商业化计费公告
腾讯云云硬盘快照跨地域复制功能正式商业化计费公告
产品简介
产品概述
产品优势
应用场景
地域和可用区
云硬盘实例
云硬盘快照
访问管理
相关产品
上一代产品
Service Regions and Service Providers
产品计费
计费概述
价格总览
购买指引
续费指引
欠费说明
快速入门
步骤1:创建云硬盘
步骤2:挂载云硬盘
步骤3:初始化云硬盘
用户指南
操作总览
使用限制
创建云硬盘
挂载云硬盘
初始化云硬盘
扩容云硬盘
卸载云硬盘
销毁云硬盘
查看云硬盘信息
调整云硬盘类型
调整云硬盘性能
云硬盘数据防护配置
云硬盘数据备份点
管理快照
监控与告警
实践教程
如何衡量云硬盘的性能
多块弹性云硬盘构建 LVM 逻辑卷
MBR 分区云硬盘扩容至大于 2TB
故障处理
Windows 云服务器无法卸载云硬盘
Linux 云服务器重启后云硬盘未自动挂载
API 文档
History
Introduction
API Category
Making API Requests
Snapshot APIs
Cloud Disk APIs
Data Types
Error Codes
常见问题
功能相关问题
计费相关问题
性能相关问题
快照相关问题
使用相关问题
服务等级协议
联系我们
词汇表

ModifyDiskAttributes

PDF
聚焦模式
字号
最后更新时间: 2023-07-10 16:37:18

1. API Description

Domain name for API request: cbs.tencentcloudapi.com.

  • Only the project ID of elastic cloud disk can be modified. The project ID of the cloud disk created with the CVM is linked with the CVM. The project ID can be can be queried in the Portable field in the output parameters through the API DescribeDisks.
  • "Cloud disk name" is only used by users for their management. Tencent Cloud does not use the name as the basis for ticket submission or cloud disk management.
  • Batch operations are supported. If multiple cloud disk IDs are specified, all the specified cloud disks must have the same attribute. If there is a cloud disk that does not allow this operation, the operation is not performed and a specific error code is returned.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyDiskAttributes.
Version Yes String Common Params. The value used for this API: 2017-03-12.
Region No String Common Params. This parameter is not required for this API.
DiskIds.N Yes Array of String IDs of one or more cloud disks to be operated. If multiple cloud disk IDs are selected, it only supports modifying all cloud disks with the same attributes.
DiskName No String Name of new cloud disk.
Portable No Boolean Whether it is an elastic cloud disk. FALSE: non-elastic cloud disk; TRUE: elastic cloud disk. You can only modify non-elastic cloud disks to elastic cloud disks.
ProjectId No Integer The new project ID of the cloud disk. Only the project ID of elastic cloud disk can be modified. The available projects and their IDs can be queried via the API DescribeProject.
DeleteWithInstance No Boolean Whether the cloud disk is terminated with the CVM after it has been successfully mounted. TRUE indicates that it is terminated with the CVM. FALSE indicates that it is not terminated with the CVM. This is only supported for cloud disks and data disks that are pay-as-you-go.
DiskType No String When changing the type of a cloud disk, this parameter can be passed to indicate the desired cloud disk type. Value range:
  • CLOUD_PREMIUM: Premium cloud storage.
  • CLOUD_SSD: SSD cloud disk.
    Currently, batch operations are not supported for changing type. That is, when DiskType is passed, only one cloud disk can be passed through DiskIds.
    When the cloud disk type is changed, the changing of other attributes is not supported concurrently.
  • BurstPerformanceOperation No String Enable/disable disk bursting.

    3. Output Parameters

    Parameter Name Type Description
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Renaming a cloud disk

    This example shows you how to rename the specified cloud disk test_data_disk.

    Input Example

    POST / HTTP/1.1
    Host: cbs.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyDiskAttributes
    <Common request parameters>
    
    {
        "DiskName": "test_data_disk",
        "DiskIds": [
            "disk-fyctkqsf"
        ]
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "bf84fb00-6949-c0f6-aea8-5a1f806401c2"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

    Error Code Description
    InternalError.ComponentError Dependent component request failed. Please contact customer service.
    InvalidAccount.InsufficientBalance Insufficient account balance
    InvalidDisk.NotSupported Indicates that the operation is not supported for the cloud disk.
    InvalidDiskId.NotFound The ‘DiskId’ entered does not exist.
    InvalidInstanceId.NotFound The ‘InstanceId’ entered does not exist.
    InvalidParameter.DiskConfigNotSupported Currently configured cloud disk not supported in current region.
    InvalidParameterValue Invalid parameter value.
    InvalidParameterValue.LimitExceeded Number of parameter values exceeds the limit.
    MissingParameter Missing parameter.
    ResourceInUse.DiskMigrating The cloud disk is being migrated. Try again later.
    ResourceInsufficient Insufficient resources.
    ResourceNotFound.NotFound The resource is not found.
    ResourceUnavailable.NotSupported The resource does not support this operation.

    帮助和支持

    本页内容是否解决了您的问题?

    填写满意度调查问卷,共创更好文档体验。

    文档反馈