tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.mediaconnect.tags |
Fields
The following fields are returned by SELECT queries:
- list_tags_for_global_resource
| Name | Datatype | Description |
|---|---|---|
tags | object | A map of tag keys and values associated with the global resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_tags_for_global_resource | select | resource_arn, region | Lists the tags associated with a global resource in AWS Elemental MediaConnect. The API supports the following global resources: router inputs, router outputs and router network interfaces. | |
untag_global_resource | update | resource_arn, tagKeys, region | Removes tags from a global resource in AWS Elemental MediaConnect. The API supports the following global resources: router inputs, router outputs and router network interfaces. | |
tag_global_resource | update | resource_arn, region | Adds tags to a global resource in AWS Elemental MediaConnect. The API supports the following global resources: router inputs, router outputs and router network interfaces. | |
list_tags_for_resource | exec | resource_arn, region | List all tags on a MediaConnect resource in the current region. | |
tag_resource | exec | resource_arn, region | Associates the specified tags to a resource with the specified resourceArn in the current region. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well. | |
untag_resource | exec | resource_arn, tagKeys, region | Deletes specified tags from a resource in the current region. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
resource_arn | string | The Amazon Resource Name (ARN) of the resource that you want to untag. |
tagKeys | array | The keys of the tags to be removed. |
SELECT examples
- list_tags_for_global_resource
Lists the tags associated with a global resource in AWS Elemental MediaConnect. The API supports the following global resources: router inputs, router outputs and router network interfaces.
SELECT
tags
FROM aws.mediaconnect.tags
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- untag_global_resource
- tag_global_resource
Removes tags from a global resource in AWS Elemental MediaConnect. The API supports the following global resources: router inputs, router outputs and router network interfaces.
UPDATE aws.mediaconnect.tags
SET
-- No updatable properties
WHERE
resource_arn = '{{ resource_arn }}' --required
AND tagKeys = '{{ tagKeys }}' --required
AND region = '{{ region }}' --required;
Adds tags to a global resource in AWS Elemental MediaConnect. The API supports the following global resources: router inputs, router outputs and router network interfaces.
UPDATE aws.mediaconnect.tags
SET
Tags = '{{ Tags }}'
WHERE
resource_arn = '{{ resource_arn }}' --required
AND region = '{{ region }}' --required;
Lifecycle Methods
- list_tags_for_resource
- tag_resource
- untag_resource
List all tags on a MediaConnect resource in the current region.
EXEC aws.mediaconnect.tags.list_tags_for_resource
@resource_arn='{{ resource_arn }}' --required,
@region='{{ region }}' --required
;
Associates the specified tags to a resource with the specified resourceArn in the current region. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.
EXEC aws.mediaconnect.tags.tag_resource
@resource_arn='{{ resource_arn }}' --required,
@region='{{ region }}' --required
@@json=
'{
"Tags": "{{ Tags }}"
}'
;
Deletes specified tags from a resource in the current region.
EXEC aws.mediaconnect.tags.untag_resource
@resource_arn='{{ resource_arn }}' --required,
@tagKeys='{{ tagKeys }}' --required,
@region='{{ region }}' --required
;