Fugue.AWS.IAM.Role

Module Members

external

(Function)

Create a reference to an externally managed Role.

Example usage:

role: IAM.Role.external("MyRole")

Type Signature

 fun (String) -> Role
Argument: name

The name of the target Role. Maximum length of 64 characters. May include alphanumeric characters and =, ,, ., @, and -, but may not include the space character.

Type: String

Returns:

A reference to the specified Role.

Type: Role

new

(Function)

Type Signature

 fun { path: Optional<String>,
       roleName: String,
       assumeRolePolicyDocument: String,
       rolePolicies: Optional<List<Policy>>,
       managedPolicies: Optional<List<ManagedPolicy>> } -> Role
Argument: path

The path to the role.

Type: Optional<String>

Argument: roleName

The name of the role.

Type: String

Argument: assumeRolePolicyDocument

Policy allowing a user, service, or federated service to assume this role. Mutable.

You may alternatively attach the assumeRolePolicyDocument policy as an external JSON document, using the readFileUtf8() method. Files are relative to the directory in which the lwc compiler is run, unless an absolute path is specified.

Example usage:

assumeRolePolicyDocument: String.readFileUtf8("policy/my-policy.json")

Type: String

Argument: rolePolicies

An optional list of policy values to attach to this role. Mutable.

Type: Optional<List<Policy>>

Argument: managedPolicies

An optional list of managed policies to attach to this role. Mutable.

Type: Optional<List<ManagedPolicy>>

Returns:

A Fugue.AWS.IAM.Role record.

Type: Role

Spec

(Type)

type Spec:
  roleName: String
  assumeRolePolicyDocument: String
  rolePolicies: Optional<List<Policy>>

DEPRECATED IAM Role Specification

This type of value specifies an IAM role, an AWS identity that delegates permission policies to whatever entity assumes the role.

Record {

Field: roleName

The name of the role.

Type: String

Field: assumeRolePolicyDocument

Policy allowing a user, service, or federated service to assume this role.

You may alternatively attach the assumeRolePolicyDocument policy as an external JSON document, using the readFileUtf8() method. Files are relative to the directory in which the lwc compiler is run, unless an absolute path is specified.

Example usage:

assumeRolePolicyDocument: String.readFileUtf8("policy/my-policy.json")

Type: String

Field: rolePolicies

A list of policy values to attach to this role.

Type: Optional<List<Policy>>

}

default

(Value)

default:
  rolePolicies: None

DEPRECATED IAM Role Specification Defaults

These are the default values for an IAM role created with the IAM role constructor, IAM.Role(). If these values are provided to the constructor, the default values are overwritten. The default values are:

  • rolePolicies: None, meaning no policies are attached to the role.