全部產品
Search
文件中心

Cloud Parallel File Storage:CreateMountTarget

更新時間:Jun 25, 2026

建立掛載點。

介面說明

  • 在使用 CreateMountTarget 介面建立掛載點時部分資源的產生是非同步完成的。因此在執行 CreateMountTarget 介面成功後,請先呼叫 DescribeMountTargets 介面查詢掛載點狀態,當掛載點狀態為 Active 後再執行掛載檔案系統操作,否則可能會掛載失敗。

  • 呼叫此介面將自動建立操作所需的 NAS 服務關聯角色。更多資訊,請參見管理 NAS 服務關聯角色

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

nas:CreateMountTarget

create

*FileSystem

acs:nas:{#regionId}:{#accountId}:filesystem/{#filesystemId}

*VSwitch

acs:vpc:{#regionId}:{#accountId}:vswitch/{#VSwitchId}

  • vpc:Vpc

請求參數

名稱

類型

必填

描述

樣本值

FileSystemId

string

檔案系統 ID。

  • 通用型 NAS:31a8e4****。

  • 極速型 NAS:必須以extreme-開頭,例如 extreme-0015****。

  • CPFS:必須以cpfs-開頭,例如 cpfs-125487****。

174494****

AccessGroupName

string

權限群組名稱。

當目標檔案系統為通用型 NAS 或極速型 NAS 時,此參數必填。

預設權限群組:DEFAULT_VPC_GROUP_NAME(專有網路預設權限群組)。

vpc-test

NetworkType

string

掛載點網路類型。取值為 Vpc,表示專有網路。

枚舉值:

  • Vpc :

    專有網路。

  • vpc :

    專有網路。

  • 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 掛載點。

取值:

  • true:建立

  • false(預設值):不建立

說明

當前僅極速型 NAS 中國內地各地域支援 IPv6 功能,且該檔案系統需要開啟 IPv6 功能。

true

DryRun

boolean

校驗是否有存量掛載點。僅支援校驗 CPFS 檔案系統。

預檢操作會幫助您檢查參數有效性、校驗庫存等,並不會實際建立掛載點,也不會產生費用。

  • true:傳送校驗請求,不會建立掛載點。檢查項包括是否填寫了必需參數、請求格式、業務限制和 CPFS 庫存。如果檢查不通過,則返回對應錯誤。如果檢查通過,則返回200 HttpCode,但MountTargetDomain為空。

  • false(預設值):傳送正常請求,通過檢查後直接建立掛載點。

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.
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.
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.
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.
403 OperationDenied.InvalidState The operation is not permitted when the status is processing.
403 InvalidRamRole.NotExist The specified RAM role does not exist.
403 InvalidRamRole.NoPermission The specified RAM role does not have sufficient permission.
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.
404 InvalidFileSystem.NotFound The specified file system does not exist.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情