tag
Creates, updates, deletes, gets or lists a tag resource.
Overview
| Name | tag |
| Type | Resource |
| Id | azure.api_management.tag |
Fields
The following fields are returned by SELECT queries:
- get_by_operation
- list_by_operation
- get_by_api
- get_by_product
- get
- list_by_api
- list_by_product
- list_by_service
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | Tag name. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | Tag name. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | Tag name. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | Tag name. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | Tag name. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | Tag name. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | Tag name. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
displayName | string | Tag name. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_id | string | API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number. Required. |
operation_id | string | Operation identifier within an API. Must be unique in the current API Management service instance. Required. |
product_id | string | Product identifier. Must be unique in the current API Management service instance. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
service_name | string | The name of the API Management service. Required. |
subscription_id | string | |
tag_id | string | Tag identifier. Must be unique in the current API Management service instance. Required. |
$filter | string | | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |. Default value is None. |
$skip | integer | Number of records to skip. Default value is None. |
$top | integer | Number of records to return. Default value is None. |
scope | string | Scope like 'apis', 'products' or 'apis/{apiId}. Default value is None. |
SELECT examples
- get_by_operation
- list_by_operation
- get_by_api
- get_by_product
- get
- list_by_api
- list_by_product
- list_by_service
Get tag associated with the Operation.
SELECT
id,
name,
displayName,
systemData,
type
FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND api_id = '{{ api_id }}' -- required
AND operation_id = '{{ operation_id }}' -- required
AND tag_id = '{{ tag_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all Tags associated with the Operation.
SELECT
id,
name,
displayName,
systemData,
type
FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND api_id = '{{ api_id }}' -- required
AND operation_id = '{{ operation_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;
Get tag associated with the API.
SELECT
id,
name,
displayName,
systemData,
type
FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND api_id = '{{ api_id }}' -- required
AND tag_id = '{{ tag_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Get tag associated with the Product.
SELECT
id,
name,
displayName,
systemData,
type
FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND product_id = '{{ product_id }}' -- required
AND tag_id = '{{ tag_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets the details of the tag specified by its identifier.
SELECT
id,
name,
displayName,
systemData,
type
FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND tag_id = '{{ tag_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all Tags associated with the API.
SELECT
id,
name,
displayName,
systemData,
type
FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND api_id = '{{ api_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;
Lists all Tags associated with the Product.
SELECT
id,
name,
displayName,
systemData,
type
FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND product_id = '{{ product_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;
Lists a collection of tags defined within a service instance.
SELECT
id,
name,
displayName,
systemData,
type
FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
AND scope = '{{ scope }}'
;
INSERT examples
- create_or_update
- Manifest
Creates a tag.
INSERT INTO azure.api_management.tag (
properties,
resource_group_name,
service_name,
tag_id,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ tag_id }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: tag
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the tag resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the tag resource.
- name: tag_id
value: "{{ tag_id }}"
description: Required parameter for the tag resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the tag resource.
- name: properties
description: |
Properties supplied to Create Tag operation.
value:
displayName: "{{ displayName }}"
UPDATE examples
- update
Updates the details of the tag specified by its identifier.
UPDATE azure.api_management.tag
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND tag_id = '{{ tag_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
REPLACE examples
- create_or_update
Creates a tag.
REPLACE azure.api_management.tag
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND tag_id = '{{ tag_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- detach_from_operation
- detach_from_api
- detach_from_product
- delete
Detach the tag from the Operation.
DELETE FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND api_id = '{{ api_id }}' --required
AND operation_id = '{{ operation_id }}' --required
AND tag_id = '{{ tag_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Detach the tag from the Api.
DELETE FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND api_id = '{{ api_id }}' --required
AND tag_id = '{{ tag_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Detach the tag from the Product.
DELETE FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND product_id = '{{ product_id }}' --required
AND tag_id = '{{ tag_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Deletes specific tag of the API Management service instance.
DELETE FROM azure.api_management.tag
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND tag_id = '{{ tag_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_entity_state
- get_entity_state_by_api
- assign_to_api
- get_entity_state_by_operation
- assign_to_operation
- get_entity_state_by_product
- assign_to_product
Gets the entity state version of the tag specified by its identifier.
EXEC azure.api_management.tag.get_entity_state
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@tag_id='{{ tag_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets the entity state version of the tag specified by its identifier.
EXEC azure.api_management.tag.get_entity_state_by_api
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@api_id='{{ api_id }}' --required,
@tag_id='{{ tag_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Assign tag to the Api.
EXEC azure.api_management.tag.assign_to_api
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@api_id='{{ api_id }}' --required,
@tag_id='{{ tag_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets the entity state version of the tag specified by its identifier.
EXEC azure.api_management.tag.get_entity_state_by_operation
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@api_id='{{ api_id }}' --required,
@operation_id='{{ operation_id }}' --required,
@tag_id='{{ tag_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Assign tag to the Operation.
EXEC azure.api_management.tag.assign_to_operation
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@api_id='{{ api_id }}' --required,
@operation_id='{{ operation_id }}' --required,
@tag_id='{{ tag_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets the entity state version of the tag specified by its identifier.
EXEC azure.api_management.tag.get_entity_state_by_product
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@product_id='{{ product_id }}' --required,
@tag_id='{{ tag_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Assign tag to the Product.
EXEC azure.api_management.tag.assign_to_product
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@product_id='{{ product_id }}' --required,
@tag_id='{{ tag_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;