tags
Creates, updates, deletes, gets or lists a tags resource.
Overview
| Name | tags |
| Type | Resource |
| Id | aws.autoscaling.tags |
Fields
The following fields are returned by SELECT queries:
- describe_tags
| Name | Datatype | Description |
|---|---|---|
key | string | The tag key. |
propagate_at_launch | boolean | Determines whether the tag is added to new instances as they are launched in the group. |
resource_id | string | The name of the group. |
resource_type | string | The type of resource. The only supported value is auto-scaling-group. |
value | string | The tag value. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_tags | select | region | Filters, NextToken, MaxRecords | Describes the specified tags. You can use filters to limit the results. For example, you can query for the tags for a specific Auto Scaling group. You can specify multiple values for a filter. A tag must match at least one of the specified values for it to be included in the results. You can also specify multiple filters. The result includes information for a particular tag only if it matches all the filters. If there's no match, no special message is returned. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide. |
create_or_update_tags | insert | region | Tags | Creates or updates tags for the specified Auto Scaling group. When you specify a tag with a key that already exists, the operation overwrites the previous tag definition, and you do not get an error message. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide. |
delete_tags | delete | region | Tags | Deletes the specified tags. |
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) |
Filters | array | One or more filters to scope the tags to return. The maximum number of filters per filter type (for example, auto-scaling-group) is 1000. |
MaxRecords | integer | The maximum number of items to return with this call. The default value is 50 and the maximum value is 100. |
NextToken | string | The token for the next set of items to return. (You received this token from a previous call.) |
Tags | array | One or more tags. |
SELECT examples
- describe_tags
Describes the specified tags. You can use filters to limit the results. For example, you can query for the tags for a specific Auto Scaling group. You can specify multiple values for a filter. A tag must match at least one of the specified values for it to be included in the results. You can also specify multiple filters. The result includes information for a particular tag only if it matches all the filters. If there's no match, no special message is returned. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide.
SELECT
key,
propagate_at_launch,
resource_id,
resource_type,
value
FROM aws.autoscaling.tags
WHERE region = '{{ region }}' -- required
AND Filters = '{{ Filters }}'
AND NextToken = '{{ NextToken }}'
AND MaxRecords = '{{ MaxRecords }}'
;
INSERT examples
- create_or_update_tags
- Manifest
Creates or updates tags for the specified Auto Scaling group. When you specify a tag with a key that already exists, the operation overwrites the previous tag definition, and you do not get an error message. For more information, see Tag Auto Scaling groups and instances in the Amazon EC2 Auto Scaling User Guide.
INSERT INTO aws.autoscaling.tags (
region,
Tags
)
SELECT
'{{ region }}',
'{{ Tags }}'
;
# Description fields are for documentation purposes
- name: tags
props:
- name: region
value: "{{ region }}"
description: Required parameter for the tags resource.
- name: Tags
value: "{{ Tags }}"
description: One or more tags.
description: One or more tags.
DELETE examples
- delete_tags
Deletes the specified tags.
DELETE FROM aws.autoscaling.tags
WHERE region = '{{ region }}' --required
AND Tags = '{{ Tags }}'
;