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

建立新的 ASUP 資源

POST /accounts/{account_id}/core/v1/asups

指示要建立的 ASUP API 資源所需的值。

參數

Name 類型 必要 說明

account_id

字串

路徑

True

包含帳戶資源的 ID

  • 範例:{{.Account}}

請求本文

指示要建立的 ASUP API 資源所需的值。

Name 類型 必要 說明

類型

字串

True

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

  • "application/astra-asup"

版本

字串

True

資源版本。已定義值包括:

  • "1.0"

上傳

字串

True

JSON 字串包含一個值,指示在成功建立後是否上傳 AutoSupport 套裝組合。已定義的值為:

  • "true" - 上傳 AutoSupport 套裝組合。

  • "false" - 請勿上傳該 AutoSupport 套件組合。

dataWindowStart

字串

錯誤

包含時間戳記的 JSON 字串,指示 AutoSupport 套裝組合資料收集視窗的開始時間。預設值為 "dataWindowEnd" 鍵值前 24 小時。必須早於 "dataWindowEnd" 鍵值。最大值為請求當前時間前 7 天。已定義的值包括:

  • 符合 ISO-8601 日期時間架構

dataWindowEnd

字串

錯誤

包含時間戳記的 JSON 字串,指示 AutoSupport 套裝組合資料收集時間範圍的結束時間。預設為要求的目前時間。定義的值為:

  • 符合 ISO-8601 日期時間架構

中繼資料

"type_astra_metadata"

錯誤

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

  • 符合 Astra Metadata Schema。如果在建立時未指定、則會建立沒有標籤的中繼資料物件。

範例請求
{
  "type": "application/astra-asup",
  "version": "1.0",
  "upload": "true"
}

回應

Status: 201, Returns the newly created asup resource in the JSON response body.
Name 類型 必要 說明

類型

字串

True

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

  • "application/astra-asup"

版本

字串

True

資源版本。已定義值包括:

  • "1.0"

ID

字串

True

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

  • 符合 UUIDv4 架構

creationState

字串

True

JSON 字串,包含指示 AutoSupport 套裝組合建立狀態的值。對於「completed」和「partial」狀態,可以透過對資源 URI 執行 GET 請求,並在 Accept 標頭中包含「/」或「application/gzip」來下載套裝組合。已定義的值如下:

  • 「運作中」- AutoSupport 套裝組合產生正在正常運作。

  • 「已完成」- AutoSupport 套裝組合產生已完成。

  • 「部分」- AutoSupport 資料包產生已完成,但部分資料未包含在資料包中。

  • 「失敗」- AutoSupport 套裝組合產生處於永久失敗狀態。

creationStateDetails

陣列["type_astra_stateDetail"]

True

JSON 物件的 JSON 陣列,其中列出了有關「creationState」為何轉換為「partial」或「failed」的更多詳細資訊。如果沒有可用的詳細資訊,則此陣列為空白。

  • 最少項目數:0

上傳

字串

True

JSON 字串包含一個值,指示在成功建立後是否上傳 AutoSupport 套裝組合。已定義的值為:

  • "true" - 上傳 AutoSupport 套裝組合。

  • "false" - 請勿上傳該 AutoSupport 套件組合。

uploadState

字串

錯誤

JSON 字串包含一個值,該值指示 AutoSupport 套裝組合上傳的狀態(如果已要求)。定義的值包括:

  • 「pending」- AutoSupport 套裝組合上傳已排程在 AutoSupport 套裝組合建立完成時執行(「creationState」為「running」)。

  • 「blocked」 - 未嘗試上傳 AutoSupport 套裝組合,因為未建立套裝組合(「creationState」為「failed」),或因為沒有授權而封鎖上傳。

  • 「running」- AutoSupport 套裝組合上傳正常執行(「creationState」為「completed」或「partial」)。

  • 「已完成」- AutoSupport 套裝組合上傳已完成。

  • 「失敗」- AutoSupport 套裝組合上傳處於永久失敗狀態。

uploadStateDetails

陣列["type_astra_stateDetail"]

錯誤

JSON 物件的 JSON 陣列,列出有關「uploadState」為何轉換為「failed」的其他詳細資訊。如果沒有可用的詳細資訊,此陣列將為空白。

  • 最少項目數:0

triggerType

字串

True

包含一個值的 JSON 字串,該值指示觸發 ASUP 資源建立的原因。已定義的值包括:

  • 「手動」 - ASUP 資源和相關 AutoSupport 套裝組合是手動建立的。

  • 「已排程」 - ASUP 資源和相關 AutoSupport 套件是根據配置的排程建立的。

dataWindowStart

字串

True

包含時間戳記的 JSON 字串,指示 AutoSupport 套裝組合資料收集視窗的開始時間。預設值為 "dataWindowEnd" 鍵值前 24 小時。必須早於 "dataWindowEnd" 鍵值。最大值為請求當前時間前 7 天。已定義的值包括:

  • 符合 ISO-8601 日期時間架構

dataWindowEnd

字串

True

包含時間戳記的 JSON 字串,指示 AutoSupport 套裝組合資料收集時間範圍的結束時間。預設為要求的目前時間。定義的值為:

  • 符合 ISO-8601 日期時間架構

中繼資料

"type_astra_metadata"

True

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

  • 符合 Astra Metadata Schema。如果在建立時未指定、則會建立沒有標籤的中繼資料物件。

範例回應
{
  "type": "application/astra-asup",
  "version": "1.0",
  "id": "9950003f-a1c7-5ca7-8930-06eec25f60aa",
  "creationState": "running",
  "creationStateDetails": [],
  "upload": "true",
  "uploadState": "pending",
  "uploadStateDetails": [],
  "triggerType": "manual",
  "dataWindowStart": "2020-08-05T12:24:00.000000Z",
  "dataWindowEnd": "2020-08-06T12:24:52.000000Z",
  "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

字串

錯誤

invalidFields

陣列["invalidFields"]

錯誤

無效請求本文欄位清單

範例回應
{
  "type": "https://astra.netapp.io/problems/5",
  "title": "Invalid query parameters",
  "detail": "The supplied query parameters are invalid.",
  "status": "400"
}

回應

Status: 409, Conflict
Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

狀態

字串

True

correlationID

字串

錯誤

invalidFields

陣列["invalidFields"]

錯誤

無效請求本文欄位清單

範例回應
{
  "type": "https://astra.netapp.io/problems/10",
  "title": "JSON resource conflict",
  "detail": "The request body JSON contains a field that conflicts with an idempotent value.",
  "status": "409"
}

回應

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"
}

定義

請參閱定義

type_astra_label

Name 類型 必要 說明

姓名

字串

True

字串

True

type_astra_metadata

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

  • 符合 Astra Metadata Schema。如果在建立時未指定、則會建立沒有標籤的中繼資料物件。

Name 類型 必要 說明

標籤

陣列["type_astra_label"]

True

建立時間戳記

字串

True

修改時間戳記

字串

True

建立者

字串

True

modifiedBy

字串

錯誤

additionalDetails

type_astra_stateDetail

Name 類型 必要 說明

類型

字串

True

標題

字串

True

詳細資料

字串

True

additionalDetails

"additionalDetails"

錯誤

invalidParams

Name 類型 必要 說明

姓名

字串

True

無效查詢參數的名稱

原因

字串

True

查詢參數無效的原因

invalidFields

Name 類型 必要 說明

姓名

字串

True

無效請求內文欄位的名稱

原因

字串

True

請求本文欄位無效的原因