Skip to main content

mqs

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

Overview

Namemqs
TypeResource
Idazure.iot_mq.mqs

Fields

NameDatatypeDescription
extended_locationtextfield from the properties object
locationtextThe geo-location where the resource lives
mqNametextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTmqName, resourceGroupName, subscriptionIdGet a MqResource
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList MqResource resources by resource group
list_by_subscriptionSELECTsubscriptionIdList MqResource resources by subscription ID
create_or_updateINSERTmqName, resourceGroupName, subscriptionId, data__extendedLocationCreate a MqResource
deleteDELETEmqName, resourceGroupName, subscriptionIdDelete a MqResource
updateUPDATEmqName, resourceGroupName, subscriptionIdUpdate a MqResource

SELECT examples

List MqResource resources by subscription ID

SELECT
extended_location,
location,
mqName,
provisioning_state,
resourceGroupName,
subscriptionId,
tags
FROM azure.iot_mq.vw_mqs
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ 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 }}'
;

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 }}';