JobsOperations Class

JobsOperations operations.

Inheritance
builtins.object
JobsOperations

Constructor

JobsOperations(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

api_version

Version of the Api. Constant value: "2021-04-12".

Methods

cancel_import_export_job

Cancels an import or export job in the IoT Hub.

cancel_scheduled_job

Cancels a scheduled job on the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-jobs for more information.

create_import_export_job

Creates a new import or export job on the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities for more information.

create_scheduled_job

Creates a new job to schedule twin updates or direct methods on the IoT Hub at a scheduled time. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-jobs for more information.

get_import_export_job

Gets the status of an import or export job in the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities for more information.

get_import_export_jobs

Gets the status of all import and export jobs in the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities for more information.

get_scheduled_job

Gets details of a scheduled job from the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-jobs for more information.

query_scheduled_jobs

Gets the information about jobs using an IoT Hub query. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language for more information.

cancel_import_export_job

Cancels an import or export job in the IoT Hub.

cancel_import_export_job(id, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the job.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

object or ClientRawResponse if raw=true

Return type

Exceptions

cancel_scheduled_job

Cancels a scheduled job on the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-jobs for more information.

cancel_scheduled_job(id, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the job.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

JobResponse or ClientRawResponse if raw=true

Return type

Exceptions

create_import_export_job

Creates a new import or export job on the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities for more information.

create_import_export_job(job_properties, custom_headers=None, raw=False, **operation_config)

Parameters

job_properties
JobProperties
Required

The job specifications.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

JobProperties or ClientRawResponse if raw=true

Return type

Exceptions

create_scheduled_job

Creates a new job to schedule twin updates or direct methods on the IoT Hub at a scheduled time. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-jobs for more information.

create_scheduled_job(id, job_request, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the job.

job_request
JobRequest
Required

The job request info.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

JobResponse or ClientRawResponse if raw=true

Return type

Exceptions

get_import_export_job

Gets the status of an import or export job in the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities for more information.

get_import_export_job(id, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the job.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

JobProperties or ClientRawResponse if raw=true

Return type

Exceptions

get_import_export_jobs

Gets the status of all import and export jobs in the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities for more information.

get_import_export_jobs(custom_headers=None, raw=False, **operation_config)

Parameters

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

list or ClientRawResponse if raw=true

Return type

Exceptions

get_scheduled_job

Gets details of a scheduled job from the IoT Hub. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-jobs for more information.

get_scheduled_job(id, custom_headers=None, raw=False, **operation_config)

Parameters

id
str
Required

The unique identifier of the job.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

JobResponse or ClientRawResponse if raw=true

Return type

Exceptions

query_scheduled_jobs

Gets the information about jobs using an IoT Hub query. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language for more information.

query_scheduled_jobs(job_type=None, job_status=None, custom_headers=None, raw=False, **operation_config)

Parameters

job_type
str
default value: None

The job type. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-jobs#querying-for-progress-on-jobs for a list of possible job types.

job_status
str
default value: None

The job status. See https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-jobs#querying-for-progress-on-jobs for a list of possible statuses.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

QueryResult or ClientRawResponse if raw=true

Return type

Exceptions

Attributes

models

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