Certificate - List

Lists all of the Certificates that have been added to the specified Account.
Warning: This operation is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension instead.

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 Parameters

Name In Required Type Description
batchUrl
path True

string

The base URL for all Azure Batch service requests.

api-version
query True

string

Client API Version.

$filter
query

string

An OData $filter clause. For more information on constructing this filter, see https://docs.microsoft.com/en-us/rest/api/batchservice/odata-filters-in-batch#list-certificates.

$select
query

string

An OData $select clause.

maxresults
query

integer

int32

The maximum number of items to return in the response. A maximum of 1000 Certificates can be returned.

timeout
query

integer

int32

The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds.

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

CertificateListResult

A response containing the list of Certificates.

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 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"
          }
        ]
      }
    }
  ]
}

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.

CertificateListResult

The result of listing the Certificates in the Account.

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.

CertificateListResult

The result of listing the Certificates in the Account.

Name Type Description
odata.nextLink

string

The URL to get the next set of results.

value

Certificate[]

The list of Certificates.

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.