aws ecs put-attributes
Create or update an attribute on an Amazon ECS resource. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To create an attribute and associate it with an Amazon ECS resource
The following put-attributes example applies an attribute with the name stack and the value production to a container instance.
aws ecs put-attributes --attributes name=stack,value=production,targetId=arn:aws:ecs:us-west-2:123456789012:container-instance/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111Identify--attributesThe attributes to apply to your resource.Its output
{
"attributes": [
{
"name": "stack",
"targetId": "arn:aws:ecs:us-west-2:123456789012:container-instance/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"value": "production"
}
]
}For more information, see Define which container instances Amazon ECS uses for tasks in the Amazon ECS Developer Guide.
Options
--attributesThe attributes to apply to your resource.--clusterThe short name or full Amazon Resource Name (ARN) of the cluster that contains the resource to apply attributes.