CertificatesOperations Class

CertificatesOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
CertificatesOperations

Constructor

CertificatesOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

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: azure.mgmt.iothub.v2021_03_31.models._models_py3.CertificateDescription, if_match: Optional[str] = None, **kwargs: Any) -> azure.mgmt.iothub.v2021_03_31.models._models_py3.CertificateDescription

Parameters

resource_group_name
str
Required

The name of the resource group that contains the IoT hub.

resource_name
str
Required

The name of the IoT hub.

certificate_name
str
Required

The name of the certificate.

certificate_description
CertificateDescription
Required

The certificate body.

if_match
str
Required

ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate.

cls
callable

A custom type or function that will be passed the direct response

Returns

CertificateDescription, or the result of cls(response)

Return type

Exceptions

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

resource_group_name
str
Required

The name of the resource group that contains the IoT hub.

resource_name
str
Required

The name of the IoT hub.

certificate_name
str
Required

The name of the certificate.

if_match
str
Required

ETag of the Certificate.

cls
callable

A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

Exceptions

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) -> azure.mgmt.iothub.v2021_03_31.models._models_py3.CertificateWithNonceDescription

Parameters

resource_group_name
str
Required

The name of the resource group that contains the IoT hub.

resource_name
str
Required

The name of the IoT hub.

certificate_name
str
Required

The name of the certificate.

if_match
str
Required

ETag of the Certificate.

cls
callable

A custom type or function that will be passed the direct response

Returns

CertificateWithNonceDescription, or the result of cls(response)

Return type

Exceptions

get

Get the certificate.

Returns the certificate.

async get(resource_group_name: str, resource_name: str, certificate_name: str, **kwargs: Any) -> azure.mgmt.iothub.v2021_03_31.models._models_py3.CertificateDescription

Parameters

resource_group_name
str
Required

The name of the resource group that contains the IoT hub.

resource_name
str
Required

The name of the IoT hub.

certificate_name
str
Required

The name of the certificate.

cls
callable

A custom type or function that will be passed the direct response

Returns

CertificateDescription, or the result of cls(response)

Return type

Exceptions

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) -> azure.mgmt.iothub.v2021_03_31.models._models_py3.CertificateListDescription

Parameters

resource_group_name
str
Required

The name of the resource group that contains the IoT hub.

resource_name
str
Required

The name of the IoT hub.

cls
callable

A custom type or function that will be passed the direct response

Returns

CertificateListDescription, or the result of cls(response)

Return type

Exceptions

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: azure.mgmt.iothub.v2021_03_31.models._models_py3.CertificateVerificationDescription, **kwargs: Any) -> azure.mgmt.iothub.v2021_03_31.models._models_py3.CertificateDescription

Parameters

resource_group_name
str
Required

The name of the resource group that contains the IoT hub.

resource_name
str
Required

The name of the IoT hub.

certificate_name
str
Required

The name of the certificate.

if_match
str
Required

ETag of the Certificate.

certificate_verification_body
CertificateVerificationDescription
Required

The name of the certificate.

cls
callable

A custom type or function that will be passed the direct response

Returns

CertificateDescription, or the result of cls(response)

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.iothub.v2021_03_31.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\iothub\\v2021_03_31\\models\\__init__.py'>