cbs — Cloud Block Storage
cbs · 2017-03-12

CreateDisks

POST

Create cloud disks.

Wire call

Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /cbs/CreateDisks path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.

curl
curl -sS https://cbs.api3.convergecloud.com/ \
  -H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/cbs/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'Host: cbs.api3.convergecloud.com' \
  -H 'X-TC-Action: CreateDisks' \
  -H 'X-TC-Version: 2017-03-12' \
  -H 'X-TC-Timestamp: <unix-seconds>' \
  -H 'X-TC-Region: luzon' \
  -d '{"Placement":"<Placement>","DiskChargeType":"<DiskChargeType>","DiskType":"<DiskType>"}'

Request parameters

FieldTypeRequiredDescription
PlacementPlacementYesLocation of the instance. You can use this parameter to specify the attributes of the instance, such as its availability zone and project. If no project is specified, the default project will be used.
DiskChargeTypestringYesCloud disk billing mode. POSTPAID_BY_HOUR: Pay-as-you-go by hour CDCPAID: Billed together with the bound dedicated cluster For more information on the pricing in each mode, see Pricing Overview.
DiskTypestringYesCloud disk media type. Valid values: CLOUD_BASIC: HDD Cloud Storage CLOUD_PREMIUM: Premium Cloud Disk CLOUD_BSSD: Balanced SSD CLOUD_SSD: SSD CLOUD_HSSD: Enhanced SSD CLOUD_TSSD: ulTra SSD.
DiskNamestringNoCloud disk name. If it is not specified, "Unnamed" will be used by default. The maximum length is 60 bytes.
TagsTag[]NoTags bound to the cloud disk.
SnapshotIdstringNoSnapshot ID. If this parameter is specified, the cloud disk will be created based on the snapshot. The snapshot must be a data disk snapshot. To query the type of a snapshot, call the DescribeSnapshots API and see the `DiskUsage` field in the response.
DiskCountintegerNoNumber of cloud disks to be created. If it is not specified, `1` will be used by default. There is an upper limit on the maximum number of cloud disks that can be created in a single request. For more information, see Use Limits.
ThroughputPerformanceintegerNoExtra performance purchased for a cloud disk. This optional parameter is only valid for ulTra SSD (CLOUD_TSSD) and Enhanced SSD (CLOUD_HSSD).
DiskSizeintegerNoCloud disk size in GB. `DiskSize` is not required if `SnapshotId` is specified. In this case, the size of the cloud disk will be equal to that of the snapshot. If you specify both `SnapshotId` and `DiskSize`, the specified disk size cannot be smaller than the snapshot size. For the value range of cloud disk size, see Cloud Disk Types.
ShareablebooleanNoOptional parameter. Default value: `False`. If `True` is specified, the new cloud disk will be shared.
ClientTokenstringNoA unique string supplied by the client to ensure that the request is idempotent. Its maximum length is 64 ASCII characters. If this parameter is not specified, the idempotency of the request cannot be guaranteed.
EncryptstringNoThis parameter is used to create encrypted cloud disks. It is fixed at `ENCRYPT`.
DiskChargePrepaidDiskChargePrepaidNoRelevant parameter settings for the prepaid mode (i.e., monthly subscription). The monthly subscription cloud disk purchase attributes such as usage period and whether or not auto-renewal is set up can be specified using this parameter. This parameter is required when creating a prepaid cloud disk. This parameter is not required when creating an hourly postpaid cloud disk.
DeleteSnapshotintegerNoWhether to delete the associated non-permanently reserved snapshots upon deletion of the source cloud disk. `0`: No (default value). `1`: Yes. To check whether a snapshot is permanently reserved, see the `IsPermanent` field returned by the `DescribeSnapshots` API.
AutoMountConfigurationAutoMountConfigurationNoSpecifies whether to automatically attach and initialize the newly created data disk.
DiskBackupQuotaintegerNoSpecifies the cloud disk backup point quota.
BurstPerformancebooleanNoSpecifies whether to enable disk bursting.

Response

Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.

FieldTypeDescription
DiskIdSetstring[]ID list of the created cloud disks. Note: This field may return null, indicating that no valid values can be obtained.
RequestIdstringThe unique request ID, which is returned for each request. RequestId is required for locating a problem.
Success
{
  "Response": {
    "DiskIdSet": …,
    "RequestId": "…"
  }
}
Error
{
  "Response": {
    "Error": { "Code": "…", "Message": "…" },
    "RequestId": "…"
  }
}

Try it

CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/cbs.
Request bodyvalid JSONPOST cbs.api3.convergecloud.com · CreateDisks

Behaviour

Creates billable storage. Disks can be enlarged later but never shrunk.