CreateProtocolService
Creates a protocol service for a Cloud Parallel File Storage (CPFS) file system. The creation process takes about 5 to 10 minutes.
Operation description
-
This operation is applicable only to CPFS file systems.
-
Protocol services are supported only by CPFS 2.3.0 and later. You can call the DescribeFileSystems operation to query the version of the target file system.
-
Protocol service specifications.
Protocol services include two protocol types: General and Cache. Compared with the General type, the Cache type provides the hot spot data caching capability. When a cache hit occurs, the bandwidth of a Cache protocol service can exceed the bandwidth of the CPFS file system and reach the maximum bandwidth configured for the protocol service.
- General: Provides NFS protocol access and [folder-level mount targets](~~427175~~) for CPFS. Users do not need to configure POSIX client cluster management. This feature is free of charge.
- Cache: Provides server-side memory caching based on the LRU policy in addition to the features of the General type. When data is cached in memory, CPFS can provide higher internal network bandwidth. Cache protocol services are divided into two specifications: Cache 1 and Cache 2. The difference lies in the internal network bandwidth and memory cache size.
> Cache protocol services are paid services and are currently in invitational preview. For the billing methods of Cache protocol services, refer to [Billable items](~~111858~~). If you have any feedback or questions, join the DingTalk group (group ID: 31045006299) to communicate with CPFS engineers.
Protocol type.
Only the NFSv3 protocol is supported.
Prerequisites.
The target CPFS file system must be created and in the Running state.
-
Others.
-
You can create only one protocol service for a CPFS file system.
-
Creating a protocol service consumes IP addresses on the specified vSwitch (up to 32 IP addresses). Make sure that the target vSwitch has sufficient IP addresses.
-
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:CreateProtocolService |
create |
*FileSystem
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileSystemId |
string |
Yes |
The ID of the file system. |
cpfs-099394bd928c**** |
| ProtocolSpec |
string |
Yes |
The specification of the protocol service. Valid values: General (default). Valid values:
|
General |
| Throughput |
integer |
No |
The bandwidth of the protocol service. Unit: MB/s. |
8000 |
| ProtocolType |
string |
Yes |
The protocol type of the protocol service. Valid values: NFS (default). Only NFSv3 protocol access is supported. |
NFS |
| Description |
string |
No |
The description of the protocol service. It is displayed as the protocol service name in the console. Limits:
|
The description of this protocol service |
| VpcId |
string |
No |
The VPC ID of the protocol service. It must be the same as the VPC of the file system. Do not set this field if the storage redundancy type of the file system is zone-redundant storage (ZRS). Otherwise, this field is required. |
vpc-2vct297b8157bth9z**** |
| VSwitchId |
string |
No |
The vSwitch ID of the protocol service. Do not set this field if the storage redundancy type of the file system is zone-redundant storage (ZRS). Otherwise, this field is required. |
vsw-2vc3c2lybvdllxyq4**** |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run on the creation request. A dry run checks the validity of parameters and dependencies. It does not actually create the instance or incur any fees. Valid values:
|
false |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can generate the token on your client to ensure that the token is unique across different requests. The ClientToken parameter supports only ASCII characters and can be up to 64 characters in length. For more information, refer to Ensure idempotence. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId may be different for each API request. |
123e4567-e89b-12d3-a456-42665544**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The ID of the request. |
98696EF0-1607-4E9D-B01D-F20930B6**** |
| ProtocolServiceId |
string |
The ID of the protocol service cluster. |
ptc-197ed6a00f2b**** |
Examples
Success response
JSON format
{
"RequestId": "98696EF0-1607-4E9D-B01D-F20930B6****",
"ProtocolServiceId": "ptc-197ed6a00f2b****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | MissingFileSystemId | FileSystemId is mandatory for this action. | The FileSystemId parameter is not specified. |
| 400 | MissingVpcId | VpcId is mandatory for this action. | The VPC ID parameter is not specified. |
| 400 | MissingVSwitchId | VSwitchId is mandatory for this action. | |
| 403 | InvalidProtocolSpec.NotSupported | The specified protocol spec does not supported. | The specified ProtocolSpec is not supported. |
| 403 | InvalidNetworkType.NotSupported | The specified network type does not supported. | The specified network type is not supported. |
| 403 | Instance.IncorrectStatus | The specified instance is in an incorrect status. | The operation is not allowed in the current state. |
| 403 | OperationDenied.ProtocolServiceExceedLimit | The protocol service amount exceed file system limit. | The number of protocol services has exceeded the file system limit. |
| 403 | PermissionDenied.CapacityTooLow | Capacity of file system too low to subscribe protocol service. | Protocol services cannot be activated if the capacity is less than 10,800 GiB. |
| 403 | PermissionDenied.ThroughputInvalid | Standard protocol service should not specified throughput. | Specifying the service bandwidth for general-purpose protocol services is not allowed. |
| 403 | PermissionDenied.ThroughputTooSmall | Throughput of protocol service too small. | The protocol service bandwidth is too small to meet the activation requirements. |
| 403 | PermissionDenied.ThroughputExceed | Throughput of protocol service must less than throughput of file system. | The bandwidth of the protocol service cannot exceed the bandwidth of the file system. |
| 403 | InvalidProtocolType.NotSupported | The specified protocol type does not supported. | The specified protocol type is not supported. |
| 403 | InvalidVSwitchId.IpShortage | The specified vswitch ip shortage. | |
| 403 | InvalidFset.InUse | Fset already used by other export. | The specified Fileset is already in use. |
| 403 | InvalidFileSystemPath.InvalidCharacters | The specified filesystem path contains invalid characters. | The specified Fileset path contains invalid characters. |
| 403 | MntPathConflict.InvalidParam | FilesetId and Path must and can only be specified one. | Exactly one of the Fileset and Path parameters must be specified. |
| 403 | OperationDenied.TooManyDepth | The operation is denied due to Fsets path too deep. | The path depth of the smart directory exceeds the threshold. |
| 403 | OperationDenied.InvalidState | The operation is denied due to invalid file system state. | |
| 403 | OperationDenied.NoProtocolServiceQuota | No protocol service quota. | The protocol service quota for the current file system has been exhausted. |
| 403 | OperationDenied.NotSupported | The operation is denied due to not supported. | The file system does not support the protocol service. |
| 403 | PermissionDenied.CLThroughputInvalid | Throughput of caching protocol service is invalid. | The bandwidth for the cache protocol service is invalid. |
| 403 | InvalidVpcId.CrossVpcNotSupport. | Cross VPC not support. | Cross-VPC access between the protocol service and the file system is not supported. |
| 404 | InvalidParameter.VpcNotFound | The specified VPC does not exist. | The specified VPC does not exist. |
| 404 | InvalidParameter.VswNotFound | The specified VSwitch does not exist. | |
| 404 | InvalidFileSystem.NotFound | The specified file system does not exist. | The specified file system does not exist. |
| 404 | InvalidDescription.InvalidFormat | Description format is invalid. | The specified description format is invalid. |
| 404 | InvalidVpcId.ConflictVpcCidr | Vpc cidr conflict with file system | The CIDR block of the specified VPC overlaps with that of the file system VPC. |
| 404 | InvalidAccessGroupName.NotFound | The specified access group does not exist. | The specified permission group does not exist. |
| 404 | InvalidAccessGroupName.NotAccessRule | There has no rule in access group. | The specified permission group contains no rules. |
| 404 | OperationDenied.NoStock | The operation is denied due to no stock. | The file system is out of stock. |
| 404 | PathNotExistInFileSystem.InvalidParam | Given path does not exist in file system. | The specified path does not exist in the file system. |
| 404 | InvalidFsetId.NotFound | The specified Fileset ID does not exist. | The specified Fileset does not exist. |
| 404 | InvalidParameter.VpcVswitchMismatch | Given vSwitch mismatch with given VPC. | The specified VPC and vSwitch do not match. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.