列出所有 AppMirror 資源
GET /accounts/{account_id}/k8s/v1/appMirrors
傳回集合中所有符合資源的 JSON 陣列。如果在請求中指定了個別欄位,則項目 JSON 陣列將按指定順序包含每個相符資源所請求的欄位。
參數
| Name | 類型 | 在 | 必要 | 說明 |
|---|---|---|---|---|
account_id |
字串 |
路徑 |
True |
包含帳戶資源的 ID
|
包括 |
字串 |
查詢 |
錯誤 |
指示列出集合時應傳回哪些欄位。 URL 範例:「include=id」、「include=id,name」 OpenAPI 範例:"id" |
限制 |
字串 |
查詢 |
錯誤 |
表示列出集合時要傳回的資源數量上限。 URL 範例:「limit=2」 OpenAPI 範例:「2」 |
篩選器 |
字串 |
查詢 |
錯誤 |
指示在列出集合時,為了傳回資源而應符合哪些欄位。 支援的運算子包括:
URL 範例:「filter=field%20eq%20%27value%27」 OpenAPI 範例:"field eq 'value'" |
回應
Status: 200, Returns a JSON array of all matching resources in the collection. If individual fields are specified in the request, the items JSON array will contain the fields requested for each matching resource in the order specified.
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
項目 |
array[任何: "appMirror_1.0_get_response_body"、array[]] |
True |
|
中繼資料 |
True |
範例回應
{
"type": "application/astra-appMirrors",
"version": "1.0",
"items": [
{
"type": "application/astra-appMirror",
"version": "1.0",
"id": "f1c98c2e-6391-42d3-8b21-3e75dac048a3",
"sourceAppID": "efd639b6-fc92-4112-8841-0c0ab7890ae0",
"sourceClusterID": "5789e026-c2e2-41e9-ab00-9766bcfa8951",
"destinationAppID": "cd7b6d91-fc19-4983-a754-9a7bb4d80a7b",
"destinationClusterID": "c5d023a9-4061-4a8a-bfbf-3be11ff06226",
"namespaceMapping": [
{
"clusterID": "5789e026-c2e2-41e9-ab00-9766bcfa8951",
"namespaces": [
"ns1-src",
"ns2-src"
]
},
{
"clusterID": "c5d023a9-4061-4a8a-bfbf-3be11ff06226",
"namespaces": [
"ns1-dest",
"ns2-dest"
]
}
],
"state": "established",
"stateTransitions": [
{
"from": "establishing",
"to": [
"established",
"deleting"
]
},
{
"from": "established",
"to": [
"failingOver",
"deleting"
]
},
{
"from": "failingOver",
"to": [
"failedOver",
"deleting"
]
},
{
"from": "failedOver",
"to": [
"establishing",
"deleting"
]
},
{
"from": "deleting",
"to": [
"deleted"
]
}
],
"stateDesired": "established",
"stateAllowed": [
"failedOver",
"deleted"
],
"stateDetails": [
{
"type": "https://astra.netapp.io/stateDetails/1",
"title": "AppMirror relationship established",
"detail": "The AppMirror relationship has been successfully established."
}
],
"healthState": "normal",
"healthStateTransitions": [
{
"from": "indeterminate",
"to": [
"normal",
"warning",
"critical"
]
},
{
"from": "normal",
"to": [
"indeterminate",
"warning",
"critical"
]
},
{
"from": "warning",
"to": [
"indeterminate",
"normal",
"critical"
]
},
{
"from": "critical",
"to": [
"indeterminate",
"normal",
"warning"
]
}
],
"healthStateDetails": [
{
"type": "https://astra.netapp.io/stateDetails/2",
"title": "SnapMirror syncing successfully",
"detail": "All SnapMirror relationships are synchronizing as expected."
}
],
"metadata": {
"labels": [],
"creationTimestamp": "2020-08-06T12:24:52.256624Z",
"modificationTimestamp": "2020-08-06T12:24:52.256624Z",
"createdBy": "11c0cfa1-4f27-4ef7-a21c-cb452fc5c9aa"
}
}
],
"metadata": {
"labels": [],
"creationTimestamp": "2022-10-06T20:58:16.305662Z",
"modificationTimestamp": "2022-10-06T20:58:16.305662Z",
"createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
}
}
回應
Status: 401, Unauthorized
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例回應
{
"type": "https://astra.netapp.io/problems/3",
"title": "Missing bearer token",
"detail": "The request is missing the required bearer token.",
"status": "401"
}
回應
Status: 400, Bad request
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
|
invalidParams |
陣列["invalidParams"] |
錯誤 |
無效查詢參數清單 |
範例回應
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
回應
Status: 403, Forbidden
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例回應
{
"type": "https://astra.netapp.io/problems/11",
"title": "Operation not permitted",
"detail": "The requested operation isn't permitted.",
"status": "403"
}
錯誤
Status: 404, Not found
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例錯誤回應
{
"type": "https://astra.netapp.io/problems/2",
"title": "Collection not found",
"detail": "The collection specified in the request URI wasn't found.",
"status": "404"
}
定義
請參閱定義
namespaceMapping
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
clusterID |
字串 |
錯誤 |
指定命名空間的叢集識別碼。定義的值為:
|
命名空間 |
陣列[string] |
錯誤 |
叢集上要使用的命名空間清單。透過索引與其他叢集命名空間清單關聯。定義的值為:
|
storageClasses
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
clusterID |
字串 |
錯誤 |
指定儲存類別的叢集識別碼。定義的值為:
|
storageClassName |
字串 |
錯誤 |
在「clusterID」指定的叢集上建立 PVC 時要使用的儲存類別名稱。定義的值為:
|
type_astra_stateTransition
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
從 |
字串 |
True |
|
到 |
陣列[string] |
True |
type_astra_stateDetail
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
type_astra_label
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
|
值 |
字串 |
True |
type_astra_metadata_update
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
-
符合 Astra Metadata Schema。如果在建立時未指定、則會建立沒有標籤的中繼資料物件。如果在更新時未指定,元資料物件的標籤、creationTimestamp 和 createdBy 將保持不變。
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
標籤 |
錯誤 |
||
建立時間戳記 |
字串 |
錯誤 |
|
修改時間戳記 |
字串 |
錯誤 |
|
建立者 |
字串 |
錯誤 |
|
modifiedBy |
字串 |
錯誤 |
appMirror_1.0_get_response_body
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
資源的媒體類型。定義的值為:
|
版本 |
字串 |
True |
資源版本。定義的值為:
|
ID |
字串 |
True |
資源的全域唯一識別碼。定義的值為:
|
來源應用程式 ID |
字串 |
True |
來源應用程式的識別碼。僅在將 sourceAppID 與 destinationAppID 互換時更新。定義的值為:
|
sourceClusterID |
字串 |
True |
託管來源應用程式的受管叢集識別碼。此欄位為唯讀,根據來源應用程式的主機叢集決定。如果在更新中提供,則必須與來源應用程式的叢集 ID 相符,因此只有在將 sourceAppID 與 destinationAppID 互換時才能變更。定義的值為:
|
目的地應用程式 ID |
字串 |
錯誤 |
目標應用程式的識別碼。建立時無法提供此識別碼,因為關係初始化過程中會產生一個新的應用程式 ID。只有在來源應用程式 ID 與目標應用程式 ID 互換時才能更新此識別碼。定義的值為:
|
目的地叢集 ID |
字串 |
True |
用於託管目標應用程式的受管叢集識別碼。建立時必須提供,因為它決定了目標應用程式將在哪個叢集上建立。如果在更新時提供,則它必須與目標應用程式的叢集 ID 相符,因此只有在 sourceAppID 與 destinationAppID 互換時才會變更。定義的值為:
|
namespaceMapping |
錯誤 |
建立目標應用程式時要使用的命名空間,與來源應用程式的命名空間相對應。每個 JSON 物件包含「clusterID」和「namespaces」欄位,其中「clusterID」的值是來源叢集或目標叢集的 JSON 字串 ID,「namespaces」的值是 JSON 字串陣列。每個叢集必須只有一個 JSON 物件,命名空間將透過索引關聯。如果未提供,則目標叢集將使用與來源叢集相同的命名空間。定義的值為:
|
|
storageClasses |
陣列["storageClasses"] |
錯誤 |
建立新的持久性磁碟區宣告(PVC)時,目標叢集上要使用的儲存類別。每個 JSON 物件包含欄位 "clusterID" 和 "storageClassName",其中 "clusterID" 的值是來源叢集或目標叢集的 JSON 字串 ID,"storageClassName" 是在該叢集上建立 PVC 時要使用的儲存類別。如果未提供或某個叢集缺少該值,則將使用該叢集的預設儲存類別。定義的值為:
|
狀態 |
字串 |
True |
關係的狀態。定義的值為:
|
stateTransitions |
錯誤 |
允許的狀態轉換。此資源可能的狀態轉換如下:
|
|
stateDesired |
字串 |
True |
關係的理想狀態。建立時,唯一有效值為 "established"。定義的值為:
|
stateAllowed |
陣列[string] |
錯誤 |
在給定狀態下可以請求的狀態。在每個已定義的狀態下,可以請求以下狀態:
|
stateDetails |
True |
關於目前狀態的其他詳細資訊,包括達到目前狀態的原因。如果沒有可用的詳細資料,此陣列將為空白。定義的值為:
|
|
transferState |
字串 |
錯誤 |
目前或最近一次 Snapshot 傳輸的狀態。定義的值為:
|
transferStateTransitions |
錯誤 |
從給定的已定義狀態允許的狀態轉換。此資源可能的狀態轉換如下:
|
|
transferStateDetails |
錯誤 |
有關目前狀態的其他詳細資料,包括達到目前狀態的原因。如果沒有可用的詳細資料,此陣列將為空白。定義的值為:
|
|
healthState |
字串 |
True |
資源的健全狀態。定義的值為:
|
healthStateTransitions |
True |
從給定的已定義狀態允許的狀態轉換。此資源可能的狀態轉換如下:
|
|
healthStateDetails |
True |
有關目前狀態的其他詳細資料,包括達到目前狀態的原因。如果沒有可用的詳細資料,此陣列將為空白。定義的值為:
|
|
中繼資料 |
True |
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
|
type_astra_metadata_list
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
繼續 |
字串 |
錯誤 |
|
數 |
數字 |
錯誤 |
|
標籤 |
錯誤 |
||
建立時間戳記 |
字串 |
錯誤 |
|
修改時間戳記 |
字串 |
錯誤 |
|
建立者 |
字串 |
錯誤 |
|
modifiedBy |
字串 |
錯誤 |
invalidParams
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
無效查詢參數的名稱 |
原因 |
字串 |
True |
查詢參數無效的原因 |