azure.mgmt.iothubprovisioningservices.operations module

class azure.mgmt.iothubprovisioningservices.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – The version of the API. Constant value: “2018-01-22”.

list(custom_headers=None, raw=False, **operation_config)[source]

Lists all of the available Microsoft.Devices REST API operations.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Operation

Return type

OperationPaged[Operation]

Raises

ErrorDetailsException

models = <module 'azure.mgmt.iothubprovisioningservices.models' from '/usr/lib/python3/dist-packages/azure/mgmt/iothubprovisioningservices/models/__init__.py'>
class azure.mgmt.iothubprovisioningservices.operations.DpsCertificateOperations(client, config, serializer, deserializer)[source]

Bases: object

DpsCertificateOperations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – The version of the API. Constant value: “2018-01-22”.

create_or_update(resource_group_name, provisioning_service_name, certificate_name, if_match=None, certificate=None, custom_headers=None, raw=False, **operation_config)[source]

Upload the certificate to the provisioning service.

Add new certificate or update an existing certificate.

Parameters
  • resource_group_name (str) – Resource group identifier.

  • provisioning_service_name (str) – The name of the provisioning service.

  • certificate_name (str) – The name of the certificate create or update.

  • if_match (str) – ETag of the certificate. This is required to update an existing certificate, and ignored while creating a brand new certificate.

  • certificate (str) – Base-64 representation of the X509 leaf certificate .cer file or just .pem file content.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

CertificateResponse or ClientRawResponse if raw=true

Return type

CertificateResponse or ClientRawResponse

Raises

ErrorDetailsException

delete(resource_group_name, if_match, provisioning_service_name, certificate_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, custom_headers=None, raw=False, **operation_config)[source]

Delete the Provisioning Service Certificate.

Deletes the specified certificate assosciated with the Provisioning Service.

Parameters
  • resource_group_name (str) – Resource group identifier.

  • if_match (str) – ETag of the certificate

  • provisioning_service_name (str) – The name of the provisioning service.

  • certificate_name (str) – This is a mandatory field, and is the logical name of the certificate that the provisioning service will access by.

  • certificatename (str) – This is optional, and it is the Common Name of the certificate.

  • certificateraw_bytes (bytearray) – Raw data within the certificate.

  • certificateis_verified (bool) – Indicates if certificate has been verified by owner of the private key.

  • certificatepurpose (str or CertificatePurpose) – A description that mentions the purpose of the certificate. Possible values include: ‘clientAuthentication’, ‘serverAuthentication’

  • certificatecreated (datetime) – Time the certificate is created.

  • certificatelast_updated (datetime) – Time the certificate is last updated.

  • certificatehas_private_key (bool) – Indicates if the certificate contains a private key.

  • certificatenonce (str) – Random number generated to indicate Proof of Possession.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

Raises

ErrorDetailsException

generate_verification_code(certificate_name, if_match, resource_group_name, provisioning_service_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, custom_headers=None, raw=False, **operation_config)[source]

Generate verification code for Proof of Possession.

Parameters
  • certificate_name (str) – The mandatory logical name of the certificate, that the provisioning service uses to access.

  • if_match (str) – ETag of the certificate. This is required to update an existing certificate, and ignored while creating a brand new certificate.

  • resource_group_name (str) – name of resource group.

  • provisioning_service_name (str) – Name of provisioning service.

  • certificatename (str) – Common Name for the certificate.

  • certificateraw_bytes (bytearray) – Raw data of certificate.

  • certificateis_verified (bool) – Indicates if the certificate has been verified by owner of the private key.

  • certificatepurpose (str or CertificatePurpose) – Description mentioning the purpose of the certificate. Possible values include: ‘clientAuthentication’, ‘serverAuthentication’

  • certificatecreated (datetime) – Certificate creation time.

  • certificatelast_updated (datetime) – Certificate last updated time.

  • certificatehas_private_key (bool) – Indicates if the certificate contains private key.

  • certificatenonce (str) – Random number generated to indicate Proof of Possession.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

VerificationCodeResponse or ClientRawResponse if raw=true

Return type

VerificationCodeResponse or ClientRawResponse

Raises

ErrorDetailsException

get(certificate_name, resource_group_name, provisioning_service_name, if_match=None, custom_headers=None, raw=False, **operation_config)[source]

Get the certificate from the provisioning service.

Parameters
  • certificate_name (str) – Name of the certificate to retrieve.

  • resource_group_name (str) – Resource group identifier.

  • provisioning_service_name (str) – Name of the provisioning service the certificate is associated with.

  • if_match (str) – ETag of the certificate.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

CertificateResponse or ClientRawResponse if raw=true

Return type

CertificateResponse or ClientRawResponse

Raises

ErrorDetailsException

list(resource_group_name, provisioning_service_name, custom_headers=None, raw=False, **operation_config)[source]

Get all the certificates tied to the provisioning service.

Parameters
  • resource_group_name (str) – Name of resource group.

  • provisioning_service_name (str) – Name of provisioning service to retrieve certificates for.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

CertificateListDescription or ClientRawResponse if raw=true

Return type

CertificateListDescription or ClientRawResponse

Raises

ErrorDetailsException

verify_certificate(certificate_name, if_match, resource_group_name, provisioning_service_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, certificate=None, custom_headers=None, raw=False, **operation_config)[source]

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.

Parameters
  • certificate_name (str) – The mandatory logical name of the certificate, that the provisioning service uses to access.

  • if_match (str) – ETag of the certificate.

  • resource_group_name (str) – Resource group name.

  • provisioning_service_name (str) – Provisioning service name.

  • certificatename (str) – Common Name for the certificate.

  • certificateraw_bytes (bytearray) – Raw data of certificate.

  • certificateis_verified (bool) – Indicates if the certificate has been verified by owner of the private key.

  • certificatepurpose (str or CertificatePurpose) – Describe the purpose of the certificate. Possible values include: ‘clientAuthentication’, ‘serverAuthentication’

  • certificatecreated (datetime) – Certificate creation time.

  • certificatelast_updated (datetime) – Certificate last updated time.

  • certificatehas_private_key (bool) – Indicates if the certificate contains private key.

  • certificatenonce (str) – Random number generated to indicate Proof of Possession.

  • certificate (str) – base-64 representation of X509 certificate .cer file or just .pem file content.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

CertificateResponse or ClientRawResponse if raw=true

Return type

CertificateResponse or ClientRawResponse

Raises

ErrorDetailsException

models = <module 'azure.mgmt.iothubprovisioningservices.models' from '/usr/lib/python3/dist-packages/azure/mgmt/iothubprovisioningservices/models/__init__.py'>
class azure.mgmt.iothubprovisioningservices.operations.IotDpsResourceOperations(client, config, serializer, deserializer)[source]

Bases: object

IotDpsResourceOperations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – The version of the API. Constant value: “2018-01-22”.

check_provisioning_service_name_availability(name, custom_headers=None, raw=False, **operation_config)[source]

Check if a provisioning service name is available.

Check if a provisioning service name is available. This will validate if the name is syntactically valid and if the name is usable.

Parameters
  • name (str) – The name of the Provisioning Service to check.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

NameAvailabilityInfo or ClientRawResponse if raw=true

Return type

NameAvailabilityInfo or ClientRawResponse

Raises

ErrorDetailsException

create_or_update(resource_group_name, provisioning_service_name, iot_dps_description, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Create or update the metadata of the provisioning service.

Create or update the metadata of the provisioning service. The usual pattern to modify a property is to retrieve the provisioning service metadata and security metadata, and then combine them with the modified values in a new body to update the provisioning service.

Parameters
  • resource_group_name (str) – Resource group identifier.

  • provisioning_service_name (str) – Name of provisioning service to create or update.

  • iot_dps_description (ProvisioningServiceDescription) – Description of the provisioning service to create or update.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns ProvisioningServiceDescription or ClientRawResponse<ProvisioningServiceDescription> if raw==True

Return type

AzureOperationPoller[ProvisioningServiceDescription] or AzureOperationPoller[ClientRawResponse[ProvisioningServiceDescription]]

Raises

ErrorDetailsException

delete(provisioning_service_name, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Delete the Provisioning Service.

Deletes the Provisioning Service.

Parameters
  • provisioning_service_name (str) – Name of provisioning service to delete.

  • resource_group_name (str) – Resource group identifier.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True

Return type

AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]

Raises

ErrorDetailsException

get(provisioning_service_name, resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Get the non-security related metadata of the provisioning service.

Get the metadata of the provisioning service without SAS keys.

Parameters
  • provisioning_service_name (str) – Name of the provisioning service to retrieve.

  • resource_group_name (str) – Resource group name.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

ProvisioningServiceDescription or ClientRawResponse if raw=true

Return type

ProvisioningServiceDescription or ClientRawResponse

Raises

ErrorDetailsException

get_operation_result(operation_id, resource_group_name, provisioning_service_name, asyncinfo='true', custom_headers=None, raw=False, **operation_config)[source]

Gets the status of a long running operation, such as create, update or delete a provisioning service.

Parameters
  • operation_id (str) – Operation id corresponding to long running operation. Use this to poll for the status.

  • resource_group_name (str) – Resource group identifier.

  • provisioning_service_name (str) – Name of provisioning service that the operation is running on.

  • asyncinfo (str) – Async header used to poll on the status of the operation, obtained while creating the long running operation.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

AsyncOperationResult or ClientRawResponse if raw=true

Return type

AsyncOperationResult or ClientRawResponse

Raises

ErrorDetailsException

list_by_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Get a list of all provisioning services in the given resource group.

Parameters
  • resource_group_name (str) – Resource group identifier.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of ProvisioningServiceDescription

Return type

ProvisioningServiceDescriptionPaged[ProvisioningServiceDescription]

Raises

ErrorDetailsException

list_by_subscription(custom_headers=None, raw=False, **operation_config)[source]

Get all the provisioning services in a subscription.

List all the provisioning services for a given subscription id.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of ProvisioningServiceDescription

Return type

ProvisioningServiceDescriptionPaged[ProvisioningServiceDescription]

Raises

ErrorDetailsException

list_keys(provisioning_service_name, resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Get the security metadata for a provisioning service.

List the primary and secondary keys for a provisioning service.

Parameters
  • provisioning_service_name (str) – The provisioning service name to get the shared access keys for.

  • resource_group_name (str) – resource group name

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of SharedAccessSignatureAuthorizationRuleAccessRightsDescription

Return type

SharedAccessSignatureAuthorizationRuleAccessRightsDescriptionPaged[SharedAccessSignatureAuthorizationRuleAccessRightsDescription]

Raises

ErrorDetailsException

list_keys_for_key_name(provisioning_service_name, key_name, resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Get a shared access policy by name from a provisioning service.

List primary and secondary keys for a specific key name.

Parameters
  • provisioning_service_name (str) – Name of the provisioning service.

  • key_name (str) – Logical key name to get key-values for.

  • resource_group_name (str) – The name of the resource group that contains the provisioning service.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

SharedAccessSignatureAuthorizationRuleAccessRightsDescription or ClientRawResponse if raw=true

Return type

SharedAccessSignatureAuthorizationRuleAccessRightsDescription or ClientRawResponse

Raises

ErrorDetailsException

list_valid_skus(provisioning_service_name, resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Get the list of valid SKUs for a provisioning service.

Gets the list of valid SKUs and tiers for a provisioning service.

Parameters
  • provisioning_service_name (str) – Name of provisioning service.

  • resource_group_name (str) – Name of resource group.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of IotDpsSkuDefinition

Return type

IotDpsSkuDefinitionPaged[IotDpsSkuDefinition]

Raises

ErrorDetailsException

update(resource_group_name, provisioning_service_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Update an existing provisioning service’s tags.

Update an existing provisioning service’s tags. to update other fields use the CreateOrUpdate method.

Parameters
  • resource_group_name (str) – Resource group identifier.

  • provisioning_service_name (str) – Name of provisioning service to create or update.

  • tags (dict[str, str]) – Resource tags

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns ProvisioningServiceDescription or ClientRawResponse<ProvisioningServiceDescription> if raw==True

Return type

AzureOperationPoller[ProvisioningServiceDescription] or AzureOperationPoller[ClientRawResponse[ProvisioningServiceDescription]]

Raises

CloudError

models = <module 'azure.mgmt.iothubprovisioningservices.models' from '/usr/lib/python3/dist-packages/azure/mgmt/iothubprovisioningservices/models/__init__.py'>