Creates a mount target.
Operation description
When you call the CreateMountTarget operation to create a mount target, some resources are generated asynchronously. After the CreateMountTarget operation succeeds, first invoke the DescribeMountTargets operation to query the mount target status. Execute the file system mount operation only after the mount target status changes to Active. Otherwise, the mount operation may fail.
Invoking this operation triggers the automatic creation of the service-linked role required for the operation. For more information, see Manage the service-linked role for NAS.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:CreateMountTarget |
create |
*FileSystem
*VSwitch
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileSystemId |
string |
Yes |
The file system ID.
|
174494**** |
| AccessGroupName |
string |
No |
The name of the permission group. This parameter is required if the file system is a General-purpose NAS or Extreme NAS file system. Default permission group: DEFAULT_VPC_GROUP_NAME (the default permission group for VPCs). |
vpc-test |
| NetworkType |
string |
Yes |
The network type of the mount target. Set the value to Vpc, which indicates a virtual private cloud (VPC). Valid values:
|
Vpc |
| VpcId |
string |
No |
The VPC ID. This parameter is required and valid only when the network type is VPC. For example: If NetworkType is set to VPC, VpcId is required. |
vpc-2zesj9afh3y518k9o**** |
| VSwitchId |
string |
No |
The vSwitch ID. This parameter is required and valid only when the network type is VPC. For example: If NetworkType is set to VPC, VSwitchId is required. |
vsw-2zevmwkwyztjuoffg**** |
| SecurityGroupId |
string |
No |
The security group ID. |
sg-bp1fg655nh68xyz9**** |
| EnableIpv6 |
boolean |
No |
Specifies whether to create an IPv6 mount target. Valid values:
Note
IPv6 is supported only by Extreme NAS file systems in all regions in the Chinese mainland. The file system must have IPv6 enabled. |
true |
| DryRun |
boolean |
No |
Specifies whether to check for existing mount targets. Only CPFS file systems are supported. A dry run checks parameter validity and inventory without actually creating a mount target or incurring fees.
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
70EACC9C-D07A-4A34-ADA4-77506C42**** |
| MountTargetDomain |
string |
The IPv4 mount target. |
174494b666-x****.cn-hangzhou.nas.aliyuncs.com |
| MountTargetExtra |
object |
The mount target information. |
|
| DualStackMountTargetDomain |
string |
The dual-stack mount target that supports both IPv4 and IPv6. |
174494b666-x****.dualstack.cn-hangzhou.nas.aliyuncs.com |
Examples
Success response
JSON format
{
"RequestId": "70EACC9C-D07A-4A34-ADA4-77506C42****",
"MountTargetDomain": "174494b666-x****.cn-hangzhou.nas.aliyuncs.com",
"MountTargetExtra": {
"DualStackMountTargetDomain": "174494b666-x****.dualstack.cn-hangzhou.nas.aliyuncs.com"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 202 | RequestAccepted | The request has been accepted by the server. | The request has been accepted by the server. |
| 400 | InvalidFileSystem.NotsupportedIPv6 | The file system does not support IPv6. | The file system does not support 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. | The same client token was passed in to different parameters. |
| 400 | MissingParameter.AccessGroupName | You must specify AccessGroupName when you create a standard or extreme file system mount target. | 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. | The specified VPC CIDR conflicts with the server. |
| 400 | DryRunOperation | The request is validated with DryRun flag set. | 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. | The RAM user does not have the permission to create service linked role AliyunServiceRoleForNasStandard. Please authorize the RAM user the permission ram:CreateServiceLinkedRole. |
| 403 | OperationDenied.InvalidState | The operation is not permitted when the status is processing. | The operation is not permitted when the status is processing. |
| 403 | InvalidRamRole.NotExist | The specified RAM role does not exist. | The specified RAM role does not exist. |
| 403 | InvalidRamRole.NoPermission | The specified RAM role does not have sufficient permission. | The specified RAM role does not have sufficient permission. |
| 403 | InvalidMountTarget.AlreadyExisted | The specified mount target already exists. | The specified mount target already exists. |
| 403 | Resource.OutOfStock | The inventory of the specified zone is insufficient. | The inventory of the specified zone is insufficient. |
| 403 | OperationDenied.MountTargetExceedLimit | The maximum number of mount target in the specified file system is exceeded. | 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. | The specified VPC does not exist. |
| 404 | InvalidFileSystem.NotFound | The specified file system does not exist. | The specified file system does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.