Skip to main content

catalogs

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

Overview

Namecatalogs
TypeResource
Idazure.sphere.catalogs

Fields

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

Methods

NameAccessible byRequired ParamsDescription
getSELECTcatalogName, resourceGroupName, subscriptionIdGet a Catalog
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList Catalog resources by resource group
list_by_subscriptionSELECTsubscriptionIdList Catalog resources by subscription ID
create_or_updateINSERTcatalogName, resourceGroupName, subscriptionIdCreate a Catalog
deleteDELETEcatalogName, resourceGroupName, subscriptionIdDelete a Catalog
updateUPDATEcatalogName, resourceGroupName, subscriptionIdUpdate a Catalog
count_devicesEXECcatalogName, resourceGroupName, subscriptionIdCounts devices in catalog.
upload_imageEXECcatalogName, resourceGroupName, subscriptionIdCreates an image. Use this action when the image ID is unknown.

SELECT examples

List Catalog resources by subscription ID

SELECT
catalogName,
location,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
tenant_id
FROM azure.sphere.vw_catalogs
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.sphere.catalogs (
catalogName,
resourceGroupName,
subscriptionId,
properties,
tags,
location
)
SELECT
'{{ catalogName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a catalogs resource.

/*+ update */
UPDATE azure.sphere.catalogs
SET
tags = '{{ tags }}'
WHERE
catalogName = '{{ catalogName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified catalogs resource.

/*+ delete */
DELETE FROM azure.sphere.catalogs
WHERE catalogName = '{{ catalogName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';