Skip to main content

tags

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

Overview

Nametags
TypeResource
Idazure.api_management.tags

Fields

NameDatatypeDescription
apiIdtextfield from the properties object
display_nametextfield from the properties object
operationIdtextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
subscriptionIdtextfield from the properties object
tagIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, serviceName, subscriptionId, tagIdGets the details of the tag specified by its identifier.
get_by_apiSELECTapiId, resourceGroupName, serviceName, subscriptionId, tagIdGet tag associated with the API.
get_by_operationSELECTapiId, operationId, resourceGroupName, serviceName, subscriptionId, tagIdGet tag associated with the Operation.
get_by_productSELECTproductId, resourceGroupName, serviceName, subscriptionId, tagIdGet tag associated with the Product.
list_by_apiSELECTapiId, resourceGroupName, serviceName, subscriptionIdLists all Tags associated with the API.
list_by_operationSELECTapiId, operationId, resourceGroupName, serviceName, subscriptionIdLists all Tags associated with the Operation.
list_by_productSELECTproductId, resourceGroupName, serviceName, subscriptionIdLists all Tags associated with the Product.
list_by_serviceSELECTresourceGroupName, serviceName, subscriptionIdLists a collection of tags defined within a service instance.
create_or_updateINSERTresourceGroupName, serviceName, subscriptionId, tagIdCreates a tag.
deleteDELETEIf-Match, resourceGroupName, serviceName, subscriptionId, tagIdDeletes specific tag of the API Management service instance.
updateUPDATEIf-Match, resourceGroupName, serviceName, subscriptionId, tagIdUpdates the details of the tag specified by its identifier.
assign_to_apiEXECapiId, resourceGroupName, serviceName, subscriptionId, tagIdAssign tag to the Api.
assign_to_operationEXECapiId, operationId, resourceGroupName, serviceName, subscriptionId, tagIdAssign tag to the Operation.
assign_to_productEXECproductId, resourceGroupName, serviceName, subscriptionId, tagIdAssign tag to the Product.
detach_from_apiEXECapiId, resourceGroupName, serviceName, subscriptionId, tagIdDetach the tag from the Api.
detach_from_operationEXECapiId, operationId, resourceGroupName, serviceName, subscriptionId, tagIdDetach the tag from the Operation.
detach_from_productEXECproductId, resourceGroupName, serviceName, subscriptionId, tagIdDetach the tag from the Product.

SELECT examples

Lists a collection of tags defined within a service instance.

SELECT
apiId,
display_name,
operationId,
resourceGroupName,
serviceName,
subscriptionId,
tagId
FROM azure.api_management.vw_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.

/*+ create */
INSERT INTO azure.api_management.tags (
resourceGroupName,
serviceName,
subscriptionId,
tagId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ tagId }}',
'{{ properties }}'
;

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