Auto Scaling
API Reference (API Version 2011-01-01)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.

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

The limit for the number of Auto Scaling groups or launch configurations has already been reached.

HTTP Status Code: 400

Examples

Sample Request

https://autoscaling.amazonaws.com/?Tags.member.1.ResourceId=my-test-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>