Certificate - Get
取得指定憑證的相關信息。
警告:這項作業已被取代,將在 2024 年 2 月之後移除。 請改用 Azure KeyVault 擴充功能。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}?api-version=2024-07-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
account
|
path | True |
string minLength: 3maxLength: 24 pattern: ^[a-zA-Z0-9]+$ |
批次帳號的名稱必須在該地區內獨一無二。 批次帳號名稱長度必須介於 3 到 24 字元之間,且只能使用數字和小寫字母。 此名稱作為 DNS 名稱的一部分,用於存取該帳號所建立區域的批次服務。 例如: |
|
certificate
|
path | True |
string minLength: 5maxLength: 45 pattern: ^[\w]+-[\w]+$ |
憑證的標識碼。 這必須由以破折號分隔的演算法和指紋組成,而且必須符合要求中的憑證數據。 例如SHA1-a3d1c5。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
資源群組的名稱。 名稱不區分大小寫。 |
|
subscription
|
path | True |
string (uuid) |
目標訂用帳戶的標識碼。 此值必須是 UUID。 |
|
api-version
|
query | True |
string minLength: 1 |
用於此作業的 API 版本。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
要求已成功。 標題 ETag: string |
|
| Other Status Codes |
未預期的錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 流程。
類型:
oauth2
Flow:
implicit
授權 URL:
https://login.microsoftonline.com/common/oauth2/authorize
範圍
| 名稱 | Description |
|---|---|
| user_impersonation | 模擬您的用戶帳戶 |
範例
| Get Certificate |
| Get Certificate with Deletion Error |
Get Certificate
範例要求
範例回覆
ETag: W/"0x8D4EDD5118668F7"
{
"name": "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
"type": "Microsoft.Batch/batchAccounts/certificates",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
"properties": {
"format": "Pfx",
"provisioningState": "Succeeded",
"provisioningStateTransitionTime": "2017-07-21T01:47:38.4420202Z",
"publicData": "MIICrjCCAZagAwI...",
"thumbprint": "0a0e4f50d51beadeac1d35afc5116098e7902e6e",
"thumbprintAlgorithm": "sha1"
}
}
Get Certificate with Deletion Error
範例要求
範例回覆
ETag: W/"0x8D4EDD5118668F7"
{
"name": "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
"type": "Microsoft.Batch/batchAccounts/certificates",
"id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
"properties": {
"format": "Pfx",
"deleteCertificateError": {
"code": "NodesReferencingCertificate",
"message": "The specified certificate is being used by the below mentioned node(s)\nRequestId:2dc78afc-b15b-42d2-8c85-39cb61a0799e\nTime:2017-08-28T10:22:52.8633406Z",
"target": "BatchAccount",
"details": [
{
"code": "Nodes",
"message": "node1, node3"
}
]
},
"previousProvisioningState": "Deleting",
"previousProvisioningStateTransitionTime": "2017-07-21T00:15:25.5625498Z",
"provisioningState": "Failed",
"provisioningStateTransitionTime": "2017-07-21T01:47:38.4420202Z",
"publicData": "MIICrjCCAZagAwI...",
"thumbprint": "0a0e4f50d51beadeac1d35afc5116098e7902e6e",
"thumbprintAlgorithm": "sha1"
}
}
定義
| 名稱 | Description |
|---|---|
| Certificate |
包含憑證的相關信息。 |
|
Certificate |
憑證的格式 - Pfx 或 Cer。 如果省略,預設值為 Pfx。 |
|
Certificate |
|
|
Cloud |
Batch 服務的錯誤回應。 |
|
Cloud |
Batch 服務的錯誤回應。 |
|
created |
建立資源的身分識別類型。 |
|
Delete |
Batch 服務的錯誤回應。 |
|
system |
與建立和上次修改資源相關的元數據。 |
Certificate
包含憑證的相關信息。
| 名稱 | 類型 | Description |
|---|---|---|
| etag |
string |
資源的 ETag,用於並行語句。 |
| id |
string (arm-id) |
資源的完整資源標識碼。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}” |
| name |
string |
資源的名稱 |
| properties.deleteCertificateError |
刪除憑證時發生的錯誤 |
|
| properties.format |
憑證的格式 - Pfx 或 Cer。 如果省略,預設值為 Pfx。 |
|
| properties.previousProvisioningState |
資源先前布建的狀態 |
|
| properties.previousProvisioningStateTransitionTime |
string (date-time) |
憑證進入其先前狀態的時間。 |
| properties.provisioningState |
資源的布建狀態 |
|
| properties.provisioningStateTransitionTime |
string (date-time) |
憑證進入其目前狀態的時間。 |
| properties.publicData |
string |
憑證的公鑰。 |
| properties.thumbprint |
string |
憑證的指紋。 |
| properties.thumbprintAlgorithm |
string |
憑證指紋的演算法。 |
| systemData |
包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。 |
|
| tags |
object |
資源的標記。 |
| type |
string |
資源的型別。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts” |
CertificateFormat
憑證的格式 - Pfx 或 Cer。 如果省略,預設值為 Pfx。
| 值 | Description |
|---|---|
| Pfx |
憑證是 PFX (PKCS#12) 格式化的憑證或憑證鏈結。 |
| Cer |
憑證是base64編碼的 X.509 憑證。 |
CertificateProvisioningState
| 值 | Description |
|---|---|
| Succeeded |
憑證可用於集區。 |
| Deleting |
使用者已要求刪除憑證,但刪除作業尚未完成。 建立或更新集區時,您可能不會參考憑證。 |
| Failed |
使用者要求刪除憑證,但有集區仍會參考憑證,或仍安裝在一或多個計算節點上。 (如果憑證已從集區中移除,但節點尚未重新啟動,則會發生後者。節點只有在重新啟動時才會重新整理其憑證。您可以使用取消憑證刪除作業來取消刪除,或刪除憑證作業來重試刪除。 |
CloudError
Batch 服務的錯誤回應。
| 名稱 | 類型 | Description |
|---|---|---|
| error |
錯誤回應的主體。 |
CloudErrorBody
Batch 服務的錯誤回應。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
錯誤的識別碼。 程序代碼是不變的,而且是要以程序設計方式取用。 |
| details |
錯誤的其他詳細數據清單。 |
|
| message |
string |
描述錯誤的訊息,適用於在使用者介面中顯示。 |
| target |
string |
特定錯誤的目標。 例如,錯誤中的屬性名稱。 |
createdByType
建立資源的身分識別類型。
| 值 | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DeleteCertificateError
Batch 服務的錯誤回應。
| 名稱 | 類型 | Description |
|---|---|---|
| code |
string |
錯誤的識別碼。 程序代碼是不變的,而且是要以程序設計方式取用。 |
| details |
錯誤的其他詳細數據清單。 |
|
| message |
string |
描述錯誤的訊息,適用於在使用者介面中顯示。 |
| target |
string |
特定錯誤的目標。 例如,錯誤中的屬性名稱。 |
systemData
與建立和上次修改資源相關的元數據。
| 名稱 | 類型 | Description |
|---|---|---|
| createdAt |
string (date-time) |
資源建立的時間戳(UTC)。 |
| createdBy |
string |
建立資源的身分識別。 |
| createdByType |
建立資源的身分識別類型。 |
|
| lastModifiedAt |
string (date-time) |
上次修改的資源時間戳 (UTC) |
| lastModifiedBy |
string |
上次修改資源的身分識別。 |
| lastModifiedByType |
上次修改資源的身分識別類型。 |