创建挂载点。
接口说明
在使用 CreateMountTarget 接口创建挂载点时部分资源的生成是异步完成的。因此在执行 CreateMountTarget 接口成功后,请先调用 DescribeMountTargets 接口查询挂载点状态,当挂载点状态为 Active 后再执行挂载文件系统操作,否则可能会挂载失败。
调用此接口将自动创建操作所需的 NAS 服务关联角色。更多信息,请参见管理 NAS 服务关联角色。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
nas:CreateMountTarget |
create |
*FileSystem
*VSwitch
|
|
无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| FileSystemId |
string |
是 |
文件系统 ID。
|
174494**** |
| AccessGroupName |
string |
否 |
权限组名称。 当目标文件系统为通用型 NAS 或极速型 NAS 时,此参数必填。 默认权限组:DEFAULT_VPC_GROUP_NAME(专有网络默认权限组)。 |
vpc-test |
| NetworkType |
string |
是 |
挂载点网络类型。取值为 Vpc,表示专有网络。 枚举值:
|
Vpc |
| VpcId |
string |
否 |
专有网络 ID。 当网络类型是专有网络,此字段必填且有意义。 例如: NetworkType=VPC 时,VpcId 为必填项。 |
vpc-2zesj9afh3y518k9o**** |
| VSwitchId |
string |
否 |
交换机 ID。 当网络类型是专有网络,此字段必填且有意义。 例如: NetworkType=VPC 时,VSwitchId 为必填项。 |
vsw-2zevmwkwyztjuoffg**** |
| SecurityGroupId |
string |
否 |
安全组 ID。 |
sg-bp1fg655nh68xyz9**** |
| EnableIpv6 |
boolean |
否 |
是否创建 IPv6 挂载点。 取值:
说明
当前仅极速型 NAS 中国内地各地域支持 IPv6 功能,且该文件系统需要开启 IPv6 功能。 |
true |
| DryRun |
boolean |
否 |
校验是否有存量挂载点。仅支持校验 CPFS 文件系统。 预检操作会帮助您检查参数有效性、校验库存等,并不会实际创建挂载点,也不会产生费用。
|
false |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
70EACC9C-D07A-4A34-ADA4-77506C42**** |
| MountTargetDomain |
string |
IPv4 挂载点。 |
174494b666-x****.cn-hangzhou.nas.aliyuncs.com |
| MountTargetExtra |
object |
挂载点信息集合。 |
|
| DualStackMountTargetDomain |
string |
IPv4 和 IPv6 双栈挂载点。 |
174494b666-x****.dualstack.cn-hangzhou.nas.aliyuncs.com |
示例
正常返回示例
JSON格式
{
"RequestId": "70EACC9C-D07A-4A34-ADA4-77506C42****",
"MountTargetDomain": "174494b666-x****.cn-hangzhou.nas.aliyuncs.com",
"MountTargetExtra": {
"DualStackMountTargetDomain": "174494b666-x****.dualstack.cn-hangzhou.nas.aliyuncs.com"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 202 | RequestAccepted | The request has been accepted by the server. | 请求已被后端接受。 |
| 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. | |
| 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. | 创建通用型或极速型文件系统挂载点时权限组参数必填。 |
| 400 | InvalidVSwitchId.IpNotEnough | The number of the specified VSwitch IP address is insufficient. | |
| 400 | InvalidParameter.ConflictVpcCidr | The specified VPC CIDR conflicts with the server. | 指定的VPC网段与服务端冲突。 |
| 400 | DryRunOperation | The request is validated with DryRun flag set. | 请求校验通过。 |
| 400 | SubAccount.NoStandardSLRPermission | The RAM user does not have the permission to create service linked role AliyunServiceRoleForNasStandard. Please authorize the RAM user the permission ram:CreateServiceLinkedRole. | 当前RAM用户没有权限创建AliyunServiceRoleForNasStandard SLR角色,请授权RAM用户ram:CreateServiceLinkedRole权限。 |
| 403 | OperationDenied.InvalidState | The operation is not permitted when the status is processing. | 状态处理中不允许此操作。 |
| 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. | 指定的挂载点已经存在。 |
| 403 | Resource.OutOfStock | The inventory of the specified zone is insufficient. | 指定的可用区库存不足。 |
| 403 | OperationDenied.MountTargetExceedLimit | The maximum number of mount target in the specified file system is exceeded. | 当前文件系统的挂载点达到上限。 |
| 404 | InvalidParameter.VswNotFound | The specified VSwitch does not exist. | |
| 404 | InvalidParameter.VpcNotFound | The specified VPC does not exist. | 指定的VPC网络不存在。 |
| 404 | InvalidFileSystem.NotFound | The specified file system does not exist. | 指定的文件系统不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。