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 { local } from '@monadahq/wingsdk'

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

propsRequired
  • Type: @monadahq/wingsdk.local.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 { local } from '@monadahq/wingsdk'

local.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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(_consumer: any, _capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

_consumerRequired
  • Type: any

_captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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.cloud.IBucket, @monadahq/wingsdk.local.IResource

Initializers

import { local } from '@monadahq/wingsdk'

new local.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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(consumer: any, _capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

consumerRequired
  • Type: any

_captureRequired
  • Type: @monadahq/wingsdk.core.Capture

Static Functions

NameDescription
isConstructChecks if x is a construct.

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

local.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.cloud.IBucket

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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(consumer: any, capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

consumerRequired
  • Type: any

captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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

  • Implements: @monadahq/wingsdk.cloud.IBucket

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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(consumer: any, capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

consumerRequired
  • Type: any

captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(_consumer: any, _capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

_consumerRequired
  • Type: any

_captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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.local.IResource

Initializers

import { local } from '@monadahq/wingsdk'

new local.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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.
addEnvironmentNo description.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(_consumer: any, _capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

_consumerRequired
  • Type: any

_captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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 { local } from '@monadahq/wingsdk'

local.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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.
addEnvironmentNo description.
addPolicyStatementsNo description.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(_consumer: any, _capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

_consumerRequired
  • Type: any

_captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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

  • Implements: @monadahq/wingsdk.cloud.IFunction

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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(consumer: any, capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

consumerRequired
  • Type: any

captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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

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

Methods

NameDescription
toStringReturns a string representation of this construct.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(_consumer: any, _capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

_consumerRequired
  • Type: any

_captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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.cloud.IQueue

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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.
addWorkerNo description.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(_consumer: any, _capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

_consumerRequired
  • Type: any

_captureRequired
  • Type: @monadahq/wingsdk.core.Capture

addWorker
public addWorker(fn: IFunction): void
fnRequired
  • Type: @monadahq/wingsdk.cloud.IFunction

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

  • Implements: @monadahq/wingsdk.cloud.IQueue

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

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

Methods

NameDescription
toStringReturns a string representation of this construct.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(consumer: any, capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

consumerRequired
  • Type: any

captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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.cloud.IResource, @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.
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

toString
public toString(): string

Returns a string representation of this construct.

capture
public capture(consumer: any, capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

consumerRequired
  • Type: any

captureRequired
  • Type: @monadahq/wingsdk.core.Capture

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 { local } from '@monadahq/wingsdk'

const appProps: local.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
objanyThe captured object.
methodsstring[]Which methods are called on the captured object.

objRequired
public readonly obj: any;
  • Type: any

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.


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[]No description.

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

effectOptional
public readonly effect: string;
  • Type: string

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

QueueProps

Properties for Queue.

Initializer

import { cloud } from '@monadahq/wingsdk'

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

Properties

NameTypeDescription
timeout@monadahq/wingsdk.core.DurationNo description.

timeoutOptional
public readonly timeout: Duration;
  • Type: @monadahq/wingsdk.core.Duration

ResourceSpec

Initializer

import { local } from '@monadahq/wingsdk'

const resourceSpec: local.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[]

Classes

Code

Reference to a piece of code.

Initializers

import { core } from '@monadahq/wingsdk'

new core.Code()
NameTypeDescription

Properties

NameTypeDescription
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.

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 at runtime within 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

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.


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
language@monadahq/wingsdk.core.LanguageThe language of the code.
pathstringNo description.
textstringThe 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 { local } from '@monadahq/wingsdk'

new local.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 { local } from '@monadahq/wingsdk'

new local.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.


Protocols

IBucket

  • Extends: @monadahq/wingsdk.cloud.IResource

  • Implemented By: @monadahq/wingsdk.cloud.Bucket, @monadahq/wingsdk.cloud.BucketBase, @monadahq/wingsdk.local.Bucket, @monadahq/wingsdk.tfaws.Bucket, @monadahq/wingsdk.cloud.IBucket

Properties

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

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.


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.local.Bucket, @monadahq/wingsdk.local.Function, @monadahq/wingsdk.tfaws.Bucket, @monadahq/wingsdk.tfaws.Function, @monadahq/wingsdk.tfaws.Queue, @monadahq/wingsdk.core.ICapturable

Represents something that is capturable.

Methods

NameDescription
captureCaptures the resource for a given consumer so that it can be used in an Inflight.

capture
public capture(consumer: any, capture: Capture): Code

Captures the resource for a given consumer so that it can be used in an Inflight.

consumerRequired
  • Type: any

captureRequired
  • Type: @monadahq/wingsdk.core.Capture

IFunction

  • Extends: @monadahq/wingsdk.cloud.IResource

  • Implemented By: @monadahq/wingsdk.cloud.Function, @monadahq/wingsdk.cloud.FunctionBase, @monadahq/wingsdk.local.Function, @monadahq/wingsdk.tfaws.Function, @monadahq/wingsdk.cloud.IFunction

Properties

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

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.


IQueue

  • Extends: @monadahq/wingsdk.cloud.IResource

  • Implemented By: @monadahq/wingsdk.cloud.Queue, @monadahq/wingsdk.cloud.QueueBase, @monadahq/wingsdk.tfaws.Queue, @monadahq/wingsdk.cloud.IQueue

Properties

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

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.


IResource

  • 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.local.Bucket, @monadahq/wingsdk.local.Function, @monadahq/wingsdk.tfaws.Bucket, @monadahq/wingsdk.tfaws.Function, @monadahq/wingsdk.tfaws.Queue, @monadahq/wingsdk.cloud.IBucket, @monadahq/wingsdk.cloud.IFunction, @monadahq/wingsdk.cloud.IQueue, @monadahq/wingsdk.cloud.IResource

Properties

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

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.


IResource

  • Extends: constructs.IConstruct

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

Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.

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

The tree node.


Enums

Language

The language of a piece of code.

Members

NameDescription
NODE_JSNo description.

NODE_JS