文档

CreateProtocolService - 创建协议服务

更新时间:
一键部署

创建CPFS文件系统的协议服务,创建协议服务过程大约需要5~10分钟。

接口说明

  • 该接口仅适用于中国站 CPFS 文件系统。

  • 仅 CPFS 2.3.0 及以上版本支持协议服务。您可以通过调用 DescribeFileSystems 接口查询目标文件系统的版本号。

  • 协议服务规格

    协议服务包括两种协议类型:通用型和缓存型。缓存型相比通用型,提供热点数据缓存能力。在命中缓存的情况下,缓存型协议服务的带宽可超过 CPFS 文件系统的带宽,达到协议服务设定的最大带宽值。

    • 通用型:为 CPFS 提供 NFS 协议访问能力和目录级挂载点,用户无需配置 POSIX 客户端管理集群。该功能免费。

    • 缓存型:在通用型基础上提供基于 LRU 策略的服务端内存缓存。当数据缓存于内存中时,CPFS 可提供更高的内网带宽。缓存型协议服务分为缓存 1 型和缓存 2 型两种协议服务规格,差异点为内网带宽大小和内存缓存大小。

    说明 缓存型协议服务为收费服务,正在邀测。有关缓存型协议服务的付费方式,请参见计费项。如果您有任何反馈或疑问,欢迎加入钉钉用户群(钉钉群号:31045006299)与 CPFS 工程师进行交流讨论。
  • 协议类型

    仅支持 NFSv3 协议。

  • 其它

    • 一个 CPFS 文件系统只能创建一个协议服务。

    • 创建协议服务会消耗指定 vSwitch 上的 IP 地址(最多消耗 32 个 IP 地址),请确保目标 vSwitch IP 资源充足。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
FileSystemIdstring

文件系统 ID。

cpfs-099394bd928c****
ProtocolSpecstring

协议服务的规格。

取值: General(默认值)。

General
Throughputinteger

协议服务的带宽。

单位:MB/s。

8000
ProtocolTypestring

协议服务的协议类型。

取值:NFS(默认值),仅支持 NFSv3 协议访问。

NFS
Descriptionstring

协议服务的描述。控制台中显示为“协议服务名称”。

限制:

  • 长度为 2~128 个英文或中文字符。
  • 必须以大小写字母或中文开头,不能以http://https://开头。
  • 可以包含数字、半角冒号(:)、下划线(_)或者短划线(-)。
此协议服务的描述。
VpcIdstring

协议服务 VpcId,需与文件系统 VPC 保持一致。

vpc-2vct297b8157bth9z****
VSwitchIdstring

协议服务 VSwitchId。

vsw-2vc3c2lybvdllxyq4****
DryRunboolean

是否对此次创建请求执行预检。

预检操作会帮助您检查参数有效性、依赖条件等,并不会实际创建实例,也不会产生费用。

取值:

  • true:发送检查请求,不会创建协议服务。检查项包括是否填写了必需参数、请求格式、业务限制依赖条件。如果检查不通过,则返回对应错误。如果检查通过,则返回 200 HttpCode,但 ProtocolServiceId 为空。
  • false(默认):发送正常请求,通过检查后直接创建实例。
false
ClientTokenstring

保证请求幂等性,从您的客户端生成一个参数值,确保不同请求间该参数值唯一。

ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性

说明 若用户未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。
123e4567-e89b-12d3-a456-42665544****

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求 ID。

98696EF0-1607-4E9D-B01D-F20930B6****
ProtocolServiceIdstring

协议机集群 ID。

ptc-197ed6a00f2b****

示例

正常返回示例

JSON格式

{
  "RequestId": "98696EF0-1607-4E9D-B01D-F20930B6****",
  "ProtocolServiceId": "ptc-197ed6a00f2b****"
}

错误码

HTTP status code错误码错误信息描述
400MissingFileSystemIdFileSystemId is mandatory for this action.未指定FileSystemId参数。
400MissingVpcIdVpcId is mandatory for this action.未指定VPC ID参数。
400MissingVSwitchIdVSwitchId is mandatory for this action.未指定vSwitch ID参数。
403InvalidProtocolSpec.NotSupportedThe specified protocol spec does not supported.指定的ProtocolSpec不支持。
403InvalidNetworkType.NotSupportedThe specified network type does not supported.指定的网络类型不支持。
403Instance.IncorrectStatusThe specified instance is in an incorrect status.当前状态不允许操作。
403OperationDenied.ProtocolServiceExceedLimitThe protocol service amount exceed file system limit.协议服务数量超过文件系统限制。
403PermissionDenied.CapacityTooLowCapacity of file system too low to subscribe protocol service.容量低于10800GiB不允许开通协议服务。
403PermissionDenied.ThroughputInvalidStandard protocol service should not specified throughput.通用型协议服务不允许指定服务带宽。
403PermissionDenied.ThroughputTooSmallThroughput of protocol service too small.协议服务带宽太小,不满足开通条件。
403PermissionDenied.ThroughputExceedThroughput of protocol service must less than throughput of file system.协议服务的带宽不允许超过文件系统的带宽。
403InvalidProtocolType.NotSupportedThe specified protocol type does not supported.指定的协议类型不支持。
403InvalidVSwitchId.IpShortageThe specified vswitch ip shortage.指定的vSwitch可用IP不足。
403InvalidFset.InUseFset already used by other export.指定的Fileset已被使用。
403InvalidFileSystemPath.InvalidCharactersThe specified filesystem path contains invalid characters.指定的文件系统路径包含非法字符。
403MntPathConflict.InvalidParamFilesetId and Path must and can only be specified one.Fileset和Path只能且必须指定一个。
403OperationDenied.TooManyDepthThe operation is denied due to Fsets path too deep.文件系统路径深度超过阈值。
403OperationDenied.InvalidStateThe operation is denied due to invalid file system state.当前文件系统状态不支持该操作。
403OperationDenied.NoProtocolServiceQuotaNo protocol service quota.当前文件系统协议服务配额用尽。
403OperationDenied.NotSupportedThe operation is denied due to not supported.文件系统不支持协议机服务。
403PermissionDenied.CLThroughputInvalidThroughput of caching protocol service is invalid.缓存型协议服务带宽无效。
403InvalidVpcId.CrossVpcNotSupport.Cross VPC not support.不支持协议服务和文件系统跨VPC。
404InvalidParameter.VpcNotFoundThe specified VPC does not exist.指定的VPC网络不存在。
404InvalidParameter.VswNotFoundThe specified VSwitch does not exist.指定的虚拟交换机不存在。
404InvalidFileSystem.NotFoundThe specified file system does not exist.指定的文件系统不存在。
404InvalidDescription.InvalidFormatDescription format is invalid.指定的描述格式非法。
404InvalidVpcId.ConflictVpcCidrVpc cidr conflict with file system指定VPC与文件系统VPC网段重叠。
404InvalidAccessGroupName.NotFoundThe specified access group does not exist.指定的权限组不存在。
404InvalidAccessGroupName.NotAccessRuleThere has no rule in access group.指定的权限组中无规则。
404OperationDenied.NoStockThe operation is denied due to no stock.文件系统无库存。
404PathNotExistInFileSystem.InvalidParamGiven path does not exist in file system.文件系统中不存在指定的路径。
404InvalidFsetId.NotFoundThe specified Fileset ID does not exist.指定的Fileset不存在。
404InvalidParameter.VpcVswitchMismatchGiven vSwitch mismatch with given VPC. 指定的VPC和vSwitch不匹配。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2024-09-05OpenAPI 错误码发生变更查看变更详情