Creates a mount target.
Operation description
When you invoke the CreateMountTarget operation to create a mount target, some resources are generated asynchronously. Therefore, after you successfully execute the CreateMountTarget operation, first invoke the DescribeMountTargets operation to query the status of the mount target. Execute the file system mount operation only after the mount target status changes to Active. Otherwise, the mount operation may end up failed.
Invoking this operation triggers the automatic creation of the NAS service-linked role and will associate it with 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 ID of the file system.
|
174494**** |
| AccessGroupName |
string |
No |
The name of the permission group. This parameter is required when the target file system is a General-purpose NAS file system or an 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 ID of the VPC. This parameter is required and takes effect only when the network type is VPC. For example: When NetworkType is set to VPC, VpcId is required. |
vpc-2zesj9afh3y518k9o**** |
| VSwitchId |
string |
No |
The ID of the vSwitch. This parameter is required and takes effect only when the network type is VPC. For example: When NetworkType is set to VPC, VSwitchId is required. |
vsw-2zevmwkwyztjuoffg**** |
| SecurityGroupId |
string |
No |
The ID of the security group. |
sg-bp1fg655nh68xyz9**** |
| EnableIpv6 |
boolean |
No |
Specifies whether to create an IPv6 mount target. Valid values:
Note
Currently, only Extreme NAS file systems in regions within the Chinese mainland support IPv6, and the IPv6 feature must be enabled for the file system. |
true |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run to check for existing mount targets. Only CPFS file systems are supported for dry runs. A dry run checks the validity of parameters and inventory without actually creating a mount target or incurring fees.
|
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
70EACC9C-D07A-4A34-ADA4-77506C42**** |
| MountTargetDomain |
string |
The IPv4 mount target. |
174494b666-x****.cn-hangzhou.nas.aliyuncs.com |
| MountTargetExtra |
object |
The collection of 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.