This document explains samples and how to use them.
Key concepts are explained in detail here.
Getting started explained in detail here.
These sample can be run in your IDE with default JDK.
Following section document various examples.
- HelloWorld.java - and HelloWorldAsync.java - Contains samples for following scenarios:
- Create a Certificate & Certificate Issuer
- Retrieve a Certificate & Certificate Issuer
- Update a Certificate
- Delete a Certificate
- ListOperations.java and ListOperationsAsync.java - Contains samples for following scenarios:
- Create a Certificate, Certificate Issuer & Certificate Contact
- List Certificates, Certificate Issuers & Certificate Contacts
- Create new version of existing certificate.
- List versions of an existing certificate.
- BackupAndRestoreOperations.java and BackupAndRestoreOperationsAsync.java - Contains samples for following scenarios:
- Create a Certificate
- Backup a Certificate -- Write it to a file.
- Delete a certificate
- Restore a certificate
- ManagingDeletedCertificates.java and ManagingDeletedCertificatesAsync.java - Contains samples for following scenarios:
- Create a Certificate
- Delete a certificate
- List deleted certificates
- Recover a deleted certificate
- Purge Deleted certificate
Certificate Vault clients raise exceptions. For example, if you try to retrieve a certificate after it is deleted a 404
error is returned, indicating resource not found. In the following snippet, the error is handled gracefully by catching the exception and displaying additional information about the error.
try {
certificateClient.getCertificate("certificateName")
} catch (ResourceNotFoundException e) {
System.out.println(e.getMessage());
}
Start using KeyVault Java SDK in your solutions. Our SDK details could be found at SDK README.
For more extensive documentation on Azure Key Vault, see the API reference documentation.
This project welcomes contributions and suggestions. Find more contributing details here.