paws.compute (version 0.1.0)

ecs_tag_resource: Associates the specified tags to a resource with the specified resourceArn

Description

Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.

Usage

ecs_tag_resource(resourceArn, tags)

Arguments

resourceArn

[required] The Amazon Resource Name (ARN) of the resource to which to add tags. Currently, the supported resources are Amazon ECS tasks, services, task definitions, clusters, and container instances.

tags

[required] The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

Request syntax

svc$tag_resource(
  resourceArn = "string",
  tags = list(
    list(
      key = "string",
      value = "string"
    )
  )
)

Examples

Run this code
# NOT RUN {
# This example tags the 'dev' cluster with key 'team' and value 'dev'.
# }
# NOT RUN {
svc$tag_resource(
  resourceArn = "arn:aws:ecs:region:aws_account_id:cluster/dev",
  tags = list(
    list(
      key = "team",
      value = "dev"
    )
  )
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab