Store API 僅適用於託管模式。client 是 PDSClient 執行個體。options 參數是額外請求配置,詳見AxiosRequestConfig。
listAllStores 方法
標準模式不支援
託管模式支援
擷取儲存空間列表。 要求admin或superadmin許可權。
const result = await client.listAllStores(options)舉例
const {items=[]} = await client.listAllStores()參數說明
欄位 | 類型 | 必選 | 說明 |
options | AxiosRequestConfig | 其它配置項 |
返回
欄位 | 類型 | 必選 | 說明 |
result | IListRes | 返回結果 |
IListRes
欄位 | 類型 | 必選 | 說明 |
items | IStoreItem[] | 返回store列表 |
IStoreItem
欄位 | 類型 | 必選 | 說明 |
accelerate_endpoint | string | Global Acceleration網域名稱。範例 : "https://oss-cn-shenzhen.aliyuncs.com/" | |
base_path | string | 儲存公用首碼。範例 : "pds-data" | |
bucket | string | 是 | bucket名稱。範例 : "data-sz-bucket" |
customized_endpoint | string | 使用者自訂綁定儲存地址。範例 : "https://oss-cn-shenzhen.aliyuncs.com/" | |
domain_id | string | 範例 : "string" | |
endpoint | string | 是 | 儲存訪問地址。範例 : "https://oss-cn-shenzhen.aliyuncs.com/" |
internal_endpoint | string | 內網儲存地址。範例 : "https://oss-cn-shenzhen.aliyuncs.com/" | |
ownership | string | 是 | 儲存歸屬,system表示系統提供,custom表示使用自己的儲存。範例 : "system" |
policy | string | 是 | Policy授權,system類型store會將bucket許可權授予當前雲帳號。範例 : "string" |
role_arn | string | 訪問Bucket的角色ARN 範例 : "acs:oss:*:*:*" | |
store_id | string | 是 | store ID 範例 : "cdjaksbwuiqbxuiassd" |
type | string | 是 | 儲存類型,當前只支援OSS 範例 : "oss" |