華為云計算 云知識 查詢共享詳掛載路徑信息getMountLocation
查詢共享詳掛載路徑信息getMountLocation

 

接口說明

查詢共享掛載路徑信息。

約束說明

必須在請求頭中指定X-Openstack-Manila-Api-Version的值大于等于2.9,該接口才存在。

URL
GET  https://sfs.cn-south-2.myhuaweicloud.com/v2/{project_id}/shares/{share_id}/export_locations 
請求參數(shù)
名稱 類型 IN 必選 描述
X-Auth-Token
 
string header

用戶Token。

通過調(diào)用 IAM 服務(wù)獲取用戶Token接口獲取(響應(yīng)消息頭中X-Subject-Token的值)。

X-Openstack-Manila-Api-Version
 
float header

指定API微版本號。

project_id
 
string path

操作用戶的項目ID。

share_id
 
string path

共享的UUID。

返回參數(shù)
返回碼: 200

OK

名稱 類型 必選 描述
export_locations
 
Array of export_location objects

export_location對象的列表。

200 export_locations
名稱 類型 必選 描述
id
 
string

共享的掛載路徑的UUID。

is_admin_only
 
boolean

是否僅管理員和創(chuàng)建的屬主可見,如果是true表明只有創(chuàng)建屬主用戶和具有管理員身份的用戶可見,如果是false,表明所有用戶都可見。

path
 
string

掛載共享時要使用的路徑。

preferred
 
boolean

當(dāng)掛載路徑有多個時候,標(biāo)記這個掛載路徑,是否應(yīng)該優(yōu)先使用。

share_instance_id
 
string

共享實例的UUID。

請求示例
示例 1

查詢共享的掛載路徑

 
"GET https://{endpoint}/v2/{project_id}/shares/{share_id}/export_locations"
 
"GET https://{endpoint}/v2/{project_id}/shares/{share_id}/export_locations"
返回示例
返回碼:200

OK

示例 1
 
{
"export_locations": [
{
"id": "b03d2aac-aeed-409a-af07-5d1b9024241c",
"path": "sfs-nas1.dong.com:/share-236b936a",
"preferred": false
}
]
}
示例 2
 
{
"export_locations": [
{
"id": "85eb5849-1a89-43ae-99ac-2e781514a228",
"path": "\\\\sfs-nas1.dong.com\\share-4e76e627",
"preferred": false
}
]
}
錯誤碼
請參考 錯誤碼說明