All Products
Search
Document Center

Cloud Storage Gateway:ExpandCacheDisk

Last Updated:Aug 04, 2025

Expands the cache disk of a Cloud Storage Gateway.

Operation description

Before you call this operation, note the following:

Before you call this operation, make sure that you are familiar with the billing and pricing of Cloud Storage Gateway.

  • Make sure that a cache disk is created. You can use the purchase URL returned by this operation to complete the payment and expand the cache disk.

  • The maximum cache disk capacity is 4 TB for a Basic gateway, 8 TB for a Medium gateway, and 32 TB for an Enhanced or Performance gateway.

  • Cloud Storage Gateway lets you scale out cache disks, but you cannot scale them in.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

hcs-sgw:ExpandCacheDisk

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

GatewayId

string

Yes

The ID of the gateway.

gw-000eg44nmxbsfwbvq***

NewSizeInGB

integer

Yes

The capacity of the cache disk after it is scaled out. Unit: GB. The following requirements must be met:

  • The capacity of the cache disk after it is scaled out cannot be smaller than the original capacity. You cannot scale in a cache disk.

  • The maximum capacity of a cache disk for a Basic gateway is 4 TB. The maximum capacity of a cache disk for a Medium gateway is 8 TB. The maximum capacity of a cache disk for an Enhanced or Performance gateway is 32 TB.

  • The minimum capacity of a cache disk for a file gateway is 40 GB. The minimum capacity of a cache disk for an iSCSI gateway is 20 GB.

101

LocalFilePath

string

Yes

The internal device name of the cache disk. You can call the DescribeGatewayCaches operation to query the internal device name of the cache disk.

/dev/vdb

Response parameters

Parameter

Type

Description

Example

object

BuyURL

string

The URL that is used to pay for the subscription cache disk.

https://common-buy-intl.alibabacloud.com/?commodityCode=hcs_sgw_csg_pre&request={"gateway_id":"gw-0007va9bnidei3s8a***”,”directBuy":"false","gateway_class":"standard","cache_cloud_efficiency_size":0}&regionId=cn-hangzhou#/buy

TaskId

string

The ID of the task.

t-000eg44nmxbsh3qk3***

RequestId

string

The ID of the request.

F8B59F29-453D-49BF-8673-EEB8F9F2D5C6

Message

string

The message that is returned.

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. Valid values:

  • true: Yes.

  • false: No.

true

Examples

Success response

JSON format

{
  "BuyURL": "https://common-buy-intl.alibabacloud.com/?commodityCode=hcs_sgw_csg_pre&request={\"gateway_id\":\"gw-0007va9bnidei3s8a***”,”directBuy\":\"false\",\"gateway_class\":\"standard\",\"cache_cloud_efficiency_size\":0}&regionId=cn-hangzhou#/buy",
  "TaskId": "t-000eg44nmxbsh3qk3***",
  "RequestId": "F8B59F29-453D-49BF-8673-EEB8F9F2D5C6",
  "Message": "successful",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 EmptyGatewayId You must enter a valid ID for the gateway. You must enter a valid ID for the gateway.
400 GatewayNotExist The specified gateway does not exist. You must specify a valid parameter. The specified gateway does not exist. You must specify a valid parameter.
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 GatewayInOperation The gateway is processing requests . Try again later. The gateway is busy. 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 CacheNotExist The specified cache disk does not exist. You must specify a valid parameter. The specified cache disk does not exist. You must specify a valid parameter.
400 EmptyLocalFilePath You must enter an local file path for the cache disk. You must enter an internal device name for the cache disk.
400 InvalidNewSizeInGB The scale-up size that you specified for the cache disk is invalid. You must specify a valid size. The scale-up size that you specified for the cache disk is invalid. You must specify a valid size.
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.
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.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.