Skip to main content
Astra Automation
此產品有較新版本可以使用。
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

擷取 AppMirror 資源

GET /accounts/{account_id}/k8s/v1/appMirrors/{appMirror_id}

傳回 JSON 回應正文中儲存的 AppMirror API 資源。

參數

Name 類型 必要 說明

account_id

字串

路徑

True

包含帳戶資源的 ID

  • 範例:{{.Account}}

appMirror_id

字串

路徑

True

要列出的 appMirror 集合的 ID

回應

Status: 200, Returns the stored AppMirror API resource in the JSON response body.
Name 類型 必要 說明

類型

字串

True

資源的媒體類型。定義的值為:

  • "應用程式/astra-appMirror"

版本

字串

True

資源版本。定義的值為:

  • "1.0"

  • "1.1"

ID

字串

True

資源的全域唯一識別碼。定義的值為:

  • 符合 UUIDv4 架構

來源應用程式 ID

字串

True

來源應用程式的識別碼。僅在將 sourceAppID 與 destinationAppID 互換時更新。定義的值為:

  • 符合 Astra 識別符架構

sourceClusterID

字串

True

託管來源應用程式的受管叢集識別碼。此欄位為唯讀,根據來源應用程式的主機叢集決定。如果在更新中提供,則必須與來源應用程式的叢集 ID 相符,因此只有在將 sourceAppID 與 destinationAppID 互換時才能變更。定義的值為:

  • 符合 Astra 識別符架構

目的地應用程式 ID

字串

錯誤

目標應用程式的識別碼。建立時無法提供此識別碼,因為關係初始化過程中會產生一個新的應用程式 ID。只有在來源應用程式 ID 與目標應用程式 ID 互換時才能更新此識別碼。定義的值為:

  • 符合 Astra 識別符架構

目的地叢集 ID

字串

True

用於託管目標應用程式的受管叢集識別碼。建立時必須提供,因為它決定了目標應用程式將在哪個叢集上建立。如果在更新時提供,則它必須與目標應用程式的叢集 ID 相符,因此只有在 sourceAppID 與 destinationAppID 互換時才會變更。定義的值為:

  • 符合 Astra 識別符架構

namespaceMapping

陣列["namespaceMapping"]

錯誤

建立目標應用程式時要使用的命名空間,與來源應用程式的命名空間相對應。每個 JSON 物件包含「clusterID」和「namespaces」欄位,其中「clusterID」的值是來源叢集或目標叢集的 JSON 字串 ID,「namespaces」的值是 JSON 字串陣列。每個叢集必須只有一個 JSON 物件,命名空間將透過索引關聯。如果未提供,則目標叢集將使用與來源叢集相同的命名空間。定義的值為:

  • 最短長度:0

  • 最大長度:2

storageClasses

陣列["storageClasses"]

錯誤

建立新的持久性磁碟區宣告(PVC)時,目標叢集上要使用的儲存類別。每個 JSON 物件包含欄位 "clusterID" 和 "storageClassName",其中 "clusterID" 的值是來源叢集或目標叢集的 JSON 字串 ID,"storageClassName" 是在該叢集上建立 PVC 時要使用的儲存類別。如果未提供或某個叢集缺少該值,則將使用該叢集的預設儲存類別。定義的值為:

  • 最短長度:0

  • 最大長度:2

狀態

字串

True

關係的狀態。定義的值為:

  • 「establishing」——關係正在建立中。

  • 「established」- 關係已建立。

  • 「failingOver」- 應用程式故障轉移到目的地叢集正在進行中。

  • "failedOver" - 應用程式故障轉移到目標叢集已完成。

  • 「刪除」- 正在清理由該關係建立的資源。

  • 「已刪除」- 關係已清理並刪除。

stateTransitions

陣列["type_astra_stateTransition"]

錯誤

允許的狀態轉換。此資源可能的狀態轉換如下:

  • 「establishing」:「established」、「deleting」

  • 「已建立」:「failingOver」、「刪除」

  • "failingOver": "failedOver", "正在刪除"

  • "failedOver":"建立中","刪除中"

  • "正在刪除": "已刪除"

  • "deleted":

stateDesired

字串

True

關係的理想狀態。建立時,唯一有效值為 "established"。定義的值為:

  • 「established」- 關係已建立。

  • "failedOver" - 應用程式故障轉移到目標叢集已完成。

  • 「已刪除」- 該關係已成功清理並刪除。

stateAllowed

陣列[string]

錯誤

在給定狀態下可以請求的狀態。在每個已定義的狀態下,可以請求以下狀態:

  • 「establishing」:「established」、「deleted」

  • 「已建立」:「failedOver」、「已刪除」

  • "failingOver": "failedOver", "deleted"

  • "failedOver": "已建立", "已刪除"

  • "正在刪除": "已刪除"

  • "deleted": "已刪除"

stateDetails

陣列["type_astra_stateDetail"]

True

關於目前狀態的其他詳細資訊,包括達到目前狀態的原因。如果沒有可用的詳細資料,此陣列將為空白。定義的值為:

  • 最低項目數:0

transferState

字串

錯誤

目前或最近一次 Snapshot 傳輸的狀態。定義的值為:

  • 「正在傳輸」— 已建立新快照,並正在複製到目標叢集。此狀態也涵蓋先前嘗試失敗且正在持續重試的傳輸。

  • 「閒置」- 目前沒有正在進行的傳輸。

transferStateTransitions

陣列["type_astra_stateTransition"]

錯誤

從給定的已定義狀態允許的狀態轉換。此資源可能的狀態轉換如下:

  • 「傳輸中」:「閒置」

  • "idle": "transferring"

transferStateDetails

陣列["type_astra_stateDetail"]

錯誤

有關目前狀態的其他詳細資料,包括達到目前狀態的原因。如果沒有可用的詳細資料,此陣列將為空白。定義的值為:

  • 最低項目數:0

healthState

字串

True

資源的健全狀態。定義的值為:

  • 「不確定」- 無法判斷資源的健全狀況 (例如,由於缺乏連線能力)

  • 「normal」- 資源沒有已知問題,可依據介面規格提供服務

  • 「警告」- 該資源有已知問題,但這並不妨礙其依照介面規範提供服務

  • 「critical」- 此資源有已知問題,導致其無法依照介面規格提供服務

healthStateTransitions

陣列["type_astra_stateTransition"]

True

從給定的已定義狀態允許的狀態轉換。此資源可能的狀態轉換如下:

  • 「不確定」:「正常」、「警告」、「嚴重」

  • "normal": "indeterminate", "warning", "critical"

  • "warning": "indeterminate", "normal", "critical"

  • "critical": "未確定", "正常", "警告"

healthStateDetails

陣列["type_astra_stateDetail"]

True

有關目前狀態的其他詳細資料,包括達到目前狀態的原因。如果沒有可用的詳細資料,此陣列將為空白。定義的值為:

  • 最低項目數:0

中繼資料

"type_astra_metadata_update"

True

與資源相關聯的用戶端和服務指定中繼資料。定義的值為:

  • 符合 Astra Metadata Schema。如果在建立時未指定、則會建立沒有標籤的中繼資料物件。如果在更新時未指定,元資料物件的標籤、creationTimestamp 和 createdBy 將保持不變。

範例回應
{
  "type": "application/astra-appMirror",
  "version": "1.1",
  "id": "512c8dac-b7d4-5be9-836e-ee672965866a",
  "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": "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

字串

錯誤

指定命名空間的叢集識別碼。定義的值為:

  • 符合 Astra 識別符架構

命名空間

陣列[string]

錯誤

叢集上要使用的命名空間清單。透過索引與其他叢集命名空間清單關聯。定義的值為:

  • 最短長度:1

  • 最大長度:63

  • 符合 DNS 1123 Label Schema

角色

字串

錯誤

此命名空間定義的初始角色。除使用同叢集複寫組態外,此參數為選用參數。定義的值為:

  • 「source」

  • 「destination」

storageClasses

Name 類型 必要 說明

clusterID

字串

錯誤

指定儲存類別的叢集識別碼。定義的值為:

  • 符合 Astra 識別符架構

storageClassName

字串

錯誤

在「clusterID」指定的叢集上建立 PVC 時要使用的儲存類別名稱。定義的值為:

  • 最短長度:1

  • 最大長度:255

角色

字串

錯誤

此儲存類別定義的初始角色。除使用同叢集複寫組態外,此參數為選用參數。定義的值為:

  • 「source」

  • 「destination」

type_astra_stateTransition

Name 類型 必要 說明

字串

True

陣列[string]

True

additionalDetails

type_astra_stateDetail

Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

additionalDetails

"additionalDetails"

錯誤

type_astra_label

Name 類型 必要 說明

姓名

字串

True

字串

True

type_astra_metadata_update

與資源相關聯的用戶端和服務指定中繼資料。定義的值為:

  • 符合 Astra Metadata Schema。如果在建立時未指定、則會建立沒有標籤的中繼資料物件。如果在更新時未指定,元資料物件的標籤、creationTimestamp 和 createdBy 將保持不變。

Name 類型 必要 說明

標籤

陣列["type_astra_label"]

錯誤

建立時間戳記

字串

錯誤

修改時間戳記

字串

錯誤

建立者

字串

錯誤

modifiedBy

字串

錯誤

invalidParams

Name 類型 必要 說明

姓名

字串

True

無效查詢參數的名稱

原因

字串

True

查詢參數無效的原因