Creates a mount target.

Precautions

After you create a mount target, you must call the DescribeMountTargets operation to query the details of the mount target. This is a required step because some details for the mount target are generated asynchronously at the backend when you use the CreateMountTarget API operation to create the mount target. Before you mount a file system, you must ensure the attached mount target is in the Active state. Otherwise, the file system may fail to be mounted.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateMountTarget

The operation that you want to perform. Set the value to CreateMountTarget.

AccessGroupName String Yes classic-test

The name of the permission group.

Default permission groups include DEFAULT_VPC_GROUP_NAME and DEFAULT_CLASSIC_GROUP_NAME.

FileSystemId String Yes 174494b666

The ID of the file system.

NetworkType String Yes VPC

The type of network. Valid values: VPC and Classic.

VpcId String No vpc-2zesj9afh3y518k9o****

The ID of the VPC. If you specify VPC for the NetworkType parameter, you must specify the VpcId parameter.

VSwitchId String No vsw-2zevmwkwyztjuoffg****

The ID of the VSwitch. If you specify VPC for the NetworkType parameter, you must specify the VSwitchId parameter.

SecurityGroupId String No sg-bp1fg655nh68xyz9**** Security Group ID.

Response parameters

Parameter Type Example Description
RequestId String 70EACC9C-D07A-4A34-ADA4-77506C42B023

The ID of the request.

MountTargetDomain String 174494b666-xog95.cn-hangzhou.nas.aliyuncs.com

The public endpoint of the mount target.

Examples

Sample requests

GET https://nas.cn-hangzhou.aliyuncs.com/?Action=CreateMountTarget
&AccessGroupName=classic-test
&FileSystemId=1ca404a666
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.