Package com.azure.compute.batch.models
Class BatchCertificate
java.lang.Object
com.azure.compute.batch.models.BatchCertificate
- All Implemented Interfaces:
com.azure.json.JsonSerializable<BatchCertificate>
public final class BatchCertificate
extends Object
implements com.azure.json.JsonSerializable<BatchCertificate>
A Certificate that can be installed on Compute Nodes and can be used to
authenticate operations on the machine.
-
Constructor Summary
ConstructorsConstructorDescriptionBatchCertificate
(String thumbprint, String thumbprintAlgorithm, String data) Creates an instance of BatchCertificate class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BatchCertificate
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of BatchCertificate from the JsonReader.Get the certificateFormat property: The format of the Certificate data.getData()
Get the data property: The base64-encoded contents of the Certificate.Get the deleteCertificateError property: The error that occurred on the last attempt to delete this Certificate.Get the password property: The password to access the Certificate's private key.Get the previousState property: The previous state of the Certificate.Get the previousStateTransitionTime property: The time at which the Certificate entered its previous state.Get the publicData property: The public part of the Certificate as a base-64 encoded .cer file.getState()
Get the state property: The state of the Certificate.Get the stateTransitionTime property: The time at which the Certificate entered its current state.Get the thumbprint property: The X.509 thumbprint of the Certificate.Get the thumbprintAlgorithm property: The algorithm used to derive the thumbprint.getUrl()
Get the url property: The URL of the Certificate.setCertificateFormat
(BatchCertificateFormat certificateFormat) Set the certificateFormat property: The format of the Certificate data.setPassword
(String password) Set the password property: The password to access the Certificate's private key.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
BatchCertificate
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
-
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
Get the thumbprintAlgorithm property: The algorithm used to derive the thumbprint. This must be sha1.- Returns:
- the thumbprintAlgorithm value.
-
getUrl
Get the url property: The URL of the Certificate.- Returns:
- the url value.
-
getState
Get the state property: The state of the Certificate.- Returns:
- the state value.
-
getStateTransitionTime
Get the stateTransitionTime property: The time at which the Certificate entered its current state.- Returns:
- the stateTransitionTime value.
-
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
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
Get the publicData property: The public part of the Certificate as a base-64 encoded .cer file.- Returns:
- the publicData value.
-
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.
-
getData
Get the data property: The base64-encoded contents of the Certificate. The maximum size is 10KB.- Returns:
- the data value.
-
getCertificateFormat
Get the certificateFormat property: The format of the Certificate data.- Returns:
- the certificateFormat value.
-
setCertificateFormat
Set the certificateFormat property: The format of the Certificate data.- Parameters:
certificateFormat
- the certificateFormat value to set.- Returns:
- the BatchCertificate object itself.
-
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.
-
setPassword
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<BatchCertificate>
- Throws:
IOException
-
fromJson
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:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the BatchCertificate.
-