azure.mgmt.iothub.v2023_06_30.operations module
- class azure.mgmt.iothub.v2023_06_30.operations.CertificatesOperations(*args, **kwargs)[source]
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
IotHubClient’scertificatesattribute.- create_or_update(resource_group_name: str, resource_name: str, certificate_name: str, certificate_description: CertificateDescription | IO[bytes], if_match: str | None = None, **kwargs: Any) CertificateDescription[source]
Upload the certificate to the IoT hub.
Adds new or replaces existing certificate.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
resource_name (str) – The name of the IoT hub. Required.
certificate_name (str) – The name of the certificate. Required.
certificate_description (CertificateDescription or IO[bytes]) – The certificate body. Is either a CertificateDescription type or a IO[bytes] type. Required.
if_match (str) – ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate. Default value is None.
- Returns:
CertificateDescription or the result of cls(response)
- Return type:
- Raises:
- delete(resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, **kwargs: Any) None[source]
Delete an X509 certificate.
Deletes an existing X509 certificate or does nothing if it does not exist.
- Parameters:
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- generate_verification_code(resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, **kwargs: Any) CertificateWithNonceDescription[source]
Generate verification code for proof of possession flow.
Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.
- Parameters:
- Returns:
CertificateWithNonceDescription or the result of cls(response)
- Return type:
- Raises:
- get(resource_group_name: str, resource_name: str, certificate_name: str, **kwargs: Any) CertificateDescription[source]
Get the certificate.
Returns the certificate.
- Parameters:
- Returns:
CertificateDescription or the result of cls(response)
- Return type:
- Raises:
- list_by_iot_hub(resource_group_name: str, resource_name: str, **kwargs: Any) CertificateListDescription[source]
Get the certificate list.
Returns the list of certificates.
- Parameters:
- Returns:
CertificateListDescription or the result of cls(response)
- Return type:
- Raises:
- verify(resource_group_name: str, resource_name: str, certificate_name: str, if_match: str, certificate_verification_body: CertificateVerificationDescription | IO[bytes], **kwargs: Any) CertificateDescription[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:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
resource_name (str) – The name of the IoT hub. Required.
certificate_name (str) – The name of the certificate. Required.
if_match (str) – ETag of the Certificate. Required.
certificate_verification_body (CertificateVerificationDescription or IO[bytes]) – The name of the certificate. Is either a CertificateVerificationDescription type or a IO[bytes] type. Required.
- Returns:
CertificateDescription or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.iothub.v2023_06_30.models' from '/mnt/vss/_work/1/s/sdk/iothub/azure-mgmt-iothub/.tox/sphinx/lib/python3.13/site-packages/azure/mgmt/iothub/v2023_06_30/models/__init__.py'>
- class azure.mgmt.iothub.v2023_06_30.operations.IotHubOperations(*args, **kwargs)[source]
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
IotHubClient’siot_hubattribute.- begin_manual_failover(iot_hub_name: str, resource_group_name: str, failover_input: FailoverInput | IO[bytes], **kwargs: Any) LROPoller[None][source]
Manually initiate a failover for the IoT Hub to its secondary region.
Manually initiate a failover for the IoT Hub to its secondary region. To learn more, see https://aka.ms/manualfailover.
- Parameters:
iot_hub_name (str) – Name of the IoT hub to failover. Required.
resource_group_name (str) – Name of the resource group containing the IoT hub resource. Required.
failover_input (FailoverInput or IO[bytes]) – Region to failover to. Must be the Azure paired region. Get the value from the secondary location in the locations property. To learn more, see https://aka.ms/manualfailover/region. Is either a FailoverInput type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either None or the result of cls(response)
- Return type:
LROPoller[None]
- Raises:
- models = <module 'azure.mgmt.iothub.v2023_06_30.models' from '/mnt/vss/_work/1/s/sdk/iothub/azure-mgmt-iothub/.tox/sphinx/lib/python3.13/site-packages/azure/mgmt/iothub/v2023_06_30/models/__init__.py'>
- class azure.mgmt.iothub.v2023_06_30.operations.IotHubResourceOperations(*args, **kwargs)[source]
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
IotHubClient’siot_hub_resourceattribute.- begin_create_or_update(resource_group_name: str, resource_name: str, iot_hub_description: IotHubDescription | IO[bytes], if_match: str | None = None, **kwargs: Any) LROPoller[IotHubDescription][source]
Create or update the metadata of an IoT hub.
Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to default, which may lead to unexpected behavior.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
resource_name (str) – The name of the IoT hub. Required.
iot_hub_description (IotHubDescription or IO[bytes]) – The IoT hub metadata and security metadata. Is either a IotHubDescription type or a IO[bytes] type. Required.
if_match (str) – ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub. Default value is None.
- Returns:
An instance of LROPoller that returns either IotHubDescription or the result of cls(response)
- Return type:
- Raises:
- begin_delete(resource_group_name: str, resource_name: str, **kwargs: Any) LROPoller[IotHubDescription][source]
Delete an IoT hub.
Delete an IoT hub.
- Parameters:
- Returns:
An instance of LROPoller that returns either IotHubDescription or An instance of LROPoller that returns either ErrorDetails or the result of cls(response)
- Return type:
- Raises:
- begin_update(resource_group_name: str, resource_name: str, iot_hub_tags: TagsResource | IO[bytes], **kwargs: Any) LROPoller[IotHubDescription][source]
Update an existing IoT Hubs tags.
Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method.
- Parameters:
resource_group_name (str) – Resource group identifier. Required.
resource_name (str) – Name of iot hub to update. Required.
iot_hub_tags (TagsResource or IO[bytes]) – Updated tag information to set into the iot hub instance. Is either a TagsResource type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either IotHubDescription or the result of cls(response)
- Return type:
- Raises:
- check_name_availability(operation_inputs: OperationInputs | IO[bytes], **kwargs: Any) IotHubNameAvailabilityInfo[source]
Check if an IoT hub name is available.
Check if an IoT hub name is available.
- Parameters:
operation_inputs (OperationInputs or IO[bytes]) – Set the name parameter in the OperationInputs structure to the name of the IoT hub to check. Is either a OperationInputs type or a IO[bytes] type. Required.
- Returns:
IotHubNameAvailabilityInfo or the result of cls(response)
- Return type:
- Raises:
- create_event_hub_consumer_group(resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, consumer_group_body: EventHubConsumerGroupBodyDescription | IO[bytes], **kwargs: Any) EventHubConsumerGroupInfo[source]
Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.
Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
resource_name (str) – The name of the IoT hub. Required.
event_hub_endpoint_name (str) – The name of the Event Hub-compatible endpoint in the IoT hub. Required.
name (str) – The name of the consumer group to add. Required.
consumer_group_body (EventHubConsumerGroupBodyDescription or IO[bytes]) – The consumer group to add. Is either a EventHubConsumerGroupBodyDescription type or a IO[bytes] type. Required.
- Returns:
EventHubConsumerGroupInfo or the result of cls(response)
- Return type:
- Raises:
- delete_event_hub_consumer_group(resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any) None[source]
Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
resource_name (str) – The name of the IoT hub. Required.
event_hub_endpoint_name (str) – The name of the Event Hub-compatible endpoint in the IoT hub. Required.
name (str) – The name of the consumer group to delete. Required.
- Returns:
None or the result of cls(response)
- Return type:
None
- Raises:
- export_devices(resource_group_name: str, resource_name: str, export_devices_parameters: ExportDevicesRequest | IO[bytes], **kwargs: Any) JobResponse[source]
Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
resource_name (str) – The name of the IoT hub. Required.
export_devices_parameters (ExportDevicesRequest or IO[bytes]) – The parameters that specify the export devices operation. Is either a ExportDevicesRequest type or a IO[bytes] type. Required.
- Returns:
JobResponse or the result of cls(response)
- Return type:
- Raises:
- get(resource_group_name: str, resource_name: str, **kwargs: Any) IotHubDescription[source]
Get the non-security related metadata of an IoT hub.
Get the non-security related metadata of an IoT hub.
- Parameters:
- Returns:
IotHubDescription or the result of cls(response)
- Return type:
- Raises:
- get_endpoint_health(resource_group_name: str, iot_hub_name: str, **kwargs: Any) Iterable[EndpointHealthData][source]
Get the health for routing endpoints.
Get the health for routing endpoints.
- Parameters:
- Returns:
An iterator like instance of either EndpointHealthData or the result of cls(response)
- Return type:
- Raises:
- get_event_hub_consumer_group(resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, name: str, **kwargs: Any) EventHubConsumerGroupInfo[source]
Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
resource_name (str) – The name of the IoT hub. Required.
event_hub_endpoint_name (str) – The name of the Event Hub-compatible endpoint in the IoT hub. Required.
name (str) – The name of the consumer group to retrieve. Required.
- Returns:
EventHubConsumerGroupInfo or the result of cls(response)
- Return type:
- Raises:
- get_job(resource_group_name: str, resource_name: str, job_id: str, **kwargs: Any) JobResponse[source]
Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
- Parameters:
- Returns:
JobResponse or the result of cls(response)
- Return type:
- Raises:
- get_keys_for_key_name(resource_group_name: str, resource_name: str, key_name: str, **kwargs: Any) SharedAccessSignatureAuthorizationRule[source]
Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
- Parameters:
- Returns:
SharedAccessSignatureAuthorizationRule or the result of cls(response)
- Return type:
- Raises:
- get_quota_metrics(resource_group_name: str, resource_name: str, **kwargs: Any) Iterable[IotHubQuotaMetricInfo][source]
Get the quota metrics for an IoT hub.
Get the quota metrics for an IoT hub.
- Parameters:
- Returns:
An iterator like instance of either IotHubQuotaMetricInfo or the result of cls(response)
- Return type:
- Raises:
- get_stats(resource_group_name: str, resource_name: str, **kwargs: Any) RegistryStatistics[source]
Get the statistics from an IoT hub.
Get the statistics from an IoT hub.
- Parameters:
- Returns:
RegistryStatistics or the result of cls(response)
- Return type:
- Raises:
- get_valid_skus(resource_group_name: str, resource_name: str, **kwargs: Any) Iterable[IotHubSkuDescription][source]
Get the list of valid SKUs for an IoT hub.
Get the list of valid SKUs for an IoT hub.
- Parameters:
- Returns:
An iterator like instance of either IotHubSkuDescription or the result of cls(response)
- Return type:
- Raises:
- import_devices(resource_group_name: str, resource_name: str, import_devices_parameters: ImportDevicesRequest | IO[bytes], **kwargs: Any) JobResponse[source]
Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
resource_name (str) – The name of the IoT hub. Required.
import_devices_parameters (ImportDevicesRequest or IO[bytes]) – The parameters that specify the import devices operation. Is either a ImportDevicesRequest type or a IO[bytes] type. Required.
- Returns:
JobResponse or the result of cls(response)
- Return type:
- Raises:
- list_by_resource_group(resource_group_name: str, **kwargs: Any) Iterable[IotHubDescription][source]
Get all the IoT hubs in a resource group.
Get all the IoT hubs in a resource group.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
- Returns:
An iterator like instance of either IotHubDescription or the result of cls(response)
- Return type:
- Raises:
- list_by_subscription(**kwargs: Any) Iterable[IotHubDescription][source]
Get all the IoT hubs in a subscription.
Get all the IoT hubs in a subscription.
- Returns:
An iterator like instance of either IotHubDescription or the result of cls(response)
- Return type:
- Raises:
- list_event_hub_consumer_groups(resource_group_name: str, resource_name: str, event_hub_endpoint_name: str, **kwargs: Any) Iterable[EventHubConsumerGroupInfo][source]
Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
- Parameters:
- Returns:
An iterator like instance of either EventHubConsumerGroupInfo or the result of cls(response)
- Return type:
- Raises:
- list_jobs(resource_group_name: str, resource_name: str, **kwargs: Any) Iterable[JobResponse][source]
Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
- Parameters:
- Returns:
An iterator like instance of either JobResponse or the result of cls(response)
- Return type:
- Raises:
- list_keys(resource_group_name: str, resource_name: str, **kwargs: Any) Iterable[SharedAccessSignatureAuthorizationRule][source]
Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
- Parameters:
- Returns:
An iterator like instance of either SharedAccessSignatureAuthorizationRule or the result of cls(response)
- Return type:
- Raises:
- test_all_routes(iot_hub_name: str, resource_group_name: str, input: TestAllRoutesInput | IO[bytes], **kwargs: Any) TestAllRoutesResult[source]
Test all routes.
Test all routes configured in this Iot Hub.
- Parameters:
iot_hub_name (str) – IotHub to be tested. Required.
resource_group_name (str) – resource group which Iot Hub belongs to. Required.
input (TestAllRoutesInput or IO[bytes]) – Input for testing all routes. Is either a TestAllRoutesInput type or a IO[bytes] type. Required.
- Returns:
TestAllRoutesResult or the result of cls(response)
- Return type:
- Raises:
- test_route(iot_hub_name: str, resource_group_name: str, input: TestRouteInput | IO[bytes], **kwargs: Any) TestRouteResult[source]
Test the new route.
Test the new route for this Iot Hub.
- Parameters:
iot_hub_name (str) – IotHub to be tested. Required.
resource_group_name (str) – resource group which Iot Hub belongs to. Required.
input (TestRouteInput or IO[bytes]) – Route that needs to be tested. Is either a TestRouteInput type or a IO[bytes] type. Required.
- Returns:
TestRouteResult or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.iothub.v2023_06_30.models' from '/mnt/vss/_work/1/s/sdk/iothub/azure-mgmt-iothub/.tox/sphinx/lib/python3.13/site-packages/azure/mgmt/iothub/v2023_06_30/models/__init__.py'>
- class azure.mgmt.iothub.v2023_06_30.operations.Operations(*args, **kwargs)[source]
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
IotHubClient’soperationsattribute.- list(**kwargs: Any) Iterable[Operation][source]
Lists all of the available IoT Hub REST API operations.
- Returns:
An iterator like instance of either Operation or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.iothub.v2023_06_30.models' from '/mnt/vss/_work/1/s/sdk/iothub/azure-mgmt-iothub/.tox/sphinx/lib/python3.13/site-packages/azure/mgmt/iothub/v2023_06_30/models/__init__.py'>
- class azure.mgmt.iothub.v2023_06_30.operations.PrivateEndpointConnectionsOperations(*args, **kwargs)[source]
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
IotHubClient’sprivate_endpoint_connectionsattribute.- begin_delete(resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any) LROPoller[PrivateEndpointConnection][source]
Delete private endpoint connection.
Delete private endpoint connection with the specified name.
- Parameters:
- Returns:
An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response)
- Return type:
- Raises:
- begin_update(resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, private_endpoint_connection: PrivateEndpointConnection | IO[bytes], **kwargs: Any) LROPoller[PrivateEndpointConnection][source]
Update private endpoint connection.
Update the status of a private endpoint connection with the specified name.
- Parameters:
resource_group_name (str) – The name of the resource group that contains the IoT hub. Required.
resource_name (str) – The name of the IoT hub. Required.
private_endpoint_connection_name (str) – The name of the private endpoint connection. Required.
private_endpoint_connection (PrivateEndpointConnection or IO[bytes]) – The private endpoint connection with updated properties. Is either a PrivateEndpointConnection type or a IO[bytes] type. Required.
- Returns:
An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response)
- Return type:
- Raises:
- get(resource_group_name: str, resource_name: str, private_endpoint_connection_name: str, **kwargs: Any) PrivateEndpointConnection[source]
Get private endpoint connection.
Get private endpoint connection properties.
- Parameters:
- Returns:
PrivateEndpointConnection or the result of cls(response)
- Return type:
- Raises:
- list(resource_group_name: str, resource_name: str, **kwargs: Any) List[PrivateEndpointConnection][source]
List private endpoint connections.
List private endpoint connection properties.
- Parameters:
- Returns:
list of PrivateEndpointConnection or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.iothub.v2023_06_30.models' from '/mnt/vss/_work/1/s/sdk/iothub/azure-mgmt-iothub/.tox/sphinx/lib/python3.13/site-packages/azure/mgmt/iothub/v2023_06_30/models/__init__.py'>
- class azure.mgmt.iothub.v2023_06_30.operations.PrivateLinkResourcesOperations(*args, **kwargs)[source]
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
IotHubClient’sprivate_link_resourcesattribute.- get(resource_group_name: str, resource_name: str, group_id: str, **kwargs: Any) GroupIdInformation[source]
Get the specified private link resource.
Get the specified private link resource for the given IotHub.
- Parameters:
- Returns:
GroupIdInformation or the result of cls(response)
- Return type:
- Raises:
- list(resource_group_name: str, resource_name: str, **kwargs: Any) PrivateLinkResources[source]
List private link resources.
List private link resources for the given IotHub.
- Parameters:
- Returns:
PrivateLinkResources or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.iothub.v2023_06_30.models' from '/mnt/vss/_work/1/s/sdk/iothub/azure-mgmt-iothub/.tox/sphinx/lib/python3.13/site-packages/azure/mgmt/iothub/v2023_06_30/models/__init__.py'>
- class azure.mgmt.iothub.v2023_06_30.operations.ResourceProviderCommonOperations(*args, **kwargs)[source]
Bases:
objectWarning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
IotHubClient’sresource_provider_commonattribute.- get_subscription_quota(**kwargs: Any) UserSubscriptionQuotaListResult[source]
Get the number of iot hubs in the subscription.
Get the number of free and paid iot hubs in the subscription.
- Returns:
UserSubscriptionQuotaListResult or the result of cls(response)
- Return type:
- Raises:
- models = <module 'azure.mgmt.iothub.v2023_06_30.models' from '/mnt/vss/_work/1/s/sdk/iothub/azure-mgmt-iothub/.tox/sphinx/lib/python3.13/site-packages/azure/mgmt/iothub/v2023_06_30/models/__init__.py'>