azure.iot.deviceupdate.operations package

class azure.iot.deviceupdate.operations.UpdatesOperations(client, config, serializer, deserializer)[source]

UpdatesOperations 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.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

delete_update(provider: str, name: str, version: str, **kwargs: Any)None[source]

Delete a specific update version.

Parameters
  • provider (str) – Update provider.

  • name (str) – Update name.

  • version (str) – Update version.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

get_file(provider: str, name: str, version: str, file_id: str, access_condition: Optional[‘_models.AccessCondition’] = None, **kwargs: Any) → Optional[‘_models.File’][source]

Get a specific update file from the version.

Parameters
  • provider (str) – Update provider.

  • name (str) – Update name.

  • version (str) – Update version.

  • file_id (str) – File identifier.

  • access_condition (AccessCondition) – Parameter group.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

File, or the result of cls(response)

Return type

File or None

Raises

~azure.core.exceptions.HttpResponseError

get_files(provider: str, name: str, version: str, **kwargs: Any) → Iterable[‘_models.PageableListOfStrings’][source]

Get a list of all update file identifiers for the specified version.

Parameters
  • provider (str) – Update provider.

  • name (str) – Update name.

  • version (str) – Update version.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfStrings or the result of cls(response)

Return type

ItemPaged[PageableListOfStrings]

Raises

~azure.core.exceptions.HttpResponseError

get_names(provider: str, **kwargs: Any) → Iterable[‘_models.PageableListOfStrings’][source]

Get a list of all update names that match the specified provider.

Parameters

provider (str) – Update provider.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfStrings or the result of cls(response)

Return type

ItemPaged[PageableListOfStrings]

Raises

~azure.core.exceptions.HttpResponseError

get_operation(operation_id: str, access_condition: Optional[‘_models.AccessCondition’] = None, **kwargs: Any) → Optional[‘_models.Operation’][source]

Retrieve operation status.

Parameters
  • operation_id (str) – Operation identifier.

  • access_condition (AccessCondition) – Parameter group.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Operation, or the result of cls(response)

Return type

Operation or None

Raises

~azure.core.exceptions.HttpResponseError

get_operations(filter: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) → Iterable[‘_models.PageableListOfOperations’][source]

Get a list of all import update operations. Completed operations are kept for 7 days before auto-deleted. Delete operations are not returned by this API version.

Parameters
  • filter (str) – Restricts the set of operations returned. Only one specific filter is supported: “status eq ‘NotStarted’ or status eq ‘Running’”.

  • top (int) – Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfOperations or the result of cls(response)

Return type

ItemPaged[PageableListOfOperations]

Raises

~azure.core.exceptions.HttpResponseError

get_providers(**kwargs: Any) → Iterable[‘_models.PageableListOfStrings’][source]

Get a list of all update providers that have been imported to Device Update for IoT Hub.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfStrings or the result of cls(response)

Return type

ItemPaged[PageableListOfStrings]

Raises

~azure.core.exceptions.HttpResponseError

get_update(provider: str, name: str, version: str, access_condition: Optional[‘_models.AccessCondition’] = None, **kwargs: Any) → Optional[‘_models.Update’][source]

Get a specific update version.

Parameters
  • provider (str) – Update provider.

  • name (str) – Update name.

  • version (str) – Update version.

  • access_condition (AccessCondition) – Parameter group.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Update, or the result of cls(response)

Return type

Update or None

Raises

~azure.core.exceptions.HttpResponseError

get_versions(provider: str, name: str, **kwargs: Any) → Iterable[‘_models.PageableListOfStrings’][source]

Get a list of all update versions that match the specified provider and name.

Parameters
  • provider (str) – Update provider.

  • name (str) – Update name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfStrings or the result of cls(response)

Return type

ItemPaged[PageableListOfStrings]

Raises

~azure.core.exceptions.HttpResponseError

import_update(update_to_import: ‘_models.ImportUpdateInput’, **kwargs: Any)None[source]

Import new update version.

Parameters

update_to_import (ImportUpdateInput) – The update to be imported.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.iot.deviceupdate.models' from '/mnt/vss/_work/1/s/sdk/deviceupdate/azure-iot-deviceupdate/.tox/sphinx/lib/python3.6/site-packages/azure/iot/deviceupdate/models/__init__.py'>
class azure.iot.deviceupdate.operations.DevicesOperations(client, config, serializer, deserializer)[source]

DevicesOperations 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.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

create_or_update_group(group_id: str, group: ‘_models.Group’, **kwargs: Any) → ’_models.Group’[source]

Create or update a device group.

Parameters
  • group_id (str) – Group identifier.

  • group (Group) – The group properties.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Group, or the result of cls(response)

Return type

Group

Raises

~azure.core.exceptions.HttpResponseError

delete_group(group_id: str, **kwargs: Any)None[source]

Deletes a device group.

Parameters

group_id (str) – Group identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

get_all_device_classes(**kwargs: Any) → Iterable[‘_models.PageableListOfDeviceClasses’][source]

Gets a list of all device classes (unique combinations of device manufacturer and model) for all devices connected to Device Update for IoT Hub.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfDeviceClasses or the result of cls(response)

Return type

ItemPaged[PageableListOfDeviceClasses]

Raises

~azure.core.exceptions.HttpResponseError

get_all_device_tags(**kwargs: Any) → Iterable[‘_models.PageableListOfDeviceTags’][source]

Gets a list of available group device tags for all devices connected to Device Update for IoT Hub.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfDeviceTags or the result of cls(response)

Return type

ItemPaged[PageableListOfDeviceTags]

Raises

~azure.core.exceptions.HttpResponseError

get_all_devices(filter: Optional[str] = None, **kwargs: Any) → Iterable[‘_models.PageableListOfDevices’][source]

Gets a list of devices connected to Device Update for IoT Hub.

Parameters

filter (str) – Restricts the set of devices returned. You can only filter on device GroupId.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfDevices or the result of cls(response)

Return type

ItemPaged[PageableListOfDevices]

Raises

~azure.core.exceptions.HttpResponseError

get_all_groups(**kwargs: Any) → Iterable[‘_models.PageableListOfGroups’][source]

Gets a list of all device groups.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfGroups or the result of cls(response)

Return type

ItemPaged[PageableListOfGroups]

Raises

~azure.core.exceptions.HttpResponseError

get_device(device_id: str, **kwargs: Any) → ’_models.Device’[source]

Gets the device properties and latest deployment status for a device connected to Device Update for IoT Hub.

Parameters

device_id (str) – Device identifier in Azure IOT Hub.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Device, or the result of cls(response)

Return type

Device

Raises

~azure.core.exceptions.HttpResponseError

get_device_class(device_class_id: str, **kwargs: Any) → ’_models.DeviceClass’[source]

Gets the properties of a device class.

Parameters

device_class_id (str) – Device class identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

DeviceClass, or the result of cls(response)

Return type

DeviceClass

Raises

~azure.core.exceptions.HttpResponseError

get_device_class_device_ids(device_class_id: str, **kwargs: Any) → Iterable[‘_models.PageableListOfStrings’][source]

Gets a list of device identifiers in a device class.

Parameters

device_class_id (str) – Device class identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfStrings or the result of cls(response)

Return type

ItemPaged[PageableListOfStrings]

Raises

~azure.core.exceptions.HttpResponseError

get_device_class_installable_updates(device_class_id: str, **kwargs: Any) → Iterable[‘_models.PageableListOfUpdateIds’][source]

Gets a list of installable updates for a device class.

Parameters

device_class_id (str) – Device class identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfUpdateIds or the result of cls(response)

Return type

ItemPaged[PageableListOfUpdateIds]

Raises

~azure.core.exceptions.HttpResponseError

get_device_tag(tag_name: str, **kwargs: Any) → ’_models.DeviceTag’[source]

Gets a count of how many devices have a device tag.

Parameters

tag_name (str) – Tag name.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

DeviceTag, or the result of cls(response)

Return type

DeviceTag

Raises

~azure.core.exceptions.HttpResponseError

get_group(group_id: str, **kwargs: Any) → ’_models.Group’[source]

Gets the properties of a group.

Parameters

group_id (str) – Group identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Group, or the result of cls(response)

Return type

Group

Raises

~azure.core.exceptions.HttpResponseError

get_group_best_updates(group_id: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[‘_models.PageableListOfUpdatableDevices’][source]

Get the best available updates for a group and a count of how many devices need each update.

Parameters
  • group_id (str) – Group identifier.

  • filter (str) – Restricts the set of bestUpdates returned. You can filter on update Provider, Name and Version property.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfUpdatableDevices or the result of cls(response)

Return type

ItemPaged[PageableListOfUpdatableDevices]

Raises

~azure.core.exceptions.HttpResponseError

get_group_update_compliance(group_id: str, **kwargs: Any) → ’_models.UpdateCompliance’[source]

Get group update compliance information such as how many devices are on their latest update, how many need new updates, and how many are in progress on receiving a new update.

Parameters

group_id (str) – Group identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

UpdateCompliance, or the result of cls(response)

Return type

UpdateCompliance

Raises

~azure.core.exceptions.HttpResponseError

get_update_compliance(**kwargs: Any) → ’_models.UpdateCompliance’[source]

Gets the breakdown of how many devices are on their latest update, have new updates available, or are in progress receiving new updates.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

UpdateCompliance, or the result of cls(response)

Return type

UpdateCompliance

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.iot.deviceupdate.models' from '/mnt/vss/_work/1/s/sdk/deviceupdate/azure-iot-deviceupdate/.tox/sphinx/lib/python3.6/site-packages/azure/iot/deviceupdate/models/__init__.py'>
class azure.iot.deviceupdate.operations.DeploymentsOperations(client, config, serializer, deserializer)[source]

DeploymentsOperations 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.

Variables

models – Alias to model classes used in this operation group.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

cancel_deployment(deployment_id: str, **kwargs: Any) → ’_models.Deployment’[source]

Cancels a deployment.

Parameters

deployment_id (str) – Deployment identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Deployment, or the result of cls(response)

Return type

Deployment

Raises

~azure.core.exceptions.HttpResponseError

create_or_update_deployment(deployment_id: str, deployment: ‘_models.Deployment’, **kwargs: Any) → ’_models.Deployment’[source]

Creates or updates a deployment.

Parameters
  • deployment_id (str) – Deployment identifier.

  • deployment (Deployment) – The deployment properties.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Deployment, or the result of cls(response)

Return type

Deployment

Raises

~azure.core.exceptions.HttpResponseError

delete_deployment(deployment_id: str, **kwargs: Any)None[source]

Deletes a deployment.

Parameters

deployment_id (str) – Deployment identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

None

Raises

~azure.core.exceptions.HttpResponseError

get_all_deployments(filter: Optional[str] = None, **kwargs: Any) → Iterable[‘_models.PageableListOfDeployments’][source]

Gets a list of deployments.

Parameters

filter (str) – Restricts the set of deployments returned. You can filter on update Provider, Name and Version property.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfDeployments or the result of cls(response)

Return type

ItemPaged[PageableListOfDeployments]

Raises

~azure.core.exceptions.HttpResponseError

get_deployment(deployment_id: str, **kwargs: Any) → ’_models.Deployment’[source]

Gets the properties of a deployment.

Parameters

deployment_id (str) – Deployment identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Deployment, or the result of cls(response)

Return type

Deployment

Raises

~azure.core.exceptions.HttpResponseError

get_deployment_devices(deployment_id: str, filter: Optional[str] = None, **kwargs: Any) → Iterable[‘_models.PageableListOfDeploymentDeviceStates’][source]

Gets a list of devices in a deployment along with their state. Useful for getting a list of failed devices.

Parameters
  • deployment_id (str) – Deployment identifier.

  • filter (str) – Restricts the set of deployment device states returned. You can filter on deviceId and/or deviceState.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

An iterator like instance of either PageableListOfDeploymentDeviceStates or the result of cls(response)

Return type

ItemPaged[PageableListOfDeploymentDeviceStates]

Raises

~azure.core.exceptions.HttpResponseError

get_deployment_status(deployment_id: str, **kwargs: Any) → ’_models.DeploymentStatus’[source]

Gets the status of a deployment including a breakdown of how many devices in the deployment are in progress, completed, or failed.

Parameters

deployment_id (str) – Deployment identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

DeploymentStatus, or the result of cls(response)

Return type

DeploymentStatus

Raises

~azure.core.exceptions.HttpResponseError

retry_deployment(deployment_id: str, **kwargs: Any) → ’_models.Deployment’[source]

Retries a deployment with failed devices.

Parameters

deployment_id (str) – Deployment identifier.

Keyword Arguments

cls (callable) – A custom type or function that will be passed the direct response

Returns

Deployment, or the result of cls(response)

Return type

Deployment

Raises

~azure.core.exceptions.HttpResponseError

models = <module 'azure.iot.deviceupdate.models' from '/mnt/vss/_work/1/s/sdk/deviceupdate/azure-iot-deviceupdate/.tox/sphinx/lib/python3.6/site-packages/azure/iot/deviceupdate/models/__init__.py'>