Certificate - Get

Gets information about the specified certificate.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}?api-version=2021-01-01

URI Parameters

Name In Required Type Description
accountName
path True
  • string

The name of the Batch account.

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

certificateName
path True
  • string

The identifier for the certificate. This must be made up of algorithm and thumbprint separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.

Regex pattern: ^[\w]+-[\w]+$

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.

Responses

Name Type Description
200 OK

The operation was successful. The response contains the certificate entity.

Headers

  • ETag: string
Other Status Codes

Error response describing why the operation failed.

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

Get Certificate
Get Certificate with Deletion Error

Get Certificate

Sample Request

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

Sample Response

ETag: W/"0x8D4EDD5118668F7"
{
  "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..."
  }
}

Get Certificate with Deletion Error

Sample Request

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

Sample Response

ETag: W/"0x8D4EDD5118668F7"
{
  "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": "Failed",
    "provisioningStateTransitionTime": "2017-07-21T01:47:38.4420202Z",
    "previousProvisioningState": "Deleting",
    "previousProvisioningStateTransitionTime": "2017-07-21T00:15:25.5625498Z",
    "format": "Pfx",
    "publicData": "MIICrjCCAZagAwI...",
    "deleteCertificateError": {
      "code": "NodesReferencingCertificate",
      "message": "The specified certificate is being used by the below mentioned node(s)\nRequestId:2dc78afc-b15b-42d2-8c85-39cb61a0799e\nTime:2017-08-28T10:22:52.8633406Z",
      "target": "BatchAccount",
      "details": [
        {
          "code": "Nodes",
          "message": "node1, node3"
        }
      ]
    }
  }
}

Definitions

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.

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

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

properties.format

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

properties.previousProvisioningState

The previous provisioned state of the resource

properties.previousProvisioningStateTransitionTime
  • string

The time at which the certificate entered its previous state.

properties.provisioningState

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

An error response from the Batch service.

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

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

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.