tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.elb.tags |
Fields
The following fields are returned by SELECT queries:
- describe_tags
| Name | Datatype | Description |
|---|---|---|
load_balancer_name | string | The name of the load balancer. |
tags | string | The tags. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_tags | select | LoadBalancerNames, region | Describes the tags associated with the specified load balancers. | |
add_tags | update | LoadBalancerNames, region | Tags | Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags. Each tag consists of a key and an optional value. If a tag with the same key is already associated with the load balancer, AddTags updates its value. For more information, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide. |
remove_tags | exec | LoadBalancerNames, region | Tags | Removes one or more tags from the specified load balancer. |
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 |
|---|---|---|
LoadBalancerNames | array | The name of the load balancer. You can specify a maximum of one load balancer name. |
region | string | AWS region (default: us-east-1) |
Tags | array | The list of tag keys to remove. |
SELECT examples
- describe_tags
Describes the tags associated with the specified load balancers.
SELECT
load_balancer_name,
tags
FROM aws.elb.tags
WHERE LoadBalancerNames = '{{ LoadBalancerNames }}' -- required
AND region = '{{ region }}' -- required
;
UPDATE examples
- add_tags
Adds the specified tags to the specified load balancer. Each load balancer can have a maximum of 10 tags. Each tag consists of a key and an optional value. If a tag with the same key is already associated with the load balancer, AddTags updates its value. For more information, see Tag Your Classic Load Balancer in the Classic Load Balancers Guide.
UPDATE aws.elb.tags
SET
-- No updatable properties
WHERE
LoadBalancerNames = '{{ LoadBalancerNames }}' --required
AND region = '{{ region }}' --required
AND Tags = '{{ Tags}}'
RETURNING
line_items;
Lifecycle Methods
- remove_tags
Removes one or more tags from the specified load balancer.
EXEC aws.elb.tags.remove_tags
@LoadBalancerNames='{{ LoadBalancerNames }}' --required,
@region='{{ region }}' --required,
@Tags='{{ Tags }}'
;