diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/client.py index 9425a17b82a1..d152a66bc4a5 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/client.py @@ -58,13 +58,11 @@ async def create_certificate( If this is the first version, the certificate resource is created. This operation requires the certificates/create permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :param policy: The management policy for the certificate. :type policy: ~azure.keyvault.certificates.models.CertificatePolicy - :param enabled: Determines whether the object is enabled. - :type enabled: bool + :param bool enabled: Determines whether the object is enabled. :param tags: Application specific metadata in the form of key-value pairs. :type tags: dict(str, str) :returns: The created CertificateOperation @@ -147,9 +145,7 @@ async def get_certificate_with_policy( version of the certificate as a parameter. If you wish to specify version, use the get_certificate function and specify version. - :param name: The name of the certificate in the given - vault. - :type name: str + :param str name: The name of the certificate in the given vault. :returns: An instance of Certificate :rtype: ~azure.keyvault.certificates.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError @@ -182,11 +178,8 @@ async def get_certificate( If you wish to not specify a version or to get the certificate's policy as well, use the get_certificate_with_policy function. - :param name: The name of the certificate in the given - vault. - :type name: str - :param version: The version of the certificate. - :type version: str + :param str name: The name of the certificate in the given vault. + :param str version: The version of the certificate. :returns: An instance of Certificate :rtype: ~azure.keyvault.certificates.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError @@ -216,8 +209,7 @@ async def delete_certificate(self, name: str, **kwargs: "**Any") -> DeletedCerti of a certificate object. This operation requires the certificates/delete permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :returns: The deleted certificate :rtype: ~azure.keyvault.certificates.models.DeletedCertificate :raises: ~azure.core.exceptions.HttpResponseError @@ -246,8 +238,7 @@ async def get_deleted_certificate(self, name: str, **kwargs: "**Any") -> Deleted current deletion recovery level. This operaiton requires the certificates/ get permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :return: The deleted certificate :rtype: ~azure.keyvault.certificates.models.DeletedCertificate :raises: ~azure.core.exceptions.HttpResponseError @@ -276,8 +267,7 @@ async def purge_deleted_certificate(self, name: str, **kwargs: "**Any") -> None: level does not specified 'Purgeable'. This operation requires the certificate/purge permission. - :param name: The name of the certificate - :type name: str + :param str name: The name of the certificate :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError @@ -298,10 +288,9 @@ async def recover_deleted_certificate(self, name: str, **kwargs: "**Any") -> Cer interval (available in the deleted certificate's attributes). This operation requires the certificates/recover permission. - :param name: The name of the deleted certificate - :type name: str + :param str name: The name of the deleted certificate :return: The recovered certificate - :rtype ~azure.keyvault.certificates.models.Certificate + :rtype: ~azure.keyvault.certificates.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -338,21 +327,16 @@ async def import_certificate( contain the key as well as x509 certificates. This operation requires the certificates/import permission. - :param name: The name of the certificate. - :type name: str - :param certificate_bytes: Bytes of the ertificate object to import. - This certificate needs to contain the private key. - :type certificate_bytes: str - :param password: If the private key in base64EncodedCertificate is - encrypted, the password used for encryption. - :type password: str + :param str name: The name of the certificate. + :param bytes certificate_bytes: Bytes of the certificate object to import. + This certificate needs to contain the private key. + :param str password: If the private key in the passed in certificate is encrypted, + it is the password used for encryption. :param policy: The management policy for the certificate. :type policy: ~azure.keyvault.certificates.models.CertificatePolicy - :param enabled: Determines whether the object is enabled. - :type enabled: bool - :param tags: Application specific metadata in the form of key-value - pairs. + :param bool enabled: Determines whether the object is enabled. + :param tags: Application specific metadata in the form of key-value pairs. :type tags: dict[str, str] :returns: The imported Certificate :rtype: ~azure.keyvault.certificates.models.Certificate @@ -384,10 +368,9 @@ async def get_policy(self, name: str, **kwargs: "**Any") -> CertificatePolicy: Returns the specified certificate policy resources in the key vault. This operation requires the certificates/get permission. - :param name: The name of the certificate in a given key vault. - :type name: str + :param str name: The name of the certificate in a given key vault. :return: The certificate policy - :rtype ~azure.keyvault.certificates.models.CertificatePolicy + :rtype: ~azure.keyvault.certificates.models.CertificatePolicy :raises: ~azure.core.exceptions.HttpResponseError """ bundle = await self._client.get_certificate_policy( @@ -409,8 +392,7 @@ async def update_policy( Set specified members in the certificate policy. Leaves others as null. This operation requries the certificates/update permission. - :param name: The name of the certificate in the given vault. - :type name: str + :param str name: The name of the certificate in the given vault. :param policy: The policy for the certificate. :type policy: ~azure.keyvault.certificates.models.CertificatePolicy :return: The certificate policy @@ -440,13 +422,9 @@ async def update_certificate( given certificate; the only elements updated are the certificate's attributes. This operation requires the certificates/update permission. - :param name: The name of the certificate in the given key - vault. - :type name: str - :param version: The version of the certificate. - :type version: str - :param enabled: Determines whether the object is enabled. - :type enabled: bool + :param str name: The name of the certificate in the given key vault. + :param str version: The version of the certificate. + :param bool enabled: Determines whether the object is enabled. :param tags: Application specific metadata in the form of key-value pairs. :type tags: dict(str, str) :returns: The updated Certificate @@ -486,8 +464,7 @@ async def backup_certificate(self, name: str, **kwargs: "**Any") -> bytes: to the client. All versions of the certificate will be downloaded. This operation requires the certificates/backup permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :return: the backup blob containing the backed up certificate. :rtype: bytes :raises: ~azure.core.exceptions.HttpResponseError @@ -514,8 +491,7 @@ async def restore_certificate(self, backup: bytes, **kwargs: "**Any") -> Certifi Restores a backed up certificate, and all its versions, to a vault. this operation requires the certificates/restore permission. - :param backup: The backup blob associated with a certificate bundle. - :type backup bytes + :param bytes backup: The backup blob associated with a certificate bundle. :return: The restored Certificate :rtype: ~azure.keyvault.certificates.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError @@ -549,12 +525,11 @@ def list_deleted_certificates( deletion-specific information. This operation requires the certificates/get/list permission. This operation can only be enabled on soft-delete enabled vaults. - :param include_pending: Specifies whether to include certificates which are not - completely provisioned. - :type include_pending: bool + :param bool include_pending: Specifies whether to include certificates which are not + completely provisioned. :return: An iterator like instance of DeletedCertificate :rtype: - typing.Generator[~azure.keyvault.certificates.models.DeletedCertificate] + ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.models.DeletedCertificate] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -586,12 +561,11 @@ def list_certificates( in the key vault. This operation requires the certificates/list permission. - :param include_pending: Specifies whether to include certificates + :param bool include_pending: Specifies whether to include certificates which are not completely provisioned. - :type include_pending: bool :returns: An iterator like instance of CertificateBase :rtype: - typing.Generator[~azure.keyvault.certificates.models.CertificateBase] + ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.models.CertificateBase] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -619,11 +593,10 @@ def list_certificate_versions(self, name: str, **kwargs: "**Any") -> AsyncIterab certificate in the key vault. This operation requires the certificates/list permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :returns: An iterator like instance of CertificateBase :rtype: - typing.Generator[~azure.keyvault.certificates.models.CertificateBase] + ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.models.CertificateBase] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -656,7 +629,7 @@ async def create_contacts(self, contacts: Iterable[Contact], **kwargs: "**Any") :param contacts: The contact list for the vault certificates. :type contacts: list[~azure.keyvault.certificates.models.Contact] :returns: The created list of contacts - :rtype: Iterator[~azure.keyvault.certificates.models.Contact] + :rtype: list[~azure.keyvault.certificates.models.Contact] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -687,7 +660,7 @@ async def get_contacts(self, **kwargs: "**Any") -> List[Contact]: permission. :return: The certificate contacts for the key vault. - :rtype: Iterator[azure.keyvault.certificates.models.Contact] + :rtype: list[azure.keyvault.certificates.models.Contact] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -713,7 +686,7 @@ async def delete_contacts(self, **kwargs: "**Any") -> List[Contact]: This operation requires the certificates/managecontacts permission. :return: Contacts - :rtype: Iterator[~azure.security.certificates._models.Contact] + :rtype: list[~azure.keyvault.certificates.models.Contact] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -734,10 +707,9 @@ async def get_certificate_operation(self, name: str, **kwargs: "**Any") -> Certi Gets the creation operation associated with a specified certificate. This operation requires the certificates/get permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :returns: The created CertificateOperation - :rtype: ~azure.security.keyvault.certificates.models.CertificateOperation + :rtype: ~azure.keyvault.certificates.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ @@ -756,8 +728,7 @@ async def delete_certificate_operation(self, name: str, **kwargs: "**Any") -> Ce the process of being created. The certificate is no longer created. This operation requires the certificates/update permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :return: The deleted CertificateOperation :rtype: ~azure.keyvault.certificates.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError @@ -771,14 +742,13 @@ async def delete_certificate_operation(self, name: str, **kwargs: "**Any") -> Ce @distributed_trace_async async def cancel_certificate_operation(self, name: str, **kwargs: "**Any") -> CertificateOperation: - """Updates a certificate operation. + """Cancels a certificate operation. - Updates a certificate creation operation that is already in progress. + Cancels a certificate creation operation that is already in progress. This operation requires the certificates/update permission. - :param name: The name of the certificate. - :type name: str - :returns: The updated certificate operation + :param str name: The name of the certificate. + :returns: The cancelled certificate operation :rtype: ~azure.keyvault.certificates.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ @@ -797,10 +767,10 @@ async def get_pending_certificate_signing_request( custom_headers: Optional[Dict[str, str]] = None, **kwargs: "**Any") -> str: """Gets the Base64 pending certificate signing request (PKCS-10). - :param name: The name of the certificate - :type name: str + + :param str name: The name of the certificate :param custom_headers: headers that will be added to the request - :type custom_headers: dict + :type custom_headers: dict[str, str] :return: Base64 encoded pending certificate signing request (PKCS-10). :rtype: str :raises: ~azure.core.exceptions.HttpResponseError @@ -864,13 +834,14 @@ async def merge_certificate( Performs the merging of a certificate or certificate chain with a key pair currently available in the service. This operation requires the certificates/create permission. + Make sure when creating the certificate to merge using create_certificate that you set + it's issuer to 'Unknown'. This way Key Vault knows that the certificate will not be signed + by an issuer known to it. - :param name: The name of the certificate - :type name: str + :param str name: The name of the certificate :param x509_certificates: The certificate or the certificate chain to merge. :type x509_certificates: list[bytearray] - :param enabled: Determines whether the object is enabled. - :type enabled: bool + :param bool enabled: Determines whether the object is enabled. :param tags: Application specific metadata in the form of key-value pairs. :type tags: dict[str, str] :return: The merged certificate operation @@ -900,8 +871,7 @@ async def get_issuer(self, name: str, **kwargs: "**Any") -> Issuer: Returns the specified certificate issuer resources in the key vault. This operation requires the certificates/manageissuers/getissuers permission. - :param name: The name of the issuer. - :type name: str + :param str name: The name of the issuer. :return: The specified certificate issuer. :rtype: ~azure.keyvault.certificates.models.Issuer :raises: ~azure.core.exceptions.HttpResponseError @@ -939,20 +909,14 @@ async def create_issuer( certificate issuer. This operation requires the certificates/setissuers permission. - :param name: The name of the issuer. - :type name: str - :param provider: The issuer provider. - :type provider: str - :param account_id: The user name/account name/account id. - :type account_id: str - :param password: The password/secret/account key. - :type password: str - :param organization_id: Id of the organization. - :type organization_id: str + :param str name: The name of the issuer. + :param str provider: The issuer provider. + :param str account_id: The user name/account name/account id. + :param str password: The password/secret/account key. + :param str organization_id: Id of the organization. :param admin_details: Details of the organization administrators of the certificate issuer. - :type admin_details: ~azure.keyvault.certificates.models.AdministratorDetails - :param enabled: Determines whether the object is enabled. - :type enabled: bool + :type admin_details: list[~azure.keyvault.certificates.models.AdministratorDetails] + :param bool enabled: Determines whether the object is enabled. :returns: The created Issuer :rtype: ~azure.keyvault.certificates.models.Issuer :raises: ~azure.core.exceptions.HttpResponseError @@ -1015,33 +979,19 @@ async def update_issuer( """Updates the specified certificate issuer. Performs an update on the specified certificate issuer entity. - THis operation requires the certificates/setissuers permission. - - :param name: The name of the issuer. - :type name: str - :param provider: The issuer provider. - :type provider: str - :param account_id: The username / account name / account key. - :type account_id: str - :param password: The password / secret / account key. - :type password: str - :param organization_id: Id of the organization - :type organization_id: str + This operation requires the certificates/setissuers permission. + + :param str name: The name of the issuer. + :param str provider: The issuer provider. + :param str account_id: The username / account name / account key. + :param str password: The password / secret / account key. + :param str organization_id: Id of the organization :param admin_details: Details of the organization administrators of the certificate issuer. - :type admin_details: ~azure.keyvault.certificates.models.AdministratorDetails - :param enabled: Determines whether the issuer is enabled. - :type enabled: bool + :type admin_details: list[~azure.keyvault.certificates.models.AdministratorDetails] + :param bool enabled: Determines whether the issuer is enabled. :return: The updated issuer :rtype: ~azure.keyvault.certificates.models.Issuer :raises: ~azure.core.exceptions.HttpResponseError - - Example: - .. literalinclude:: ../tests/test_examples_certificates_async.py - :start-after: [START update_issuer] - :end-before: [END update_issuer] - :language: python - :caption: Update an issuer - :dedent: 8 """ if account_id or password: issuer_credentials = self._client.models.IssuerCredentials(account_id=account_id, password=password) @@ -1085,8 +1035,7 @@ async def delete_issuer(self, name: str, **kwargs: "**Any") -> Issuer: Permanently removes the specified certificate issuer from the vault. This operation requires the certificates/manageissuers/deleteissuers permission. - :param name: The name of the issuer. - :type name: str + :param str name: The name of the issuer. :return: Issuer :rtype: ~azure.keyvault.certificates.models.Issuer :raises: ~azure.core.exceptions.HttpResponseError @@ -1115,7 +1064,7 @@ def list_issuers(self, **kwargs: "**Any") -> AsyncIterable[IssuerBase]: permission. :return: An iterator like instance of Issuers - :rtype: Iterable[~azure.keyvault.certificates.models.Issuer] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.models.Issuer] :raises: ~azure.core.exceptions.HttpResponseError Example: diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/client.py index 8d77bae79b45..69b8f6440061 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/client.py @@ -66,11 +66,10 @@ def create_certificate( If this is the first version, the certificate resource is created. This operation requires the certificates/create permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :param policy: The management policy for the certificate. :type policy: - ~azure.security.keyvault.certificates._models.CertificatePolicy + ~azure.keyvault.certificates.models.CertificatePolicy :param bool enabled: Determines whether the object is enabled. :param tags: Application specific metadata in the form of key-value pairs. :type tags: dict(str, str) @@ -152,9 +151,7 @@ def get_certificate_with_policy(self, name, **kwargs): version of the certificate as a parameter. If you wish to specify version, use the get_certificate function and specify version. - :param name: The name of the certificate in the given - vault. - :type name: str + :param str name: The name of the certificate in the given vault. :returns: An instance of Certificate :rtype: ~azure.keyvault.certificates.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError @@ -183,11 +180,8 @@ def get_certificate(self, name, version, **kwargs): If you wish to not specify a version or to get the certificate's policy as well, use the get_certificate_with_policy function. - :param name: The name of the certificate in the given - vault. - :type name: str - :param version: The version of the certificate. - :type version: str + :param str name: The name of the certificate in the given vault. + :param str version: The version of the certificate. :returns: An instance of Certificate :rtype: ~azure.keyvault.certificates.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError @@ -218,8 +212,7 @@ def delete_certificate(self, name, **kwargs): of a certificate object. This operation requires the certificates/delete permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :returns: The deleted certificate :rtype: ~azure.keyvault.certificates.models.DeletedCertificate :raises: ~azure.core.exceptions.HttpResponseError @@ -249,8 +242,7 @@ def get_deleted_certificate(self, name, **kwargs): current deletion recovery level. This operaiton requires the certificates/ get permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :return: The deleted certificate :rtype: ~azure.keyvault.certificates.models.DeletedCertificate :raises: ~azure.core.exceptions.HttpResponseError @@ -280,8 +272,7 @@ def purge_deleted_certificate(self, name, **kwargs): level does not specified 'Purgeable'. This operation requires the certificate/purge permission. - :param name: The name of the certificate - :type name: str + :param str name: The name of the certificate :return: None :rtype: None :raises: ~azure.core.exceptions.HttpResponseError @@ -303,14 +294,13 @@ def recover_deleted_certificate(self, name, **kwargs): interval (available in the deleted certificate's attributes). This operation requires the certificates/recover permission. - :param name: The name of the deleted certificate - :type name: str + :param str name: The name of the deleted certificate :return: The recovered certificate - :rtype ~azure.keyvault.certificates.models.Certificate + :rtype: ~azure.keyvault.certificates.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError Example: - .. literalinclude:: ../tests/test_samples_keys.py + .. literalinclude:: ../tests/test_examples_certificates.py :start-after: [START recover_deleted_certificate] :end-before: [END recover_deleted_certificate] :language: python @@ -344,21 +334,17 @@ def import_certificate( contain the key as well as x509 certificates. This operation requires the certificates/import permission. - :param name: The name of the certificate. - :type name: str - :param certificate_bytes: Bytes of the ertificate object to import. - This certificate needs to contain the private key. - :type certificate_bytes: str - :param password: If the private key in base64EncodedCertificate is - encrypted, the password used for encryption. - :type password: str + :param str name: The name of the certificate. + :param bytes certificate_bytes: Bytes of the certificate object to import. This certificate + needs to contain the private key. + :param str password: If the private key in the passed in certificate is encrypted, it is the + password used for encryption. :param policy: The management policy for the certificate. :type policy: ~azure.keyvault.certificates.models.CertificatePolicy - :param enabled: Determines whether the object is enabled. - :type enabled: bool + :param bool enabled: Determines whether the object is enabled. :param tags: Application specific metadata in the form of key-value - pairs. + pairs. :type tags: dict[str, str] :returns: The imported Certificate :rtype: ~azure.keyvault.certificates.models.Certificate @@ -391,10 +377,9 @@ def get_policy(self, name, **kwargs): Returns the specified certificate policy resources in the key vault. This operation requires the certificates/get permission. - :param name: The name of the certificate in a given key vault. - :type name: str + :param str name: The name of the certificate in a given key vault. :return: The certificate policy - :rtype ~azure.keyvault.certificates.models.CertificatePolicy + :rtype: ~azure.keyvault.certificates.models.CertificatePolicy :raises: ~azure.core.exceptions.HttpResponseError """ bundle = self._client.get_certificate_policy( @@ -412,8 +397,7 @@ def update_policy(self, name, policy, **kwargs): Set specified members in the certificate policy. Leaves others as null. This operation requires the certificates/update permission. - :param name: The name of the certificate in the given vault. - :type name: str + :param str name: The name of the certificate in the given vault. :param policy: The policy for the certificate. :type policy: ~azure.keyvault.certificates.models.CertificatePolicy :return: The certificate policy @@ -444,13 +428,10 @@ def update_certificate( given certificate; the only elements updated are the certificate's attributes. This operation requires the certificates/update permission. - :param name: The name of the certificate in the given key - vault. - :type name: str - :param version: The version of the certificate. - :type version: str - :param enabled: Determines whether the object is enabled. - :type enabled: bool + :param str name: The name of the certificate in the given key + vault. + :param str version: The version of the certificate. + :param bool enabled: Determines whether the object is enabled. :param tags: Application specific metadata in the form of key-value pairs. :type tags: dict(str, str) :returns: The updated Certificate @@ -491,8 +472,7 @@ def backup_certificate(self, name, **kwargs): to the client. All versions of the certificate will be downloaded. This operation requires the certificates/backup permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :return: the backup blob containing the backed up certificate. :rtype: bytes :raises: ~azure.core.exceptions.HttpResponseError @@ -520,8 +500,7 @@ def restore_certificate(self, backup, **kwargs): Restores a backed up certificate, and all its versions, to a vault. this operation requires the certificates/restore permission. - :param backup: The backup blob associated with a certificate bundle. - :type backup bytes + :param bytes backup: The backup blob associated with a certificate bundle. :return: The restored Certificate :rtype: ~azure.keyvault.certificates.models.Certificate :raises: ~azure.core.exceptions.HttpResponseError @@ -552,12 +531,11 @@ def list_deleted_certificates(self, include_pending=None, **kwargs): deletion-specific information. This operation requires the certificates/get/list permission. This operation can only be enabled on soft-delete enabled vaults. - :param include_pending: Specifies whether to include certificates which are not - completely provisioned. - :type include_pending: bool + :param bool include_pending: Specifies whether to include certificates which are not + completely provisioned. :return: An iterator like instance of DeletedCertificate :rtype: - typing.Generator[~azure.keyvault.certificates.models.DeletedCertificate] + ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.models.DeletedCertificate] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -589,12 +567,11 @@ def list_certificates(self, include_pending=None, **kwargs): in the key vault. This operation requires the certificates/list permission. - :param include_pending: Specifies whether to include certificates - which are not completely provisioned. - :type include_pending: bool + :param bool include_pending: Specifies whether to include certificates + which are not completely provisioned. :returns: An iterator like instance of CertificateBase :rtype: - typing.Generator[~azure.keyvault.certificates.models.CertificateBase] + ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.models.CertificateBase] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -623,11 +600,10 @@ def list_certificate_versions(self, name, **kwargs): certificate in the key vault. This operation requires the certificates/list permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :returns: An iterator like instance of CertificateBase :rtype: - typing.Generator[~azure.keyvault.certificates.models.CertificateBase] + ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.models.CertificateBase] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -657,7 +633,7 @@ def create_contacts(self, contacts, **kwargs): :param contacts: The contact list for the vault certificates. :type contacts: list[~azure.keyvault.certificates.models.Contact] :returns: The created list of contacts - :rtype: Iterator[~azure.keyvault.certificates.models.Contact] + :rtype: list[~azure.keyvault.certificates.models.Contact] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -685,7 +661,7 @@ def get_contacts(self, **kwargs): permission. :return: The certificate contacts for the key vault. - :rtype: Iterator[azure.keyvault.certificates._models.Contact] + :rtype: list[~azure.keyvault.certificates.models.Contact] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -708,7 +684,7 @@ def delete_contacts(self, **kwargs): This operation requires the certificates/managecontacts permission. :return: Contacts - :rtype: Iterator[~azure.certificates._models.Contact] + :rtype: list[~azure.keyvault.certificates.models.Contact] :raises: ~azure.core.exceptions.HttpResponseError Example: @@ -730,8 +706,7 @@ def get_certificate_operation(self, name, **kwargs): Gets the creation operation associated with a specified certificate. This operation requires the certificates/get permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :returns: The created CertificateOperation :rtype: ~azure.keyvault.certificates.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError @@ -753,8 +728,7 @@ def delete_certificate_operation(self, name, **kwargs): the process of being created. The certificate is no longer created. This operation requires the certificates/update permission. - :param name: The name of the certificate. - :type name: str + :param str name: The name of the certificate. :return: The deleted CertificateOperation :rtype: ~azure.keyvault.certificates.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError @@ -769,14 +743,13 @@ def delete_certificate_operation(self, name, **kwargs): @distributed_trace def cancel_certificate_operation(self, name, **kwargs): # type: (str, **Any) -> CertificateOperation - """Updates a certificate operation. + """Cancels a certificate operation. - Updates a certificate creation operation that is already in progress. + Cancels a certificate creation operation that is already in progress. This operation requires the certificates/update permission. - :param name: The name of the certificate. - :type name: str - :returns: The updated certificate operation + :param str name: The name of the certificate. + :returns: The cancelled certificate operation :rtype: ~azure.keyvault.certificates.models.CertificateOperation :raises: ~azure.core.exceptions.HttpResponseError """ @@ -802,13 +775,14 @@ def merge_certificate( Performs the merging of a certificate or certificate chain with a key pair currently available in the service. This operation requires the certificates/create permission. + Make sure when creating the certificate to merge using create_certificate that you set + it's issuer to 'Unknown'. This way Key Vault knows that the certificate will not be signed + by an issuer known to it. - :param name: The name of the certificate - :type name: str + :param str name: The name of the certificate :param x509_certificates: The certificate or the certificate chain to merge. :type x509_certificates: list[bytearray] - :param enabled: Determines whether the object is enabled. - :type enabled: bool + :param bool enabled: Determines whether the object is enabled. :param tags: Application specific metadata in the form of key-value pairs. :type tags: dict[str, str] :return: The merged certificate @@ -839,10 +813,10 @@ def get_pending_certificate_signing_request( ): # type: (...) -> str """Gets the Base64 pending certificate signing request (PKCS-10). - :param name: The name of the certificate - :type name: str + + :param str name: The name of the certificate :param custom_headers: headers that will be added to the request - :type custom_headers: dict + :type custom_headers: dict[str, str] :return: Base64 encoded pending certificate signing request (PKCS-10). :rtype: str :raises: ~azure.core.exceptions.HttpResponseError @@ -899,8 +873,7 @@ def get_issuer(self, name, **kwargs): Returns the specified certificate issuer resources in the key vault. This operation requires the certificates/manageissuers/getissuers permission. - :param name: The name of the issuer. - :type name: str + :param str name: The name of the issuer. :return: The specified certificate issuer. :rtype: ~azure.keyvault.certificates.models.Issuer :raises: ~azure.core.exceptions.HttpResponseError @@ -939,20 +912,14 @@ def create_issuer( certificate issuer. This operation requires the certificates/setissuers permission. - :param name: The name of the issuer. - :type name: str - :param provider: The issuer provider. - :type provider: str - :param account_id: The user name/account name/account id. - :type account_id: str - :param password: The password/secret/account key. - :type password: str - :param organization_id: Id of the organization. - :type organization_id: str + :param str name: The name of the issuer. + :param str provider: The issuer provider. + :param str account_id: The user name/account name/account id. + :param str password: The password/secret/account key. + :param str organization_id: Id of the organization. :param admin_details: Details of the organization administrators of the certificate issuer. - :type admin_details: Iterable[AdministratorDetails] - :param enabled: Determines whether the object is enabled. - :type enabled: bool + :type admin_details: list[~azure.keyvault.certificates.models.AdministratorDetails] + :param bool enabled: Determines whether the object is enabled. :returns: The created Issuer :rtype: ~azure.keyvault.certificates.models.Issuer :raises: ~azure.core.exceptions.HttpResponseError @@ -1016,33 +983,19 @@ def update_issuer( """Updates the specified certificate issuer. Performs an update on the specified certificate issuer entity. - THis operation requires the certificates/setissuers permission. - - :param name: The name of the issuer. - :type name: str - :param provider: The issuer provider. - :type provider: str - :param account_id: The username / account name / account key. - :type account_id: str - :param password: The password / secret / account key. - :type password: str - :param organization_id: Id of the organization - :type organization_id: str + This operation requires the certificates/setissuers permission. + + :param str name: The name of the issuer. + :param str provider: The issuer provider. + :param str account_id: The username / account name / account key. + :param str password: The password / secret / account key. + :param str organization_id: Id of the organization :param admin_details: Details of the organization administrators of the certificate issuer. - :type admin_details: Iterable[AdministratorDetails] - :param enabled: Determines whether the issuer is enabled. - :type enabled: bool + :type admin_details: list[~azure.keyvault.certificates.models.AdministratorDetails] + :param bool enabled: Determines whether the issuer is enabled. :return: The updated issuer :rtype: ~azure.keyvault.certificates.models.Issuer :raises: ~azure.core.exceptions.HttpResponseError - - Example: - .. literalinclude:: ../tests/test_examples_certificates.py - :start-after: [START update_issuer] - :end-before: [END update_issuer] - :language: python - :caption: Update an issuer - :dedent: 8 """ if account_id or password: issuer_credentials = self._client.models.IssuerCredentials(account_id=account_id, password=password) @@ -1087,8 +1040,7 @@ def delete_issuer(self, name, **kwargs): Permanently removes the specified certificate issuer from the vault. This operation requires the certificates/manageissuers/deleteissuers permission. - :param name: The name of the issuer. - :type name: str + :param str name: The name of the issuer. :return: Issuer :rtype: ~azure.keyvault.certificates.models.Issuer :raises: ~azure.core.exceptions.HttpResponseError @@ -1118,7 +1070,7 @@ def list_issuers(self, **kwargs): permission. :return: An iterator like instance of Issuers - :rtype: Iterable[~azure.keyvault.certificates.models.Issuer] + :rtype: ~azure.core.paging.ItemPaged[~azure.keyvault.certificates.models.Issuer] :raises: ~azure.core.exceptions.HttpResponseError Example: diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/models.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/models.py index b518a732f66a..fa3cc3d9faba 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/models.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/models.py @@ -22,14 +22,10 @@ class AdministratorDetails(object): """Details of the organization administrator of the certificate issuer. - :param first_name: First name of the issuer. - :type first_name: str - :param last_name: Last name of the issuer. - :type last_name: str - :param email: email of the issuer. - :type email: str - :param phone: phone number of the issuer. - :type phone: str + :param str first_name: First name of the issuer. + :param str last_name: Last name of the issuer. + :param str email: email of the issuer. + :param str phone: phone number of the issuer. """ def __init__(self, first_name=None, last_name=None, email=None, phone=None): @@ -78,10 +74,8 @@ def phone(self): class Error(object): """The key vault server error. - :param code: The error code. - :type code: str - :param message: The error message. - :type message: str + :param str code: The error code. + :param str message: The error message. :param inner_error: The error object itself :type inner_error: ~azure.keyvault.certificates.Error """ @@ -125,10 +119,8 @@ class CertificateBase(object): :param attributes: The certificate management attributes. :type attributes: ~azure.keyvault.certificates.CertificateAttributes - :param cert_id: The certificate id. - :type cert_id: str - :param thumbprint: Thumpbrint of the certificate - :type thumbprint: bytes + :param str cert_id: The certificate id. + :param bytes thumbprint: Thumpbrint of the certificate """ def __init__(self, attributes=None, cert_id=None, thumbprint=None, **kwargs): # type: (Optional[models.CertificateAttributes], Optional[str], Optional[bytes], **Any) -> None @@ -263,18 +255,13 @@ class Certificate(CertificateBase): :param policy: The management policy for the certificate. :type policy: ~azure.keyvault.certificates.CertificatePolicy - :param cert_id: The certificate id. - :type cert_id: str - :param thumbprint: Thumpbrint of the certificate - :type thumbprint: bytes - :param key_id: The key id. - :type key_id: str - :param secret_id: The secret id. - :type secret_id: str + :paramstr cert_id: The certificate id. + :param bytes thumbprint: Thumpbrint of the certificate + :param str key_id: The key id. + :param str secret_id: The secret id. :param attributes: The certificate attributes. :type attributes: ~azure.keyvault.certificates.CertificateAttributes - :param cer: CER contents of the X509 certificate. - :type cer: bytearray + :param bytearray cer: CER contents of the X509 certificate. """ def __init__( self, @@ -327,7 +314,7 @@ def policy(self): # type: () -> CertificatePolicy """The management policy of the certificate. - :rtype: CertificatePolicy + :rtype: ~azure.keyvault.certificates.CertificatePolicy """ return self._policy @@ -345,32 +332,22 @@ class CertificateOperation(object): # pylint:disable=too-many-instance-attributes """A certificate operation is returned in case of asynchronous requests. - :param cert_operation_id: The certificate id. - :type cert_operation_id: str - :param issuer_name: Name of the operation's issuer object or reserved names; - for example, 'Self' or 'Unknown - :type issuer_name: str - :param certificate_type: Type of certificate requested from the issuer provider. - :type certificate_type: str - :param certificate_transparency: Indicates if the certificate this operation is - running for is published to certificate transparency logs. - :type certificate_transparency: bool - :param csr: The certificate signing request (CSR) that is being used in the certificate - operation. - :type csr: bytearray - :param cancellation_requested: Indicates if cancellation was requested on the certificate - operation. - :type cancellation_requested: bool - :param status: Status of the certificate operation. - :type status: str - :param status_details: The status details of the certificate operation - :type status_details: str + :param str cert_operation_id: The certificate id. + :param str issuer_name: Name of the operation's issuer object or reserved names; + for example, 'Self' or 'Unknown + :param str certificate_type: Type of certificate requested from the issuer provider. + :param bool certificate_transparency: Indicates if the certificate this operation is + running for is published to certificate transparency logs. + :param bytearray csr: The certificate signing request (CSR) that is being used in the certificate + operation. + :param bool cancellation_requested: Indicates if cancellation was requested on the certificate + operation. + :param str status: Status of the certificate operation. + :param str status_details: The status details of the certificate operation :param error: Error encountered, if any, during the certificate operation. - :type ~azure.keyvault.certificates.Error - :param target: Location which contains the result of the certificate operation. - :type target: str - :param request_id: Identifier for the certificate operation. - :type request_id: str + :type error: ~azure.keyvault.certificates.Error + :param str target: Location which contains the result of the certificate operation. + :param str request_id: Identifier for the certificate operation. """ def __init__( self, @@ -521,36 +498,30 @@ class CertificatePolicy(object): :param attributes: the certificate attributes. :type attributes: ~azure.keyvault.certificates.models.CertificateAttributes - :param cert_policy_id: The certificate id. - :type cert_policy_id: str + :param str cert_policy_id: The certificate id. :param key_properties: Properties of the key backing the certificate. :type key_properties: ~azure.keyvault.certificates.models.KeyProperties :param content_type: The media type (MIME type) of the secret backing the certificate. - :type content_type: ~azure.keyvault.certificates.SecretContentType or str - :param subject_name: The subject name of the certificate. Should be a valid X509 - distinguished name. - :type subject_name: str - :param validity_in_months: The duration that the certificate is valid in months. - :type validity_in_months: int + :type content_type: ~azure.keyvault.certificates.enums.SecretContentType or str + :param str subject_name: The subject name of the certificate. Should be a valid X509 + distinguished name. + :param int validity_in_months: The duration that the certificate is valid in months. :param lifetime_actions: Actions that will be performed by Key Vault over the lifetime - of a certificate + of a certificate :type lifetime_actions: Iterable[~azure.keyvault.certificates.LifetimeAction] - :param issuer_name: Name of the referenced issuer object or reserved names; for example, - 'Self' or 'Unknown" - :type issuer_name: str - :param certificate_type: Type of certificate to be requested from the issuer provider. - :type certificate_type: str - :param certificate_transparency: Indicates if the certificates generated under this policy - should be published to certificate transparency logs. - :type certificate_transparency: bool + :param str issuer_name: Name of the referenced issuer object or reserved names; for example, + 'Self' or 'Unknown" + :param str certificate_type: Type of certificate to be requested from the issuer provider. + :param bool certificate_transparency: Indicates if the certificates generated under this policy + should be published to certificate transparency logs. :param san_emails: Subject alternative emails of the X509 object. Only one out of san_emails, - san_dns_names, and san_upns may be set. + san_dns_names, and san_upns may be set. :type san_emails: Iterable[str] :param san_dns_names: Subject alternative DNS names of the X509 object. Only one out of - san_emails, san_dns_names, and san_upns may be set. + san_emails, san_dns_names, and san_upns may be set. :type san_dns_names: Iterable[str] :param san_upns: Subject alternative user principal names. Only one out of san_emails, - san_dns_names, and san_upns may be set. + san_dns_names, and san_upns may be set. :type san_upns: Iterable[str] """ # pylint:disable=too-many-instance-attributes @@ -780,19 +751,19 @@ def id(self): @property def key_properties(self): - # type: () -> models.KeyProperties + # type: () -> KeyProperties """Properties of the key backing the certificate. - :rtype: KeyProperties + :rtype: ~azure.keyvault.certificates.models.KeyProperties """ return self._key_properties @property def content_type(self): - # type: () -> models.SecretContentType + # type: () -> SecretContentType """The media type (MIME type). - :rtype: SecretContentType + :rtype: ~azure.keyvault.certificates.enums.SecretContentType """ return self._content_type @@ -844,7 +815,7 @@ def lifetime_actions(self): """Actions and their triggers that will be performed by Key Vault over the lifetime of the certificate. - :rtype: list[LifetimeAction] + :rtype: list[~azure.keyvault.certificates.models.LifetimeAction] """ return self._lifetime_actions @@ -935,12 +906,9 @@ def recovery_level(self): class Contact(object): """The contact information for the vault certificates. - :param email: Email address of a contact for the certificate. - :type email: str - :param name: Name of a contact for the certificate. - :type name: str - :param phone: phone number of a contact for the certificate. - :type phone: str + :param str email: Email address of a contact for the certificate. + :param str name: Name of a contact for the certificate. + :param str phone: phone number of a contact for the certificate. """ def __init__(self, email=None, name=None, phone=None): @@ -985,8 +953,7 @@ def phone(self): class IssuerBase(object): """The base for the issuer containing the issuer metadata. - :param issuer_id: the ID of the issuer. - :type issuer_id: str + :param str issuer_id: the ID of the issuer. """ def __init__(self, issuer_id=None, provider=None): # type: (Optional[str], Optional[str]) -> None @@ -1034,18 +1001,13 @@ class Issuer(IssuerBase): :param attributes: Attributes of the issuer object. Only populated by server. :type attributes: ~azure.keyvault.v7_0.models.IssuerAttributes - :param provider: The issuer provider. - :type provider: str - :param issuer_id: The ID of the issuer. - :type issuer_id: str - :param account_id: The username / account name / account id. - :type account_id: str - :param password: The password / secret / account key. - :type password: str - :param organization_id: The ID of the organization. - :type organization_id: str + :param str provider: The issuer provider. + :param str issuer_id: The ID of the issuer. + :param str account_id: The username / account name / account id. + :param str password: The password / secret / account key. + :param str organization_id: The ID of the organization. :param admin_details: Details of the organization administrator. - :type admin_details: List[~azure.keyvault.certificates.AdministratorDetails] + :type admin_details: list[~azure.keyvault.certificates.AdministratorDetails] """ def __init__( self, @@ -1117,7 +1079,7 @@ def updated(self): @property def account_id(self): # type: () -> str - """THe username/ account name/ account id. + """The username/ account name/ account id. :rtype: str """ @@ -1143,7 +1105,7 @@ def admin_details(self): # type: () -> List[AdministratorDetails] """Details of the organization administrator of this issuer. - :rtype: List[AdministratorDetails] + :rtype: list[~azure.keyvault.certificates.models.AdministratorDetails] """ return self._admin_details @@ -1151,24 +1113,21 @@ def admin_details(self): class KeyProperties(object): """Properties of the key pair backing a certificate. - :param exportable: Indicates if the private key can be exported. - :type exportable: bool + :param bool exportable: Indicates if the private key can be exported. :param key_type: The type of key pair to be used for the certificate. - Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' - :type str or ~azure.keyvault.certificates.enums.JsonWebKeyType - :param key_size: The key size in bits. For example: 2048, 3072, or 4096 - for RSA. - :type key_size: int - :param reuse_key: Indicates if the same key pair will be used on certificate - renewal. - :type reuse_key: bool + Possible values include: 'EC', 'EC-HSM', 'RSA', 'RSA-HSM', 'oct' + :type key_type: str or ~azure.keyvault.certificates.enums.JsonWebKeyType + :param int key_size: The key size in bits. For example: 2048, 3072, or 4096 + for RSA. + :param bool reuse_key: Indicates if the same key pair will be used on certificate + renewal. :param curve: Elliptic curve name. For valid values, see JsonWebKeyCurveName. - Possible values include: 'P-256', 'P-384', 'P-521', 'P-256K' + Possible values include: 'P-256', 'P-384', 'P-521', 'P-256K' :type curve: str or ~azure.keyvault.certificates.enums.JsonWebKeyCurveName :param ekus: The enhanced key usages. :type ekus: list[str] :param key_usage: List of key usages. - :type key_usage: list[str or ~azure.keyvault.certificates.KeyUsageType] + :type key_usage: list[str or ~azure.keyvault.certificates.enums.KeyUsageType] """ def __init__( self, @@ -1200,10 +1159,10 @@ def exportable(self): @property def key_type(self): - # type: () -> models.JsonWebKeyType + # type: () -> JsonWebKeyType """The type of key pair to be used for the certificate. - :rtype: models.JsonWebKeyType + :rtype: ~azure.keyvault.certificates.enums.JsonWebKeyType """ return self._key_type @@ -1227,10 +1186,10 @@ def reuse_key(self): @property def curve(self): - # type: () -> models.JsonWebKeyCurveName + # type: () -> JsonWebKeyCurveName """Elliptic curve name. - :rtype: models.JsonWebKeyCurveName + :rtype: ~azure.keyvault.certificates.enums.JsonWebKeyCurveName """ return self._curve @@ -1248,7 +1207,7 @@ def key_usage(self): # type: () -> list[KeyUsageType] """List of key usages. - :rtype: list[KeyUsageType] + :rtype: list[~azure.keyvault.certificates.enums.KeyUsageType] """ return self._key_usage @@ -1258,15 +1217,13 @@ class LifetimeAction(object): lifetime of a certificate. :param action_type: The type of the action. Possible values include: 'EmailContacts', - 'AutoRenew' + 'AutoRenew' :type action_type: str or ~azure.keyvault.certificates.enums.ActionType - :param lifetime_percentage: Percentage of lifetime at which to trigger. Value - should be between 1 and 99. - :type lifetime_percentage: int - :param days_before_expiry: Days before expiry to attempt renewal. Value should be between - 1 and validity_in_months multiplied by 27. I.e., if validity_in_months is 36, then value - should be between 1 and 972 (36 * 27). - :type days_before_expiry: int + :param int lifetime_percentage: Percentage of lifetime at which to trigger. Value + should be between 1 and 99. + :param int days_before_expiry: Days before expiry to attempt renewal. Value should be between + 1 and validity_in_months multiplied by 27. I.e., if validity_in_months is 36, then value + should be between 1 and 972 (36 * 27). """ def __init__(self, action_type, lifetime_percentage=None, days_before_expiry=None): @@ -1299,7 +1256,7 @@ def action_type(self): """The type of the action that will be executed. Valid values are "EmailContacts" and "AutoRenew" - :rtype: str or models.ActionType + :rtype: str or ~azure.keyvault.certificates.enums.ActionType """ return self._action_type @@ -1310,26 +1267,18 @@ class DeletedCertificate(Certificate): :param attributes: The certificate attributes :type attributes: ~azure.keyvault.certifictaes.CertificateAttributes - :param cert_id: The certificate id. - :type cert_id: str - :param thumbprint: Thumbprint of the certificate. - :type thumbprint: bytes - :param key_id: The key id. - :type key_id: str - :param secret_id: The secret id. - :type secret_id: str + :param str cert_id: The certificate id. + :param bytes thumbprint: Thumbprint of the certificate. + :param str key_id: The key id. + :param str secret_id: The secret id. :param policy: The management policy of the deleted certificate. :type policy: ~azure.keyvault.certificates.CertificatePolicy - :param cer: CER contents of the X509 certificate. - :type cer: bytearray - :param deleted_date: The time when the certificate was deleted, in UTC - :type deleted_date: datetime - :param recovery_id: The url of the recovery object, used to identify and - recover the deleted certificate. - :type recovery_id: str - :param scheduled_purge_date: The time when the certificate is scheduled to - be purged, in UTC - :type scheduled_purge_date: datetime + :param bytearray cer: CER contents of the X509 certificate. + :param datetime deleted_date: The time when the certificate was deleted, in UTC + :param str recovery_id: The url of the recovery object, used to identify and + recover the deleted certificate. + :param datetime scheduled_purge_date: The time when the certificate is scheduled to + be purged, in UTC """ def __init__( diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates.py index d7d34d7f0ce6..31a64b4e2fd6 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates.py @@ -192,7 +192,7 @@ def test_example_certificate_backup_restore(self, vault_client, **kwargs): # backup certificate certificate_backup = certificate_client.backup_certificate(name=cert_name) - # returns the raw byte sof the backed up certificate + # returns the raw bytes of the backed up certificate print(certificate_backup) # [END backup_certificate] diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates_async.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates_async.py index d85ca344b317..5c96935fe5c9 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates_async.py @@ -193,7 +193,7 @@ async def test_example_certificate_backup_restore(self, vault_client, **kwargs): # backup certificate certificate_backup = await certificate_client.backup_certificate(name=cert_name) - # returns the raw byte sof the backed up certificate + # returns the raw bytes of the backed up certificate print(certificate_backup) # [END backup_certificate]