Skip to main content

API Reference

Classes

Function

A helper class for working with AWS functions.

Initializers

bring aws;

new aws.Function();
NameTypeDescription

Static Functions

NameDescription
fromIf the inflight host is an AWS function, return a helper interface for working with it.

from
bring aws;

aws.Function.from(host: IInflightHost);

If the inflight host is an AWS function, return a helper interface for working with it.

hostRequired

The inflight host.


Structs

PolicyStatement

AWS IAM Policy Statement.

Initializer

bring aws;

let PolicyStatement = aws.PolicyStatement{ ... };

Properties

NameTypeDescription
actionsMutArray<str>Actions.
effectEffectEffect ("Allow" or "Deny").
resourcesMutArray<str>Resources.

actionsOptional
actions: MutArray<str>;
  • Type: MutArray<str>

Actions.


effectOptional
effect: Effect;

Effect ("Allow" or "Deny").


resourcesOptional
resources: MutArray<str>;
  • Type: MutArray<str>

Resources.


Protocols

IAwsFunction

A shared interface for AWS functions.

Methods

NameDescription
addEnvironmentAdd an environment variable to the function.
addPolicyStatementsAdd policy statements to the function's IAM role.

addEnvironment
addEnvironment(key: str, value: str): void

Add an environment variable to the function.

keyRequired
  • Type: str

valueRequired
  • Type: str

addPolicyStatements
addPolicyStatements(...policies: Array<PolicyStatement>): void

Add policy statements to the function's IAM role.

policiesRequired

Enums

Effect

The Effect element of an AWS IAM policy statement.

Members

NameDescription
ALLOWAllow.
DENYDeny.

ALLOW

Allow.


DENY

Deny.