Creates a mount target.
Description
After you call the CreateMountTarget operation, a mount target is not immediately created. Therefore, we recommend that you call the DescribeMountTargets operation to query the status of the mount target. If the mount target is in the Active state, you can then mount the file system. Otherwise, the mount may fail.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateMountTarget |
The operation that you want to perform. Set the value to CreateMountTarget. |
DryRun | Boolean | Yes | false |
Check whether one or more mount targets already exist. This parameter is required if you create a mount target for a CPFS file system. The dry run does not create a mount target. Default value: false. |
FileSystemId | String | Yes | 174494**** |
The ID of the file system. |
NetworkType | String | Yes | Vpc |
The network type of the mount target. Valid values:
|
AccessGroupName | String | No | classic-test |
The name of the permission group. This parameter is required if you create a mount target for a General-purpose NAS file system or an Extreme NAS file system. Default permission groups: DEFAULT_VPC_GROUP_NAME (the default permission group for VPC) and DEFAULT_CLASSIC_GROUP_NAME (the default permission group for the classic network). |
VpcId | String | No | vpc-2zesj9afh3y518k9o**** |
The ID of the VPC. This parameter is valid and required if the mount target resides in a VPC. |
VSwitchId | String | No | vsw-2zevmwkwyztjuoffg**** |
The ID of the vSwitch. This parameter is valid and required if the mount target resides in a VPC. |
SecurityGroupId | String | No | sg-bp1fg655nh68xyz9**** |
The ID of the security group. |
EnableIpv6 | Boolean | No | true |
Specifies whether to create an IPv6 domain name for the mount target. Valid values:
Note Only Extreme NAS file systems that reside in the China (Hohhot) region support IPv6.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
MountTargetDomain | String | 174494b666-x****.cn-hangzhou.nas.aliyuncs.com |
The IPv4 domain name of the mount target. |
MountTargetExtra | Struct |
The list of mount targets. |
|
DualStackMountTargetDomain | String | 174494b666-x****.dualstack.cn-hangzhou.nas.aliyuncs.com |
The dual-stack domain name of the mount target. |
RequestId | String | 70EACC9C-D07A-4A34-ADA4-77506C42**** |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=CreateMountTarget
&DryRun=false
&FileSystemId=174494****
&NetworkType=Vpc
&<Common request parameters>
Sample success responses
XML
format
<CreateMountTargetResponse>
<RequestId>70EACC9C-D07A-4A34-ADA4-77506C42****</RequestId>
<MountTargetDomain>174494b666-x****.cn-hangzhou.nas.aliyuncs.com</MountTargetDomain>
</CreateMountTargetResponse>
JSON
format
{
"CreateMountTargetResponse": {
"RequestId": "70EACC9C-D07A-4A34-ADA4-77506C42****",
"MountTargetDomain": "174494b666-x****.cn-hangzhou.nas.aliyuncs.com"
}
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidFileSystem.NotsupportedIPv6 | The file system does not support IPv6. | The error message returned because 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. | The error message returned because the vSwitch does not support IPv6. Please enable this feature and try again. |
400 | IdempotentParameterMismatch | The same client token was passed in to different parameters. | The error message returned because the same client token is passed into two different parameters. |
400 | MissingParameter.AccessGroupName | You must specify AccessGroupName when you create a standard or extreme file system mount target. | The error message returned because you have not specified the AccessGroupName parameter. This parameter is required if you create a mount target for a General-purpose NAS file system or an Extreme NAS file system. |
202 | RequestAccepted | The request has been accepted by the server. | The message returned because the request has been accepted by the backend. |
403 | OperationDenied.InvalidState | The operation is not permitted when the status is processing. | The error message returned because the file system is in an invalid status. |
400 | InvalidVSwitchId.IpNotEnough | The number of the specified VSwitch IP address is insufficient. | The error message returned because available IP addresses within the CIDR block of the specified vSwitch are insufficient. |
404 | InvalidParameter.VswNotFound | The specified VSwitch does not exist. | The error message returned because the specified vSwitch does not exist. |
404 | InvalidParameter.VpcNotFound | The specified VPC does not exist. | The error message returned because the specified VPC does not exist. |
400 | InvalidParameter.ConflictVpcCidr | The specified VPC CIDR conflicts with the server. | The error message returned because the specified CIDR block of the VPC conflicts with the server. |
403 | InvalidRamRole.NotExist | The specified RAM role does not exist. | The error message returned because the specified Resource Access Management (RAM) role does not exist. |
403 | InvalidRamRole.NoPermission | The specified RAM role does not have sufficient permission. | The error message returned because the specified RAM role does not have the permissions to create a mount target. |
403 | InvalidMountTarget.AlreadyExisted | The specified mount target already exists. | The error message returned because the specified mount target already exists. |
404 | InvalidFileSystem.NotFound | The specified file system does not exist. | The error message returned because the specified file system does not exist. |
403 | Resource.OutOfStock | The inventory of the specified zone is insufficient. | The error message returned because resources in the specified zone is insufficient. |
400 | DryRunOperation | The request is validated with DryRun flag set. | The message returned because the dry-run request is validated. |
403 | OperationDenied.MountTargetExceedLimit | The maximum number of mount target in the specified file system is exceeded. | The error message returned because the number of mount targets has reached the upper limit. |
For a list of error codes, visit the API Error Center.