Skip to main content

tags

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

Overview

Nametags
TypeResource
Idaws.elb.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
load_balancer_namestringThe name of the load balancer.
tagsstringThe tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_tagsselectLoadBalancerNames, regionDescribes the tags associated with the specified load balancers.
add_tagsupdateLoadBalancerNames, regionTagsAdds 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_tagsexecLoadBalancerNames, regionTagsRemoves 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.

NameDatatypeDescription
LoadBalancerNamesarrayThe name of the load balancer. You can specify a maximum of one load balancer name.
regionstringAWS region (default: us-east-1)
TagsarrayThe list of tag keys to remove.

SELECT examples

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

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

Removes one or more tags from the specified load balancer.

EXEC aws.elb.tags.remove_tags
@LoadBalancerNames='{{ LoadBalancerNames }}' --required,
@region='{{ region }}' --required,
@Tags='{{ Tags }}'
;