Skip to main content

API Reference

Constructs

App

Initializers

import { core } from '@monadahq/wingsdk'

new core.App(props: AppProps)
NameTypeDescription
props@monadahq/wingsdk.core.AppPropsNo description.

propsRequired
  • Type: @monadahq/wingsdk.core.AppProps

Methods

NameDescription
toStringReturns a string representation of this construct.
synthNo description.

toString
public toString(): string

Returns a string representation of this construct.

synth
public synth(): void

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { core } from '@monadahq/wingsdk'

core.App.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
outdirstringNo description.
rootconstructs.ConstructNo description.
stateFilestringNo description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


outdirRequired
public readonly outdir: string;
  • Type: string

rootRequired
public readonly root: Construct;
  • Type: constructs.Construct

stateFileOptional
public readonly stateFile: string;
  • Type: string

App

Initializers

import { sim } from '@monadahq/wingsdk'

new sim.App(props: AppProps)
NameTypeDescription
props@monadahq/wingsdk.sim.AppPropsNo description.

propsRequired
  • Type: @monadahq/wingsdk.sim.AppProps

Methods

NameDescription
toStringReturns a string representation of this construct.
synthNo description.

toString
public toString(): string

Returns a string representation of this construct.

synth
public synth(): void

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { sim } from '@monadahq/wingsdk'

sim.App.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


Bucket

Represents a cloud object store.

Initializers

import { cloud } from '@monadahq/wingsdk'

new cloud.Bucket(scope: Construct, id: string, props?: BucketProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
props@monadahq/wingsdk.cloud.BucketPropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsOptional
  • Type: @monadahq/wingsdk.cloud.BucketProps

Methods

NameDescription
toStringReturns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { cloud } from '@monadahq/wingsdk'

cloud.Bucket.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


Bucket

  • Implements: @monadahq/wingsdk.sim.IResource

Initializers

import { sim } from '@monadahq/wingsdk'

new sim.Bucket(scope: Construct, id: string, props: BucketProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
props@monadahq/wingsdk.cloud.BucketPropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired
  • Type: @monadahq/wingsdk.cloud.BucketProps

Methods

NameDescription
toStringReturns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { sim } from '@monadahq/wingsdk'

sim.Bucket.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


Bucket

Initializers

import { tfaws } from '@monadahq/wingsdk'

new tfaws.Bucket(scope: Construct, id: string, props: BucketProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
props@monadahq/wingsdk.cloud.BucketPropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired
  • Type: @monadahq/wingsdk.cloud.BucketProps

Methods

NameDescription
toStringReturns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { tfaws } from '@monadahq/wingsdk'

tfaws.Bucket.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


BucketBase

Functionality shared between all Bucket implementations.

Initializers

import { cloud } from '@monadahq/wingsdk'

new cloud.BucketBase(scope: Construct, id: string, props: BucketProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
props@monadahq/wingsdk.cloud.BucketPropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired
  • Type: @monadahq/wingsdk.cloud.BucketProps

Methods

NameDescription
toStringReturns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { cloud } from '@monadahq/wingsdk'

cloud.BucketBase.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


FileBase

Initializers

import { fs } from '@monadahq/wingsdk'

new fs.FileBase(scope: Construct, id: string, filePath: string)
NameTypeDescription
scopeconstructs.Constructconstruct scope.
idstringconstruct id.
filePathstringrelative file path.

scopeRequired
  • Type: constructs.Construct

construct scope.


idRequired
  • Type: string

construct id.


filePathRequired
  • Type: string

relative file path.


Methods

NameDescription
toStringReturns a string representation of this construct.
saveNo description.

toString
public toString(): string

Returns a string representation of this construct.

save
public save(outdir: string): void
outdirRequired
  • Type: string

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { fs } from '@monadahq/wingsdk'

fs.FileBase.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
filePathstringNo description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


filePathRequired
public readonly filePath: string;
  • Type: string

Function

Represents a serverless function.

Initializers

import { cloud } from '@monadahq/wingsdk'

new cloud.Function(scope: Construct, id: string, inflight: Inflight, props?: FunctionProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
inflight@monadahq/wingsdk.core.InflightNo description.
props@monadahq/wingsdk.cloud.FunctionPropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

inflightRequired
  • Type: @monadahq/wingsdk.core.Inflight

propsOptional
  • Type: @monadahq/wingsdk.cloud.FunctionProps

Methods

NameDescription
toStringReturns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { cloud } from '@monadahq/wingsdk'

cloud.Function.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


Function

  • Implements: @monadahq/wingsdk.sim.IResource

Initializers

import { sim } from '@monadahq/wingsdk'

new sim.Function(scope: Construct, id: string, inflight: Inflight, props: FunctionProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
inflight@monadahq/wingsdk.core.InflightNo description.
props@monadahq/wingsdk.cloud.FunctionPropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

inflightRequired
  • Type: @monadahq/wingsdk.core.Inflight

propsRequired
  • Type: @monadahq/wingsdk.cloud.FunctionProps

Methods

NameDescription
toStringReturns a string representation of this construct.
addEnvironmentNo description.

toString
public toString(): string

Returns a string representation of this construct.

addEnvironment
public addEnvironment(name: string, value: string): void
nameRequired
  • Type: string

valueRequired
  • Type: string

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { sim } from '@monadahq/wingsdk'

sim.Function.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


Function

Initializers

import { tfaws } from '@monadahq/wingsdk'

new tfaws.Function(scope: Construct, id: string, inflight: Inflight, props: FunctionProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
inflight@monadahq/wingsdk.core.InflightNo description.
props@monadahq/wingsdk.cloud.FunctionPropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

inflightRequired
  • Type: @monadahq/wingsdk.core.Inflight

propsRequired
  • Type: @monadahq/wingsdk.cloud.FunctionProps

Methods

NameDescription
toStringReturns a string representation of this construct.
addEnvironmentNo description.
addPolicyStatementsNo description.

toString
public toString(): string

Returns a string representation of this construct.

addEnvironment
public addEnvironment(name: string, value: string): void
nameRequired
  • Type: string

valueRequired
  • Type: string

addPolicyStatements
public addPolicyStatements(statements: PolicyStatement): void
statementsRequired
  • Type: @monadahq/wingsdk.tfaws.PolicyStatement

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { tfaws } from '@monadahq/wingsdk'

tfaws.Function.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


FunctionBase

Functionality shared between all Function implementations.

Initializers

import { cloud } from '@monadahq/wingsdk'

new cloud.FunctionBase(scope: Construct, id: string, inflight: Inflight, props: FunctionProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
inflight@monadahq/wingsdk.core.InflightNo description.
props@monadahq/wingsdk.cloud.FunctionPropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

inflightRequired
  • Type: @monadahq/wingsdk.core.Inflight

propsRequired
  • Type: @monadahq/wingsdk.cloud.FunctionProps

Methods

NameDescription
toStringReturns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { cloud } from '@monadahq/wingsdk'

cloud.FunctionBase.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


JsonFile

Initializers

import { fs } from '@monadahq/wingsdk'

new fs.JsonFile(scope: Construct, id: string, filePath: string, props: JsonFileProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
filePathstringNo description.
props@monadahq/wingsdk.fs.JsonFilePropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

filePathRequired
  • Type: string

propsRequired
  • Type: @monadahq/wingsdk.fs.JsonFileProps

Methods

NameDescription
toStringReturns a string representation of this construct.
saveNo description.

toString
public toString(): string

Returns a string representation of this construct.

save
public save(outdir: string): void
outdirRequired
  • Type: string

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { fs } from '@monadahq/wingsdk'

fs.JsonFile.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
filePathstringNo description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


filePathRequired
public readonly filePath: string;
  • Type: string

Queue

Represents a serverless queue.

Initializers

import { cloud } from '@monadahq/wingsdk'

new cloud.Queue(scope: Construct, id: string, props?: QueueProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
props@monadahq/wingsdk.cloud.QueuePropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsOptional
  • Type: @monadahq/wingsdk.cloud.QueueProps

Methods

NameDescription
toStringReturns a string representation of this construct.
onMessageCreate a function to consume messages from this queue.

toString
public toString(): string

Returns a string representation of this construct.

onMessage
public onMessage(_inflight: Inflight, _props?: QueueOnMessageProps): Function

Create a function to consume messages from this queue.

_inflightRequired
  • Type: @monadahq/wingsdk.core.Inflight

_propsOptional
  • Type: @monadahq/wingsdk.cloud.QueueOnMessageProps

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { cloud } from '@monadahq/wingsdk'

cloud.Queue.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


Queue

  • Implements: @monadahq/wingsdk.sim.IResource

Initializers

import { sim } from '@monadahq/wingsdk'

new sim.Queue(scope: Construct, id: string, props?: QueueProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
props@monadahq/wingsdk.cloud.QueuePropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsOptional
  • Type: @monadahq/wingsdk.cloud.QueueProps

Methods

NameDescription
toStringReturns a string representation of this construct.
onMessageCreate a function to consume messages from this queue.

toString
public toString(): string

Returns a string representation of this construct.

onMessage
public onMessage(inflight: Inflight, props?: QueueOnMessageProps): Function

Create a function to consume messages from this queue.

inflightRequired
  • Type: @monadahq/wingsdk.core.Inflight

propsOptional
  • Type: @monadahq/wingsdk.cloud.QueueOnMessageProps

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { sim } from '@monadahq/wingsdk'

sim.Queue.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


Queue

Initializers

import { tfaws } from '@monadahq/wingsdk'

new tfaws.Queue(scope: Construct, id: string, props?: QueueProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
props@monadahq/wingsdk.cloud.QueuePropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsOptional
  • Type: @monadahq/wingsdk.cloud.QueueProps

Methods

NameDescription
toStringReturns a string representation of this construct.
onMessageCreate a function to consume messages from this queue.

toString
public toString(): string

Returns a string representation of this construct.

onMessage
public onMessage(inflight: Inflight, props?: QueueOnMessageProps): Function

Create a function to consume messages from this queue.

inflightRequired
  • Type: @monadahq/wingsdk.core.Inflight

propsOptional
  • Type: @monadahq/wingsdk.cloud.QueueOnMessageProps

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { tfaws } from '@monadahq/wingsdk'

tfaws.Queue.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


QueueBase

Functionality shared between all Queue implementations.

Initializers

import { cloud } from '@monadahq/wingsdk'

new cloud.QueueBase(scope: Construct, id: string, props?: QueueProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
props@monadahq/wingsdk.cloud.QueuePropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsOptional
  • Type: @monadahq/wingsdk.cloud.QueueProps

Methods

NameDescription
toStringReturns a string representation of this construct.
onMessageCreate a function to consume messages from this queue.

toString
public toString(): string

Returns a string representation of this construct.

onMessage
public onMessage(inflight: Inflight, props?: QueueOnMessageProps): Function

Create a function to consume messages from this queue.

inflightRequired
  • Type: @monadahq/wingsdk.core.Inflight

propsOptional
  • Type: @monadahq/wingsdk.cloud.QueueOnMessageProps

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { cloud } from '@monadahq/wingsdk'

cloud.QueueBase.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


Resource

  • Implements: @monadahq/wingsdk.core.ICapturable

Initializers

import { cloud } from '@monadahq/wingsdk'

new cloud.Resource(scope: Construct, id: string)
NameTypeDescription
scopeconstructs.ConstructThe scope in which to define this construct.
idstringThe scoped construct ID.

scopeRequired
  • Type: constructs.Construct

The scope in which to define this construct.


idRequired
  • Type: string

The scoped construct ID.

Must be unique amongst siblings. If the ID includes a path separator (/), then it will be replaced by double dash --.


Methods

NameDescription
toStringReturns a string representation of this construct.

toString
public toString(): string

Returns a string representation of this construct.

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { cloud } from '@monadahq/wingsdk'

cloud.Resource.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
statefulbooleanWhether a resource is stateful, i.e. it stores information that is not defined by your application.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


statefulRequired
public readonly stateful: boolean;
  • Type: boolean

Whether a resource is stateful, i.e. it stores information that is not defined by your application.

A non-stateful resource does not remember information about past transactions or events, and can typically be replaced by a cloud provider with a fresh copy without any consequences.


TextFile

Initializers

import { fs } from '@monadahq/wingsdk'

new fs.TextFile(scope: Construct, id: string, filePath: string, props?: TextFileProps)
NameTypeDescription
scopeconstructs.ConstructNo description.
idstringNo description.
filePathstringNo description.
props@monadahq/wingsdk.fs.TextFilePropsNo description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

filePathRequired
  • Type: string

propsOptional
  • Type: @monadahq/wingsdk.fs.TextFileProps

Methods

NameDescription
toStringReturns a string representation of this construct.
saveNo description.
addLineNo description.

toString
public toString(): string

Returns a string representation of this construct.

save
public save(outdir: string): void
outdirRequired
  • Type: string

addLine
public addLine(line: string): void
lineRequired
  • Type: string

Static Functions

NameDescription
isConstructChecks if x is a construct.

isConstruct
import { fs } from '@monadahq/wingsdk'

fs.TextFile.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
filePathstringNo description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


filePathRequired
public readonly filePath: string;
  • Type: string

Structs

AppProps

Initializer

import { core } from '@monadahq/wingsdk'

const appProps: core.AppProps = { ... }

Properties

NameTypeDescription
synthesizer@monadahq/wingsdk.core.SynthesizerA synthesizer that handles setting up a CDK framework and registering a polycon factory.
stateFilestringThe path to a state file which will track all synthesized files.

synthesizerRequired
public readonly synthesizer: Synthesizer;
  • Type: @monadahq/wingsdk.core.Synthesizer

A synthesizer that handles setting up a CDK framework and registering a polycon factory.


stateFileOptional
public readonly stateFile: string;
  • Type: string

The path to a state file which will track all synthesized files.

If a statefile is not specified, we won't be able to remove extrenous files.


AppProps

Initializer

import { sim } from '@monadahq/wingsdk'

const appProps: sim.AppProps = { ... }

Properties

NameTypeDescription
outdirstringNo description.

outdirRequired
public readonly outdir: string;
  • Type: string

BucketProps

Properties for Bucket.

Initializer

import { cloud } from '@monadahq/wingsdk'

const bucketProps: cloud.BucketProps = { ... }

Properties

NameTypeDescription
publicbooleanWhether objects in the bucket are publicly accessible.

publicOptional
public readonly public: boolean;
  • Type: boolean
  • Default: false

Whether objects in the bucket are publicly accessible.


Capture

Capture information.

A capture is a reference from an Inflight to a construction-time object or value.

Initializer

import { core } from '@monadahq/wingsdk'

const capture: core.Capture = { ... }

Properties

NameTypeDescription
methodsstring[]Which methods are called on the captured object.
objanyThe captured object.

methodsOptional
public readonly methods: string[];
  • Type: string[]

Which methods are called on the captured object.


objRequired
public readonly obj: any;
  • Type: any

The captured object.


CaptureMetadata

Extra metadata associated with a capture.

Initializer

import { core } from '@monadahq/wingsdk'

const captureMetadata: core.CaptureMetadata = { ... }

Properties

NameTypeDescription
methodsstring[]Which methods are called on the captured object.

methodsOptional
public readonly methods: string[];
  • Type: string[]

Which methods are called on the captured object.


FunctionProps

Properties for Function.

This is the type users see when constructing a cloud.Function instance.

Initializer

import { cloud } from '@monadahq/wingsdk'

const functionProps: cloud.FunctionProps = { ... }

Properties

NameTypeDescription
env{[ key: string ]: string}Environment variables to pass to the function.

envOptional
public readonly env: {[ key: string ]: string};
  • Type: {[ key: string ]: string}
  • Default: No environment variables.

Environment variables to pass to the function.


InflightBundleOptions

Options for Inflight.bundle.

Initializer

import { core } from '@monadahq/wingsdk'

const inflightBundleOptions: core.InflightBundleOptions = { ... }

Properties

NameTypeDescription
captureClients{[ key: string ]: @monadahq/wingsdk.core.Code}A map of capture clients that can be bundled with the Inflight's code.
captureScopeconstructs.IConstructAssociate the inflight bundle with a given capture scope.
externalstring[]List of dependencies to exclude from the bundle.

captureClientsRequired
public readonly captureClients: {[ key: string ]: Code};
  • Type: {[ key: string ]: @monadahq/wingsdk.core.Code}

A map of capture clients that can be bundled with the Inflight's code.


captureScopeOptional
public readonly captureScope: IConstruct;
  • Type: constructs.IConstruct

Associate the inflight bundle with a given capture scope.


externalOptional
public readonly external: string[];
  • Type: string[]

List of dependencies to exclude from the bundle.


InflightProps

Options for Inflight.

Initializer

import { core } from '@monadahq/wingsdk'

const inflightProps: core.InflightProps = { ... }

Properties

NameTypeDescription
code@monadahq/wingsdk.core.CodeReference to code containing the entrypoint function.
entrypointstringName of the exported function to run.
captures{[ key: string ]: @monadahq/wingsdk.core.Capture}Capture information.

codeRequired
public readonly code: Code;
  • Type: @monadahq/wingsdk.core.Code

Reference to code containing the entrypoint function.


entrypointRequired
public readonly entrypoint: string;
  • Type: string

Name of the exported function to run.


Example

"exports.handler"
capturesOptional
public readonly captures: {[ key: string ]: Capture};
  • Type: {[ key: string ]: @monadahq/wingsdk.core.Capture}

Capture information.

During runtime, a map containing all captured values will be passed as the first argument of the entrypoint function.

Each key here will be the key for the final value in the map.


JsonFileProps

Initializer

import { fs } from '@monadahq/wingsdk'

const jsonFileProps: fs.JsonFileProps = { ... }

Properties

NameTypeDescription
objanyThe object that will be serialized into the file during synthesis.

objRequired
public readonly obj: any;
  • Type: any

The object that will be serialized into the file during synthesis.


PolicyStatement

Initializer

import { tfaws } from '@monadahq/wingsdk'

const policyStatement: tfaws.PolicyStatement = { ... }

Properties

NameTypeDescription
actionstring[]No description.
effectstringNo description.
resourcestring | string[]No description.

actionOptional
public readonly action: string[];
  • Type: string[]

effectOptional
public readonly effect: string;
  • Type: string

resourceOptional
public readonly resource: string | string[];
  • Type: string | string[]

QueueOnMessageProps

Options for Queue.onMessage.

Initializer

import { cloud } from '@monadahq/wingsdk'

const queueOnMessageProps: cloud.QueueOnMessageProps = { ... }

Properties

NameTypeDescription
env{[ key: string ]: string}Environment variables to pass to the function.
batchSizenumberThe maximum number of messages to send to subscribers at once.

envOptional
public readonly env: {[ key: string ]: string};
  • Type: {[ key: string ]: string}
  • Default: No environment variables.

Environment variables to pass to the function.


batchSizeOptional
public readonly batchSize: number;
  • Type: number
  • Default: 1

The maximum number of messages to send to subscribers at once.


QueueProps

Properties for Queue.

Initializer

import { cloud } from '@monadahq/wingsdk'

const queueProps: cloud.QueueProps = { ... }

Properties

NameTypeDescription
timeout@monadahq/wingsdk.core.DurationHow long a queue's consumers have to process a message.

timeoutOptional
public readonly timeout: Duration;
  • Type: @monadahq/wingsdk.core.Duration
  • Default: Duration.fromSeconds(10)

How long a queue's consumers have to process a message.


ResourceSpec

Initializer

import { sim } from '@monadahq/wingsdk'

const resourceSpec: sim.ResourceSpec = { ... }

Properties

NameTypeDescription
kindstringNo description.
namestringNo description.
propsanyNo description.

kindRequired
public readonly kind: string;
  • Type: string

nameRequired
public readonly name: string;
  • Type: string

propsRequired
public readonly props: any;
  • Type: any

SynthesizerProps

Initializer

import { core } from '@monadahq/wingsdk'

const synthesizerProps: core.SynthesizerProps = { ... }

Properties

NameTypeDescription
customFactory@monadahq/polycons.IPolyconFactoryNo description.
outdirstringNo description.

customFactoryOptional
public readonly customFactory: IPolyconFactory;
  • Type: @monadahq/polycons.IPolyconFactory

outdirOptional
public readonly outdir: string;
  • Type: string

TextFileProps

Initializer

import { fs } from '@monadahq/wingsdk'

const textFileProps: fs.TextFileProps = { ... }

Properties

NameTypeDescription
linesstring[]No description.

linesOptional
public readonly lines: string[];
  • Type: string[]

Void

This type exists as a placeholder for wherever "void" should be used in Promise interfaces.

This exists as a workaround for https://github.com/aws/jsii/issues/51

Initializer

import { cloud } from '@monadahq/wingsdk'

const void: cloud.Void = { ... }

Classes

Code

Reference to a piece of code.

Initializers

import { core } from '@monadahq/wingsdk'

new core.Code()
NameTypeDescription

Properties

NameTypeDescription
hashstringGenerate a hash of the code contents.
language@monadahq/wingsdk.core.LanguageThe language of the code.
pathstringA path to the code in the user's file system that can be referenced for bundling purposes.
textstringThe code contents.

hashRequired
public readonly hash: string;
  • Type: string

Generate a hash of the code contents.


languageRequired
public readonly language: Language;
  • Type: @monadahq/wingsdk.core.Language

The language of the code.


pathRequired
public readonly path: string;
  • Type: string

A path to the code in the user's file system that can be referenced for bundling purposes.


textRequired
public readonly text: string;
  • Type: string

The code contents.


Duration

Static Functions

NameDescription
fromHoursNo description.
fromMinutesNo description.
fromSecondsNo description.

fromHours
import { core } from '@monadahq/wingsdk'

core.Duration.fromHours(amount: number)
amountRequired
  • Type: number

fromMinutes
import { core } from '@monadahq/wingsdk'

core.Duration.fromMinutes(amount: number)
amountRequired
  • Type: number

fromSeconds
import { core } from '@monadahq/wingsdk'

core.Duration.fromSeconds(amount: number)
amountRequired
  • Type: number

Properties

NameTypeDescription
hoursnumberNo description.
minutesnumberNo description.
secondsnumberNo description.

hoursRequired
public readonly hours: number;
  • Type: number

minutesRequired
public readonly minutes: number;
  • Type: number

secondsRequired
public readonly seconds: number;
  • Type: number

Inflight

Represents a unit of application code that can be executed by a cloud resource.

Initializers

import { core } from '@monadahq/wingsdk'

new core.Inflight(props: InflightProps)
NameTypeDescription
props@monadahq/wingsdk.core.InflightPropsNo description.

propsRequired
  • Type: @monadahq/wingsdk.core.InflightProps

Methods

NameDescription
bundleBundle this inflight process so that it can be used in the given capture scope.
makeClientsResolve this inflight's captured objects into a map of clients that be safely referenced at runtime.

bundle
public bundle(options: InflightBundleOptions): Code

Bundle this inflight process so that it can be used in the given capture scope.

Returns the path to a JavaScript file that has been rewritten to include all dependencies and captured values or clients. The file is isolated in its own directory so that it can be zipped up and uploaded to cloud providers.

High level implementation:

  1. Read the file (let's say its path is path/to/foo.js)
  2. Create a new javascript file named path/to/foo.prebundle.js, including a map of all capture clients, a new handler that calls the original handler with the clients passed in, and a copy of the user's code from path/to/foo.js.
  3. Use esbuild to bundle all dependencies, outputting the result to path/to/foo.js.bundle/index.js.
optionsRequired
  • Type: @monadahq/wingsdk.core.InflightBundleOptions

makeClients
public makeClients(captureScope: IConstruct): {[ key: string ]: Code}

Resolve this inflight's captured objects into a map of clients that be safely referenced at runtime.

captureScopeRequired
  • Type: constructs.IConstruct

Properties

NameTypeDescription
captures{[ key: string ]: @monadahq/wingsdk.core.Capture}Capture information.
code@monadahq/wingsdk.core.CodeReference to code containing the entrypoint function.
entrypointstringName of the exported function which will be run.

capturesRequired
public readonly captures: {[ key: string ]: Capture};
  • Type: {[ key: string ]: @monadahq/wingsdk.core.Capture}

Capture information.

During runtime, a map containing all captured values will be passed as the first argument of the entrypoint function.

Each key here will be the key for the final value in the map.


codeRequired
public readonly code: Code;
  • Type: @monadahq/wingsdk.core.Code

Reference to code containing the entrypoint function.


entrypointRequired
public readonly entrypoint: string;
  • Type: string

Name of the exported function which will be run.


InflightClient

Static Functions

NameDescription
forNo description.

for
import { core } from '@monadahq/wingsdk'

core.InflightClient.for(filename: string, clientClass: string, args: string[])
filenameRequired
  • Type: string

clientClassRequired
  • Type: string

argsRequired
  • Type: string[]

NodeJsCode

Reference to a piece of Node.js code.

Static Functions

NameDescription
fromFileReference code from a file path.
fromInlineReference code directly from a string.

fromFile
import { core } from '@monadahq/wingsdk'

core.NodeJsCode.fromFile(path: string)

Reference code from a file path.

pathRequired
  • Type: string

fromInline
import { core } from '@monadahq/wingsdk'

core.NodeJsCode.fromInline(text: string)

Reference code directly from a string.

textRequired
  • Type: string

Properties

NameTypeDescription
hashstringGenerate a hash of the code contents.
language@monadahq/wingsdk.core.LanguageThe language of the code.
pathstringNo description.
textstringThe code contents.

hashRequired
public readonly hash: string;
  • Type: string

Generate a hash of the code contents.


languageRequired
public readonly language: Language;
  • Type: @monadahq/wingsdk.core.Language

The language of the code.


pathRequired
public readonly path: string;
  • Type: string

textRequired
public readonly text: string;
  • Type: string

The code contents.


PolyconFactory

  • Implements: @monadahq/polycons.IPolyconFactory

Initializers

import { sim } from '@monadahq/wingsdk'

new sim.PolyconFactory()
NameTypeDescription

Methods

NameDescription
resolveResolve the parameters needed for creating a specific polycon into a concrete construct.

resolve
public resolve(polyconId: string, scope: IConstruct, id: string, args: any): IConstruct

Resolve the parameters needed for creating a specific polycon into a concrete construct.

polyconIdRequired
  • Type: string

scopeRequired
  • Type: constructs.IConstruct

idRequired
  • Type: string

argsRequired
  • Type: any

PolyconFactory

  • Implements: @monadahq/polycons.IPolyconFactory

Initializers

import { tfaws } from '@monadahq/wingsdk'

new tfaws.PolyconFactory()
NameTypeDescription

Methods

NameDescription
resolveResolve the parameters needed for creating a specific polycon into a concrete construct.

resolve
public resolve(polyconId: string, scope: IConstruct, id: string, args: any): IConstruct

Resolve the parameters needed for creating a specific polycon into a concrete construct.

polyconIdRequired
  • Type: string

scopeRequired
  • Type: constructs.IConstruct

idRequired
  • Type: string

argsRequired
  • Type: any

Synthesizer

Handles the initialization and synthesis of constructs for a given CDK framework.

Initializers

import { core } from '@monadahq/wingsdk'

new core.Synthesizer(props: SynthesizerProps)
NameTypeDescription
props@monadahq/wingsdk.core.SynthesizerPropsNo description.

propsRequired
  • Type: @monadahq/wingsdk.core.SynthesizerProps

Methods

NameDescription
synthSynthesize the app.

synth
public synth(): void

Synthesize the app.

Properties

NameTypeDescription
outdirstringPath to the output directory.
rootconstructs.ConstructPlace in the construct tree where all users constructs will get added.

outdirRequired
public readonly outdir: string;
  • Type: string

Path to the output directory.

For example, if synthesizing to terraform, cdktf.out will be created in here.


rootRequired
public readonly root: Construct;
  • Type: constructs.Construct

Place in the construct tree where all users constructs will get added.


Synthesizer

Initializers

import { sim } from '@monadahq/wingsdk'

new sim.Synthesizer(props?: SynthesizerProps)
NameTypeDescription
props@monadahq/wingsdk.core.SynthesizerPropsNo description.

propsOptional
  • Type: @monadahq/wingsdk.core.SynthesizerProps

Methods

NameDescription
synthSynthesize the app.

synth
public synth(): void

Synthesize the app.

Properties

NameTypeDescription
outdirstringPath to the output directory.
rootconstructs.ConstructPlace in the construct tree where all users constructs will get added.

outdirRequired
public readonly outdir: string;
  • Type: string

Path to the output directory.

For example, if synthesizing to terraform, cdktf.out will be created in here.


rootRequired
public readonly root: Construct;
  • Type: constructs.Construct

Place in the construct tree where all users constructs will get added.


Synthesizer

Initializers

import { tfaws } from '@monadahq/wingsdk'

new tfaws.Synthesizer(props?: SynthesizerProps)
NameTypeDescription
props@monadahq/wingsdk.core.SynthesizerPropsNo description.

propsOptional
  • Type: @monadahq/wingsdk.core.SynthesizerProps

Methods

NameDescription
synthSynthesize the app.

synth
public synth(): void

Synthesize the app.

Properties

NameTypeDescription
outdirstringPath to the output directory.
rootconstructs.ConstructPlace in the construct tree where all users constructs will get added.

outdirRequired
public readonly outdir: string;
  • Type: string

Path to the output directory.

For example, if synthesizing to terraform, cdktf.out will be created in here.


rootRequired
public readonly root: Construct;
  • Type: constructs.Construct

Place in the construct tree where all users constructs will get added.


Testing

Testing utilities.

Initializers

import { core } from '@monadahq/wingsdk'

new core.Testing()
NameTypeDescription

Static Functions

NameDescription
inspectPrebundledCodeObtain a reference to the prebundled Code for a given capture scope.

inspectPrebundledCode
import { core } from '@monadahq/wingsdk'

core.Testing.inspectPrebundledCode(captureScope: IConstruct)

Obtain a reference to the prebundled Code for a given capture scope.

captureScopeRequired
  • Type: constructs.IConstruct

Protocols

IBucketClient

  • Implemented By: @monadahq/wingsdk.cloud.IBucketClient

Inflight interface for Bucket.

Methods

NameDescription
getNo description.
putNo description.

get
public get(key: string): string
keyRequired
  • Type: string

put
public put(key: string, body: string): Void
keyRequired
  • Type: string

bodyRequired
  • Type: string

ICapturable

  • Implemented By: @monadahq/wingsdk.cloud.Bucket, @monadahq/wingsdk.cloud.BucketBase, @monadahq/wingsdk.cloud.Function, @monadahq/wingsdk.cloud.FunctionBase, @monadahq/wingsdk.cloud.Queue, @monadahq/wingsdk.cloud.QueueBase, @monadahq/wingsdk.cloud.Resource, @monadahq/wingsdk.sim.Bucket, @monadahq/wingsdk.sim.Function, @monadahq/wingsdk.sim.Queue, @monadahq/wingsdk.tfaws.Bucket, @monadahq/wingsdk.tfaws.Function, @monadahq/wingsdk.tfaws.Queue, @monadahq/wingsdk.core.ICapturable

Represents something that is capturable by an Inflight.

IFunctionClient

  • Implemented By: @monadahq/wingsdk.cloud.IFunctionClient

Inflight interface for Function.

Methods

NameDescription
invokeNo description.

invoke
public invoke(payload: string): string
payloadRequired
  • Type: string

IQueueClient

  • Implemented By: @monadahq/wingsdk.cloud.IQueueClient

Inflight interface for Queue.

Methods

NameDescription
pushPush a message to the queue.

push
public push(message: string): Void

Push a message to the queue.

messageRequired
  • Type: string

Payload to send to the queue.


IResource

  • Extends: constructs.IConstruct

  • Implemented By: @monadahq/wingsdk.sim.Bucket, @monadahq/wingsdk.sim.Function, @monadahq/wingsdk.sim.Queue, @monadahq/wingsdk.sim.IResource

Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


Enums

BucketInflightMethods

List of inflight operations available for Bucket.

Members

NameDescription
PUTNo description.
GETNo description.

PUT

GET

FunctionInflightMethods

List of inflight operations available for Function.

Members

NameDescription
INVOKENo description.

INVOKE

Language

The language of a piece of code.

Members

NameDescription
NODE_JSNo description.

NODE_JS

QueueInflightMethods

List of inflight operations available for Queue.

Members

NameDescription
PUSHNo description.

PUSH