修改認證資料
PUT /accounts/{account_id}/core/v1/credentials/{credential_id}
將整個儲存的資源替換為提供的 JSON 請求主體,同時保留使用者不可修改的鍵值。
參數
| Name | 類型 | 在 | 必要 | 說明 |
|---|---|---|---|---|
account_id |
字串 |
路徑 |
True |
包含帳戶資源的 ID
|
credential_id |
字串 |
路徑 |
True |
要列出的認證資料集合 ID |
請求本文
將整個儲存的資源替換為提供的 JSON 請求主體,同時保留使用者不可修改的鍵值。
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
資源的媒體類型。定義的值為:
|
版本 |
字串 |
True |
資源版本。定義的值為:
|
ID |
字串 |
錯誤 |
資源的全域唯一識別碼。定義的值為:
|
姓名 |
字串 |
True |
包含使用者指定名稱的 JSON 字串。為使用者建立憑證時,該名稱將設定為該使用者的 UUID。定義的值為:
|
keyType |
字串 |
錯誤 |
JSON 字串,包含 keyStore 內容的選用使用者指定資料驗證類型描述符。擴充更新限制:
|
keyStore |
True |
包含 JSON 字串的 JSON 物件。keyStore 中的每個字串代表憑證的一部分。每個字串的名稱代表憑證的組成部分,對應的鍵值對以 base64 格式儲存該部分憑證的值。定義的值為:
|
|
有效 |
字串 |
錯誤 |
描述憑證是否有效使用的 JSON 字串。如果省略,預設值為 "true"。定義的值為:
|
validFromTimestamp |
字串 |
錯誤 |
包含時間戳記的 JSON 字串,指示憑證的有效時間。這些用於認證資料輪替。定義的值為:
|
validUntilTimestamp |
字串 |
錯誤 |
包含時間戳記的 JSON 字串,指示認證資料何時失效。這些用於認證資料輪替。定義的值為:
|
中繼資料 |
錯誤 |
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
|
範例請求
{
"type": "application/astra-credential",
"version": "1.1",
"name": "oldCert",
"keyStore": {
"privKey": "SGkh",
"pubKey": "VGhpcyBpcyBhbiBleGFtcGxlLg=="
}
}
回應
Status: 204, Indicates if the credential resource was updated.
回應
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: 406, Not acceptable
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例回應
{
"type": "https://astra.netapp.io/problems/32",
"title": "Unsupported content type",
"detail": "The response can't be returned in the requested format.",
"status": "406"
}
回應
Status: 500, Internal server error
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例回應
{
"type": "https://astra.netapp.io/problems/34",
"title": "Internal server error",
"detail": "The server was unable to process this request.",
"status": "500"
}
回應
Status: 412, Precondition failed
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例回應
{
"type": "https://astra.netapp.io/problems/38",
"title": "Precondition not met",
"detail": "The conditional headers aren't satisfied.",
"status": "412"
}
回應
Status: 409, Conflict
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例回應
{
"type": "https://astra.netapp.io/problems/39",
"title": "Credential exists",
"detail": "A credential of this type already exists.",
"status": "409"
}
回應
Status: 502, Bad gateway
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例回應
{
"type": "https://astra.netapp.io/problems/40",
"title": "Communication failed",
"detail": "Communication wasn't made with downstream services.",
"status": "502"
}
回應
Status: 503, Service unavailable
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
範例回應
{
"type": "https://astra.netapp.io/problems/41",
"title": "Service not ready",
"detail": "Currently, the service can't respond to this request.",
"status": "503"
}
錯誤
Status: 400, Bad request
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
類型 |
字串 |
True |
|
標題 |
字串 |
True |
|
詳細資料 |
字串 |
True |
|
狀態 |
字串 |
True |
|
correlationID |
字串 |
錯誤 |
|
invalidParams |
陣列["invalidParams"] |
錯誤 |
無效查詢參數清單 |
範例錯誤回應
{
"type": "https://astra.netapp.io/problems/7",
"title": "Invalid JSON payload",
"detail": "The request body is not valid JSON.",
"status": "400"
}
定義
請參閱定義
keyStore
包含 JSON 字串的 JSON 物件。keyStore 中的每個字串代表憑證的一部分。每個字串的名稱代表憑證的組成部分,對應的鍵值對以 base64 格式儲存該部分憑證的值。定義的值為:
-
符合 base64 編碼資料架構,字串長度沒有限制。
將字串對應至字串的雜湊
type_astra_label
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
|
值 |
字串 |
True |
type_astra_metadata_update
與資源相關聯的用戶端和服務指定中繼資料。定義的值為:
-
符合 Astra Metadata Schema。如果在建立時未指定、則會建立沒有標籤的中繼資料物件。如果在更新時未指定,元資料物件的標籤、creationTimestamp 和 createdBy 將保持不變。
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
標籤 |
錯誤 |
||
建立時間戳記 |
字串 |
錯誤 |
|
修改時間戳記 |
字串 |
錯誤 |
|
建立者 |
字串 |
錯誤 |
|
modifiedBy |
字串 |
錯誤 |
invalidFields
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
無效請求內文欄位的名稱 |
原因 |
字串 |
True |
請求本文欄位無效的原因 |
invalidParams
| Name | 類型 | 必要 | 說明 |
|---|---|---|---|
姓名 |
字串 |
True |
無效查詢參數的名稱 |
原因 |
字串 |
True |
查詢參數無效的原因 |