Creates a cache disk for a gateway.
Operation description
This operation applies only to online gateways.
If the gateway uses the subscription billing method, this operation returns a BuyURL. After you complete the payment, the cache disk is automatically created.
If the gateway uses the pay-as-you-go billing method, this operation returns the ID of the task that creates the cache disk.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
hcs-sgw:CreateGatewayCacheDisk | create | *All Resource
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
GatewayId | string | Yes | The ID of the gateway. | gw-000eg44nmxbsfwbvq*** |
CacheDiskCategory | string | No | The type of the cache disk. Only Enhanced SSDs (ESSDs) are supported. Set the value to cloud_essd. | cloud_essd |
CacheDiskSizeInGB | integer | Yes | The capacity of the cache disk in GB. The capacity must meet the following requirements:
| 100 |
PerformanceLevel | string | No | The performance level of the ESSD. This parameter is required if CacheDiskCategory is set to cloud_essd. Valid values:
| PL1 |
Response elements
Element | Type | Description | Example |
object | |||
BuyURL | string | The purchase URL. This parameter is returned for subscription gateways. | https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&request={"gateway_id":"gw-0007va9bnidei3s8a***","directBuy":"false","gateway_class":"standard","cache_cloud_efficiency_size":0}®ionId=cn-hangzhou#/buy |
TaskId | string | The ID of the task that is used to create the cache disk. This parameter is returned for pay-as-you-go gateways. | t-0001xv7je357xv4st*** |
RequestId | string | The request ID. | 8E69E1A1-9076-4C8C-8ADF-ACD253886E22 |
Message | string | The response message. | successful |
Code | string | The status code. A status code of 200 indicates that the request was successful. | 200 |
Success | boolean | Indicates whether the request was successful. | true |
Examples
Success response
JSON format
{
"BuyURL": "https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&request={\"gateway_id\":\"gw-0007va9bnidei3s8a***\",\"directBuy\":\"false\",\"gateway_class\":\"standard\",\"cache_cloud_efficiency_size\":0}®ionId=cn-hangzhou#/buy",
"TaskId": "t-0001xv7je357xv4st***",
"RequestId": "8E69E1A1-9076-4C8C-8ADF-ACD253886E22",
"Message": "successful",
"Code": "200",
"Success": true
}Error codes
HTTP status code | Error code | Error message | Description |
400 | LocationCloudRequired | You must specify a cloud gateway. Try again later. | You must specify a cloud gateway. Try again later. |
400 | BadRequest | Invalid request. You must specify valid parameters in the request. | Invalid request. You must specify valid parameters in the request. |
400 | GatewayOperationNotAllowed | You cannot perform the operation when the gateway is in the current state. | You cannot perform the operation when the gateway is in the current state. |
400 | InvalidCacheDiskCategory | The category that you specified for the cache disk is invalid. You must specify a valid category. | The category that you specified for the cache disk is invalid. You must specify a valid category. |
400 | CacheSizeLimitForBasic | The specified scale-up size exceeds the maximum limit. The maximum scale-up size of cache disks for a Basic gateway is 4 TB. | The expansion capacity exceeds the maximum cache disk limit. The maximum cache disk limit for Basic Gateway is 4 TB. |
400 | CacheSizeLimitForStandard | The specified scale-up size exceeds the maximum limit. The maximum scale-up size of cache disks for a Standard gateway is 8 TB. | The expansion capacity exceeds the maximum cache disk limit. The standard gateway cache disk limit is 8 TB. |
400 | CacheSizeLimit | The maximum size of cache disks for the gateway is 32 TB. | The maximum cache disk size of the gateway is 32 TB. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.