Creates a file share for a file gateway.
Operation description
Before you call this operation, ensure that the following requirements are met:
-
You have created and deployed a file gateway that has an unused cache disk.
-
You have an Object Storage Service (OSS) bucket.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hcs-sgw:CreateGatewayFileShare |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GatewayId |
string |
Yes |
The gateway ID. |
gw-000eg44nmxbsfwbvq*** |
| Name |
string |
Yes |
The name of the file share. The name must be 1 to 255 characters in length. It can contain uppercase and lowercase letters, digits, periods (.), underscores (_), and hyphens (-). |
alex*** |
| ShareProtocol |
string |
Yes |
The file sharing protocol. Valid values:
|
NFS |
| RemoteSync |
boolean |
No |
Indicates whether to enable remote sync for the file share. Valid values:
|
false |
| PollingInterval |
integer |
No |
The remote sync interval, in seconds. The value must be an integer from 15 to 36,000. Note
If you use replication mode and enable both remote sync and file data download, the value must be an integer from 3,600 to 36,000. |
4500 |
| IgnoreDelete |
boolean |
No |
Indicates whether to ignore deletions. If this feature is enabled, deleting a file on the gateway does not delete the corresponding file in the OSS bucket.
Note
This feature is supported by gateway versions 1.0.40 and later. |
false |
| FrontendLimit |
integer |
No |
The maximum write speed of the file share, in MB/s. Valid values are 0 to 1,280. A value of 0 indicates no limit. The default value is 0. |
1234 |
| BackendLimit |
integer |
No |
The maximum upload speed of the file share, in MB/s. Valid values are 0 to 1,280. A value of 0 indicates no limit. The default value is 0. Note
If you set a maximum write speed, the maximum upload speed cannot be less than the maximum write speed. |
1234 |
| InPlace |
boolean |
No |
This parameter is deprecated. Do not set this parameter. |
false |
| CacheMode |
string |
No |
The cache mode of the file share. Valid values:
|
Cache |
| Browsable |
boolean |
No |
For a file share that uses the SMB protocol, this parameter indicates whether the share is discoverable in Network Neighborhood. Valid values:
Note
|
true |
| Squash |
string |
No |
The user mapping for the file share that uses the NFS protocol. Valid values:
|
none |
| ReadWriteUserList |
string |
No |
A list of users with read and write permissions for the SMB file share. Separate multiple users with a comma (,). Note
|
user1,user2 |
| ReadOnlyUserList |
string |
No |
A list of users with read-only permissions for the SMB file share. Separate multiple users with a comma (,). Note
|
userA,userB |
| ReadWriteClientList |
string |
No |
A list of clients with read and write permissions for the NFS file share. The list can contain IP addresses or IP address ranges. Separate multiple clients with a comma (,). |
12.12.12.12 |
| ReadOnlyClientList |
string |
No |
A list of clients with read-only permissions for the NFS file share. The list can contain IP addresses or IP address ranges. Separate multiple clients with a comma (,). |
12.12.12.12 |
| OssBucketName |
string |
Yes |
The name of the OSS bucket that the file share uses. Note
|
testbucket |
| OssEndpoint |
string |
Yes |
The endpoint of the region where the OSS bucket is located. Note
Use an internal endpoint if the OSS bucket and the gateway are in the same region. For example, `oss-cn-hangzhou-internal.aliyuncs.com`. Otherwise, use a public endpoint. |
oss-cn-hangzhou-internal.aliyuncs.com |
| OssBucketSsl |
boolean |
No |
Indicates whether to use Secure Sockets Layer (SSL) to access the OSS bucket. Valid values:
|
true |
| LagPeriod |
integer |
No |
The synchronization latency in seconds. This is the delay when synchronizing the local cache of the gateway to the OSS bucket. Valid values are 5 to 120. The default value is 5. Note
This feature is supported by gateway versions 1.0.40 and later. |
5 |
| DirectIO |
boolean |
No |
Deprecated. |
false |
| LocalFilePath |
string |
Yes |
The internal device name of the cache disk that the file share uses. To get this name, call the `DescribeGatewayCaches` operation. |
/dev/vdb |
| ServerSideEncryption |
boolean |
No |
Deprecated. |
false |
| ServerSideCmk |
string |
No |
Deprecated. |
xxxxx |
| ClientSideEncryption |
boolean |
No |
Deprecated. |
false |
| ClientSideCmk |
string |
No |
Deprecated. |
xxxxx |
| KmsRotatePeriod |
integer |
No |
Deprecated. |
0 |
| PathPrefix |
string |
No |
The path of the subdirectory in the OSS bucket that the file share uses. If you leave this parameter empty, the file share uses the root directory of the bucket. |
test1 |
| FastReclaim |
boolean |
No |
Indicates whether to enable upload optimization for the file share. This is suitable for scenarios where you only back up data to the cloud. Valid values:
Note
This feature is supported by gateway versions 1.0.39 and later. |
false |
| SupportArchive |
boolean |
No |
This parameter is deprecated. Do not set this parameter. |
false |
| WindowsAcl |
boolean |
No |
For the SMB protocol, indicates whether to enable access control with Windows Access Control Lists (ACLs). This requires an Active Directory (AD) domain. Valid values:
Note
This feature is supported by gateway versions 1.0.45 and later. |
false |
| AccessBasedEnumeration |
boolean |
No |
For the SMB protocol, indicates whether to enable Windows access-based enumeration (ABE). This parameter takes effect only if `WindowsAcl` is set to `true`. Valid values:
Note
This feature is supported by gateway versions 1.0.45 and later. |
false |
| NfsV4Optimization |
boolean |
No |
For the NFS protocol, indicates whether to enable NFSv4 optimization to improve mount and upload efficiency. Valid values:
Note
If you enable this feature, you cannot mount the share with NFSv3. This feature is supported by gateway versions 1.2.0 and later. |
false |
| TransferAcceleration |
boolean |
No |
Indicates whether to enable transfer acceleration for the file share. The corresponding OSS bucket must also have transfer acceleration enabled. Note
This feature is supported by gateway versions 1.3.0 and later. |
false |
| RemoteSyncDownload |
boolean |
No |
In replication mode, indicates whether to download file data. Valid values:
Note
This parameter takes effect only if remote sync is enabled for the share or the share is added to an express synchronization group. |
false |
| DownloadLimit |
integer |
No |
The maximum download speed for the file share in MB/s. Valid values range from 0 to 1280. A value of 0 indicates an unlimited speed. Note
|
0 |
| PartialSyncPaths |
string |
No |
In replication mode, lets you specify a collection of directory paths. Only these directories use replication mode. Note
Before you can configure this setting, contact us to add your account to the whitelist. |
test1 |
| ServerSideAlgorithm |
string |
No |
Deprecated. |
AES256 |
| BypassCacheRead |
boolean |
No |
Indicates whether to read directly from OSS. Valid values:
|
false |
| BindIPAddr |
string |
No |
The virtual mount IP address to attach to the share. This parameter is used only for high availability (HA) gateways. |
192.168.0.10 |
| OssBucketRegionId |
string |
No |
The region where the OSS bucket is located. Note
|
cn-hangzhou |
| BucketInfos |
array<object> |
No |
Deprecated. |
|
|
object |
No |
|||
| Name |
string |
No |
Deprecated. |
test-aliyun |
| Endpoint |
string |
No |
Deprecated. |
oss-cn-hangzhou.aliyuncs.com |
| PathPrefix |
string |
No |
Deprecated. |
test1 |
| BucketStub |
boolean |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. A value of `200` indicates that the request was successful. |
200 |
| Message |
string |
The returned message. |
successful |
| RequestId |
string |
The request ID. |
F8B59F29-453D-49BF-8673-EEB8F9F2D5C6 |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| TaskId |
string |
The task ID. |
t-000eg44nmxbsh3qk*** |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "successful",
"RequestId": "F8B59F29-453D-49BF-8673-EEB8F9F2D5C6",
"Success": true,
"TaskId": "t-000eg44nmxbsh3qk***"
}
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. |
| 400 | FileShareArchiveSupportConflict | You can configure the ArchiveSupport parameter only with NFS protocol and when the user mapping value is "none". |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.