iam_tag_role: Adds one or more tags to an IAM role

Description Usage Arguments Details Request syntax Examples

View source: R/iam_operations.R

Description

Adds one or more tags to an IAM role. The role can be a regular role or a service-linked role. If a tag with the same key name already exists, then that tag is overwritten with the new value.

Usage

1
iam_tag_role(RoleName, Tags)

Arguments

RoleName

[required] The name of the role that you want to add tags to.

This parameter accepts (through its regex pattern) a string of characters that consist of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: \_+=,[email protected]

Tags

[required] The list of tags that you want to attach to the role. Each tag consists of a key name and an associated value. You can specify this with a JSON string.

Details

A tag consists of a key name and an associated value. By assigning tags to your resources, you can do the following:

<!– –>

For more information about tagging, see Tagging IAM Identities in the IAM User Guide.

Request syntax

1
2
3
4
5
6
7
8
9
svc$tag_role(
  RoleName = "string",
  Tags = list(
    list(
      Key = "string",
      Value = "string"
    )
  )
)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# The following example shows how to add tags to an existing role.
svc$tag_role(
  RoleName = "taggedrole",
  Tags = list(
    list(
      Key = "Dept",
      Value = "Accounting"
    ),
    list(
      Key = "CostCenter",
      Value = "12345"
    )
  )
)

paws.security.identity documentation built on Oct. 30, 2019, 11:26 a.m.