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 Details

    • BatchCertificate

      public BatchCertificate(String thumbprint, String thumbprintAlgorithm, String 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

    • 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.
    • 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.
    • 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.
    • getDeleteCertificateError

      public DeleteBatchCertificateError 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

      public String getData()
      Get the data property: The base64-encoded contents of the Certificate. The maximum size is 10KB.
      Returns:
      the data value.
    • getCertificateFormat

      public BatchCertificateFormat getCertificateFormat()
      Get the certificateFormat property: The format of the Certificate data.
      Returns:
      the certificateFormat 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.
    • 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.
    • 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 com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<BatchCertificate>
      Throws:
      IOException
    • fromJson

      public static BatchCertificate fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.