Certificate - List

Lists all of the Certificates that have been added to the specified Account.

GET {batchUrl}/certificates?api-version=2019-08-01.10.0
GET {batchUrl}/certificates?$filter={$filter}&$select={$select}&maxresults={maxresults}&timeout={timeout}&api-version=2019-08-01.10.0

URI Parameters

Name In Required Type Description
batchUrl
path True
  • string

The base URL for all Azure Batch service requests.

$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.

api-version
query True
  • string

Client API Version.

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

A response containing the list of Certificates.

Headers

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

The error from the Batch service.

Security

azure_auth

Azure Active Directory OAuth2 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=2019-08-01.10.0
client-request-id: 00000000-0000-0000-0000-000000000000
ocp-date: Fri, 17 Feb 2017 00:00:00 GMT

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

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

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

values

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

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

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

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

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

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.