tags
Creates, updates, deletes, gets or lists a tags
resource.
Overview
Name | tags |
Type | Resource |
Id | azure.api_management.tags |
Fields
- vw_tags
- tags
Name | Datatype | Description |
---|---|---|
apiId | text | field from the properties object |
display_name | text | field from the properties object |
operationId | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serviceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
tagId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Tag contract Properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, serviceName, subscriptionId, tagId | Gets the details of the tag specified by its identifier. |
get_by_api | SELECT | apiId, resourceGroupName, serviceName, subscriptionId, tagId | Get tag associated with the API. |
get_by_operation | SELECT | apiId, operationId, resourceGroupName, serviceName, subscriptionId, tagId | Get tag associated with the Operation. |
get_by_product | SELECT | productId, resourceGroupName, serviceName, subscriptionId, tagId | Get tag associated with the Product. |
list_by_api | SELECT | apiId, resourceGroupName, serviceName, subscriptionId | Lists all Tags associated with the API. |
list_by_operation | SELECT | apiId, operationId, resourceGroupName, serviceName, subscriptionId | Lists all Tags associated with the Operation. |
list_by_product | SELECT | productId, resourceGroupName, serviceName, subscriptionId | Lists all Tags associated with the Product. |
list_by_service | SELECT | resourceGroupName, serviceName, subscriptionId | Lists a collection of tags defined within a service instance. |
create_or_update | INSERT | resourceGroupName, serviceName, subscriptionId, tagId | Creates a tag. |
delete | DELETE | If-Match, resourceGroupName, serviceName, subscriptionId, tagId | Deletes specific tag of the API Management service instance. |
update | UPDATE | If-Match, resourceGroupName, serviceName, subscriptionId, tagId | Updates the details of the tag specified by its identifier. |
assign_to_api | EXEC | apiId, resourceGroupName, serviceName, subscriptionId, tagId | Assign tag to the Api. |
assign_to_operation | EXEC | apiId, operationId, resourceGroupName, serviceName, subscriptionId, tagId | Assign tag to the Operation. |
assign_to_product | EXEC | productId, resourceGroupName, serviceName, subscriptionId, tagId | Assign tag to the Product. |
detach_from_api | EXEC | apiId, resourceGroupName, serviceName, subscriptionId, tagId | Detach the tag from the Api. |
detach_from_operation | EXEC | apiId, operationId, resourceGroupName, serviceName, subscriptionId, tagId | Detach the tag from the Operation. |
detach_from_product | EXEC | productId, resourceGroupName, serviceName, subscriptionId, tagId | Detach the tag from the Product. |
SELECT
examples
Lists a collection of tags defined within a service instance.
- vw_tags
- tags
SELECT
apiId,
display_name,
operationId,
resourceGroupName,
serviceName,
subscriptionId,
tagId
FROM azure.api_management.vw_tags
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure.api_management.tags
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new tags
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.api_management.tags (
resourceGroupName,
serviceName,
subscriptionId,
tagId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ tagId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: displayName
value: string
UPDATE
example
Updates a tags
resource.
/*+ update */
UPDATE azure.api_management.tags
SET
properties = '{{ properties }}'
WHERE
If-Match = '{{ If-Match }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tagId = '{{ tagId }}';
DELETE
example
Deletes the specified tags
resource.
/*+ delete */
DELETE FROM azure.api_management.tags
WHERE If-Match = '{{ If-Match }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tagId = '{{ tagId }}';