resources
Creates, updates, deletes, gets or lists a resources
resource.
Overview
Name | resources |
Type | Resource |
Id | azure.iot_hub.resources |
Fields
- vw_resources
- resources
Name | Datatype | Description |
---|---|---|
id | text | The resource identifier. |
name | text | The resource name. |
allowed_fqdn_list | text | field from the properties object |
authorization_policies | text | field from the properties object |
cloud_to_device | text | field from the properties object |
comments | text | field from the properties object |
disable_device_sas | text | field from the properties object |
disable_local_auth | text | field from the properties object |
disable_module_sas | text | field from the properties object |
enable_data_residency | text | field from the properties object |
enable_file_upload_notifications | text | field from the properties object |
etag | text | The 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_endpoints | text | field from the properties object |
features | text | field from the properties object |
host_name | text | field from the properties object |
identity | text | field from the properties object |
ip_filter_rules | text | field from the properties object |
location | text | The resource location. |
locations | text | field from the properties object |
messaging_endpoints | text | field from the properties object |
min_tls_version | text | field from the properties object |
network_rule_sets | text | field from the properties object |
private_endpoint_connections | text | field from the properties object |
provisioning_state | text | field from the properties object |
public_network_access | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resourceName | text | field from the properties object |
restrict_outbound_network_access | text | field from the properties object |
routing | text | field from the properties object |
sku | text | Information about the SKU of the IoT hub. |
state | text | field from the properties object |
storage_endpoints | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
tags | text | The resource tags. |
type | text | The resource type. |
Name | Datatype | Description |
---|---|---|
id | string | The resource identifier. |
name | string | The resource name. |
etag | string | The 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. |
identity | object | |
location | string | The resource location. |
properties | object | The properties of an IoT hub. |
sku | object | Information about the SKU of the IoT hub. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
tags | object | The resource tags. |
type | string | The resource type. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, resourceName, subscriptionId | Get the non-security related metadata of an IoT hub. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | Get all the IoT hubs in a resource group. |
list_by_subscription | SELECT | subscriptionId | Get all the IoT hubs in a subscription. |
create_or_update | INSERT | resourceGroupName, resourceName, subscriptionId, data__sku | 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. |
delete | DELETE | resourceGroupName, resourceName, subscriptionId | Delete an IoT hub. |
update | UPDATE | resourceGroupName, resourceName, subscriptionId | Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method |
check_name_availability | EXEC | subscriptionId, data__name | Check if an IoT hub name is available. |
export_devices | EXEC | resourceGroupName, resourceName, subscriptionId, data__excludeKeys, data__exportBlobContainerUri | 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. |
import_devices | EXEC | resourceGroupName, resourceName, subscriptionId, data__inputBlobContainerUri, data__outputBlobContainerUri | 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. |
test_all_routes | EXEC | iotHubName, resourceGroupName, subscriptionId | Test all routes configured in this Iot Hub |
test_route | EXEC | iotHubName, resourceGroupName, subscriptionId, data__route | Test the new route for this Iot Hub |
SELECT
examples
Get all the IoT hubs in a subscription.
- vw_resources
- resources
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 }}';
SELECT
id,
name,
etag,
identity,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.iot_hub.resources
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new resources
resource.
- All Properties
- Manifest
/*+ 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 }}'
;
- name: your_resource_model_name
props:
- name: etag
value: string
- name: properties
value:
- name: authorizationPolicies
value:
- - name: keyName
value: string
- name: primaryKey
value: string
- name: secondaryKey
value: string
- name: rights
value: string
- name: disableLocalAuth
value: boolean
- name: disableDeviceSAS
value: boolean
- name: disableModuleSAS
value: boolean
- name: restrictOutboundNetworkAccess
value: boolean
- name: allowedFqdnList
value:
- string
- name: publicNetworkAccess
value: string
- name: ipFilterRules
value:
- - name: filterName
value: string
- name: action
value: string
- name: ipMask
value: string
- name: networkRuleSets
value:
- name: defaultAction
value: string
- name: applyToBuiltInEventHubEndpoint
value: boolean
- name: ipRules
value:
- - name: filterName
value: string
- name: action
value: string
- name: ipMask
value: string
- name: minTlsVersion
value: string
- name: privateEndpointConnections
value:
- - name: id
value: string
- name: name
value: string
- name: type
value: string
- name: properties
value:
- name: privateEndpoint
value:
- name: id
value: string
- name: privateLinkServiceConnectionState
value:
- name: status
value: string
- name: description
value: string
- name: actionsRequired
value: string
- name: provisioningState
value: string
- name: state
value: string
- name: hostName
value: string
- name: eventHubEndpoints
value: object
- name: routing
value:
- name: endpoints
value:
- name: serviceBusQueues
value:
- - name: id
value: string
- name: connectionString
value: string
- name: endpointUri
value: string
- name: entityPath
value: string
- name: authenticationType
value: string
- name: identity
value:
- name: userAssignedIdentity
value: string
- name: name
value: string
- name: subscriptionId
value: string
- name: resourceGroup
value: string
- name: serviceBusTopics
value:
- - name: id
value: string
- name: connectionString
value: string
- name: endpointUri
value: string
- name: entityPath
value: string
- name: authenticationType
value: string
- name: name
value: string
- name: subscriptionId
value: string
- name: resourceGroup
value: string
- name: eventHubs
value:
- - name: id
value: string
- name: connectionString
value: string
- name: endpointUri
value: string
- name: entityPath
value: string
- name: authenticationType
value: string
- name: name
value: string
- name: subscriptionId
value: string
- name: resourceGroup
value: string
- name: storageContainers
value:
- - name: id
value: string
- name: connectionString
value: string
- name: endpointUri
value: string
- name: authenticationType
value: string
- name: name
value: string
- name: subscriptionId
value: string
- name: resourceGroup
value: string
- name: containerName
value: string
- name: fileNameFormat
value: string
- name: batchFrequencyInSeconds
value: integer
- name: maxChunkSizeInBytes
value: integer
- name: encoding
value: string
- name: cosmosDBSqlContainers
value:
- - name: name
value: string
- name: id
value: string
- name: subscriptionId
value: string
- name: resourceGroup
value: string
- name: endpointUri
value: string
- name: authenticationType
value: string
- name: primaryKey
value: string
- name: secondaryKey
value: string
- name: databaseName
value: string
- name: containerName
value: string
- name: partitionKeyName
value: string
- name: partitionKeyTemplate
value: string
- name: routes
value:
- - name: name
value: string
- name: source
value: string
- name: condition
value: string
- name: endpointNames
value:
- string
- name: isEnabled
value: boolean
- name: fallbackRoute
value:
- name: name
value: string
- name: source
value: string
- name: condition
value: string
- name: endpointNames
value:
- string
- name: isEnabled
value: boolean
- name: enrichments
value:
- - name: key
value: string
- name: value
value: string
- name: endpointNames
value:
- string
- name: storageEndpoints
value: object
- name: messagingEndpoints
value: object
- name: enableFileUploadNotifications
value: boolean
- name: cloudToDevice
value:
- name: maxDeliveryCount
value: integer
- name: defaultTtlAsIso8601
value: string
- name: feedback
value:
- name: lockDurationAsIso8601
value: string
- name: ttlAsIso8601
value: string
- name: maxDeliveryCount
value: integer
- name: comments
value: string
- name: features
value: string
- name: locations
value:
- - name: location
value: string
- name: role
value: string
- name: enableDataResidency
value: boolean
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: capacity
value: integer
- name: identity
value:
- name: principalId
value: string
- name: tenantId
value: string
- name: type
value: string
- name: userAssignedIdentities
value: object
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
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 }}';