Partilhar via


Certificate - Get

Gets information about the specified Certificate.
Warning: This operation is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension instead.

GET {batchUrl}/certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})?api-version=2024-07-01.20.0
GET {batchUrl}/certificates(thumbprintAlgorithm={thumbprintAlgorithm},thumbprint={thumbprint})?$select={$select}&timeout={timeout}&api-version=2024-07-01.20.0

URI Parameters

Name In Required Type Description
batchUrl
path True

string

The base URL for all Azure Batch service requests.

thumbprint
path True

string

The thumbprint of the Certificate to get.

thumbprintAlgorithm
path True

string

The algorithm used to derive the thumbprint parameter. This must be sha1.

api-version
query True

string

Client API Version.

$select
query

string

An OData $select clause.

timeout
query

integer

int32

The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.

Request Header

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

Name Required Type Description
client-request-id

string

uuid

The caller-generated request identity, in the form of a GUID with no decoration such as curly braces, e.g. 9C4D50EE-2D56-4CD3-8152-34347DC9F2B0.

return-client-request-id

boolean

Whether the server should return the client-request-id in the response.

ocp-date

string

date-time-rfc1123

The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.

Responses

Name Type Description
200 OK

Certificate

A response containing the Certificate.

Headers

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

BatchError

The error from the Batch service.

Security

azure_auth

Microsoft Entra OAuth 2.0 auth code flow

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

Scopes

Name Description
user_impersonation Impersonate your user account

Authorization

Type: apiKey
In: header

Examples

Certificate get

Sample request

GET account.region.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=0123456789abcdef0123456789abcdef01234567)?api-version=2024-07-01.20.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"
      }
    ]
  }
}

Definitions

Name Description
BatchError

An error response received from the Azure Batch service.

BatchErrorDetail

An item of additional information included in an Azure Batch error response.

Certificate

A Certificate that can be installed on Compute Nodes and can be used to authenticate operations on the machine.

CertificateState

The state of the Certificate.

DeleteCertificateError

An error encountered by the Batch service when deleting a Certificate.

ErrorMessage

An error message received in an Azure Batch error response.

NameValuePair

Represents a name-value pair.

BatchError

An error response received from the Azure Batch service.

Name Type Description
code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

message

ErrorMessage

A message describing the error, intended to be suitable for display in a user interface.

values

BatchErrorDetail[]

A collection of key-value pairs containing additional details about the error.

BatchErrorDetail

An item of additional information included in an Azure Batch error response.

Name Type Description
key

string

An identifier specifying the meaning of the Value property.

value

string

The additional information included with the error response.

Certificate

A Certificate that can be installed on Compute Nodes and can be used to authenticate operations on the machine.

Name Type Description
deleteCertificateError

DeleteCertificateError

The error that occurred on the last attempt to delete this Certificate.
This property is set only if the Certificate is in the DeleteFailed state.

previousState

CertificateState

The previous state of the Certificate.
This property is not set if the Certificate is in its initial active state.

previousStateTransitionTime

string

The time at which the Certificate entered its previous state.
This property is not set if the Certificate is in its initial Active state.

publicData

string

The public part of the Certificate as a base-64 encoded .cer file.

state

CertificateState

The current state of the Certificate.

stateTransitionTime

string

The time at which the Certificate entered its current state.

thumbprint

string

The X.509 thumbprint of the Certificate. This is a sequence of up to 40 hex digits.

thumbprintAlgorithm

string

The algorithm used to derive the thumbprint.

url

string

The URL of the Certificate.

CertificateState

The state of the Certificate.

Name Type Description
active

string

The Certificate is available for use in Pools.

deletefailed

string

The user requested that the Certificate be deleted, but there are Pools that still have references to the Certificate, or it is still installed on one or more Nodes. (The latter can occur if the Certificate has been removed from the Pool, but the Compute Node has not yet restarted. Compute Nodes refresh their Certificates only when they restart.) You may use the cancel Certificate delete operation to cancel the delete, or the delete Certificate operation to retry the delete.

deleting

string

The user has requested that the Certificate be deleted, but the delete operation has not yet completed. You may not reference the Certificate when creating or updating Pools.

DeleteCertificateError

An error encountered by the Batch service when deleting a Certificate.

Name Type Description
code

string

An identifier for the Certificate deletion error. Codes are invariant and are intended to be consumed programmatically.

message

string

A message describing the Certificate deletion error, intended to be suitable for display in a user interface.

values

NameValuePair[]

A list of additional error details related to the Certificate deletion error.
This list includes details such as the active Pools and Compute Nodes referencing this Certificate. However, if a large number of resources reference the Certificate, the list contains only about the first hundred.

ErrorMessage

An error message received in an Azure Batch error response.

Name Type Description
lang

string

The language code of the error message

value

string

The text of the message.

NameValuePair

Represents a name-value pair.

Name Type Description
name

string

The name in the name-value pair.

value

string

The value in the name-value pair.