Skip to main content

resources

Creates, updates, deletes, gets or lists a resources resource.

Overview

Nameresources
TypeResource
Idazure.iot_hub.resources

Fields

NameDatatypeDescription
idtextThe resource identifier.
nametextThe resource name.
allowed_fqdn_listtextfield from the properties object
authorization_policiestextfield from the properties object
cloud_to_devicetextfield from the properties object
commentstextfield from the properties object
disable_device_sastextfield from the properties object
disable_local_authtextfield from the properties object
disable_module_sastextfield from the properties object
enable_data_residencytextfield from the properties object
enable_file_upload_notificationstextfield from the properties object
etagtextThe Etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention.
event_hub_endpointstextfield from the properties object
featurestextfield from the properties object
host_nametextfield from the properties object
identitytextfield from the properties object
ip_filter_rulestextfield from the properties object
locationtextThe resource location.
locationstextfield from the properties object
messaging_endpointstextfield from the properties object
min_tls_versiontextfield from the properties object
network_rule_setstextfield from the properties object
private_endpoint_connectionstextfield from the properties object
provisioning_statetextfield from the properties object
public_network_accesstextfield from the properties object
resourceGroupNametextfield from the properties object
resourceNametextfield from the properties object
restrict_outbound_network_accesstextfield from the properties object
routingtextfield from the properties object
skutextInformation about the SKU of the IoT hub.
statetextfield from the properties object
storage_endpointstextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
tagstextThe resource tags.
typetextThe resource type.

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, resourceName, subscriptionIdGet the non-security related metadata of an IoT hub.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGet all the IoT hubs in a resource group.
list_by_subscriptionSELECTsubscriptionIdGet all the IoT hubs in a subscription.
create_or_updateINSERTresourceGroupName, resourceName, subscriptionId, data__skuCreate 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.
deleteDELETEresourceGroupName, resourceName, subscriptionIdDelete an IoT hub.
updateUPDATEresourceGroupName, resourceName, subscriptionIdUpdate an existing IoT Hub tags. to update other fields use the CreateOrUpdate method
check_name_availabilityEXECsubscriptionId, data__nameCheck if an IoT hub name is available.
export_devicesEXECresourceGroupName, resourceName, subscriptionId, data__excludeKeys, data__exportBlobContainerUriExports 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.
import_devicesEXECresourceGroupName, resourceName, subscriptionId, data__inputBlobContainerUri, data__outputBlobContainerUriImport, 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.
test_all_routesEXECiotHubName, resourceGroupName, subscriptionIdTest all routes configured in this Iot Hub
test_routeEXECiotHubName, resourceGroupName, subscriptionId, data__routeTest the new route for this Iot Hub

SELECT examples

Get all the IoT hubs in a subscription.

SELECT
id,
name,
allowed_fqdn_list,
authorization_policies,
cloud_to_device,
comments,
disable_device_sas,
disable_local_auth,
disable_module_sas,
enable_data_residency,
enable_file_upload_notifications,
etag,
event_hub_endpoints,
features,
host_name,
identity,
ip_filter_rules,
location,
locations,
messaging_endpoints,
min_tls_version,
network_rule_sets,
private_endpoint_connections,
provisioning_state,
public_network_access,
resourceGroupName,
resourceName,
restrict_outbound_network_access,
routing,
sku,
state,
storage_endpoints,
subscriptionId,
system_data,
tags,
type
FROM azure.iot_hub.vw_resources
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new resources resource.

/*+ create */
INSERT INTO azure.iot_hub.resources (
resourceGroupName,
resourceName,
subscriptionId,
data__sku,
etag,
properties,
sku,
identity,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ data__sku }}',
'{{ etag }}',
'{{ properties }}',
'{{ sku }}',
'{{ identity }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a resources resource.

/*+ update */
UPDATE azure.iot_hub.resources
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified resources resource.

/*+ delete */
DELETE FROM azure.iot_hub.resources
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';