You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a `CertificateClient` you can get certificates from the vault, create new certificates and
128
+
With a [CertificateClient][certificate_client_docs] you can get certificates from the vault, create new certificates and
123
129
new versions of existing certificates, update certificate metadata, and delete certificates. You
124
130
can also manage certificate issuers, contacts, and management policies of certificates. This is
125
131
illustrated in the [examples](#examples) below.
@@ -128,73 +134,110 @@ illustrated in the [examples](#examples) below.
128
134
129
135
## Examples
130
136
This section contains code snippets covering common tasks:
131
-
* [Create a Certificate](#create-a-certificate)
132
-
* [Retrieve a Certificate](#retrieve-a-certificate)
133
-
* [Update Properties of an existing Certificate](#update-properties-of-an-existing-certificate)
134
-
* [Delete a Certificate](#delete-a-certificate)
135
-
* [List Properites of Certificates](#list-properties-of-certificates)
136
-
* [Asynchronously create a Certificate](#asynchronously-create-a-certificate)
137
-
* [Asynchronously list properties of Certificates](#asynchronously-list-properties-of-certificates)
137
+
* [Create a Certificate](#create-a-certificate "Create a Certificate")
138
+
* [Retrieve a Certificate](#retrieve-a-certificate "Retrieve a Certificate")
139
+
* [Update Properties of an existing Certificate](#update-properties-of-an-existing-certificate "Update Properties of an existing Certificate")
140
+
* [Delete a Certificate](#delete-a-certificate "Delete a Certificate")
141
+
* [List Properites of Certificates](#list-properties-of-certificates "List Properties of Certificates")
142
+
* [Asynchronously create a Certificate](#asynchronously-create-a-certificate "Asynchronously create a Certificate")
143
+
* [Asynchronously list properties of Certificates](#asynchronously-list-properties-of-certificates "Asynchronously list properties of Certificates")
138
144
139
145
### Create a Certificate
140
-
`begin_create_certificate` creates a certificate to be stored in the Azure Key Vault. If a certificate with
141
-
the same name already exists, then a new version of the certificate is created.
146
+
[begin_create_certificate](https://aka.ms/azsdk-python-keyvault-certificates-begincreatecert-ref) creates a certificate to be stored in the Azure Key Vault.
147
+
If a certificate with the same name already exists, then a new version of the certificate is created.
142
148
Before creating a certificate, a management policy for the certificate can be created or our default
143
-
policy will be used. The `begin_create_certificate` operation returns a long running operation poller.
149
+
policy will be used. The [begin_create_certificate](https://aka.ms/azsdk-python-keyvault-certificates-begincreatecert-ref) operation returns a long running operation poller.
`get_certificate_version` retrieves a certificate based on the certificate name and the version of the certificate.
182
+
[get_certificate_version](https://aka.ms/azsdk-python-keyvault-certificates-getcertversion-ref) retrieves a certificate based on the certificate name and the version of the certificate.
162
183
Version is required.
163
184
```python
185
+
from azure.identity import DefaultAzureCredential
186
+
from azure.keyvault.certificates import CertificateClient
`update_certificate_properties` updates a certificate previously stored in the Key Vault.
198
+
[update_certificate_properties](https://aka.ms/azsdk-python-keyvault-certificates-updatecertprops-ref) updates a certificate previously stored in the Key Vault.
172
199
```python
173
-
# You can specify additional application-specific metadata in the form of tags.
174
-
tags = {"foo": "updated tag"}
200
+
from azure.identity import DefaultAzureCredential
201
+
from azure.keyvault.certificates import CertificateClient
`delete_certificate` deletes a certificate previously stored in the Key Vault. When [soft-delete][soft_delete]
215
+
[delete_certificate](https://aka.ms/azsdk-python-keyvault-certs-deletecert-ref) deletes a certificate previously stored in the Key Vault. When [soft-delete][soft_delete]
187
216
is not enabled for the Key Vault, this operation permanently deletes the certificate.
188
217
```python
218
+
from azure.identity import DefaultAzureCredential
219
+
from azure.keyvault.certificates import CertificateClient
# this list doesn't include versions of the certificates
@@ -209,40 +252,57 @@ See
209
252
for more information.
210
253
211
254
### Asynchronously create a Certificate
212
-
`create_certificate` creates a certificate to be stored in the Azure Key Vault. If a certificate with the
255
+
[create_certificate](https://aka.ms/azsdk-python-keyvault-certs-async-createcert) creates a certificate to be stored in the Azure Key Vault. If a certificate with the
213
256
same name already exists, then a new version of the certificate is created.
214
257
Before creating a certificate, a management policy for the certificate can be created or our default policy
215
-
will be used. Awaiting the call to `create_certificate` returns your created certificate if creation is successful,
216
-
and a `CertificateOperation`if creation is not.
258
+
will be used. Awaiting the call to [create_certificate](https://aka.ms/azsdk-python-keyvault-certs-async-createcert) returns your created certificate if creation is successful,
259
+
and a [CertificateOperation](https://aka.ms/azsdk-python-keyvault-certs-models-certop-ref)if creation is not.
217
260
```python
261
+
from azure.identity.aio import DefaultAzureCredential
262
+
from azure.keyvault.certificates.aio import CertificateClient
263
+
from azure.keyvault.certificates import CertificatePolicy
0 commit comments