Class VaultCertificate

java.lang.Object
com.azure.resourcemanager.compute.models.VaultCertificate
All Implemented Interfaces:
com.azure.json.JsonSerializable<VaultCertificate>

public final class VaultCertificate extends Object implements com.azure.json.JsonSerializable<VaultCertificate>
Describes a single certificate reference in a Key Vault, and where the certificate should reside on the VM.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of VaultCertificate class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added.
    Get the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a secret.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of VaultCertificate from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withCertificateStore(String certificateStore)
    Set the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added.
    withCertificateUrl(String certificateUrl)
    Set the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a secret.

    Methods inherited from class 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

    • VaultCertificate

      public VaultCertificate()
      Creates an instance of VaultCertificate class.
  • Method Details

    • certificateUrl

      public String certificateUrl()
      Get the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
      Returns:
      the certificateUrl value.
    • withCertificateUrl

      public VaultCertificate withCertificateUrl(String certificateUrl)
      Set the certificateUrl property: This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8: <br><br> {<br> "data":"<Base64-encoded-certificate>",<br> "dataType":"pfx",<br> "password":"<pfx-file-password>"<br>} <br> To install certificates on a virtual machine it is recommended to use the [Azure Key Vault virtual machine extension for Linux](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-linux) or the [Azure Key Vault virtual machine extension for Windows](https://docs.microsoft.com/azure/virtual-machines/extensions/key-vault-windows).
      Parameters:
      certificateUrl - the certificateUrl value to set.
      Returns:
      the VaultCertificate object itself.
    • certificateStore

      public String certificateStore()
      Get the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted.
      Returns:
      the certificateStore value.
    • withCertificateStore

      public VaultCertificate withCertificateStore(String certificateStore)
      Set the certificateStore property: For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name &lt;UppercaseThumbprint&gt;.crt for the X509 certificate file and &lt;UppercaseThumbprint&gt;.prv for private key. Both of these files are .pem formatted.
      Parameters:
      certificateStore - the certificateStore value to set.
      Returns:
      the VaultCertificate object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<VaultCertificate>
      Throws:
      IOException
    • fromJson

      public static VaultCertificate fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of VaultCertificate from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of VaultCertificate if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the VaultCertificate.