ModifyDiskAttributes

Last updated: 2020-04-03 10:29:11

    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.

    Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: cbs.ap-shanghai-fsi.tencentcloudapi.com

    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 parameter. The value used for this API: ModifyDiskAttributes.
    Version Yes String Common parameter. The value used for this API: 2017-03-12.
    Region Yes String Common parameter. For more information, please see the list of regions supported by the product.
    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.
    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.
    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.
    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.
  • 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 Modifying the Name of a Cloud Disk

    Input Example

    https://cbs.tencentcloudapi.com/?Action=ModifyDiskAttributes
    &DiskIds.0=disk-fyctkqsf
    &DiskName=test_data_disk
    &<common request parameters>

    Output Example

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

    Example2 Modifying the Type of the Cloud Disk

    Upgrade an HDD elastic cloud disk to a premium cloud disk, which is 100 GB in size and is not currently mounted.

    Input Example

    https://cbs.tencentcloudapi.com/?Action=ModifyDiskAttributes
    &DiskIds.0=disk-hdz4c824
    &DiskType=CLOUD_PREMIUM
    &<common request parameters>

    Output Example

    {
      "Response": {
        "RequestId": "d010c751-3edb-4388-878c-1de0891aa1fd"
      }
    }

    5. Developer Resources

    API Explorer

    This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

    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.
    InvalidDisk.NotSupported Indicates that the operation is not supported for the cloud disk.
    InvalidDiskId.NotFound The ‘DiskId’ entered does not exist.
    InvalidParameterValue Invalid parameter value. Parameter value format error or parameter value not supported.
    MissingParameter Missing parameter. Request does not include the required parameter.

    Was this page helpful?

    Was this page helpful?

    • Not at all
    • Not very helpful
    • Somewhat helpful
    • Very helpful
    • Extremely helpful
    Send Feedback
    Help