diff --git a/sdk/keyvault/azure-security-keyvault-certificates/README.md b/sdk/keyvault/azure-security-keyvault-certificates/README.md index 3b6b0601cd40..8c4eb547c436 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/README.md +++ b/sdk/keyvault/azure-security-keyvault-certificates/README.md @@ -1,14 +1,13 @@ # Azure Key Vault Certificate client library for Java -Azure Key Vault allows you to create and store certificates in the Key Vault. Azure Key Vault client supports certificates backed by Rsa keys and Ec keys. It allows you to securely manage, tightly control your certificates. +Azure Key Vault allows you to securely manage and tightly control your certificates. The Azure Key Vault Certificate client library supports certificates backed by RSA and EC keys. - Multiple certificates, and multiple versions of the same certificate, can be kept in the Key Vault. Cryptographic keys in Key Vault backing the certificates are represented as [JSON Web Key [JWK]](https://tools.ietf.org/html/rfc7517) objects. This library offers operations to create, retrieve, update, delete, purge, backup, restore and list the certificates and its versions. +Multiple certificates and multiple versions of the same certificate can be kept in the Key Vault. Cryptographic keys in Key Vault backing the certificates are represented as [JSON Web Key [JWK]](https://tools.ietf.org/html/rfc7517) objects. This library offers operations to create, retrieve, update, delete, purge, backup, restore, and list the certificates, as well as its versions. [Source code][source_code] | [API reference documentation][api_documentation] | [Product documentation][azkeyvault_docs] | [Samples][certificates_samples] ## Getting started ### Adding the package to your project - -Maven dependency for Azure Key Client library. Add it to your project's pom file. +Maven dependency for the Azure Key Vault Certificate client library. Add it to your project's POM file. [//]: # ({x-version-update-start;com.azure:azure-security-keyvault-certificates;current}) ```xml @@ -21,7 +20,6 @@ Maven dependency for Azure Key Client library. Add it to your project's pom file [//]: # ({x-version-update-end}) ### Prerequisites - - Java Development Kit (JDK) with version 8 or above - [Azure Subscription][azure_subscription] - An existing [Azure Key Vault][azure_keyvault]. If you need to create a Key Vault, you can use the [Azure Cloud Shell](https://shell.azure.com/bash) to create one with this Azure CLI command. Replace `` and `` with your own, unique names: @@ -31,14 +29,14 @@ Maven dependency for Azure Key Client library. Add it to your project's pom file ``` ### Authenticate the client -In order to interact with the Key Vault service, you'll need to create an instance of the [CertificateClient](#create-certificate-client) class. You would need a **vault url** and **client secret credentials (client id, client key, tenant id)** to instantiate a client object using the default `AzureCredential` examples shown in this document. +In order to interact with the Azure Key Vault service, you'll need to create an instance of the [CertificateClient](#create-certificate-client) class. You need a **vault url** and **client secret credentials (client id, client secret, tenant id)** to instantiate a client object using the `DefaultAzureCredential` examples shown in this document. The `DefaultAzureCredential` way of authentication by providing client secret credentials is being used in this getting started section but you can find more ways to authenticate with [azure-identity][azure_identity]. #### Create/Get credentials -To create/get client key credentials you can use the [Azure Portal][azure_create_application_in_portal], [Azure CLI][azure_keyvault_cli_full] or [Azure Cloud Shell](https://shell.azure.com/bash) +To create/get client secret credentials you can use the [Azure Portal][azure_create_application_in_portal], [Azure CLI][azure_keyvault_cli_full] or [Azure Cloud Shell](https://shell.azure.com/bash) -Here is [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to +Here is an [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to * Create a service principal and configure its access to Azure resources: @@ -58,163 +56,161 @@ Here is [Azure Cloud Shell](https://shell.azure.com/bash) snippet below to } ``` -* Use the above returned credentials information to set **AZURE_CLIENT_ID**(appId), **AZURE_CLIENT_SECRET**(password) and **AZURE_TENANT_ID**(tenant) environment variables. The following example shows a way to do this in Bash: +* Use the above returned credentials information to set the **AZURE_CLIENT_ID** (appId), **AZURE_CLIENT_SECRET** (password), and **AZURE_TENANT_ID** (tenantId) environment variables. The following example shows a way to do this in Bash: - ```Bash + ```Bash export AZURE_CLIENT_ID="generated-app-ID" export AZURE_CLIENT_SECRET="random-password" export AZURE_TENANT_ID="tenant-ID" - ``` + ``` -* Grant the above mentioned application authorization to perform key operations on the keyvault: +* Grant the aforementioned application authorization to perform certificate operations on the Key Vault: ```Bash - az keyvault set-policy --name --spn $AZURE_CLIENT_ID --certificate-permissions backup delete get list create + az keyvault set-policy --name --spn $AZURE_CLIENT_ID --certificate-permissions backup delete get list create update ``` > --certificate-permissions: > Accepted values: backup, create, delete, deleteissuers, get, getissuers, import, list, listissuers, managecontacts, manageissuers, purge, recover, restore, setissuers, update -* Use the above mentioned Key Vault name to retreive details of your Vault which also contains your Key Vault URL: +* Use the aforementioned Key Vault name to retrieve details of your Key Vault, which also contain your Key Vault URL: ```Bash az keyvault show --name ``` -#### Create Certificate client -Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET** and **AZURE_TENANT_ID** environment variables and replaced **your-vault-url** with the above returned URI, you can create the CertificateClient: +#### Create certificate client +Once you've populated the **AZURE_CLIENT_ID**, **AZURE_CLIENT_SECRET**, and **AZURE_TENANT_ID** environment variables and replaced **your-key-vault-url** with the URI returned above, you can create the CertificateClient: ```Java import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.certificates.CertificateClient; +import com.azure.security.keyvault.certificates.CertificateClientBuilder; CertificateClient client = new CertificateClientBuilder() - .vaultUrl() - .credential(new DefaultAzureCredentialBuilder().build()) - .buildClient(); + .vaultUrl() + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); ``` -> NOTE: For using Asynchronous client use CertificateAsyncClient instead of CertificateClient and call buildAsyncClient() +> NOTE: For using an asynchronous client use CertificateAsyncClient instead of CertificateClient and call `buildAsyncClient()` ## Key concepts ### Certificate - Azure Key Vault supports certificates with secret content types(`PKCS12` & `PEM`). The certificate can be backed by keys in key vault of types(`EC` & `RSA`). In addition to the certificate policy, the following attributes may be specified: -* enabled: Specifies whether the certificate is enabled and useable. +Azure Key Vault supports certificates with secret content types (`PKCS12` & `PEM`). The certificate can be backed by keys in Azure Key Vault of types (`EC` & `RSA`). In addition to the certificate policy, the following attributes may be specified: +* enabled: Specifies whether the certificate is enabled and usable. * created: Indicates when this version of the certificate was created. * updated: Indicates when this version of the certificate was updated. -### Certificate Client: -The Certificate client performs the interactions with the Azure Key Vault service for getting, setting, updating, deleting, and listing certificates and its versions. The client also supports CRUD operations for certificate issuers and contacts in the key vault. An asynchronous and synchronous, CertificateClient, client exists in the SDK allowing for selection of a client based on an application's use case. Once you've initialized a Certificate, you can interact with the primary resource types in Key Vault. +### Certificate client +The certificate client performs the interactions with the Azure Key Vault service for getting, setting, updating, deleting, and listing certificates and its versions. The client also supports CRUD operations for certificate issuers and contacts in the key vault. Asynchronous (CertificateAsyncClient) and synchronous (CertificateClient) clients exist in the SDK allowing for the selection of a client based on an application's use case. Once you've initialized a certificate, you can interact with the primary resource types in Azure Key Vault. ## Examples ### Sync API -The following sections provide several code snippets covering some of the most common Azure Key Vault Key Service tasks, including: -- [Create a Certificate](#create-a-certificate) -- [Retrieve a Certificate](#retrieve-a-certificate) -- [Update an existing Certificate](#update-an-existing-certificate) -- [Delete a Certificate](#delete-a-certificate) -- [List Certificates](#list-certificates) - -### Create a Certificate +The following sections provide several code snippets covering some of the most common Azure Key Vault Certificate service tasks, including: +- [Create a certificate](#create-a-certificate) +- [Retrieve a certificate](#retrieve-a-certificate) +- [Update an existing certificate](#update-an-existing-certificate) +- [Delete a certificate](#delete-a-certificate) +- [List certificates](#list-certificates) -Create a Certificate to be stored in the Azure Key Vault. -- `beginCreateCertificate` creates a new certificate in the key vault. if the certificate with name already exists then a new version of the certificate is created. +### Create a certificate +Create a certificate to be stored in the Azure Key Vault. +- `beginCreateCertificate` creates a new certificate in the Azure Key Vault. If a certificate with the same name already exists then a new version of the certificate is created. ```Java +import com.azure.core.util.polling.LongRunningOperationStatus; +import com.azure.core.util.polling.SyncPoller; import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.certificates.models.Certificate; -import com.azure.security.keyvault.certificates.models.CertificatePolicy; -import com.azure.security.keyvault.certificates.models.CertificateOperation; import com.azure.security.keyvault.certificates.CertificateClient; +import com.azure.security.keyvault.certificates.CertificateClientBuilder; +import com.azure.security.keyvault.certificates.models.CertificateOperation; +import com.azure.security.keyvault.certificates.models.CertificatePolicy; +import com.azure.security.keyvault.certificates.models.KeyVaultCertificate; +import com.azure.security.keyvault.certificates.models.KeyVaultCertificateWithPolicy; CertificateClient certificateClient = new CertificateClientBuilder() - .vaultUrl() - .credential(new DefaultAzureCredentialBuilder().build()) - .buildClient(); + .vaultUrl() + .credential(new DefaultAzureCredentialBuilder().build()) + .buildClient(); -SyncPoller certificatePoller = certificateClient - .beginCreateCertificate("certificateName", CertificatePolicy.getDefault()); +SyncPoller certificatePoller = + certificateClient.beginCreateCertificate("certificateName", CertificatePolicy.getDefault()); certificatePoller.waitUntil(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED); KeyVaultCertificate certificate = certificatePoller.getFinalResult(); -System.out.printf("Certificate created with name %s", certificate.getName()); +System.out.printf("Certificate created with name \"%s\"\n", certificate.getName()); ``` -### Retrieve a Certificate - -Retrieve a previously stored Certificate by calling `getCertificate` or `getCertificateVersion`. +### Retrieve a certificate +Retrieve a previously stored certificate by calling `getCertificate` or `getCertificateVersion`. ```Java -KeyVaultCertificateWithPolicy certificate = certificateClient.getCertificate("certificateName"); -System.out.printf("Recevied certificate with name %s and version %s and secret id", - certificate.getProperties().getName(), - certificate.getProperties().getVersion(), certificate.getSecretId()); +KeyVaultCertificateWithPolicy certificate = certificateClient.getCertificate(""); +System.out.printf("Recevied certificate with name \"%s\", version %s and secret id %s\n", + certificate.getProperties().getName(), certificate.getProperties().getVersion(), certificate.getSecretId()); ``` -### Update an existing Certificate - -Update an existing Certificate by calling `updateCertificateProperties`. +### Update an existing certificate +Update an existing certificate by calling `updateCertificateProperties`. ```Java // Get the certificate to update. -KeyVaultCertificate certificate = certificateClient.getCertificate("certificateName"); -// Update certificate enabled status +KeyVaultCertificate certificate = certificateClient.getCertificate(""); +// Update certificate enabled status. certificate.getProperties().setEnabled(false); KeyVaultCertificate updatedCertificate = certificateClient.updateCertificateProperties(certificate.getProperties()); -System.out.printf("Updated Certificate with name %s and enabled status %s", +System.out.printf("Updated certificate with name \"%s\" and enabled status \"%s\"\n", updatedCertificate.getProperties().getName(), updatedCertificate.getProperties().isEnabled()); ``` -### Delete a Certificate - -Delete an existing Certificate by calling `beginDeleteCertificate`. +### Delete a certificate +Delete an existing certificate by calling `beginDeleteCertificate`. ```Java SyncPoller deleteCertificatePoller = - certificateClient.beginDeleteCertificate("certificateName"); -// Deleted Certificate is accessible as soon as polling beings. + certificateClient.beginDeleteCertificate(""); +// Deleted certificate is accessible as soon as polling beings. PollResponse pollResponse = deleteCertificatePoller.poll(); -System.out.printf("Deleted certitifcate with name %s and recovery id %s", pollResponse.getValue().getName(), +System.out.printf("Deleted certificate with name \"%s\" and recovery id %s", pollResponse.getValue().getName(), pollResponse.getValue().getRecoveryId()); deleteCertificatePoller.waitForCompletion(); ``` -### List Certificates - +### List certificates List the certificates in the key vault by calling `listPropertiesOfCertificates`. ```java -// List operations don't return the certificates with their full information. So, for each returned certificate we call getCertificate to get the certificate with all its properties excluding the policy. +// List operations don't return the certificates with their full information. So, for each returned certificate we call +// getCertificate to get the certificate with all its properties excluding the policy. for (CertificateProperties certificateProperties : certificateClient.listPropertiesOfCertificates()) { - KeyVaultCertificate certificateWithAllProperties = certificateClient.getCertificateVersion(certificateProperties.getName(), certificateProperties.getVersion()); - System.out.printf("Received certificate with name %s and secret id %s", + KeyVaultCertificate certificateWithAllProperties = + certificateClient.getCertificateVersion(certificateProperties.getName(), certificateProperties.getVersion()); + System.out.printf("Received certificate with name \"%s\" and secret id %s", certificateWithAllProperties.getProperties().getName(), certificateWithAllProperties.getSecretId()); } ``` ### Async API -The following sections provide several code snippets covering some of the most common asynchronous Azure Key Vault Key Service tasks, including: -- [Create a Certificate Asynchronously](#create-a-certificate-asynchronously) -- [Retrieve a Certificate Asynchronously](#retrieve-a-certificate-asynchronously) -- [Update an existing Certificate Asynchronously](#update-an-existing-certificate-asynchronously) -- [Delete a Certficate Asynchronously](#delete-a-certificate-asynchronously) -- [List Certificates Asynchronously](#list-certificates-asynchronously) - -> Note : You should add "System.in.read()" or "Thread.Sleep()" after the function calls in the main class/thread to allow Async functions/operations to execute and finish before the main application/thread exits. +The following sections provide several code snippets covering some of the most common asynchronous Azure Key Vault Certificate service tasks, including: +- [Create a certificate asynchronously](#create-a-certificate-asynchronously) +- [Retrieve a certificate asynchronously](#retrieve-a-certificate-asynchronously) +- [Update an existing certificate asynchronously](#update-an-existing-certificate-asynchronously) +- [Delete a certificate asynchronously](#delete-a-certificate-asynchronously) +- [List certificates asynchronously](#list-certificates-asynchronously) -### Create a Certificate Asynchronously +> Note : You should add `System.in.read()` or `Thread.sleep()` after the function calls in the main class/thread to allow async functions/operations to execute and finish before the main application/thread exits. -Create a Certificate to be stored in the Azure Key Vault. -- `beginCreateCertificate` creates a new certificate in the key vault. if the certificate with name already exists then a new version of the certificate is created. +### Create a certificate asynchronously +Create a certificate to be stored in the Azure Key Vault. +- `beginCreateCertificate` creates a new certificate in the Azure Key Vault. If a certificate with same name already exists then a new version of the certificate is created. ```Java import com.azure.identity.DefaultAzureCredentialBuilder; -import com.azure.security.keyvault.certificates.models.Certificate; -import com.azure.security.keyvault.certificates.models.CertificatePolicy; -import com.azure.security.keyvault.certificates.models.CertificateOperation; import com.azure.security.keyvault.certificates.CertificateAsyncClient; +import com.azure.security.keyvault.certificates.models.CertificatePolicy; -//Creates a certificate using the default policy and polls on its progress. -certificateAsyncClient.beginCreateCertificate("certificateName", CertificatePolicy.getDefault()) +// Creates a certificate using the default policy and polls on its progress. +certificateAsyncClient.beginCreateCertificate("", CertificatePolicy.getDefault()) .subscribe(pollResponse -> { System.out.println("---------------------------------------------------------------------------------"); System.out.println(pollResponse.getStatus()); @@ -223,85 +219,79 @@ certificateAsyncClient.beginCreateCertificate("certificateName", CertificatePoli }); ``` -### Retrieve a Certificate Asynchronously - -Retrieve a previously stored Certificate by calling `getCertificate` or `getCertificateVersion`. +### Retrieve a certificate asynchronously +Retrieve a previously stored certificate by calling `getCertificate` or `getCertificateVersion`. ```Java -certificateAsyncClient.getCertificate("certificateName") +certificateAsyncClient.getCertificate("") .subscribe(certificateResponse -> - System.out.printf("Certificate is returned with name %s and secretId %s %n", + System.out.printf("Certificate was returned with name \"%s\" and secretId %s\n", certificateResponse.getProperties().getName(), certificateResponse.getSecretId())); ``` -### Update an existing Certificate Asynchronously - -Update an existing Certificate by calling `updateCertificateProperties`. +### Update an existing certificate asynchronously +Update an existing certificate by calling `updateCertificateProperties`. ```Java -certificateAsyncClient.getCertificate("certificateName") +certificateAsyncClient.getCertificate("") .subscribe(certificateResponseValue -> { KeyVaultCertificate certificate = certificateResponseValue; - //Update enabled status of the certificate + // Update enabled status of the certificate. certificate.getProperties().setEnabled(false); certificateAsyncClient.updateCertificateProperties(certificate.getProperties()) .subscribe(certificateResponse -> - System.out.printf("Certificate's enabled status %s %n", + System.out.printf("Certificate's enabled status %s\n", certificateResponse.getProperties().isEnabled().toString())); }); ``` -### Delete a Certificate Asynchronously - -Delete an existing Certificate by calling `beginDeleteCertificate`. +### Delete a certificate asynchronously +Delete an existing certificate by calling `beginDeleteCertificate`. ```java -certificateAsyncClient.beginDeleteCertificate("certificateName") +certificateAsyncClient.beginDeleteCertificate("") .subscribe(pollResponse -> { - System.out.println("Delete Status: " + pollResponse.getStatus().toString()); - System.out.println("Delete Certificate Name: " + pollResponse.getValue().getName()); - System.out.println("Certificate Delete Date: " + pollResponse.getValue().getDeletedOn().toString()); + System.out.printf("Deletion status: %s\n", pollResponse.getStatus().toString()); + System.out.printf("Deleted certificate name: %s\n", pollResponse.getValue().getName()); + System.out.printf("Certificate deletion date: %s\n", pollResponse.getValue().getDeletedOn().toString()); }); ``` -### List Certificates Asynchronously - -List the certificates in the key vault by calling `listPropertiesOfCertificates`. +### List certificates asynchronously +List the certificates in the Key Vault by calling `listPropertiesOfCertificates`. ```Java -// The List Certificates operation returns certificates without their full properties, so for each certificate returned we call `getCertificate` to get all its attributes excluding the policy. +// The List Certificates operation returns certificates without their full properties, so for each certificate returned +// we call `getCertificate` to get all its attributes excluding the policy. certificateAsyncClient.listPropertiesOfCertificates() - .subscribe(certificateProperties -> certificateAsyncClient.getCertificate(certificateProperties.getName(), - certificateProperties.getVersion()); - .subscribe(certificateResponse -> System.out.printf("Received certificate with name %s and key id %s", - certificateResponse.getName(), certificateResponse.getKeyId()))); + .subscribe(certificateProperties -> + certificateAsyncClient.getCertificateVersion(certificateProperties.getName(), + certificateProperties.getVersion()); + .subscribe(certificateResponse -> + System.out.printf("Received certificate with name \"%s\" and key id %s", + certificateResponse.getName(), certificateResponse.getKeyId()))); ``` ## 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. +Azure Key Vault Certificate clients raise exceptions. For example, if you try to retrieve a certificate after it is deleted a `404` error is returned, indicating the resource was not found. In the following snippet, the error is handled gracefully by catching the exception and displaying additional information about the error. ```java try { - certificateClient.getCertificate("certificateName") + certificateClient.getCertificate("") } catch (ResourceNotFoundException e) { System.out.println(e.getMessage()); } ``` -### Default HTTP Client -All client libraries by default use the Netty HTTP client. Adding the above dependency will automatically configure -the client library to use the Netty HTTP client. Configuring or changing the HTTP client is detailed in the -[HTTP clients wiki](https://github.com/Azure/azure-sdk-for-java/wiki/HTTP-clients). +### Default HTTP client +All client libraries by default use the Netty HTTP client. Adding the above dependency will automatically configure the client library to use the Netty HTTP client. Configuring or changing the HTTP client is detailed in the [HTTP clients wiki](https://github.com/Azure/azure-sdk-for-java/wiki/HTTP-clients). ### Default SSL library -All client libraries, by default, use the Tomcat-native Boring SSL library to enable native-level performance for SSL -operations. The Boring SSL library is an uber jar containing native libraries for Linux / macOS / Windows, and provides -better performance compared to the default SSL implementation within the JDK. For more information, including how to -reduce the dependency size, refer to the [performance tuning][performance_tuning] section of the wiki. +All client libraries, by default, use the Tomcat-native Boring SSL library to enable native-level performance for SSL operations. The Boring SSL library is an Uber JAR containing native libraries for Linux / macOS / Windows, and provides better performance compared to the default SSL implementation within the JDK. For more information, including how to reduce the dependency size, refer to the [performance tuning][performance_tuning] section of the wiki. ## Next steps -Several KeyVault Java SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Key Vault: +Several Key Vault Java SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Key Vault. ## Next steps Samples Samples are explained in detail [here][samples_readme]. @@ -314,10 +304,10 @@ This project welcomes contributions and suggestions. Most contributions require When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments. +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the Code of Conduct FAQ or contact with any additional questions or comments. -[source_code]: src +[source_code]: src [api_documentation]: https://azure.github.io/azure-sdk-for-java [azkeyvault_docs]: https://docs.microsoft.com/azure/key-vault/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/identity/azure-identity @@ -327,9 +317,9 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope [azure_cli]: https://docs.microsoft.com/cli/azure [rest_api]: https://docs.microsoft.com/rest/api/keyvault/ [azkeyvault_rest]: https://docs.microsoft.com/rest/api/keyvault/ -[azure_create_application_in_portal]:https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -[azure_keyvault_cli]:https://docs.microsoft.com/azure/key-vault/quick-create-cli -[azure_keyvault_cli_full]:https://docs.microsoft.com/cli/azure/keyvault?view=azure-cli-latest +[azure_create_application_in_portal]: https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +[azure_keyvault_cli]: https://docs.microsoft.com/azure/key-vault/quick-create-cli +[azure_keyvault_cli_full]: https://docs.microsoft.com/cli/azure/keyvault?view=azure-cli-latest [certificates_samples]: src/samples/java/com/azure/security/keyvault/certificates [samples_readme]: src/samples/README.md [performance_tuning]: https://github.com/Azure/azure-sdk-for-java/wiki/Performance-Tuning diff --git a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateClientJavaDocCodeSnippets.java b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateClientJavaDocCodeSnippets.java index 409540d0cc74..9d10fc7ab2ac 100644 --- a/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateClientJavaDocCodeSnippets.java +++ b/sdk/keyvault/azure-security-keyvault-certificates/src/samples/java/com/azure/security/keyvault/certificates/CertificateClientJavaDocCodeSnippets.java @@ -58,7 +58,7 @@ private CertificateClient getCertificateClient() { /** * Method to insert code snippets for {@link CertificateClient#getCertificatePolicy(String)} */ - public void getCertiificatePolicyCodeSnippets() { + public void getCertificatePolicyCodeSnippets() { CertificateClient certificateClient = getCertificateClient(); // BEGIN: com.azure.security.keyvault.certificates.CertificateClient.getCertificatePolicy#string CertificatePolicy policy = certificateClient.getCertificatePolicy("certificateName");