Share via


BatchCertificate Class

  • java.lang.Object
    • com.azure.compute.batch.models.BatchCertificate

Implements

public final class BatchCertificate
implements JsonSerializable<BatchCertificate>

A Certificate that can be installed on Compute Nodes and can be used to authenticate operations on the machine.

Constructor Summary

Constructor Description
BatchCertificate(String thumbprint, String thumbprintAlgorithm, byte[] data)

Creates an instance of BatchCertificate class.

Method Summary

Modifier and Type Method and Description
static BatchCertificate fromJson(JsonReader jsonReader)

Reads an instance of BatchCertificate from the JsonReader.

BatchCertificateFormat getCertificateFormat()

Get the certificateFormat property: The format of the Certificate data.

byte[] getData()

Get the data property: The base64-encoded contents of the Certificate.

BatchCertificateDeleteError getDeleteCertificateError()

Get the deleteCertificateError property: The error that occurred on the last attempt to delete this Certificate.

String getPassword()

Get the password property: The password to access the Certificate's private key.

BatchCertificateState getPreviousState()

Get the previousState property: The previous state of the Certificate.

OffsetDateTime getPreviousStateTransitionTime()

Get the previousStateTransitionTime property: The time at which the Certificate entered its previous state.

String getPublicData()

Get the publicData property: The public part of the Certificate as a base-64 encoded .cer file.

BatchCertificateState getState()

Get the state property: The state of the Certificate.

OffsetDateTime getStateTransitionTime()

Get the stateTransitionTime property: The time at which the Certificate entered its current state.

String getThumbprint()

Get the thumbprint property: The X.509 thumbprint of the Certificate.

String getThumbprintAlgorithm()

Get the thumbprintAlgorithm property: The algorithm used to derive the thumbprint.

String getUrl()

Get the url property: The URL of the Certificate.

BatchCertificate setCertificateFormat(BatchCertificateFormat certificateFormat)

Set the certificateFormat property: The format of the Certificate data.

BatchCertificate setPassword(String password)

Set the password property: The password to access the Certificate's private key.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

BatchCertificate

public BatchCertificate(String thumbprint, String thumbprintAlgorithm, byte[] data)

Creates an instance of BatchCertificate class.

Parameters:

thumbprint - the thumbprint value to set.
thumbprintAlgorithm - the thumbprintAlgorithm value to set.
data - the data value to set.

Method Details

fromJson

public static BatchCertificate fromJson(JsonReader jsonReader)

Reads an instance of BatchCertificate from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of BatchCertificate if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getCertificateFormat

public BatchCertificateFormat getCertificateFormat()

Get the certificateFormat property: The format of the Certificate data.

Returns:

the certificateFormat value.

getData

public byte[] getData()

Get the data property: The base64-encoded contents of the Certificate. The maximum size is 10KB.

Returns:

the data value.

getDeleteCertificateError

public BatchCertificateDeleteError getDeleteCertificateError()

Get the deleteCertificateError property: 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.

Returns:

the deleteCertificateError value.

getPassword

public String getPassword()

Get the password property: The password to access the Certificate's private key. This must be omitted if the Certificate format is cer.

Returns:

the password value.

getPreviousState

public BatchCertificateState getPreviousState()

Get the previousState property: The previous state of the Certificate. This property is not set if the Certificate is in its initial active state.

Returns:

the previousState value.

getPreviousStateTransitionTime

public OffsetDateTime getPreviousStateTransitionTime()

Get the previousStateTransitionTime property: The time at which the Certificate entered its previous state. This property is not set if the Certificate is in its initial Active state.

Returns:

the previousStateTransitionTime value.

getPublicData

public String getPublicData()

Get the publicData property: The public part of the Certificate as a base-64 encoded .cer file.

Returns:

the publicData value.

getState

public BatchCertificateState getState()

Get the state property: The state of the Certificate.

Returns:

the state value.

getStateTransitionTime

public OffsetDateTime getStateTransitionTime()

Get the stateTransitionTime property: The time at which the Certificate entered its current state.

Returns:

the stateTransitionTime value.

getThumbprint

public String getThumbprint()

Get the thumbprint property: The X.509 thumbprint of the Certificate. This is a sequence of up to 40 hex digits (it may include spaces but these are removed).

Returns:

the thumbprint value.

getThumbprintAlgorithm

public String getThumbprintAlgorithm()

Get the thumbprintAlgorithm property: The algorithm used to derive the thumbprint. This must be sha1.

Returns:

the thumbprintAlgorithm value.

getUrl

public String getUrl()

Get the url property: The URL of the Certificate.

Returns:

the url value.

setCertificateFormat

public BatchCertificate setCertificateFormat(BatchCertificateFormat certificateFormat)

Set the certificateFormat property: The format of the Certificate data.

Parameters:

certificateFormat - the certificateFormat value to set.

Returns:

the BatchCertificate object itself.

setPassword

public BatchCertificate setPassword(String password)

Set the password property: The password to access the Certificate's private key. This must be omitted if the Certificate format is cer.

Parameters:

password - the password value to set.

Returns:

the BatchCertificate object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to