Skip to content

Latest commit

 

History

History
82 lines (66 loc) · 3.9 KB

File metadata and controls

82 lines (66 loc) · 3.9 KB

Azure Key Vault Certificate Samples client library for Java

This document explains samples and how to use them.

Key concepts

Key concepts are explained in detail here.

Getting started

Getting started explained in detail here.

How to run

These sample can be run in your IDE with default JDK.

Examples

Following section document various examples.

Hello World Samples

  • 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

List Operations Samples

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

Backup And Restore Operations Samples

Managing Deleted Certificates Samples:

Troubleshooting

General

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());
}

Next steps

Start using KeyVault Java SDK in your solutions. Our SDK details could be found at SDK README.

Additional Documentation

For more extensive documentation on Azure Key Vault, see the API reference documentation.

Contributing

This project welcomes contributions and suggestions. Find more contributing details here.

Impressions