擷取權利
GET /accounts/{account_id}/core/v1/entitlements/{entitlement_id}
在 JSON 回應本文中傳回已儲存的 Entitlement API 資源。
參數
| Name | 類型 | 在 | 必要 | 說明 |
|---|---|---|---|---|
account_id |
字串 |
路徑 |
True |
包含帳戶資源的 ID
|
entitlement_id |
字串 |
路徑 |
True |
要列出的權利集合 ID |
回應
Status: 200, Returns the stored Entitlement API resource in the JSON response body.
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
資源的媒體類型。定義的值為:
|
版本 |
字串 |
True |
資源版本。定義的值為:
|
ID |
字串 |
True |
資源的全域唯一識別碼。定義的值為:
|
分配 |
字串 |
錯誤 |
包含授權所分配物件 ID 的 JSON 字串。僅在分配授權時存在。字串內容未通過架構驗證。 |
產品 |
字串 |
錯誤 |
包含從授權或訂閱中提取的產品字串的 JSON 字串。字串內容未通過架構驗證。 |
productVersion |
字串 |
錯誤 |
包含從授權或訂閱中提取的版本字串的 JSON 字串。字串內容未通過架構驗證。 |
entitlementType |
字串 |
True |
包含授權類型的 JSON 字串。此資訊提取自授權或訂閱資訊。字串內容未通過架構驗證。 |
entitlementValue |
字串 |
True |
包含與授權相關容量的 JSON 字串。字串內容未通過架構驗證。 |
entitlementConsumption |
字串 |
錯誤 |
包含目前正在使用的授權相關容量的 JSON 字串。字串內容未通過架構驗證。 |
sourceLicense |
字串 |
錯誤 |
包含授權來源許可證物件 ID 的 JSON 字串。定義的值為:
|
sourceSubscription |
字串 |
錯誤 |
包含授權來源訂閱物件 ID 的 JSON 字串。定義的值為:
|
validFromTimestamp |
字串 |
錯誤 |
包含時間戳記的 JSON 字串,指示授權何時生效。定義的值為:
|
validUntilTimestamp |
字串 |
錯誤 |
包含時間戳記的 JSON 字串,指示授權何時不再有效。定義的值為:
|
中繼資料 |
True |
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
|
範例回應
{
"type": "application/astra-entitlement",
"version": "1.0",
"id": "8bdafc19-bde6-5f45-9808-4893c845c9f5",
"product": "Astra SDS",
"productVersion": "1.0",
"entitlementType": "capacity",
"entitlementValue": "2",
"entitlementConsumption": "1",
"sourceLicense": "c8aa757a-5318-489f-8134-a2a1a6956a3e",
"validFromTimestamp": "2020-08-06T00:00:00.000000Z",
"validUntilTimestamp": "2021-08-06T00:00:00.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 |
字串 |
錯誤 |
|
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"
}
定義
請參閱定義
type_astra_label
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
|
值 |
字串 |
True |
type_astra_metadata
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
-
符合 Astra 中繼資料架構
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
標籤 |
True |
||
建立時間戳記 |
字串 |
True |
|
修改時間戳記 |
字串 |
True |
|
建立者 |
字串 |
True |
|
modifiedBy |
字串 |
錯誤 |
invalidParams
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
無效查詢參數的名稱 |
原因 |
字串 |
True |
查詢參數無效的原因 |