CreateOrUpdateTags - Amazon EC2 Auto Scaling

CreateOrUpdateTags

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.

Request Parameters

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

Tags.member.N

One or more tags.

Type: Array of Tag objects

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 Amazon EC2 Auto Scaling resources (for example, Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see DescribeAccountLimits.

HTTP Status Code: 400

ResourceContention

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

HTTP Status Code: 500

ResourceInUse

The operation can't be performed because the resource is in use.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of CreateOrUpdateTags.

Sample Request

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

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: