Share via


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-07-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates?api-version=2024-07-01&maxresults={maxresults}&$select={$select}&$filter={$filter}

URI Parameters

Name In Required Type Description
accountName
path True

string

minLength: 3
maxLength: 24
pattern: ^[a-zA-Z0-9]+$

A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

$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

Azure operation completed successfully.

Other Status Codes

CloudError

An unexpected error response.

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

Examples

ListCertificates
ListCertificates - Filter and Select

ListCertificates

Sample request

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

Sample response

{
  "nextLink": "https://management.azure.com/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates?api-version=2024-07-01&$skiptoken=NPK%3D28%3A2857p428pug%2022F53A7734C947B8NRK%3D45%3Asha1-c23dc7f22edc793856a7506fe66397ccb4a33b46SM%3D5%3AFalse",
  "value": [
    {
      "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"
      }
    }
  ]
}

ListCertificates - Filter and Select

Sample request

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

Sample response

{
  "value": [
    {
      "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": "Failed"
      }
    },
    {
      "name": "sha1-aeb228ffb0bf67a793d61dce263ebd16949f15a1",
      "type": "Microsoft.Batch/batchAccounts/certificates",
      "id": "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/samplecct/certificates/sha1-aeb228ffb0bf67a793d61dce263ebd16949f15a1",
      "properties": {
        "format": "Cer",
        "provisioningState": "Failed"
      }
    }
  ]
}

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
CloudError

An error response from the Batch service.

CloudErrorBody

An error response from the Batch service.

createdByType

The type of identity that created the resource.

DeleteCertificateError

An error response from the Batch service.

ListCertificatesResult

Values returned by the List operation.

systemData

Metadata pertaining to creation and last modification of the resource.

Certificate

Contains information about a certificate.

Name Type Description
etag

string

The ETag of the resource, used for concurrency statements.

id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

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 (date-time)

The time at which the certificate entered its previous state.

properties.provisioningState

CertificateProvisioningState

The provisioned state of the resource

properties.provisioningStateTransitionTime

string (date-time)

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

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

The tags of the resource.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

CertificateFormat

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

Value Description
Pfx

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

Cer

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

CertificateProvisioningState

Value Description
Succeeded

The certificate is available for use in pools.

Deleting

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

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.

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.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

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 (uri)

The link to the next page of items

value

Certificate[]

The Certificate items on this page

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.