catalogs
Creates, updates, deletes, gets or lists a catalogs
resource.
Overview
Name | catalogs |
Type | Resource |
Id | azure.sphere.catalogs |
Fields
- vw_catalogs
- catalogs
Name | Datatype | Description |
---|---|---|
catalogName | text | field from the properties object |
location | text | The geo-location where the resource lives |
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. |
tenant_id | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
location | string | The geo-location where the resource lives |
properties | object | Catalog properties |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | catalogName, resourceGroupName, subscriptionId | Get a Catalog |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List Catalog resources by resource group |
list_by_subscription | SELECT | subscriptionId | List Catalog resources by subscription ID |
create_or_update | INSERT | catalogName, resourceGroupName, subscriptionId | Create a Catalog |
delete | DELETE | catalogName, resourceGroupName, subscriptionId | Delete a Catalog |
update | UPDATE | catalogName, resourceGroupName, subscriptionId | Update a Catalog |
count_devices | EXEC | catalogName, resourceGroupName, subscriptionId | Counts devices in catalog. |
upload_image | EXEC | catalogName, resourceGroupName, subscriptionId | Creates an image. Use this action when the image ID is unknown. |
SELECT
examples
List Catalog resources by subscription ID
- vw_catalogs
- catalogs
SELECT
catalogName,
location,
provisioning_state,
resourceGroupName,
subscriptionId,
tags,
tenant_id
FROM azure.sphere.vw_catalogs
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
location,
properties,
tags
FROM azure.sphere.catalogs
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new catalogs
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.sphere.catalogs (
catalogName,
resourceGroupName,
subscriptionId,
properties,
tags,
location
)
SELECT
'{{ catalogName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: tenantId
value: string
- name: provisioningState
value: []
- name: tags
value: object
- name: location
value: string
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 }}';