Share via


Certificate - Get

取得指定之憑證的相關信息。
警告:此作業已被取代,將在 2024 年 2 月之後移除。 請改用 Azure KeyVault 擴充功能

GET {batchUrl}/certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})?api-version=2023-11-01.18.0
GET {batchUrl}/certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})?$select={$select}&timeout={timeout}&api-version=2023-11-01.18.0

URI 參數

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

string

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

thumbprint
path True

string

要取得之憑證的指紋。

thumbprintAlgorithm
path True

string

用來衍生指紋參數的演算法。 這必須是sha1。

api-version
query True

string

用戶端 API 版本。

$select
query

string

OData $select 子句。

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

Certificate

包含憑證的回應。

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 get

Sample Request

GET account.region.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=0123456789abcdef0123456789abcdef01234567)?api-version=2023-11-01.18.0


Sample Response

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

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

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

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

previousState

CertificateState

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

previousStateTransitionTime

string

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

publicData

string

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

state

CertificateState

憑證的目前狀態。

stateTransitionTime

string

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

thumbprint

string

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

thumbprintAlgorithm

string

用來衍生指紋的演算法。

url

string

憑證的 URL。

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

名稱/值組中的值。