Class ImportCertificateOptions

java.lang.Object
com.azure.security.keyvault.certificates.models.ImportCertificateOptions

public final class ImportCertificateOptions extends Object
Represents the configuration used to import a certificate in the key vault.
  • Constructor Details

    • ImportCertificateOptions

      public ImportCertificateOptions(String name, byte[] certificate)
      Creates an instance of ImportCertificateOptions.
      Parameters:
      name - The name of the key.
      certificate - The PFX or PEM formatted value of the certificate containing both the x509 certificates and the private key.
  • Method Details

    • getName

      public String getName()
      Get the name of the certificate.
      Returns:
      The name of the certificate.
    • getCertificate

      public byte[] getCertificate()
      Get the value of the certificate.
      Returns:
      The value of the certificate.
    • isEnabled

      public Boolean isEnabled()
      Get a value indicating whether the certificate is enabled.
      Returns:
      The enabled status.
    • setEnabled

      public ImportCertificateOptions setEnabled(Boolean enabled)
      Set a value indicating whether the certificate is enabled.
      Parameters:
      enabled - The enabled status to set.
      Returns:
      The updated ImportCertificateOptions object.
    • getPolicy

      public CertificatePolicy getPolicy()
      Get the management policy for the certificate.
      Returns:
      The management policy.
    • setPolicy

      public ImportCertificateOptions setPolicy(CertificatePolicy policy)
      Set the management policy for the certificate.
      Parameters:
      policy - the management policy for the certificate
      Returns:
      The updated ImportCertificateOptions object.
    • getTags

      public Map<String,String> getTags()
      Get the tags associated with the certificate.
      Returns:
      The tags associated with the certificate.
    • setTags

      public ImportCertificateOptions setTags(Map<String,String> tags)
      Set the tags associated with the certificate.
      Parameters:
      tags - The tags to associate with the certificate.
      Returns:
      The updated ImportCertificateOptions object.
    • getPassword

      public String getPassword()
      Get the password for decrypting the certificate, if it's encrypted.
      Returns:
      The password.
    • setPassword

      public ImportCertificateOptions setPassword(String password)
      Set the password for decrypting the certificate, if it's encrypted.
      Parameters:
      password - The password used to encrypt the certificate.
      Returns:
      The updated ImportCertificateOptions object.
    • isCertificateOrderPreserved

      public Boolean isCertificateOrderPreserved()
      Get a value indicating the certificate order in the vault is to be preserved. If true, the certificate chain will be preserved in its original order. If false (default), the leaf certificate will be placed at index 0.
      Returns:
      The certificate order preserved status.
    • setCertificateOrderPreserved

      public ImportCertificateOptions setCertificateOrderPreserved(Boolean certificateOrderPreserved)
      Set a value indicating whether the order of the certificates in the certificate chain is preserved.
      Parameters:
      certificateOrderPreserved - The certificate order preserved status to set.
      Returns:
      The updated ImportCertificateOptions object.