调用CreateMountTarget接口创建挂载点。

接口说明

在使用CreateMountTarget接口创建挂载点时部分资源的生成是异步完成的。因此在执行CreateMountTarget接口成功后,请先调用DescribeMountTargets接口查询挂载点状态,当挂载点状态为Active后再执行挂载文件系统操作,否则可能会挂载失败。

调试

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

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateMountTarget

系统规定参数。默认取值:CreateMountTarget。

DryRun Boolean false

在创建CPFS文件系统挂载点时,此参数用于校验是否有存量挂载点,不实际产生挂载点。默认值:false。

FileSystemId String 174494****

文件系统ID。

NetworkType String Vpc

网络类型。

  • Vpc:专有网络
  • Classic:经典网络
AccessGroupName String classic-test

权限组名称。

默认权限组:DEFAULT_VPC_GROUP_NAME、DEFAULT_CLASSIC_GROUP_NAME。

VpcId String vpc-2zesj9afh3y518k9o****

专有网络ID。当网络类型是专有网络,此字段有意义且必须配置。

VSwitchId String vsw-2zevmwkwyztjuoffg****

交换机ID。当网络类型是专有网络,此字段有意义且必须配置。

SecurityGroupId String sg-bp1fg655nh68xyz9****

安全组ID。

EnableIpv6 Boolean true

是否创建IPv6挂载点。

  • true:创建
  • false:不创建
说明 当前仅华北5(呼和浩特)地域的极速型NAS支持IPv6功能,且该文件系统需要开启IPv6功能。

返回数据

名称 类型 示例值 描述
MountTargetDomain String 174494b666-x****.cn-hangzhou.nas.aliyuncs.com

IPv4挂载点。

MountTargetExtra Struct

挂载点信息。

DualStackMountTargetDomain String 174494b666-x****.dualstack.cn-hangzhou.nas.aliyuncs.com

IPv4和IPv6双栈挂载点。

RequestId String 70EACC9C-D07A-4A34-ADA4-77506C42B023

请求ID。

示例

请求示例

http(s)://[Endpoint]/?Action=CreateMountTarget
&AccessGroupName=classic-test
&FileSystemId=174494****
&NetworkType=VPC
&<公共请求参数>

正常返回示例

XML 格式

<CreateMountTargetResponse>
    <RequestId>70EACC9C-D07A-4A34-ADA4-77506C42B023</RequestId>
    <MountTargetDomain>174494b666-x****.cn-hangzhou.nas.aliyuncs.com</MountTargetDomain>
</CreateMountTargetResponse>

JSON 格式

{"RequestId":"70EACC9C-D07A-4A34-ADA4-77506C42B023","MountTargetDomain":"174494b666-x****.cn-hangzhou.nas.aliyuncs.com","MountTargetExtra":{"DualStackMountTargetDomain":"174494b666-x****.dualstack.cn-hangzhou.nas.aliyuncs.com"}}

错误码

HttpCode 错误码 错误信息 描述
400 InvalidFileSystem.NotsupportedIPv6 The file system does not support IPv6. 该文件系统不支持IPv6。
400 InvalidVSwitch.Ipv6NotTurnOn The VSwitch you are currently using has not enabled the IPv6 function. Please enable this function first and try again. 您当前使用的交换机不支持IPv6功能,请开启此功能后重试。
400 IdempotentParameterMismatch The same client token was passed in to different parameters. 相同的ClientToken传入了不同的参数。
400 MissingParameter.AccessGroupName You must specify AccessGroupName when you create a standard or extreme file system mount target. 创建通用型或极速型文件系统挂载点时权限组参数必填。
202 RequestAccepted The request has been accepted by the server. 请求已被后端接受。
403 OperationDenied.InvalidState The operation is not permitted when the status is processing. 状态处理中不允许此操作。
400 InvalidVSwitchId.IpNotEnough The number of the specified VSwitch IP address is insufficient. 指定的交换机IP数量不足。
404 InvalidParameter.VswNotFound The specified VSwitch does not exist. 指定的虚拟交换机不存在。
404 InvalidParameter.VpcNotFound The specified VPC does not exist. 指定的VPC网络不存在。
400 InvalidParameter.ConflictVpcCidr The specified VPC CIDR conflicts with the server. 指定的VPC网段与服务端冲突。
403 InvalidRamRole.NotExist The specified RAM role does not exist. 指定的RAM角色不存在。
403 InvalidRamRole.NoPermission The specified RAM role does not have sufficient permission. 指定的RAM角色权限不足。
403 InvalidMountTarget.AlreadyExisted The specified mount target already exists. 指定的挂载点已经存在。
404 InvalidFileSystem.NotFound The specified file system does not exist. 指定的文件系统不存在。
403 Resource.OutOfStock The inventory of the specified zone is insufficient. 指定的可用区库存不足。
400 DryRunOperation The request is validated with DryRun flag set. 请求校验通过。
403 OperationDenied.MountTargetExceedLimit The maximum number of mount target in the specified file system is exceeded. 当前文件系统的挂载点达到上限。

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