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.

Constructor

DpsCertificateOperations(client, config, serializer, deserializer)

Parameters

Name Description
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

Name Description
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: CertificateBodyDescription, if_match: str | None = None, **kwargs: Any) -> CertificateResponse

Parameters

Name Description
resource_group_name
Required
str

Resource group identifier.

provisioning_service_name
Required
str

The name of the provisioning service.

certificate_name
Required
str

The name of the certificate create or update.

certificate_description
Required

The certificate body.

if_match
str

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

Default value: None

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

CertificateResponse, or the result of cls(response)

Exceptions

Type Description

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: str | None = None, certificate_raw_bytes: bytearray | None = None, certificate_is_verified: bool | None = None, certificate_purpose: str | CertificatePurpose | None = None, certificate_created: datetime | None = None, certificate_last_updated: datetime | None = None, certificate_has_private_key: bool | None = None, certificate_nonce: str | None = None, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

Resource group identifier.

if_match
Required
str

ETag of the certificate.

provisioning_service_name
Required
str

The name of the provisioning service.

certificate_name
Required
str

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

certificate_name1
str

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

Default value: None
certificate_raw_bytes

Raw data within the certificate.

Default value: None
certificate_is_verified

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

Default value: None
certificate_purpose

A description that mentions the purpose of the certificate.

Default value: None
certificate_created

Time the certificate is created.

Default value: None
certificate_last_updated

Time the certificate is last updated.

Default value: None
certificate_has_private_key

Indicates if the certificate contains a private key.

Default value: None
certificate_nonce
str

Random number generated to indicate Proof of Possession.

Default value: None

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

None, or the result of cls(response)

Exceptions

Type Description

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: str | None = None, certificate_raw_bytes: bytearray | None = None, certificate_is_verified: bool | None = None, certificate_purpose: str | CertificatePurpose | None = None, certificate_created: datetime | None = None, certificate_last_updated: datetime | None = None, certificate_has_private_key: bool | None = None, certificate_nonce: str | None = None, **kwargs: Any) -> VerificationCodeResponse

Parameters

Name Description
certificate_name
Required
str

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

if_match
Required
str

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

resource_group_name
Required
str

name of resource group.

provisioning_service_name
Required
str

Name of provisioning service.

certificate_name1
str

Common Name for the certificate.

Default value: None
certificate_raw_bytes

Raw data of certificate.

Default value: None
certificate_is_verified

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

Default value: None
certificate_purpose

Description mentioning the purpose of the certificate.

Default value: None
certificate_created

Certificate creation time.

Default value: None
certificate_last_updated

Certificate last updated time.

Default value: None
certificate_has_private_key

Indicates if the certificate contains private key.

Default value: None
certificate_nonce
str

Random number generated to indicate Proof of Possession.

Default value: None

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

VerificationCodeResponse, or the result of cls(response)

Exceptions

Type Description

get

Get the certificate from the provisioning service.

async get(certificate_name: str, resource_group_name: str, provisioning_service_name: str, if_match: str | None = None, **kwargs: Any) -> CertificateResponse

Parameters

Name Description
certificate_name
Required
str

Name of the certificate to retrieve.

resource_group_name
Required
str

Resource group identifier.

provisioning_service_name
Required
str

Name of the provisioning service the certificate is associated with.

if_match
str

ETag of the certificate.

Default value: None

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

CertificateResponse, or the result of cls(response)

Exceptions

Type Description

list

Get all the certificates tied to the provisioning service.

async list(resource_group_name: str, provisioning_service_name: str, **kwargs: Any) -> CertificateListDescription

Parameters

Name Description
resource_group_name
Required
str

Name of resource group.

provisioning_service_name
Required
str

Name of provisioning service to retrieve certificates for.

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

CertificateListDescription, or the result of cls(response)

Exceptions

Type Description

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: VerificationCodeRequest, certificate_name1: str | None = None, certificate_raw_bytes: bytearray | None = None, certificate_is_verified: bool | None = None, certificate_purpose: str | CertificatePurpose | None = None, certificate_created: datetime | None = None, certificate_last_updated: datetime | None = None, certificate_has_private_key: bool | None = None, certificate_nonce: str | None = None, **kwargs: Any) -> CertificateResponse

Parameters

Name Description
certificate_name
Required
str

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

if_match
Required
str

ETag of the certificate.

resource_group_name
Required
str

Resource group name.

provisioning_service_name
Required
str

Provisioning service name.

request
Required

The name of the certificate.

certificate_name1
str

Common Name for the certificate.

Default value: None
certificate_raw_bytes

Raw data of certificate.

Default value: None
certificate_is_verified

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

Default value: None
certificate_purpose

Describe the purpose of the certificate.

Default value: None
certificate_created

Certificate creation time.

Default value: None
certificate_last_updated

Certificate last updated time.

Default value: None
certificate_has_private_key

Indicates if the certificate contains private key.

Default value: None
certificate_nonce
str

Random number generated to indicate Proof of Possession.

Default value: None

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

CertificateResponse, or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.iothubprovisioningservices.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.10\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv144\\Lib\\site-packages\\azure\\mgmt\\iothubprovisioningservices\\models\\__init__.py'>