CertificatesOperations Class 
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:certificates> attribute.
Constructor
CertificatesOperations(*args, **kwargs)
	Methods
| create_or_update | 
					 Upload the certificate to the IoT hub. Adds new or replaces existing certificate.  | 
			
| delete | 
					 Delete an X509 certificate. Deletes an existing X509 certificate or does nothing if it does not exist.  | 
			
| generate_verification_code | 
					 Generate verification code for proof of possession flow. Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.  | 
			
| get | 
					 Get the certificate. Returns the certificate.  | 
			
| list_by_iot_hub | 
					 Get the certificate list. Returns the list of certificates.  | 
			
| verify | 
					 Verify certificate's private key possession. Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.  | 
			
create_or_update
Upload the certificate to the IoT hub.
Adds new or replaces existing certificate.
async create_or_update(resource_group_name: str, resource_name: str, certificate_name: str, certificate_description: _models.CertificateBodyDescription, if_match: str | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> _models.CertificateDescription
		Parameters
| Name | Description | 
|---|---|
| 
		 resource_group_name 
			
				Required
			 
	 | 
	
		
		 The name of the resource group that contains the IoT hub. Required.  | 
| 
		 resource_name 
			
				Required
			 
	 | 
	
		
		 The name of the IoT hub. Required.  | 
| 
		 certificate_name 
			
				Required
			 
	 | 
	
		
		 The name of the certificate. Required.  | 
| 
		 certificate_description 
			
				Required
			 
	 | 
	
		
		 The certificate body. Is either a CertificateBodyDescription type or a IO[bytes] type. Required.  | 
| 
		 if_match 
	 | 
	
		
		 ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate. Default value is None. Default value: None 
			 | 
Returns
| Type | Description | 
|---|---|
| 
					 CertificateDescription or the result of cls(response)  | 
		
Exceptions
| Type | Description | 
|---|---|
delete
Delete an X509 certificate.
Deletes an existing X509 certificate or does nothing if it does not exist.
async delete(resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, **kwargs: Any) -> None
		Parameters
| Name | Description | 
|---|---|
| 
		 resource_group_name 
			
				Required
			 
	 | 
	
		
		 The name of the resource group that contains the IoT hub. Required.  | 
| 
		 resource_name 
			
				Required
			 
	 | 
	
		
		 The name of the IoT hub. Required.  | 
| 
		 certificate_name 
			
				Required
			 
	 | 
	
		
		 The name of the certificate. Required.  | 
| 
		 if_match 
			
				Required
			 
	 | 
	
		
		 ETag of the Certificate. Required.  | 
Returns
| Type | Description | 
|---|---|
| 
					 None or the result of cls(response)  | 
		
Exceptions
| Type | Description | 
|---|---|
generate_verification_code
Generate verification code for proof of possession flow.
Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.
async generate_verification_code(resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, **kwargs: Any) -> CertificateWithNonceDescription
		Parameters
| Name | Description | 
|---|---|
| 
		 resource_group_name 
			
				Required
			 
	 | 
	
		
		 The name of the resource group that contains the IoT hub. Required.  | 
| 
		 resource_name 
			
				Required
			 
	 | 
	
		
		 The name of the IoT hub. Required.  | 
| 
		 certificate_name 
			
				Required
			 
	 | 
	
		
		 The name of the certificate. Required.  | 
| 
		 if_match 
			
				Required
			 
	 | 
	
		
		 ETag of the Certificate. Required.  | 
Returns
| Type | Description | 
|---|---|
| 
					 CertificateWithNonceDescription or the result of cls(response)  | 
		
Exceptions
| Type | Description | 
|---|---|
get
Get the certificate.
Returns the certificate.
async get(resource_group_name: str, resource_name: str, certificate_name: str, **kwargs: Any) -> CertificateDescription
		Parameters
| Name | Description | 
|---|---|
| 
		 resource_group_name 
			
				Required
			 
	 | 
	
		
		 The name of the resource group that contains the IoT hub. Required.  | 
| 
		 resource_name 
			
				Required
			 
	 | 
	
		
		 The name of the IoT hub. Required.  | 
| 
		 certificate_name 
			
				Required
			 
	 | 
	
		
		 The name of the certificate. Required.  | 
Returns
| Type | Description | 
|---|---|
| 
					 CertificateDescription or the result of cls(response)  | 
		
Exceptions
| Type | Description | 
|---|---|
list_by_iot_hub
Get the certificate list.
Returns the list of certificates.
async list_by_iot_hub(resource_group_name: str, resource_name: str, **kwargs: Any) -> CertificateListDescription
		Parameters
| Name | Description | 
|---|---|
| 
		 resource_group_name 
			
				Required
			 
	 | 
	
		
		 The name of the resource group that contains the IoT hub. Required.  | 
| 
		 resource_name 
			
				Required
			 
	 | 
	
		
		 The name of the IoT hub. Required.  | 
Returns
| Type | Description | 
|---|---|
| 
					 CertificateListDescription or the result of cls(response)  | 
		
Exceptions
| Type | Description | 
|---|---|
verify
Verify certificate's private key possession.
Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.
async verify(resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, certificate_verification_body: _models.CertificateVerificationDescription, *, content_type: str = 'application/json', **kwargs: Any) -> _models.CertificateDescription
		Parameters
| Name | Description | 
|---|---|
| 
		 resource_group_name 
			
				Required
			 
	 | 
	
		
		 The name of the resource group that contains the IoT hub. Required.  | 
| 
		 resource_name 
			
				Required
			 
	 | 
	
		
		 The name of the IoT hub. Required.  | 
| 
		 certificate_name 
			
				Required
			 
	 | 
	
		
		 The name of the certificate. Required.  | 
| 
		 if_match 
			
				Required
			 
	 | 
	
		
		 ETag of the Certificate. Required.  | 
| 
		 certificate_verification_body 
			
				Required
			 
	 | 
	
		
		 The name of the certificate. Is either a CertificateVerificationDescription type or a IO[bytes] type. Required.  | 
Returns
| Type | Description | 
|---|---|
| 
					 CertificateDescription or the result of cls(response)  | 
		
Exceptions
| Type | Description | 
|---|---|
Attributes
models
models = <module 'azure.mgmt.iothub.v2019_03_22.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv151\\Lib\\site-packages\\azure\\mgmt\\iothub\\v2019_03_22\\models\\__init__.py'>