Share via


Certificate - List

列出已新增至指定帳戶的所有憑證。
警告:此作業已被取代,將在 2024 年 2 月之後移除。 請改用 Azure KeyVault 擴充功能

GET {batchUrl}/certificates?api-version=2023-11-01.18.0
GET {batchUrl}/certificates?$filter={$filter}&$select={$select}&maxresults={maxresults}&timeout={timeout}&api-version=2023-11-01.18.0

URI 參數

名稱 位於 必要 類型 Description
batchUrl
path True

string

所有 Azure Batch 服務要求的基底 URL。

api-version
query True

string

用戶端 API 版本。

$filter
query

string

OData $filter 子句。 如需建構此篩選的詳細資訊,請參閱 https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-certificates

$select
query

string

OData $select 子句。

maxresults
query

integer

int32

回應中要傳回的項目數目上限。 最多可以傳回 1000 個憑證。

timeout
query

integer

int32

伺服器可以花費在處理要求的最大時間,以秒為單位。 預設值為 30 秒。

要求標頭

Media Types: "application/json; odata=minimalmetadata"

名稱 必要 類型 Description
client-request-id

string

uuid

呼叫端產生的要求識別,格式為不含大括弧的 GUID,例如大括弧,例如 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0。

return-client-request-id

boolean

伺服器是否應該在回應中傳回 client-request-id。

ocp-date

string

date-time-rfc1123

發出要求的時間。 用戶端連結庫通常會將此設定為目前的系統時鐘時間;如果您要直接呼叫 REST API,請明確設定它。

回應

名稱 類型 Description
200 OK

CertificateListResult

包含憑證清單的回應。

Headers

  • client-request-id: string
  • request-id: string
  • ETag: string
  • Last-Modified: string
Other Status Codes

BatchError

Batch 服務的錯誤。

安全性

azure_auth

Microsoft Entra OAuth 2.0 驗證碼流程

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

Authorization

Type: apiKey
In: header

範例

Certificate list

Sample Request

GET account.region.batch.azure.com/certificates?api-version=2023-11-01.18.0


Sample Response

{
  "value": [
    {
      "thumbprint": "0123456789abcdef0123456789abcdef01234567",
      "thumbprintAlgorithm": "sha1",
      "url": "https://account.region.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=0123456789abcdef0123456789abcdef01234567)",
      "state": "deletefailed",
      "stateTransitionTime": "2014-07-31T21:12:58.236Z",
      "previousState": "deleting",
      "previousStateTransitionTime": "2014-07-31T21:11:58.236Z",
      "publicData": "#####...",
      "deleteCertificateError": {
        "code": "PoolsReferencingCertificate",
        "message": "The specified certificate is being used by the below mentioned pool(s)",
        "values": [
          {
            "name": "Pools",
            "value": "mypool1"
          }
        ]
      }
    }
  ]
}

定義

名稱 Description
BatchError

從 Azure Batch 服務收到的錯誤回應。

BatchErrorDetail

Azure Batch 錯誤回應中包含的其他信息專案。

Certificate

可在計算節點上安裝的憑證,可用來驗證計算機上的作業。

CertificateListResult

在帳戶中列出憑證的結果。

CertificateState

憑證的狀態。

DeleteCertificateError

刪除憑證時 Batch 服務遇到的錯誤。

ErrorMessage

在 Azure Batch 錯誤回應中收到的錯誤訊息。

NameValuePair

表示名稱/值組。

BatchError

從 Azure Batch 服務收到的錯誤回應。

名稱 類型 Description
code

string

錯誤的識別碼。 程式碼不變,且要以程式設計方式使用。

message

ErrorMessage

描述錯誤的訊息,適用於在使用者介面中顯示。

values

BatchErrorDetail[]

索引鍵/值組的集合,其中包含錯誤的其他詳細數據。

BatchErrorDetail

Azure Batch 錯誤回應中包含的其他信息專案。

名稱 類型 Description
key

string

指定 Value 屬性意義的識別碼。

value

string

錯誤回應中包含的其他資訊。

Certificate

可在計算節點上安裝的憑證,可用來驗證計算機上的作業。

名稱 類型 Description
deleteCertificateError

DeleteCertificateError

上次嘗試刪除此憑證時發生的錯誤。
只有當憑證處於 DeleteFailed 狀態時,才會設定這個屬性。

previousState

CertificateState

憑證的先前狀態。
如果憑證處於初始作用中狀態,則不會設定這個屬性。

previousStateTransitionTime

string

憑證進入其先前狀態的時間。
如果憑證處於其初始作用中狀態,則不會設定這個屬性。

publicData

string

憑證的公用部分,做為base-64編碼.cer檔案。

state

CertificateState

憑證的目前狀態。

stateTransitionTime

string

憑證進入其目前狀態的時間。

thumbprint

string

憑證的 X.509 指紋。 這是最多 40 個十六進位數位的序列。

thumbprintAlgorithm

string

用來衍生指紋的演算法。

url

string

憑證的 URL。

CertificateListResult

在帳戶中列出憑證的結果。

名稱 類型 Description
odata.nextLink

string

要取得下一組結果的URL。

value

Certificate[]

憑證清單。

CertificateState

憑證的狀態。

名稱 類型 Description
active

string

憑證可用於集區。

deletefailed

string

使用者要求刪除憑證,但有集區仍參考憑證,或仍安裝在一或多個節點上。 (如果憑證已從集區中移除,但計算節點尚未重新啟動,就會發生後者。計算節點只會在重新啟動時重新整理其憑證。) 您可以使用取消憑證刪除作業來取消刪除,或刪除憑證作業來重試刪除。

deleting

string

使用者已要求刪除憑證,但刪除作業尚未完成。 建立或更新集區時,您可能不會參考憑證。

DeleteCertificateError

刪除憑證時 Batch 服務遇到的錯誤。

名稱 類型 Description
code

string

憑證刪除錯誤的識別碼。 程式碼不變,且要以程式設計方式使用。

message

string

描述憑證刪除錯誤的訊息,適用於在使用者介面中顯示。

values

NameValuePair[]

與憑證刪除錯誤相關的其他錯誤詳細數據清單。
此清單包含參考此憑證的作用中集區和計算節點等詳細數據。 不過,如果大量資源參考憑證,則清單只包含大約前百個。

ErrorMessage

在 Azure Batch 錯誤回應中收到的錯誤訊息。

名稱 類型 Description
lang

string

錯誤訊息的語言代碼

value

string

訊息的文字。

NameValuePair

表示名稱/值組。

名稱 類型 Description
name

string

name-value 配對中的名稱。

value

string

name-value 配對中的值。