DpsCertificateOperations Class

DpsCertificateOperations 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
DpsCertificateOperations

Constructor

DpsCertificateOperations(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 provisioning service.

Add new certificate or update an existing certificate.

delete

Delete the Provisioning Service Certificate.

Deletes the specified certificate associated with the Provisioning Service.

generate_verification_code

Generate verification code for Proof of Possession.

get

Get the certificate from the provisioning service.

list

Get all the certificates tied to the provisioning service.

verify_certificate

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 provisioning service.

Add new certificate or update an existing certificate.

async create_or_update(resource_group_name: str, provisioning_service_name: str, certificate_name: str, certificate_description: azure.mgmt.iothubprovisioningservices.models._models_py3.CertificateBodyDescription, if_match: Optional[str] = None, **kwargs: Any) -> azure.mgmt.iothubprovisioningservices.models._models_py3.CertificateResponse

Parameters

resource_group_name
str
Required

Resource group identifier.

provisioning_service_name
str
Required

The name of the provisioning service.

certificate_name
str
Required

The name of the certificate create or update.

certificate_description
CertificateBodyDescription
Required

The certificate body.

if_match
str
Required

ETag of the certificate. This is required to update an existing certificate, and ignored while creating a brand new certificate.

cls
callable

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

Returns

CertificateResponse, or the result of cls(response)

Return type

Exceptions

delete

Delete the Provisioning Service Certificate.

Deletes the specified certificate associated with the Provisioning Service.

async delete(resource_group_name: str, if_match: str, provisioning_service_name: str, certificate_name: str, certificate_name1: Optional[str] = None, certificate_raw_bytes: Optional[bytearray] = None, certificate_is_verified: Optional[bool] = None, certificate_purpose: Optional[Union[str, azure.mgmt.iothubprovisioningservices.models._iot_dps_client_enums.CertificatePurpose]] = None, certificate_created: Optional[datetime.datetime] = None, certificate_last_updated: Optional[datetime.datetime] = None, certificate_has_private_key: Optional[bool] = None, certificate_nonce: Optional[str] = None, **kwargs: Any) -> None

Parameters

resource_group_name
str
Required

Resource group identifier.

if_match
str
Required

ETag of the certificate.

provisioning_service_name
str
Required

The name of the provisioning service.

certificate_name
str
Required

This is a mandatory field, and is the logical name of the certificate that the provisioning service will access by.

certificate_name1
str
Required

This is optional, and it is the Common Name of the certificate.

certificate_raw_bytes
bytearray
Required

Raw data within the certificate.

certificate_is_verified
bool
Required

Indicates if certificate has been verified by owner of the private key.

certificate_purpose
str or CertificatePurpose
Required

A description that mentions the purpose of the certificate.

certificate_created
datetime
Required

Time the certificate is created.

certificate_last_updated
datetime
Required

Time the certificate is last updated.

certificate_has_private_key
bool
Required

Indicates if the certificate contains a private key.

certificate_nonce
str
Required

Random number generated to indicate Proof of Possession.

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.

async generate_verification_code(certificate_name: str, if_match: str, resource_group_name: str, provisioning_service_name: str, certificate_name1: Optional[str] = None, certificate_raw_bytes: Optional[bytearray] = None, certificate_is_verified: Optional[bool] = None, certificate_purpose: Optional[Union[str, azure.mgmt.iothubprovisioningservices.models._iot_dps_client_enums.CertificatePurpose]] = None, certificate_created: Optional[datetime.datetime] = None, certificate_last_updated: Optional[datetime.datetime] = None, certificate_has_private_key: Optional[bool] = None, certificate_nonce: Optional[str] = None, **kwargs: Any) -> azure.mgmt.iothubprovisioningservices.models._models_py3.VerificationCodeResponse

Parameters

certificate_name
str
Required

The mandatory logical name of the certificate, that the provisioning service uses to access.

if_match
str
Required

ETag of the certificate. This is required to update an existing certificate, and ignored while creating a brand new certificate.

resource_group_name
str
Required

name of resource group.

provisioning_service_name
str
Required

Name of provisioning service.

certificate_name1
str
Required

Common Name for the certificate.

certificate_raw_bytes
bytearray
Required

Raw data of certificate.

certificate_is_verified
bool
Required

Indicates if the certificate has been verified by owner of the private key.

certificate_purpose
str or CertificatePurpose
Required

Description mentioning the purpose of the certificate.

certificate_created
datetime
Required

Certificate creation time.

certificate_last_updated
datetime
Required

Certificate last updated time.

certificate_has_private_key
bool
Required

Indicates if the certificate contains private key.

certificate_nonce
str
Required

Random number generated to indicate Proof of Possession.

cls
callable

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

Returns

VerificationCodeResponse, or the result of cls(response)

Return type

Exceptions

get

Get the certificate from the provisioning service.

async get(certificate_name: str, resource_group_name: str, provisioning_service_name: str, if_match: Optional[str] = None, **kwargs: Any) -> azure.mgmt.iothubprovisioningservices.models._models_py3.CertificateResponse

Parameters

certificate_name
str
Required

Name of the certificate to retrieve.

resource_group_name
str
Required

Resource group identifier.

provisioning_service_name
str
Required

Name of the provisioning service the certificate is associated with.

if_match
str
Required

ETag of the certificate.

cls
callable

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

Returns

CertificateResponse, or the result of cls(response)

Return type

Exceptions

list

Get all the certificates tied to the provisioning service.

async list(resource_group_name: str, provisioning_service_name: str, **kwargs: Any) -> azure.mgmt.iothubprovisioningservices.models._models_py3.CertificateListDescription

Parameters

resource_group_name
str
Required

Name of resource group.

provisioning_service_name
str
Required

Name of provisioning service to retrieve certificates for.

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_certificate

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_certificate(certificate_name: str, if_match: str, resource_group_name: str, provisioning_service_name: str, request: azure.mgmt.iothubprovisioningservices.models._models_py3.VerificationCodeRequest, certificate_name1: Optional[str] = None, certificate_raw_bytes: Optional[bytearray] = None, certificate_is_verified: Optional[bool] = None, certificate_purpose: Optional[Union[str, azure.mgmt.iothubprovisioningservices.models._iot_dps_client_enums.CertificatePurpose]] = None, certificate_created: Optional[datetime.datetime] = None, certificate_last_updated: Optional[datetime.datetime] = None, certificate_has_private_key: Optional[bool] = None, certificate_nonce: Optional[str] = None, **kwargs: Any) -> azure.mgmt.iothubprovisioningservices.models._models_py3.CertificateResponse

Parameters

certificate_name
str
Required

The mandatory logical name of the certificate, that the provisioning service uses to access.

if_match
str
Required

ETag of the certificate.

resource_group_name
str
Required

Resource group name.

provisioning_service_name
str
Required

Provisioning service name.

request
VerificationCodeRequest
Required

The name of the certificate.

certificate_name1
str
Required

Common Name for the certificate.

certificate_raw_bytes
bytearray
Required

Raw data of certificate.

certificate_is_verified
bool
Required

Indicates if the certificate has been verified by owner of the private key.

certificate_purpose
str or CertificatePurpose
Required

Describe the purpose of the certificate.

certificate_created
datetime
Required

Certificate creation time.

certificate_last_updated
datetime
Required

Certificate last updated time.

certificate_has_private_key
bool
Required

Indicates if the certificate contains private key.

certificate_nonce
str
Required

Random number generated to indicate Proof of Possession.

cls
callable

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

Returns

CertificateResponse, or the result of cls(response)

Return type

Exceptions

Attributes

models

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