CreateProtocolService

Updated at:
Copy as MD

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

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

nas:CreateProtocolService

create

*FileSystem

acs:nas:{#regionId}:{#accountId}:filesystem/{#FileSystemId}

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:

  • CL2 :

    Cache 2

  • General :

    General.

  • CL1 :

    Cache 1

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 must be 2 to 128 characters in length.

  • It must start with a letter or a Chinese character and cannot start with http:// or https://.

  • It can contain digits, half-width colons (:), underscores (_), and hyphens (-).

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:

  • true: performs a dry run. The protocol service is not created. The system checks whether required parameters are specified, the request format is valid, and business limits and dependencies are met. If the dry run fails, an error is returned. If the dry run succeeds, the HTTP status code 200 is returned, but the ProtocolServiceId is empty.

  • false (default): performs a standard request. The instance is created directly after the check passes.

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.