azure.iothub
Module azure.iothub
API
Definitions
![](https://bcentral-packageicons.azureedge.net/images/ballerinax_azure.iothub_1.2.0.png)
ballerinax/azure.iothub Ballerina library
Overview
This is a generated connector from Azure IoT Hub API v1.0 OpenAPI specification.
Azure IoT Hub is a service that offers programmatic access to the device, messaging, and job services, as well as the resource provider, in IoT Hub. You can access messaging services from within an IoT service running in Azure, or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
Prerequisites
- Create an Azure account
- Create an Azure IoT Hub application
- Obtain tokens
- Use this guide to obtain the credentials which are needed to create the <ACCESS_TOKEN>
Clients![](/images/permalink.svg)
azure.iothub: Client![](/images/permalink.svg)
This is a generated connector from Azure IoT Hub API v1.0 OpenAPI specification. Azure IoT Hub is a service that offers programmatic access to the device, messaging, and job services, as well as the resource provider, in IoT Hub. You can access messaging services from within an IoT service running in Azure, or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response. Use this API to manage the IoT hubs in your Azure subscription.
Constructor![](/images/permalink.svg)
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create an Azure IoT Hub account and obtain OAuth tokens following this guide.
init (ClientConfig clientConfig, string serviceUrl)
- clientConfig ClientConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://management.azure.com/" - URL of the target service
operationsList![](/images/permalink.svg)
function operationsList(string apiVersion) returns OperationListResult|error
Lists all of the available IoT Hub REST API operations.
Parameters
- apiVersion string - The version of the API.
Return Type
- OperationListResult|error - OK. The request has succeeded.
iothubresourceListbysubscription![](/images/permalink.svg)
function iothubresourceListbysubscription(string apiVersion, string subscriptionId) returns IotHubDescriptionListResult|error
Get all the IoT hubs in a subscription
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
Return Type
- IotHubDescriptionListResult|error - This is a synchronous operation. The body contains a JSON-serialized array of the metadata from all the IoT hubs in the subscription.
iothubresourceChecknameavailability![](/images/permalink.svg)
function iothubresourceChecknameavailability(string apiVersion, string subscriptionId, OperationInputs payload) returns IotHubNameAvailabilityInfo|error
Check if an IoT hub name is available
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- payload OperationInputs - Set the name parameter in the OperationInputs structure to the name of the IoT hub to check.
Return Type
- IotHubNameAvailabilityInfo|error - This is a synchronous operation. The body contains a JSON-serialized response that specifies whether the IoT hub name is available. If the name is not available, the body contains the reason.
resourceprovidercommonGetsubscriptionquota![](/images/permalink.svg)
function resourceprovidercommonGetsubscriptionquota(string subscriptionId, string apiVersion) returns UserSubscriptionQuotaListResult|error
Get the number of iot hubs in the subscription
Parameters
- subscriptionId string - The subscription identifier.
- apiVersion string - The version of the API.
Return Type
iothubresourceListbyresourcegroup![](/images/permalink.svg)
function iothubresourceListbyresourcegroup(string apiVersion, string subscriptionId, string resourceGroupName) returns IotHubDescriptionListResult|error
Get all the IoT hubs in a resource group
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
Return Type
- IotHubDescriptionListResult|error - This is a synchronous operation. The body contains a JSON-serialized array of the metadata from all the IoT hubs in the resource group.
iothubManualfailover![](/images/permalink.svg)
function iothubManualfailover(string iotHubName, string subscriptionId, string resourceGroupName, string apiVersion, FailoverInput payload) returns Response|error
Manually initiate a failover for the IoT Hub to its secondary region
Parameters
- iotHubName string - Name of the IoT hub to failover
- subscriptionId string - The subscription identifier.
- resourceGroupName string - Name of the resource group containing the IoT hub resource
- apiVersion string - The version of the API.
- payload FailoverInput - 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
iothubresourceTestallroutes![](/images/permalink.svg)
function iothubresourceTestallroutes(string iotHubName, string subscriptionId, string resourceGroupName, string apiVersion, TestAllRoutesInput payload) returns TestAllRoutesResult|error
Test all routes
Parameters
- iotHubName string - IotHub to be tested
- subscriptionId string - The subscription identifier.
- resourceGroupName string - resource group which Iot Hub belongs to
- apiVersion string - The version of the API.
- payload TestAllRoutesInput - Input for testing all routes
Return Type
- TestAllRoutesResult|error - OK
iothubresourceTestroute![](/images/permalink.svg)
function iothubresourceTestroute(string iotHubName, string subscriptionId, string resourceGroupName, string apiVersion, TestRouteInput payload) returns TestRouteResult|error
Test the new route
Parameters
- iotHubName string - IotHub to be tested
- subscriptionId string - The subscription identifier.
- resourceGroupName string - resource group which Iot Hub belongs to
- apiVersion string - The version of the API.
- payload TestRouteInput - Route that needs to be tested
Return Type
- TestRouteResult|error - OK
iothubresourceGetendpointhealth![](/images/permalink.svg)
function iothubresourceGetendpointhealth(string subscriptionId, string resourceGroupName, string iotHubName, string apiVersion) returns EndpointHealthDataListResult|error
Get the health for routing endpoints
Parameters
- subscriptionId string - The subscription identifier.
- resourceGroupName string -
- iotHubName string -
- apiVersion string - The version of the API.
Return Type
iothubresourceGet![](/images/permalink.svg)
function iothubresourceGet(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName) returns IotHubDescription|error
Get the non-security related metadata of an IoT hub
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
Return Type
- IotHubDescription|error - The body contains all the non-security properties of the IoT hub. Security-related properties are set to null.
iothubresourceCreateorupdate![](/images/permalink.svg)
function iothubresourceCreateorupdate(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, IotHubDescription payload, string? ifMatch) returns IotHubDescription|error
Create or update the metadata of an IoT hub.
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- payload IotHubDescription - The IoT hub metadata and security metadata.
- ifMatch string? (default ()) - ETag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an existing IoT Hub.
Return Type
- IotHubDescription|error - This is returned as a response to the status polling request for the create or update operation. The body contains the resource representation that indicates a transitional provisioning state.
iothubresourceDelete![](/images/permalink.svg)
function iothubresourceDelete(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName) returns IotHubDescription|error?
Delete an IoT hub
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
Return Type
- IotHubDescription|error? - This is returned as a response to the status polling request for the delete operation. The body contains the resource representation that indicates a transitional provisioning state.
iothubresourceUpdate![](/images/permalink.svg)
function iothubresourceUpdate(string subscriptionId, string resourceGroupName, string resourceName, string apiVersion, TagsResource payload) returns IotHubDescription|error
Update an existing IoT Hubs tags.
Parameters
- subscriptionId string - The subscription identifier.
- resourceGroupName string - Resource group identifier.
- resourceName string - Name of iot hub to update.
- apiVersion string - The version of the API.
- payload TagsResource - Updated tag information to set into the iot hub instance.
Return Type
- IotHubDescription|error - Iot Hub was successfully updated
iothubresourceGetkeysforkeyname![](/images/permalink.svg)
function iothubresourceGetkeysforkeyname(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string keyName) returns SharedAccessSignatureAuthorizationRule|error
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
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- keyName string - The name of the shared access policy.
Return Type
- SharedAccessSignatureAuthorizationRule|error - This is a synchronous operation. The body contains a JSON-serialized shared access policy, including keys, that you can use to access one or more IoT hub endpoints.
iothubresourceGetstats![](/images/permalink.svg)
function iothubresourceGetstats(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName) returns RegistryStatistics|error
Get the statistics from an IoT hub
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
Return Type
- RegistryStatistics|error - This is a synchronous operation. The body contains JSON-serialized statistics from the identity registry in the IoT hub.
certificatesListbyiothub![](/images/permalink.svg)
function certificatesListbyiothub(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName) returns CertificateListDescription|error
Get the certificate list.
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
Return Type
- CertificateListDescription|error - The body contains all the certificate list.
certificatesGet![](/images/permalink.svg)
function certificatesGet(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string certificateName) returns CertificateDescription|error
Get the certificate.
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- certificateName string - The name of the certificate
Return Type
- CertificateDescription|error - The body contains the certificate.
certificatesCreateorupdate![](/images/permalink.svg)
function certificatesCreateorupdate(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string certificateName, CertificateBodyDescription payload, string? ifMatch) returns CertificateDescription|error
Upload the certificate to the IoT hub.
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- certificateName string - The name of the certificate
- payload CertificateBodyDescription - The certificate body.
- ifMatch string? (default ()) - ETag of the Certificate. Do not specify for creating a brand new certificate. Required to update an existing certificate.
Return Type
- CertificateDescription|error - If certificate already exist and update was successful, the operation returns HTTP status code of 201 (OK).
certificatesDelete![](/images/permalink.svg)
function certificatesDelete(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string certificateName, string ifMatch) returns Response|error
Delete an X509 certificate.
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- certificateName string - The name of the certificate
- ifMatch string - ETag of the Certificate.
certificatesGenerateverificationcode![](/images/permalink.svg)
function certificatesGenerateverificationcode(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string certificateName, string ifMatch) returns CertificateWithNonceDescription|error
Generate verification code for proof of possession flow.
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- certificateName string - The name of the certificate
- ifMatch string - ETag of the Certificate.
Return Type
- CertificateWithNonceDescription|error - The body contains the certificate.
certificatesVerify![](/images/permalink.svg)
function certificatesVerify(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string certificateName, string ifMatch, CertificateVerificationDescription payload) returns CertificateDescription|error
Verify certificate's private key possession.
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- certificateName string - The name of the certificate
- ifMatch string - ETag of the Certificate.
- payload CertificateVerificationDescription - The name of the certificate
Return Type
- CertificateDescription|error - The body contains the certificate.
iothubresourceListeventhubconsumergroups![](/images/permalink.svg)
function iothubresourceListeventhubconsumergroups(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string eventHubEndpointName) returns EventHubConsumerGroupsListResult|error
Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- eventHubEndpointName string - The name of the Event Hub-compatible endpoint.
Return Type
- EventHubConsumerGroupsListResult|error - This is a synchronous operation. The body contains a JSON-serialized list of the consumer groups in the Event Hub-compatible endpoint in this IoT hub
iothubresourceGeteventhubconsumergroup![](/images/permalink.svg)
function iothubresourceGeteventhubconsumergroup(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string eventHubEndpointName, string name) returns EventHubConsumerGroupInfo|error
Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- eventHubEndpointName string - The name of the Event Hub-compatible endpoint in the IoT hub.
- name string - The name of the consumer group to retrieve.
Return Type
- EventHubConsumerGroupInfo|error - This is a synchronous operation. The body contains a JSON-serialized consumer group.
iothubresourceCreateeventhubconsumergroup![](/images/permalink.svg)
function iothubresourceCreateeventhubconsumergroup(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string eventHubEndpointName, string name) returns EventHubConsumerGroupInfo|error
Add a consumer group to an Event Hub-compatible endpoint in an IoT hub
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- eventHubEndpointName string - The name of the Event Hub-compatible endpoint in the IoT hub.
- name string - The name of the consumer group to add.
Return Type
- EventHubConsumerGroupInfo|error - This is a synchronous operation.
iothubresourceDeleteeventhubconsumergroup![](/images/permalink.svg)
function iothubresourceDeleteeventhubconsumergroup(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string eventHubEndpointName, string name) returns Response|error
Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- eventHubEndpointName string - The name of the Event Hub-compatible endpoint in the IoT hub.
- name string - The name of the consumer group to delete.
iothubresourceExportdevices![](/images/permalink.svg)
function iothubresourceExportdevices(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, ExportDevicesRequest payload) returns JobResponse|error
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
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- payload ExportDevicesRequest - The parameters that specify the export devices operation.
Return Type
- JobResponse|error - OK
iothubresourceImportdevices![](/images/permalink.svg)
function iothubresourceImportdevices(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, ImportDevicesRequest payload) returns JobResponse|error
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
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- payload ImportDevicesRequest - The parameters that specify the import devices operation.
Return Type
- JobResponse|error - OK
iothubresourceListjobs![](/images/permalink.svg)
function iothubresourceListjobs(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName) returns JobResponseListResult|error
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
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
Return Type
- JobResponseListResult|error - This is a synchronous operation. The response contains a JSON-serialized array of all the jobs in the IoT hub.
iothubresourceGetjob![](/images/permalink.svg)
function iothubresourceGetjob(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName, string jobId) returns JobResponse|error
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
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
- jobId string - The job identifier.
Return Type
- JobResponse|error - This is a synchronous operation. The response contains a JSON-serialized description of the job in the IoT hub.
iothubresourceListkeys![](/images/permalink.svg)
function iothubresourceListkeys(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName) returns SharedAccessSignatureAuthorizationRuleListResult|error
Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
Return Type
- SharedAccessSignatureAuthorizationRuleListResult|error - This is a synchronous operation. The body contains a JSON-serialized array of shared access policies, including keys, that you can use to access the IoT hub endpoints.
iothubresourceGetquotametrics![](/images/permalink.svg)
function iothubresourceGetquotametrics(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName) returns IotHubQuotaMetricInfoListResult|error
Get the quota metrics for an IoT hub
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
Return Type
- IotHubQuotaMetricInfoListResult|error - This is a synchronous operation. The response contains a JSON-serialized array of the quota metrics for the IoT hub.
iothubresourceGetvalidskus![](/images/permalink.svg)
function iothubresourceGetvalidskus(string apiVersion, string subscriptionId, string resourceGroupName, string resourceName) returns IotHubSkuDescriptionListResult|error
Get the list of valid SKUs for an IoT hub
Parameters
- apiVersion string - The version of the API.
- subscriptionId string - The subscription identifier.
- resourceGroupName string - The name of the resource group that contains the IoT hub.
- resourceName string - The name of the IoT hub.
Return Type
- IotHubSkuDescriptionListResult|error - This is a synchronous operation. The body contains a JSON-serialized array of the valid SKUs for this IoT hub.
Records![](/images/permalink.svg)
azure.iothub: CertificateBodyDescription![](/images/permalink.svg)
The JSON-serialized X509 Certificate.
Fields
- certificate string? - base-64 representation of the X509 leaf certificate .cer file or just .pem file content.
azure.iothub: CertificateDescription![](/images/permalink.svg)
The X509 Certificate.
Fields
- etag string? - The entity tag.
- id string? - The resource identifier.
- name string? - The name of the certificate.
- properties CertificateProperties? - The description of an X509 CA Certificate.
- 'type string? - The resource type.
azure.iothub: CertificateListDescription![](/images/permalink.svg)
The JSON-serialized array of Certificate objects.
Fields
- value CertificateDescription[]? - The array of Certificate objects.
azure.iothub: CertificateProperties![](/images/permalink.svg)
The description of an X509 CA Certificate.
Fields
- certificate string? - The certificate content
- created string? - The certificate's create date and time.
- expiry string? - The certificate's expiration date and time.
- isVerified boolean? - Determines whether certificate has been verified.
- subject string? - The certificate's subject name.
- thumbprint string? - The certificate's thumbprint.
- updated string? - The certificate's last update date and time.
azure.iothub: CertificatePropertiesWithNonce![](/images/permalink.svg)
The description of an X509 CA Certificate including the challenge nonce issued for the Proof-Of-Possession flow.
Fields
- certificate string? - The certificate content
- created string? - The certificate's create date and time.
- expiry string? - The certificate's expiration date and time.
- isVerified boolean? - Determines whether certificate has been verified.
- subject string? - The certificate's subject name.
- thumbprint string? - The certificate's thumbprint.
- updated string? - The certificate's last update date and time.
- verificationCode string? - The certificate's verification code that will be used for proof of possession.
azure.iothub: CertificateVerificationDescription![](/images/permalink.svg)
The JSON-serialized leaf certificate
Fields
- certificate string? - base-64 representation of X509 certificate .cer file or just .pem file content.
azure.iothub: CertificateWithNonceDescription![](/images/permalink.svg)
The X509 Certificate.
Fields
- etag string? - The entity tag.
- id string? - The resource identifier.
- name string? - The name of the certificate.
- properties CertificatePropertiesWithNonce? - The description of an X509 CA Certificate including the challenge nonce issued for the Proof-Of-Possession flow.
- 'type string? - The resource type.
azure.iothub: ClientConfig![](/images/permalink.svg)
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig - Configurations related to client authentication
- httpVersion string(default "1.1") - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- followRedirects FollowRedirects?(default ()) - Configurations associated with Redirection
- poolConfig PoolConfiguration?(default ()) - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig?(default ()) - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig?(default ()) - Configurations associated with retrying
- cookieConfig CookieConfig?(default ()) - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket?(default ()) - SSL/TLS-related options
azure.iothub: CloudToDeviceProperties![](/images/permalink.svg)
The IoT hub cloud-to-device messaging properties.
Fields
- defaultTtlAsIso8601 string? - The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
- feedback FeedbackProperties? - The properties of the feedback queue for cloud-to-device messages.
- maxDeliveryCount int? - The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
azure.iothub: EndpointHealthData![](/images/permalink.svg)
The health data for an endpoint
Fields
- endpointId string? - Id of the endpoint
- healthStatus string? - Health statuses have following meanings. The 'healthy' status shows that the endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint will be updated to healthy when IoT Hub has established an eventually consistent state of health. The 'dead' status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that the IoT Hub has not established a connection with the endpoint. No messages have been delivered to or rejected from this endpoint
azure.iothub: EndpointHealthDataListResult![](/images/permalink.svg)
The JSON-serialized array of EndpointHealthData objects with a next link.
Fields
- nextLink string? - Link to more results
- value EndpointHealthData[]? - JSON-serialized array of Endpoint health data
azure.iothub: EnrichmentProperties![](/images/permalink.svg)
The properties of an enrichment that your IoT hub applies to messages delivered to endpoints.
Fields
- endpointNames string[] - The list of endpoints for which the enrichment is applied to the message.
- 'key string - The key or name for the enrichment property.
- value string - The value for the enrichment property.
azure.iothub: ErrorDetails![](/images/permalink.svg)
Error details.
Fields
- code string? - The error code.
- details string? - The error details.
- httpStatusCode string? - The HTTP status code.
- message string? - The error message.
azure.iothub: EventHubConsumerGroupInfo![](/images/permalink.svg)
The properties of the EventHubConsumerGroupInfo object.
Fields
- etag string? - The etag.
- id string? - The Event Hub-compatible consumer group identifier.
- name string? - The Event Hub-compatible consumer group name.
- properties record {}? - The tags.
- 'type string? - the resource type.
azure.iothub: EventHubConsumerGroupsListResult![](/images/permalink.svg)
The JSON-serialized array of Event Hub-compatible consumer group names with a next link.
Fields
- nextLink string? - The next link.
- value EventHubConsumerGroupInfo[]? - List of consumer groups objects
azure.iothub: EventHubProperties![](/images/permalink.svg)
The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub.
Fields
- endpoint string? - The Event Hub-compatible endpoint.
- partitionCount int? - The number of partitions for receiving device-to-cloud messages in the Event Hub-compatible endpoint. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages.
- partitionIds string[]? - The partition ids in the Event Hub-compatible endpoint.
- path string? - The Event Hub-compatible name.
- retentionTimeInDays int? - The retention time for device-to-cloud messages in days. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages
azure.iothub: ExportDevicesRequest![](/images/permalink.svg)
Use to provide parameters when requesting an export of all devices in the IoT hub.
Fields
- excludeKeys boolean - The value indicating whether keys should be excluded during export.
- exportBlobContainerUri string - The export blob container URI.
azure.iothub: FailoverInput![](/images/permalink.svg)
Use to provide failover region when requesting manual Failover for a hub.
Fields
- failoverRegion string - Region the hub will be failed over to
azure.iothub: FallbackRouteProperties![](/images/permalink.svg)
The properties of the fallback route. IoT Hub uses these properties when it routes messages to the fallback endpoint.
Fields
- condition string? - The condition which is evaluated in order to apply the fallback route. If the condition is not provided it will evaluate to true by default. For grammar, See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language
- endpointNames string[] - The list of endpoints to which the messages that satisfy the condition are routed to. Currently only 1 endpoint is allowed.
- isEnabled boolean - Used to specify whether the fallback route is enabled.
- name string? - The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
- 'source string - The source to which the routing rule is to be applied to. For example, DeviceMessages
azure.iothub: FeedbackProperties![](/images/permalink.svg)
The properties of the feedback queue for cloud-to-device messages.
Fields
- lockDurationAsIso8601 string? - The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
- maxDeliveryCount int? - The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
- ttlAsIso8601 string? - The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.
azure.iothub: ImportDevicesRequest![](/images/permalink.svg)
Use to provide parameters when requesting an import of all devices in the hub.
Fields
- inputBlobContainerUri string - The input blob container URI.
- outputBlobContainerUri string - The output blob container URI.
azure.iothub: IotHubCapacity![](/images/permalink.svg)
IoT Hub capacity information.
Fields
- 'default int? - The default number of units.
- maximum int? - The maximum number of units.
- minimum int? - The minimum number of units.
- scaleType string? - The type of the scaling enabled.
azure.iothub: IotHubDescription![](/images/permalink.svg)
The description of the IoT hub.
Fields
- Fields Included from *Resource
azure.iothub: IotHubDescriptionListResult![](/images/permalink.svg)
The JSON-serialized array of IotHubDescription objects with a next link.
Fields
- nextLink string? - The next link.
- value IotHubDescription[]? - The array of IotHubDescription objects.
azure.iothub: IotHubLocationDescription![](/images/permalink.svg)
Public representation of one of the locations where a resource is provisioned.
Fields
- location string? - The name of the Azure region
- role string? - The role of the region, can be either primary or secondary. The primary region is where the IoT hub is currently provisioned. The secondary region is the Azure disaster recovery (DR) paired region and also the region where the IoT hub can failover to.
azure.iothub: IotHubNameAvailabilityInfo![](/images/permalink.svg)
The properties indicating whether a given IoT hub name is available.
Fields
- message string? - The detailed reason message.
- nameAvailable boolean? - The value which indicates whether the provided name is available.
- reason string? - The reason for unavailability.
azure.iothub: IotHubProperties![](/images/permalink.svg)
The properties of an IoT hub.
Fields
- authorizationPolicies SharedAccessSignatureAuthorizationRule[]? - The shared access policies you can use to secure a connection to the IoT hub.
- cloudToDevice CloudToDeviceProperties? - The IoT hub cloud-to-device messaging properties.
- comments string? - IoT hub comments.
- enableFileUploadNotifications boolean? - If True, file upload notifications are enabled.
- eventHubEndpoints record {}? - The Event Hub-compatible endpoint properties. The only possible keys to this dictionary is events. This key has to be present in the dictionary while making create or update calls for the IoT hub.
- features string? - The capabilities and features enabled for the IoT hub.
- hostName string? - The name of the host.
- ipFilterRules IpFilterRule[]? - The IP filter rules.
- locations IotHubLocationDescription[]? - Primary and secondary location for iot hub
- messagingEndpoints record {}? - The messaging endpoint properties for the file upload notification queue.
- provisioningState string? - The provisioning state.
- routing RoutingProperties? - The routing related properties of the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging
- state string? - The hub state.
- storageEndpoints record {}? - The list of Azure Storage endpoints where you can upload files. Currently you can configure only one Azure Storage account and that MUST have its key as $default. Specifying more than one storage account causes an error to be thrown. Not specifying a value for this property when the enableFileUploadNotifications property is set to True, causes an error to be thrown.
azure.iothub: IotHubQuotaMetricInfo![](/images/permalink.svg)
Quota metrics properties.
Fields
- currentValue int? - The current value for the quota metric.
- maxValue int? - The maximum value of the quota metric.
- name string? - The name of the quota metric.
azure.iothub: IotHubQuotaMetricInfoListResult![](/images/permalink.svg)
The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link.
Fields
- nextLink string? - The next link.
- value IotHubQuotaMetricInfo[]? - The array of quota metrics objects.
azure.iothub: IotHubSkuDescription![](/images/permalink.svg)
SKU properties.
Fields
- capacity IotHubCapacity - IoT Hub capacity information.
- resourceType string? - The type of the resource.
- sku IotHubSkuInfo - Information about the SKU of the IoT hub.
azure.iothub: IotHubSkuDescriptionListResult![](/images/permalink.svg)
The JSON-serialized array of IotHubSkuDescription objects with a next link.
Fields
- nextLink string? - The next link.
- value IotHubSkuDescription[]? - The array of IotHubSkuDescription.
azure.iothub: IotHubSkuInfo![](/images/permalink.svg)
Information about the SKU of the IoT hub.
Fields
- capacity int? - The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.
- name string - The name of the SKU.
- tier string? - The billing tier for the IoT hub.
azure.iothub: IpFilterRule![](/images/permalink.svg)
The IP filter rules for the IoT hub.
Fields
- action string - The desired action for requests captured by this rule.
- filterName string - The name of the IP filter rule.
- ipMask string - A string that contains the IP address range in CIDR notation for the rule.
azure.iothub: JobResponse![](/images/permalink.svg)
The properties of the Job Response object.
Fields
- endTimeUtc string? - The time the job stopped processing.
- failureReason string? - If status == failed, this string containing the reason for the failure.
- jobId string? - The job identifier.
- parentJobId string? - The job identifier of the parent job, if any.
- startTimeUtc string? - The start time of the job.
- status string? - The status of the job.
- statusMessage string? - The status message for the job.
- 'type string? - The type of the job.
azure.iothub: JobResponseListResult![](/images/permalink.svg)
The JSON-serialized array of JobResponse objects with a next link.
Fields
- nextLink string? - The next link.
- value JobResponse[]? - The array of JobResponse objects.
azure.iothub: MatchedRoute![](/images/permalink.svg)
Routes that matched
Fields
- properties RouteProperties? - The properties of a routing rule that your IoT hub uses to route messages to endpoints.
azure.iothub: MessagingEndpointProperties![](/images/permalink.svg)
The properties of the messaging endpoints used by this IoT hub.
Fields
- lockDurationAsIso8601 string? - The lock duration. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
- maxDeliveryCount int? - The number of times the IoT hub attempts to deliver a message. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
- ttlAsIso8601 string? - The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload.
azure.iothub: Name![](/images/permalink.svg)
Name of Iot Hub type
Fields
- localizedValue string? - Localized value of name
- value string? - IotHub type
azure.iothub: Operation![](/images/permalink.svg)
IoT Hub REST API operation
Fields
- display OperationDisplay? - The object that represents the operation.
- name string? - Operation name: {provider}/{resource}/{read | write | action | delete}
azure.iothub: OperationDisplay![](/images/permalink.svg)
The object that represents the operation.
Fields
- description string? - Description of the operation
- operation string? - Name of the operation
- provider string? - Service provider: Microsoft Devices
- 'resource string? - Resource Type: IotHubs
azure.iothub: OperationInputs![](/images/permalink.svg)
Input values.
Fields
- name string - The name of the IoT hub to check.
azure.iothub: OperationListResult![](/images/permalink.svg)
Result of the request to list IoT Hub operations. It contains a list of operations and a URL link to get the next set of results.
Fields
- nextLink string? - URL to get the next set of operation list results if there are any.
- value Operation[]? - List of IoT Hub operations supported by the Microsoft.Devices resource provider.
azure.iothub: RegistryStatistics![](/images/permalink.svg)
Identity registry statistics.
Fields
- disabledDeviceCount int? - The count of disabled devices in the identity registry.
- enabledDeviceCount int? - The count of enabled devices in the identity registry.
- totalDeviceCount int? - The total count of devices in the identity registry.
azure.iothub: Resource![](/images/permalink.svg)
The common properties of an Azure resource.
Fields
- id string? - The resource identifier.
- location string - The resource location.
- name string? - The resource name.
- tags record {}? - The resource tags.
- 'type string? - The resource type.
azure.iothub: RouteCompilationError![](/images/permalink.svg)
Compilation error when evaluating route
Fields
- location RouteErrorRange? - Range of route errors
- message string? - Route error message
- severity string? - Severity of the route error
azure.iothub: RouteErrorPosition![](/images/permalink.svg)
Position where the route error happened
Fields
- column int? - Column where the route error happened
- line int? - Line where the route error happened
azure.iothub: RouteErrorRange![](/images/permalink.svg)
Range of route errors
Fields
- end RouteErrorPosition? - Position where the route error happened
- 'start RouteErrorPosition? - Position where the route error happened
azure.iothub: RouteProperties![](/images/permalink.svg)
The properties of a routing rule that your IoT hub uses to route messages to endpoints.
Fields
- condition string? - The condition that is evaluated to apply the routing rule. If no condition is provided, it evaluates to true by default. For grammar, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-query-language
- endpointNames string[] - The list of endpoints to which messages that satisfy the condition are routed. Currently only one endpoint is allowed.
- isEnabled boolean - Used to specify whether a route is enabled.
- name string - The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
- 'source string - The source that the routing rule is to be applied to, such as DeviceMessages.
azure.iothub: RoutingEndpoints![](/images/permalink.svg)
The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.
Fields
- eventHubs RoutingEventHubProperties[]? - The list of Event Hubs endpoints that IoT hub routes messages to, based on the routing rules. This list does not include the built-in Event Hubs endpoint.
- serviceBusQueues RoutingServiceBusQueueEndpointProperties[]? - The list of Service Bus queue endpoints that IoT hub routes the messages to, based on the routing rules.
- serviceBusTopics RoutingServiceBusTopicEndpointProperties[]? - The list of Service Bus topic endpoints that the IoT hub routes the messages to, based on the routing rules.
- storageContainers RoutingStorageContainerProperties[]? - The list of storage container endpoints that IoT hub routes messages to, based on the routing rules.
azure.iothub: RoutingEventHubProperties![](/images/permalink.svg)
The properties related to an event hub endpoint.
Fields
- connectionString string - The connection string of the event hub endpoint.
- name string - The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types.
- resourceGroup string? - The name of the resource group of the event hub endpoint.
- subscriptionId string? - The subscription identifier of the event hub endpoint.
azure.iothub: RoutingMessage![](/images/permalink.svg)
Routing message
Fields
- appProperties record {}? - App properties
- body string? - Body of routing message
- systemProperties record {}? - System properties
azure.iothub: RoutingProperties![](/images/permalink.svg)
The routing related properties of the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging
Fields
- endpoints RoutingEndpoints? - The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.
- enrichments EnrichmentProperties[]? - The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid
- fallbackRoute FallbackRouteProperties? - The properties of the fallback route. IoT Hub uses these properties when it routes messages to the fallback endpoint.
- routes RouteProperties[]? - The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
azure.iothub: RoutingServiceBusQueueEndpointProperties![](/images/permalink.svg)
The properties related to service bus queue endpoint types.
Fields
- connectionString string - The connection string of the service bus queue endpoint.
- name string - The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual queue name.
- resourceGroup string? - The name of the resource group of the service bus queue endpoint.
- subscriptionId string? - The subscription identifier of the service bus queue endpoint.
azure.iothub: RoutingServiceBusTopicEndpointProperties![](/images/permalink.svg)
The properties related to service bus topic endpoint types.
Fields
- connectionString string - The connection string of the service bus topic endpoint.
- name string - The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. The name need not be the same as the actual topic name.
- resourceGroup string? - The name of the resource group of the service bus topic endpoint.
- subscriptionId string? - The subscription identifier of the service bus topic endpoint.
azure.iothub: RoutingStorageContainerProperties![](/images/permalink.svg)
The properties related to a storage container endpoint.
Fields
- batchFrequencyInSeconds int? - Time interval at which blobs are written to storage. Value should be between 60 and 720 seconds. Default value is 300 seconds.
- connectionString string - The connection string of the storage account.
- containerName string - The name of storage container in the storage account.
- encoding string? - Encoding that is used to serialize messages to blobs. Supported values are 'avro', 'avrodeflate', and 'JSON'. Default value is 'avro'.
- fileNameFormat string? - File name format for the blob. Default format is {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}. All parameters are mandatory but can be reordered.
- maxChunkSizeInBytes int? - Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB).
- name string - The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types.
- resourceGroup string? - The name of the resource group of the storage account.
- subscriptionId string? - The subscription identifier of the storage account.
azure.iothub: RoutingTwin![](/images/permalink.svg)
Twin reference input parameter. This is an optional parameter
Fields
- properties RoutingtwinProperties? -
- tags record {}? - Twin Tags
azure.iothub: RoutingtwinProperties![](/images/permalink.svg)
Fields
- desired record {}? - Twin desired properties
- reported record {}? - Twin desired properties
azure.iothub: SharedAccessSignatureAuthorizationRule![](/images/permalink.svg)
The properties of an IoT hub shared access policy.
Fields
- keyName string - The name of the shared access policy.
- primaryKey string? - The primary key.
- rights string - The permissions assigned to the shared access policy.
- secondaryKey string? - The secondary key.
azure.iothub: SharedAccessSignatureAuthorizationRuleListResult![](/images/permalink.svg)
The list of shared access policies with a next link.
Fields
- nextLink string? - The next link.
- value SharedAccessSignatureAuthorizationRule[]? - The list of shared access policies.
azure.iothub: StorageEndpointProperties![](/images/permalink.svg)
The properties of the Azure Storage endpoint for file upload.
Fields
- connectionString string - The connection string for the Azure Storage account to which files are uploaded.
- containerName string - The name of the root container where you upload files. The container need not exist but should be creatable using the connectionString specified.
- sasTtlAsIso8601 string? - The period of time for which the SAS URI generated by IoT Hub for file upload is valid. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.
azure.iothub: TagsResource![](/images/permalink.svg)
A container holding only the Tags for a resource, allowing the user to update the tags on an IoT Hub instance.
Fields
- tags record {}? - Resource tags
azure.iothub: TestAllRoutesInput![](/images/permalink.svg)
Input for testing all routes
Fields
- message RoutingMessage? - Routing message
- routingSource string? - Routing source
- twin RoutingTwin? - Twin reference input parameter. This is an optional parameter
azure.iothub: TestAllRoutesResult![](/images/permalink.svg)
Result of testing all routes
Fields
- routes MatchedRoute[]? - JSON-serialized array of matched routes
azure.iothub: TestRouteInput![](/images/permalink.svg)
Input for testing route
Fields
- message RoutingMessage? - Routing message
- route RouteProperties - The properties of a routing rule that your IoT hub uses to route messages to endpoints.
- twin RoutingTwin? - Twin reference input parameter. This is an optional parameter
azure.iothub: TestRouteResult![](/images/permalink.svg)
Result of testing one route
Fields
- details TestRouteResultDetails? - Detailed result of testing a route
- result string? - Result of testing route
azure.iothub: TestRouteResultDetails![](/images/permalink.svg)
Detailed result of testing a route
Fields
- compilationErrors RouteCompilationError[]? - JSON-serialized list of route compilation errors
azure.iothub: UserSubscriptionQuota![](/images/permalink.svg)
User subscription quota response
Fields
- currentValue int? - Current number of IotHub type
- id string? - IotHub type id
- 'limit int? - Numerical limit on IotHub type
- name Name? - Name of Iot Hub type
- 'type string? - Response type
- unit string? - Unit of IotHub type
azure.iothub: UserSubscriptionQuotaListResult![](/images/permalink.svg)
Json-serialized array of User subscription quota response
Fields
- nextLink string? -
- value UserSubscriptionQuota[]? -
Import
import ballerinax/azure.iothub;
Metadata
Released date: over 2 years ago
Version: 1.2.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.0.0
GraalVM compatible: Yes
Pull count
Total: 0
Current verison: 0
Weekly downloads
Keywords
Internet of Things/Device Management
Cost/Paid
Vendor/Microsoft
Contributors
Dependencies