# azure.mgmt.iothub.operations module

class `azure.mgmt.iothub.operations.``IotHubResourceOperations`(client, config, serializer, deserializer)

  Bases: `object`

  IotHubResourceOperations operations.

  Parameters:

  - client – Client for service requests.
  - config – Configuration of service client.
  - serializer – An object model serializer.
  - deserializer – An objec model deserializer.

  `check_name_availability`(name, custom_headers=None, raw=False, **operation_config)

    Check if an IotHub name is available.

    Check if an IotHub name is available.

    Parameters:

    - name (str) – The name of the iot hub.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `IotHubNameAvailabilityInfo`
    Return type: | `ClientRawResponse` if raw=true

  `create_event_hub_consumer_group`(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers=None, raw=False, **operation_config)

    Add an EventHub Consumer Group to an IotHub.

    Add an EventHub Consumer Group to an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - event_hub_endpoint_name (str) – The name of the event hub endpoint.
    - name (str) – The name of the consumer group.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `EventHubConsumerGroupInfo`
    Return type: | `ClientRawResponse` if raw=true

  `create_or_update`(resource_group_name, resource_name, iot_hub_description, custom_headers=None, raw=False, **operation_config)

    Create or update an IotHub.

    Create or update an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - iot_hub_description (`IotHubDescription`) – The Iot hub description.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response

    Return type: | `AzureOperationPoller` instance that returns `IotHubDescription`
    Return type: | `ClientRawResponse` if raw=true

  `delete`(resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config)

    Delete an IotHub.

    Delete an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response

    Return type: | `AzureOperationPoller` instance that returns `IotHubDescription`
    Return type: | `ClientRawResponse` if raw=true

  `delete_event_hub_consumer_group`(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers=None, raw=False, **operation_config)

    Delete EventHub Consumer Group for an IotHub.

    Delete EventHub Consumer Group for an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - event_hub_endpoint_name (str) – The name of the event hub endpoint.
    - name (str) – The name of the consumer group.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | None
    Return type: | `ClientRawResponse` if raw=true

  `export_devices`(resource_group_name, resource_name, export_blob_container_uri, exclude_keys, custom_headers=None, raw=False, **operation_config)

    Export all the devices in an IotHub.

    Export all the devices in an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - export_blob_container_uri (str) – The export BLOB container URI.
    - exclude_keys (bool) – The value indicating whether keys should be excluded during export.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `JobResponse`
    Return type: | `ClientRawResponse` if raw=true

  `get`(resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config)

    Get an IotHub.

    Get an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `IotHubDescription`
    Return type: | `ClientRawResponse` if raw=true

  `get_event_hub_consumer_group`(resource_group_name, resource_name, event_hub_endpoint_name, name, custom_headers=None, raw=False, **operation_config)

    Get EventHub Consumer Group for an IotHub.

    Get EventHub Consumer Group for an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - event_hub_endpoint_name (str) – The name of the event hub endpoint.
    - name (str) – The name of the consumer group.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `EventHubConsumerGroupInfo`
    Return type: | `ClientRawResponse` if raw=true

  `get_job`(resource_group_name, resource_name, job_id, custom_headers=None, raw=False, **operation_config)

    Get a job in an IotHub.

    Get a job in an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - job_id (str) – The job identifier.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `JobResponse`
    Return type: | `ClientRawResponse` if raw=true

  `get_keys_for_key_name`(resource_group_name, resource_name, key_name, custom_headers=None, raw=False, **operation_config)

    Get the Key given a specific KeyName for an IotHub.

    Get the Key given a specific KeyName for an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - key_name (str) – The name of the key.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `SharedAccessSignatureAuthorizationRule`
    Return type: | `ClientRawResponse` if raw=true

  `get_quota_metrics`(resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config)

    Get quota metrics for an IotHub.

    Get quota metrics for an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `IotHubQuotaMetricInfoPaged`

  `get_stats`(resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config)

    Get IotHub Stats.

    Get IotHub Stats.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `RegistryStatistics`
    Return type: | `ClientRawResponse` if raw=true

  `get_valid_skus`(resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config)

    Get Valid Skus.

    Get Valid Skus.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `IotHubSkuDescriptionPaged`

  `import_devices`(resource_group_name, resource_name, input_blob_container_uri, output_blob_container_uri, custom_headers=None, raw=False, **operation_config)

    Import all the devices in an IotHub.

    Import all the devices in an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - input_blob_container_uri (str) – The input BLOB container URI.
    - output_blob_container_uri (str) – The output BLOB container URI.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `JobResponse`
    Return type: | `ClientRawResponse` if raw=true

  `list_by_resource_group`(resource_group_name, custom_headers=None, raw=False, **operation_config)

    Get all IotHubs in a Resourcegroup.

    Get all IotHubs in a Resource group.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `IotHubDescriptionPaged`

  `list_by_subscription`(custom_headers=None, raw=False, **operation_config)

    Get all IotHubs in a subscription.

    Get all IotHubs in a subscription.

    Parameters:

    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `IotHubDescriptionPaged`

  `list_event_hub_consumer_groups`(resource_group_name, resource_name, event_hub_endpoint_name, custom_headers=None, raw=False, **operation_config)

    Get EventHub Consumer Groups for an IotHub.

    Get EventHub Consumer Groups for an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - event_hub_endpoint_name (str) – The name of the event hub endpoint.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `strPaged`

  `list_jobs`(resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config)

    Get all the jobs in an IotHub.

    Get all the jobs in an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `JobResponsePaged`

  `list_keys`(resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config)

    Get all keys for an IotHub.

    Get all keys for an IotHub.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - resource_name (str) – The name of the resource.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `SharedAccessSignatureAuthorizationRulePaged`