Menu
Auto Scaling
API Reference (API Version 2011-01-01)

CreateOrUpdateTags

Creates or updates tags for the specified Auto Scaling group.

A tag is defined by its resource ID, resource type, key, value, and propagate flag. The value and the propagate flag are optional parameters. The only supported resource type is auto-scaling-group, and the resource ID must be the name of the group. The PropagateAtLaunch flag determines whether the tag is added to instances launched in the group. Valid values are true or false.

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 Tagging Auto Scaling Groups and Instances in the Auto Scaling Developer Guide.

Request Parameters

For information about the common parameters that all actions use, see Common Parameters.

Tags.member.N

One or more tags.

Type: Tag list

Required: Yes

Errors

For information about the errors that are common to all actions, see Common Errors.

AlreadyExists

You already have an Auto Scaling group or launch configuration with this name.

HTTP Status Code: 400

LimitExceeded

You have already reached a limit for your Auto Scaling resources (for example, groups, launch configurations, or lifecycle hooks). For more information, see DescribeAccountLimits.

HTTP Status Code: 400

ResourceContention

You already have a pending update to an Auto Scaling resource (for example, a group, instance, or load balancer).

HTTP Status Code: 500

Examples

Sample Request

https://autoscaling.amazonaws.com/?Tags.member.1.ResourceId=my-asg
&Tags.member.1.ResourceType=auto-scaling-group
&Tags.member.1.Key=version
&Tags.member.1.Value=1.0
&Tags.member.1.PropagateAtLaunch=true
&Version=2011-01-01
&Action=CreateOrUpdateTags
&AUTHPARAMS 

Sample Response

<CreateOrUpdateTagsResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
  <ResponseMetadata>
    <RequestId>b0203919-bf1b-11e2-8a01-13263EXAMPLE</RequestId>
  </ResponseMetadata>
</CreateOrUpdateTagsResponse>