All Products
Search
Document Center

Cloud Storage Gateway:UpdateGatewayFileShare

Last Updated:Oct 11, 2025

This operation updates the configuration of a file share for a file gateway.

Operation description

Before you call this operation, note the following:

  • You have created and deployed a file gateway, and configured a file share.

  • This operation updates all exposed parameters of the specified file share. If you do not want to change the value of a specific parameter, set it to its current value. Otherwise, it is reset to its default value.

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 supports 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:UpdateGatewayFileShare

update

*All Resource

*

None

None

Request parameters

Parameter

Type

Required

Description

Example

GatewayId

string

Yes

The ID of the gateway.

gw-000c6hshwukkbryp****

IndexId

string

Yes

The ID of the file share. Call the DescribeGatewayFileShares operation to obtain the ID.

NFStest

Name

string

Yes

The name of the file share. Call the DescribeGatewayFileShares operation to obtain the name. This parameter cannot be modified.

name

RemoteSync

boolean

No

Specifies whether to enable remote sync for the file share. Valid values:

  • false (default): No.

  • true: Yes.

true

RemoteSyncDownload

boolean

No

Specifies whether to download file data in replication mode. This parameter is available for file gateways that run version 1.2.0 or later. Valid values:

  • false (default): No.

  • true: Yes.

Note

This parameter is valid only when remote sync is enabled for the file share or the file share is added to an express synchronization group.

false

PollingInterval

integer

No

The remote sync interval, in seconds. This parameter is required if you enable remote sync. Valid values: 15 to 36000.

Note

If the file share is in replication mode and remote sync is enabled to download file data, the valid values are 3600 to 36000.

36000

IgnoreDelete

boolean

No

Specifies whether to ignore file deletions. If this feature is enabled, deleting a file on the gateway does not delete the corresponding file in OSS. Valid values:

  • false (default): No.

  • true: Yes.

Note

This parameter is available for file gateways that run version 1.0.40 or later.

true

FrontendLimit

integer

No

The maximum write speed of the file share, in MB/s. Valid values: 0 to 1280. A value of 0 indicates no limit.

0

BackendLimit

integer

No

The maximum upload speed of the file share, in MB/s. Valid values: 0 to 1280. A value of 0 indicates no limit.

Note

If you also set FrontendLimit, the value of BackendLimit cannot be less than the value of FrontendLimit.

0

DownloadLimit

integer

No

The maximum download speed of the file share, in MB/s. Valid values: 0 to 12800. A value of 0 indicates no limit. This parameter can be set only if the file share is in replication mode and file data download is enabled. This parameter is available for file gateways that run version 1.3.0 or later.

Note

This parameter is valid only when remote sync is enabled for the file share or the file share is added to an express synchronization group.

0

InPlace

boolean

No

This parameter is deprecated. Do not set this parameter.

false

CacheMode

string

No

The cache mode of the file share. Call the DescribeGatewayFileShares operation to obtain the cache mode. This parameter cannot be modified.

Cache

Browsable

boolean

No

Specifies whether the file share is browsable over the SMB protocol. A browsable file share can be discovered in Network Neighborhood. Valid values:

  • true (default): Yes.

  • false: No.

Note
  • This parameter is invalid for the NFS protocol.

false

Squash

string

No

The user mapping for the file share over the NFS protocol. The default value is none. Valid values:

  • none

  • root_squash

  • all_squash

  • all_anonymous

none

ReadWriteUserList

string

No

The list of users who have read and write permissions on the file share over the SMB protocol. Separate multiple users with commas (,).

Note
  • This parameter is invalid for the NFS protocol.

user1,user2

ReadOnlyUserList

string

No

The list of users who have read-only permissions on the file share over the SMB protocol. Separate multiple users with commas (,).

Note
  • This parameter is invalid for the NFS protocol.

user1,user2

ReadWriteClientList

string

No

The list of clients that have read and write permissions on the file share over the NFS protocol. The clients can be IP addresses or IP address ranges. Separate multiple clients with commas (,).

172.16.146.100

ReadOnlyClientList

string

No

The list of clients that have read-only permissions on the file share over the NFS protocol. The clients can be IP addresses or IP address ranges. Separate multiple clients with commas (,).

172.16.146.100

LagPeriod

integer

No

The synchronization latency, in seconds. This is the delay for synchronizing the gateway's local cache with OSS. Valid values: 5 to 120. The default value is 5.

Note
  • This parameter is available for file gateways that run version 1.0.40 or later.

5

DirectIO

boolean

No

Specifies whether to enable Direct I/O (DirectIO) for data transfer on the file share. Valid values:

  • false (default): No.

  • true: Yes.

false

ServerSideEncryption

boolean

No

Deprecated.

false

ServerSideCmk

string

No

Deprecated.

b1e08822-1e9c-4f8e-9dd1-a740cb200***

ClientSideEncryption

boolean

No

Deprecated.

false

ClientSideCmk

string

No

Deprecated.

b1e08822-1e9c-4f8e-9dd1-a740cb200***

KmsRotatePeriod

integer

No

Deprecated.

0

FastReclaim

boolean

No

Specifies whether to enable upload optimization for the file share. This feature is suitable for scenarios where data is only backed up to the cloud. Valid values:

  • false (default): No.

  • true: Yes.

Note

This parameter is available for file gateways that run version 1.0.39 or later.

true

WindowsAcl

boolean

No

Specifies whether to enable access control through a Windows access control list (ACL) over the SMB protocol. This feature requires an Active Directory (AD) domain. Valid values:

  • false (default): No.

  • true: Yes.

Note

This parameter is available for file gateways that run version 1.0.45 or later.

false

AccessBasedEnumeration

boolean

No

Specifies whether to enable Windows access-based enumeration (ABE) over the SMB protocol. This parameter takes effect only when the `WindowsAcl` parameter is set to `true`. Valid values:

  • false (default): No.

  • true: Yes.

Note
  • This parameter is available for file gateways that run version 1.0.45 or later.

false

NfsV4Optimization

boolean

No

Specifies whether to enable NFSv4 optimization to improve mount and upload efficiency over the NFS protocol. Valid values:

  • false (default): No.

  • true: Yes.

Note
  • After you enable this feature, you cannot mount the file share using NFSv3. This parameter is available for file gateways that run version 1.2.0 or later.

true

TransferAcceleration

boolean

No

Specifies whether to enable transfer acceleration for the file share. The corresponding OSS bucket must also have transfer acceleration enabled.

Note
  • This parameter is available for file gateways that run version 1.3.0 or later.

false

BypassCacheRead

boolean

No

Specifies whether to enable direct OSS reads for the file share. If enabled, data is read directly from OSS without passing through the gateway cache. Valid values:

  • false (default): No.

  • true: Yes.

Note
  • This feature is not recommended for most use cases.

false

ServerSideAlgorithm

string

No

Deprecated.

AES256

Response elements

Element

Type

Description

Example

object

TaskId

string

The ID of the task.

t-000avsri6tlyddgf****

Message

string

The description of the request result.

successful

RequestId

string

The ID of the request.

EBAF769F-2E88-4D81-AF1E-A34FAACF9***

Code

string

The HTTP status code. A value of 200 indicates that the request was successful.

200

Success

boolean

Indicates whether the request was successful.

true

Examples

Success response

JSON format

{
  "TaskId": "t-000avsri6tlyddgf****",
  "Message": "successful",
  "RequestId": "EBAF769F-2E88-4D81-AF1E-A34FAACF9***",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400

InvalidParameter.FileShare.%s

The specified field %s for file share is invalid. Please check it again.

The specified file sharing parameter for the gateway is invalid. You must specify a valid parameter.

400

VersionNotSupported.FileShare.%s

The specified field %s for file share is not supported by current gateway version. Please check it again.

The specified file sharing parameter for the gateway does not match the gateway version. You must specify a valid parameter.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.