mqs
Creates, updates, deletes, gets or lists a mqs
resource.
Overview
Name | mqs |
Type | Resource |
Id | azure.iot_mq.mqs |
Fields
- vw_mqs
- mqs
Name | Datatype | Description |
---|---|---|
extended_location | text | field from the properties object |
location | text | The geo-location where the resource lives |
mqName | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
Name | Datatype | Description |
---|---|---|
extendedLocation | object | ExtendedLocation properties |
location | string | The geo-location where the resource lives |
properties | object | MQ Resource properties |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | mqName, resourceGroupName, subscriptionId | Get a MqResource |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List MqResource resources by resource group |
list_by_subscription | SELECT | subscriptionId | List MqResource resources by subscription ID |
create_or_update | INSERT | mqName, resourceGroupName, subscriptionId, data__extendedLocation | Create a MqResource |
delete | DELETE | mqName, resourceGroupName, subscriptionId | Delete a MqResource |
update | UPDATE | mqName, resourceGroupName, subscriptionId | Update a MqResource |
SELECT
examples
List MqResource resources by subscription ID
- vw_mqs
- mqs
SELECT
extended_location,
location,
mqName,
provisioning_state,
resourceGroupName,
subscriptionId,
tags
FROM azure.iot_mq.vw_mqs
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
extendedLocation,
location,
properties,
tags
FROM azure.iot_mq.mqs
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new mqs
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.iot_mq.mqs (
mqName,
resourceGroupName,
subscriptionId,
data__extendedLocation,
properties,
extendedLocation,
tags,
location
)
SELECT
'{{ mqName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__extendedLocation }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: provisioningState
value: []
- name: extendedLocation
value:
- name: name
value: string
- name: type
value: []
- name: tags
value: object
- name: location
value: string
UPDATE
example
Updates a mqs
resource.
/*+ update */
UPDATE azure.iot_mq.mqs
SET
tags = '{{ tags }}'
WHERE
mqName = '{{ mqName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified mqs
resource.
/*+ delete */
DELETE FROM azure.iot_mq.mqs
WHERE mqName = '{{ mqName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';