Certificates interface

Interface representing a Certificates.

Methods

createOrUpdate(string, string, string, CertificateBodyDescription, CertificatesCreateOrUpdateOptionalParams)

Adds new or replaces existing certificate.

delete(string, string, string, string, CertificatesDeleteOptionalParams)

Deletes an existing X509 certificate or does nothing if it does not exist.

generateVerificationCode(string, string, string, string, CertificatesGenerateVerificationCodeOptionalParams)

Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.

get(string, string, string, CertificatesGetOptionalParams)

Returns the certificate.

listByIotHub(string, string, CertificatesListByIotHubOptionalParams)

Returns the list of certificates.

verify(string, string, string, string, CertificateVerificationDescription, CertificatesVerifyOptionalParams)

Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.

Method Details

createOrUpdate(string, string, string, CertificateBodyDescription, CertificatesCreateOrUpdateOptionalParams)

Adds new or replaces existing certificate.

function createOrUpdate(resourceGroupName: string, resourceName: string, certificateName: string, certificateDescription: CertificateBodyDescription, options?: CertificatesCreateOrUpdateOptionalParams): Promise<CertificateDescription>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

certificateName

string

The name of the certificate

certificateDescription
CertificateBodyDescription

The certificate body.

options
CertificatesCreateOrUpdateOptionalParams

The options parameters.

Returns

delete(string, string, string, string, CertificatesDeleteOptionalParams)

Deletes an existing X509 certificate or does nothing if it does not exist.

function delete(resourceGroupName: string, resourceName: string, certificateName: string, ifMatch: string, options?: CertificatesDeleteOptionalParams): Promise<void>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

certificateName

string

The name of the certificate

ifMatch

string

ETag of the Certificate.

options
CertificatesDeleteOptionalParams

The options parameters.

Returns

Promise<void>

generateVerificationCode(string, string, string, string, CertificatesGenerateVerificationCodeOptionalParams)

Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.

function generateVerificationCode(resourceGroupName: string, resourceName: string, certificateName: string, ifMatch: string, options?: CertificatesGenerateVerificationCodeOptionalParams): Promise<CertificateWithNonceDescription>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

certificateName

string

The name of the certificate

ifMatch

string

ETag of the Certificate.

options
CertificatesGenerateVerificationCodeOptionalParams

The options parameters.

Returns

get(string, string, string, CertificatesGetOptionalParams)

Returns the certificate.

function get(resourceGroupName: string, resourceName: string, certificateName: string, options?: CertificatesGetOptionalParams): Promise<CertificateDescription>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

certificateName

string

The name of the certificate

options
CertificatesGetOptionalParams

The options parameters.

Returns

listByIotHub(string, string, CertificatesListByIotHubOptionalParams)

Returns the list of certificates.

function listByIotHub(resourceGroupName: string, resourceName: string, options?: CertificatesListByIotHubOptionalParams): Promise<CertificateListDescription>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

options
CertificatesListByIotHubOptionalParams

The options parameters.

Returns

verify(string, string, string, string, CertificateVerificationDescription, CertificatesVerifyOptionalParams)

Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.

function verify(resourceGroupName: string, resourceName: string, certificateName: string, ifMatch: string, certificateVerificationBody: CertificateVerificationDescription, options?: CertificatesVerifyOptionalParams): Promise<CertificateDescription>

Parameters

resourceGroupName

string

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

resourceName

string

The name of the IoT hub.

certificateName

string

The name of the certificate

ifMatch

string

ETag of the Certificate.

certificateVerificationBody
CertificateVerificationDescription

The name of the certificate

options
CertificatesVerifyOptionalParams

The options parameters.

Returns