Certificate - List By Batch Account

Lists all of the certificates in the specified account.
Warning: This operation is deprecated and will be removed after February, 2024. Please use the Azure KeyVault Extension instead.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates?api-version=2024-02-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates?maxresults={maxresults}&$select={$select}&$filter={$filter}&api-version=2024-02-01

URI Parameters

Name In Required Type Description
accountName
path True

string

The name of the Batch account.

Regex pattern: ^[a-zA-Z0-9]+$

resourceGroupName
path True

string

The name of the resource group that contains the Batch account.

subscriptionId
path True

string

The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)

api-version
query True

string

The API version to be used with the HTTP request.

$filter
query

string

OData filter expression. Valid properties for filtering are "properties/provisioningState", "properties/provisioningStateTransitionTime", "name".

$select
query

string

Comma separated list of properties that should be returned. e.g. "properties/provisioningState". Only top level properties under properties/ are valid for selection.

maxresults
query

integer

int32

The maximum number of items to return in the response.

Responses

Name Type Description
200 OK

ListCertificatesResult

The operation was successful. The response contains a list of certificates associated with the account.

Other Status Codes

CloudError

Error response describing why the operation failed.

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

Examples

ListCertificates
ListCertificates - Filter and Select

ListCertificates

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/certificates?api-version=2024-02-01

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
      "name": "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
      "type": "Microsoft.Batch/batchAccounts/certificates",
      "etag": "W/\"0x8D4EDD5118668F7\"",
      "properties": {
        "thumbprintAlgorithm": "sha1",
        "thumbprint": "0a0e4f50d51beadeac1d35afc5116098e7902e6e",
        "provisioningState": "Succeeded",
        "provisioningStateTransitionTime": "2017-07-21T01:47:38.4420202Z",
        "format": "Pfx",
        "publicData": "MIICrjCCAZagAwI..."
      }
    }
  ],
  "nextLink": "https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates?api-version=2024-02-01&$skiptoken=NPK%3D28%3A2857p428pug%2022F53A7734C947B8NRK%3D45%3Asha1-c23dc7f22edc793856a7506fe66397ccb4a33b46SM%3D5%3AFalse"
}

ListCertificates - Filter and Select

Sample Request

GET https://management.azure.com/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/certificates?$select=properties/format,properties/provisioningState&$filter=properties/provisioningStateTransitionTime gt '2017-05-01' or properties/provisioningState eq 'Failed'&api-version=2024-02-01

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
      "name": "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e",
      "type": "Microsoft.Batch/batchAccounts/certificates",
      "etag": "W/\"0x8D4EDD5118668F7\"",
      "properties": {
        "provisioningState": "Failed",
        "format": "Pfx"
      }
    },
    {
      "id": "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-aeb228ffb0bf67a793d61dce263ebd16949f15a1",
      "name": "sha1-aeb228ffb0bf67a793d61dce263ebd16949f15a1",
      "type": "Microsoft.Batch/batchAccounts/certificates",
      "etag": "W/\"0x8D4EDD5118572E0\"",
      "properties": {
        "provisioningState": "Failed",
        "format": "Cer"
      }
    }
  ]
}

Definitions

Name Description
Certificate

Contains information about a certificate.

CertificateFormat

The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

CertificateProvisioningState

The provisioned state of the resource

CloudError

An error response from the Batch service.

CloudErrorBody

An error response from the Batch service.

DeleteCertificateError

An error response from the Batch service.

ListCertificatesResult

Values returned by the List operation.

Certificate

Contains information about a certificate.

Name Type Description
etag

string

The ETag of the resource, used for concurrency statements.

id

string

The ID of the resource.

name

string

The name of the resource.

properties.deleteCertificateError

DeleteCertificateError

The error which occurred while deleting the certificate
This is only returned when the certificate provisioningState is 'Failed'.

properties.format

CertificateFormat

The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

properties.previousProvisioningState

CertificateProvisioningState

The previous provisioned state of the resource

properties.previousProvisioningStateTransitionTime

string

The time at which the certificate entered its previous state.

properties.provisioningState

CertificateProvisioningState

The provisioned state of the resource

properties.provisioningStateTransitionTime

string

The time at which the certificate entered its current state.

properties.publicData

string

The public key of the certificate.

properties.thumbprint

string

The thumbprint of the certificate.
This must match the thumbprint from the name.

properties.thumbprintAlgorithm

string

The algorithm of the certificate thumbprint.
This must match the first portion of the certificate name. Currently required to be 'SHA1'.

type

string

The type of the resource.

CertificateFormat

The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx.

Name Type Description
Cer

string

The certificate is a base64-encoded X.509 certificate.

Pfx

string

The certificate is a PFX (PKCS#12) formatted certificate or certificate chain.

CertificateProvisioningState

The provisioned state of the resource

Name Type Description
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.

Failed

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 compute nodes. (The latter can occur if the certificate has been removed from the pool, but the node has not yet restarted. 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.

Succeeded

string

The certificate is available for use in pools.

CloudError

An error response from the Batch service.

Name Type Description
error

CloudErrorBody

The body of the error response.

CloudErrorBody

An error response from the Batch service.

Name Type Description
code

string

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

details

CloudErrorBody[]

A list of additional details about the error.

message

string

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

target

string

The target of the particular error. For example, the name of the property in error.

DeleteCertificateError

An error response from the Batch service.

Name Type Description
code

string

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

details

DeleteCertificateError[]

A list of additional details about the error.

message

string

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

target

string

The target of the particular error. For example, the name of the property in error.

ListCertificatesResult

Values returned by the List operation.

Name Type Description
nextLink

string

The continuation token.

value

Certificate[]

The collection of returned certificates.