建立掛載點。
介面說明
在使用 CreateMountTarget 介面建立掛載點時部分資源的產生是非同步完成的。因此在執行 CreateMountTarget 介面成功後,請先呼叫 DescribeMountTargets 介面查詢掛載點狀態,當掛載點狀態為 Active 後再執行掛載檔案系統操作,否則可能會掛載失敗。
呼叫此介面將自動建立操作所需的 NAS 服務關聯角色。更多資訊,請參見管理 NAS 服務關聯角色。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
nas:CreateMountTarget |
create |
*FileSystem
*VSwitch
|
|
無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| FileSystemId |
string |
是 |
檔案系統 ID。
|
174494**** |
| AccessGroupName |
string |
否 |
權限群組名稱。 當目標檔案系統為通用型 NAS 或極速型 NAS 時,此參數必填。 預設權限群組:DEFAULT_VPC_GROUP_NAME(專有網路預設權限群組)。 |
vpc-test |
| NetworkType |
string |
是 |
掛載點網路類型。取值為 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 掛載點。 取值:
說明
當前僅極速型 NAS 中國內地各地域支援 IPv6 功能,且該檔案系統需要開啟 IPv6 功能。 |
true |
| DryRun |
boolean |
否 |
校驗是否有存量掛載點。僅支援校驗 CPFS 檔案系統。 預檢操作會幫助您檢查參數有效性、校驗庫存等,並不會實際建立掛載點,也不會產生費用。
|
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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。