JobProperties Class

JobProperties.

Inheritance
msrest.serialization.Model
JobProperties

Constructor

JobProperties(*, job_id: str = None, start_time_utc=None, end_time_utc=None, type=None, status=None, progress: int = None, input_blob_container_uri: str = None, input_blob_name: str = None, output_blob_container_uri: str = None, output_blob_name: str = None, exclude_keys_in_export: bool = None, storage_authentication_type=None, identity=None, failure_reason: str = None, include_configurations: bool = None, configurations_blob_name: str = None, **kwargs)

Parameters

Name Description
job_id
Required
str

The unique identifier of the job.

start_time_utc
Required

System generated. Ignored at creation. The start date and time of the job in UTC.

end_time_utc
Required

System generated. Ignored at creation. The end date and time of the job in UTC.

type
Required
str or <xref:protocol.models.enum>

The job type. Possible values include: 'unknown', 'export', 'import', 'backup', 'readDeviceProperties', 'writeDeviceProperties', 'updateDeviceConfiguration', 'rebootDevice', 'factoryResetDevice', 'firmwareUpdate', 'scheduleDeviceMethod', 'scheduleUpdateTwin', 'restoreFromBackup', 'failoverDataCopy'

status
Required
str or <xref:protocol.models.enum>

System generated. Ignored at creation. The status of the job. Possible values include: 'unknown', 'enqueued', 'running', 'completed', 'failed', 'cancelled', 'scheduled', 'queued'

progress
Required
int

System generated. Ignored at creation. The percentage of job completion.

input_blob_container_uri
Required
str

The URI containing SAS token to a blob container that contains registry data to sync.

input_blob_name
Required
str

The blob name to use when importing from the input blob container.

output_blob_container_uri
Required
str

The SAS token to access the blob container. This is used to output the status and results of the job.

output_blob_name
Required
str

The blob name that will be created in the output blob container. This blob will contain the exported device registry information for the IoT Hub.

exclude_keys_in_export
Required

Optional for export jobs; ignored for other jobs. If not specified, the service defaults to false. If false, authorization keys are included in export output. Keys are exported as null otherwise.

storage_authentication_type
Required
str or <xref:protocol.models.enum>

The authentication type used for connecting to the storage account. Possible values include: 'keyBased', 'identityBased'

identity
Required
failure_reason
Required
str

System genereated. Ignored at creation. The reason for failure, if a failure occurred.

include_configurations
Required

Defaults to false. If true, then configurations are included in the data export/import.

configurations_blob_name
Required
str

Defaults to configurations.txt. Specifies the name of the blob to use when exporting/importing configurations.

Keyword-Only Parameters

Name Description
job_id
Required
start_time_utc
Required
end_time_utc
Required
type
Required
status
Required
progress
Required
input_blob_container_uri
Required
input_blob_name
Required
output_blob_container_uri
Required
output_blob_name
Required
exclude_keys_in_export
Required
storage_authentication_type
Required
identity
Required
failure_reason
Required
include_configurations
Required
configurations_blob_name
Required

Methods

as_dict

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains 'type' with the msrest type and 'key' with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

deserialize

Parse a str using the RestAPI syntax and return a model.

enable_additional_properties_sending
from_dict

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

is_xml_model
serialize

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

validate

Validate this model recursively and return a list of ValidationError.

as_dict

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains 'type' with the msrest type and 'key' with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Parameters

Name Description
key_transformer
<xref:function>

A key transformer function.

keep_readonly
Default value: True

Returns

Type Description

A dict JSON compatible object

deserialize

Parse a str using the RestAPI syntax and return a model.

deserialize(data, content_type=None)

Parameters

Name Description
data
Required
str

A str using RestAPI structure. JSON by default.

content_type
str

JSON by default, set application/xml if XML.

Default value: None

Returns

Type Description

An instance of this model

Exceptions

Type Description
DeserializationError if something went wrong

enable_additional_properties_sending

enable_additional_properties_sending()

from_dict

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

from_dict(data, key_extractors=None, content_type=None)

Parameters

Name Description
data
Required

A dict using RestAPI structure

content_type
str

JSON by default, set application/xml if XML.

Default value: None
key_extractors
Default value: None

Returns

Type Description

An instance of this model

Exceptions

Type Description
DeserializationError if something went wrong

is_xml_model

is_xml_model()

serialize

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

serialize(keep_readonly=False, **kwargs)

Parameters

Name Description
keep_readonly

If you want to serialize the readonly attributes

Default value: False

Returns

Type Description

A dict JSON compatible object

validate

Validate this model recursively and return a list of ValidationError.

validate()

Returns

Type Description

A list of validation error