Skip to content

Creates an IAM role from the specified role template

Description

Creates an IAM role from the specified role template. The new role takes its configuration—including its name, path, trust policy, inline and managed policies, permissions boundary, tags, and maximum session duration—from the role template version that you specify. For more information about roles, see IAM roles in the IAM User Guide.

If the template version defines parameters, use the ReplacementValues parameter to supply the values that the service substitutes into the role during creation.

Usage

iam_acquire_role(TemplateArn, TemplateMinorVersion, ReplacementValues)

Arguments

  • TemplateArn

[required] The Amazon Resource Name (ARN) of the role template to create the role from.

For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.

  • TemplateMinorVersion

The minor version of the role template to use. If you do not specify a minor version, the service uses the template's default minor version.

  • ReplacementValues

A map of values to substitute for the parameters that are defined in the role template version. Each key is a parameter name from the template, and each value is a structure that contains the replacement values for that parameter.

Value

A list with the following syntax:

list(
  Role = list(
    Path = "string",
    RoleName = "string",
    RoleId = "string",
    Arn = "string",
    CreateDate = as.POSIXct(
      "2015-01-01"
    ),
    AssumeRolePolicyDocument = "string",
    Description = "string",
    MaxSessionDuration = 123,
    PermissionsBoundary = list(
      PermissionsBoundaryType = "PermissionsBoundaryPolicy",
      PermissionsBoundaryArn = "string"
    ),
    Tags = list(
      list(
        Key = "string",
        Value = "string"
      )
    ),
    RoleLastUsed = list(
      LastUsedDate = as.POSIXct(
        "2015-01-01"
      ),
      Region = "string"
    ),
    SourceRoleTemplate = list(
      TemplateArn = "string",
      TemplateMinorVersion = 123
    )
  )
)

Request syntax

svc$acquire_role(
  TemplateArn = "string",
  TemplateMinorVersion = 123,
  ReplacementValues = list(
    list(
      Values = list(
        "string"
      )
    )
  )
)