Fugue.AWS.IAM.InstanceProfile

Module Members

external

(Function)

Create a reference to an externally managed InstanceProfile.

Example usage:

profile: IAM.InstanceProfile.external("MyProfile")

Type Signature

 fun (String) -> InstanceProfile
Argument: name

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

Type: String

Returns:

A reference to the specified InstanceProfile.

Type: InstanceProfile

new

(Function)

InstanceProfile Constructor

Call this constructor to create a new Fugue.AWS.IAM.InstanceProfile value.

Example usage:

import Fugue.AWS.IAM as IAM

myPolicy: IAM.Policy.new {
  policyName: "my-policy",
  policyDocument: '{
  "Version": "2012-10-17",
  "Statement": {
    "Effect": "Allow",
    "Action": "s3:ListBucket",
    "Resource": "arn:aws:s3:::*"
  }
}',
}

myRole: IAM.Role.new {
  roleName: "my-role",
  rolePolicies: [myPolicy],
  assumeRolePolicyDocument: '{
  "Version": "2012-10-17",
  "Statement": {
    "Effect": "Allow",
    "Principal": {"Service": "ec2.amazonaws.com"},
    "Action": "sts:AssumeRole"
  }
}',
}

myProfile: IAM.InstanceProfile.new {
  instanceProfileName: "myProfile",
  roles: [myRole],
}

Type Signature

 fun { instanceProfileName: String,
       roles: List<Role>,
       path: Optional<String>,
       resourceId: Optional<String> } -> InstanceProfile
Argument: instanceProfileName

The name of the profile.

Type: String

Argument: roles

A list of roles to attach to this profile. A maximum of 1 role can be attached to each instance profile. Mutable.

Type: List<Role>

Argument: path

An optional string path to the profile.

Type: Optional<String>

Argument: resourceId

Currently unused.

Type: Optional<String>

Returns:

A Fugue.AWS.IAM.InstanceProfile record.

Type: InstanceProfile

Spec

(Type)

type Spec:
  instanceProfileName: String
  roles: List<Role>

DEPRECATED IAM Instance Profile Specification

This type specifies an IAM instance profile, a container that passes IAM role information to an EC2 instance at start time.

Record {

Field: instanceProfileName

The name of the profile.

Type: String

Field: roles

A list of roles to attach to this profile.

Type: List<Role>

}