Class KeyVaultCertificate
java.lang.Object
com.azure.security.keyvault.certificates.models.KeyVaultCertificate
- All Implemented Interfaces:
com.azure.json.JsonSerializable<KeyVaultCertificate>
- Direct Known Subclasses:
KeyVaultCertificateWithPolicy
public class KeyVaultCertificate
extends Object
implements com.azure.json.JsonSerializable<KeyVaultCertificate>
Represents a certificate with all of its properties.
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeyVaultCertificate
fromJson
(com.azure.json.JsonReader jsonReader) Reads a JSON stream into aKeyVaultCertificate
.byte[]
getCer()
Get the cer content of the certificategetId()
Get the certificate identifiergetKeyId()
Get the key id of the certificategetName()
Get the certificate nameGet the certificate properties.Get the secret id of the certificateGet a value indicating whether the order of certificate chain is to be preserved in the vault.setProperties
(CertificateProperties properties) Set the certificate propertiescom.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
-
Method Details
-
getProperties
Get the certificate properties.- Returns:
- the certificate properties.
-
setProperties
Set the certificate properties- Parameters:
properties
- the certificate properties- Returns:
- the updated certificate object itself.
- Throws:
NullPointerException
- ifcertificateProperties
is null
-
getId
Get the certificate identifier- Returns:
- the certificate identifier
-
getName
Get the certificate name- Returns:
- the certificate name
-
getKeyId
Get the key id of the certificate- Returns:
- the key Id.
-
getSecretId
Get the secret id of the certificate- Returns:
- the secret Id.
-
getCer
public byte[] getCer()Get the cer content of the certificate- Returns:
- the cer content.
-
isCertificateOrderPreserved
Get a value indicating whether the order of certificate chain is to be preserved in the vault. The default value isfalse
, which sets the leaf certificate at index 0.- Returns:
- The preserve certificate order status.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<KeyVaultCertificate>
- Throws:
IOException
-
fromJson
Reads a JSON stream into aKeyVaultCertificate
.- Parameters:
jsonReader
- TheJsonReader
being read.- Returns:
- The
KeyVaultCertificate
that the JSON stream represented, may return null. - Throws:
IOException
- If aKeyVaultCertificate
fails to be read from thejsonReader
.
-