API Reference
Constructs
App
Initializers
import { core } from '@monadahq/wingsdk'
new core.App(props: AppProps)
Name | Type | Description |
---|---|---|
props | @monadahq/wingsdk.core.AppProps | No description. |
props
Required
- Type: @monadahq/wingsdk.core.AppProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
synth | No description. |
toString
public toString(): string
Returns a string representation of this construct.
synth
public synth(): void
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { core } from '@monadahq/wingsdk'
core.App.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
outdir | string | No description. |
root | constructs.Construct | No description. |
stateFile | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
outdir
Required
public readonly outdir: string;
- Type: string
root
Required
public readonly root: Construct;
- Type: constructs.Construct
stateFile
Optional
public readonly stateFile: string;
- Type: string
App
Initializers
import { sim } from '@monadahq/wingsdk'
new sim.App(props: AppProps)
Name | Type | Description |
---|---|---|
props | @monadahq/wingsdk.sim.AppProps | No description. |
props
Required
- Type: @monadahq/wingsdk.sim.AppProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
synth | No description. |
toString
public toString(): string
Returns a string representation of this construct.
synth
public synth(): void
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { sim } from '@monadahq/wingsdk'
sim.App.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
node
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
props | @monadahq/wingsdk.cloud.BucketProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Optional
- Type: @monadahq/wingsdk.cloud.BucketProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { cloud } from '@monadahq/wingsdk'
cloud.Bucket.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
props | @monadahq/wingsdk.cloud.BucketProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Required
- Type: @monadahq/wingsdk.cloud.BucketProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { sim } from '@monadahq/wingsdk'
sim.Bucket.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
props | @monadahq/wingsdk.cloud.BucketProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Required
- Type: @monadahq/wingsdk.cloud.BucketProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { tfaws } from '@monadahq/wingsdk'
tfaws.Bucket.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
props | @monadahq/wingsdk.cloud.BucketProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Required
- Type: @monadahq/wingsdk.cloud.BucketProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { cloud } from '@monadahq/wingsdk'
cloud.BucketBase.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | construct scope. |
id | string | construct id. |
filePath | string | relative file path. |
scope
Required
- Type: constructs.Construct
construct scope.
id
Required
- Type: string
construct id.
filePath
Required
- Type: string
relative file path.
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
save | No description. |
toString
public toString(): string
Returns a string representation of this construct.
save
public save(outdir: string): void
outdir
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { fs } from '@monadahq/wingsdk'
fs.FileBase.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
filePath | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
filePath
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
inflight | @monadahq/wingsdk.core.Inflight | No description. |
props | @monadahq/wingsdk.cloud.FunctionProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
inflight
Required
- Type: @monadahq/wingsdk.core.Inflight
props
Optional
- Type: @monadahq/wingsdk.cloud.FunctionProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { cloud } from '@monadahq/wingsdk'
cloud.Function.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
inflight | @monadahq/wingsdk.core.Inflight | No description. |
props | @monadahq/wingsdk.cloud.FunctionProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
inflight
Required
- Type: @monadahq/wingsdk.core.Inflight
props
Required
- Type: @monadahq/wingsdk.cloud.FunctionProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
addEnvironment | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addEnvironment
public addEnvironment(name: string, value: string): void
name
Required
- Type: string
value
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { sim } from '@monadahq/wingsdk'
sim.Function.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
inflight | @monadahq/wingsdk.core.Inflight | No description. |
props | @monadahq/wingsdk.cloud.FunctionProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
inflight
Required
- Type: @monadahq/wingsdk.core.Inflight
props
Required
- Type: @monadahq/wingsdk.cloud.FunctionProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
addEnvironment | No description. |
addPolicyStatements | No description. |
toString
public toString(): string
Returns a string representation of this construct.
addEnvironment
public addEnvironment(name: string, value: string): void
name
Required
- Type: string
value
Required
- Type: string
addPolicyStatements
public addPolicyStatements(statements: PolicyStatement): void
statements
Required
- Type: @monadahq/wingsdk.tfaws.PolicyStatement
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { tfaws } from '@monadahq/wingsdk'
tfaws.Function.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
inflight | @monadahq/wingsdk.core.Inflight | No description. |
props | @monadahq/wingsdk.cloud.FunctionProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
inflight
Required
- Type: @monadahq/wingsdk.core.Inflight
props
Required
- Type: @monadahq/wingsdk.cloud.FunctionProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { cloud } from '@monadahq/wingsdk'
cloud.FunctionBase.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
filePath | string | No description. |
props | @monadahq/wingsdk.fs.JsonFileProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
filePath
Required
- Type: string
props
Required
- Type: @monadahq/wingsdk.fs.JsonFileProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
save | No description. |
toString
public toString(): string
Returns a string representation of this construct.
save
public save(outdir: string): void
outdir
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { fs } from '@monadahq/wingsdk'
fs.JsonFile.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
filePath | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
filePath
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
props | @monadahq/wingsdk.cloud.QueueProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Optional
- Type: @monadahq/wingsdk.cloud.QueueProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
onMessage | Create 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.
_inflight
Required
- Type: @monadahq/wingsdk.core.Inflight
_props
Optional
- Type: @monadahq/wingsdk.cloud.QueueOnMessageProps
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { cloud } from '@monadahq/wingsdk'
cloud.Queue.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
props | @monadahq/wingsdk.cloud.QueueProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Optional
- Type: @monadahq/wingsdk.cloud.QueueProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
onMessage | Create 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.
inflight
Required
- Type: @monadahq/wingsdk.core.Inflight
props
Optional
- Type: @monadahq/wingsdk.cloud.QueueOnMessageProps
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { sim } from '@monadahq/wingsdk'
sim.Queue.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
props | @monadahq/wingsdk.cloud.QueueProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Optional
- Type: @monadahq/wingsdk.cloud.QueueProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
onMessage | Create 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.
inflight
Required
- Type: @monadahq/wingsdk.core.Inflight
props
Optional
- Type: @monadahq/wingsdk.cloud.QueueOnMessageProps
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { tfaws } from '@monadahq/wingsdk'
tfaws.Queue.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
props | @monadahq/wingsdk.cloud.QueueProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
props
Optional
- Type: @monadahq/wingsdk.cloud.QueueProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
onMessage | Create 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.
inflight
Required
- Type: @monadahq/wingsdk.core.Inflight
props
Optional
- Type: @monadahq/wingsdk.cloud.QueueOnMessageProps
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { cloud } from '@monadahq/wingsdk'
cloud.QueueBase.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | The scope in which to define this construct. |
id | string | The scoped construct ID. |
scope
Required
- Type: constructs.Construct
The scope in which to define this construct.
id
Required
- 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
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
toString
public toString(): string
Returns a string representation of this construct.
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { cloud } from '@monadahq/wingsdk'
cloud.Resource.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
stateful | boolean | Whether a resource is stateful, i.e. it stores information that is not defined by your application. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
stateful
Required
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)
Name | Type | Description |
---|---|---|
scope | constructs.Construct | No description. |
id | string | No description. |
filePath | string | No description. |
props | @monadahq/wingsdk.fs.TextFileProps | No description. |
scope
Required
- Type: constructs.Construct
id
Required
- Type: string
filePath
Required
- Type: string
props
Optional
- Type: @monadahq/wingsdk.fs.TextFileProps
Methods
Name | Description |
---|---|
toString | Returns a string representation of this construct. |
save | No description. |
addLine | No description. |
toString
public toString(): string
Returns a string representation of this construct.
save
public save(outdir: string): void
outdir
Required
- Type: string
addLine
public addLine(line: string): void
line
Required
- Type: string
Static Functions
Name | Description |
---|---|
isConstruct | Checks if x is a construct. |
isConstruct
isConstruct
import { fs } from '@monadahq/wingsdk'
fs.TextFile.isConstruct(x: any)
Checks if x
is a construct.
x
Required
- Type: any
Any object.
Properties
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
filePath | string | No description. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
filePath
Required
public readonly filePath: string;
- Type: string
Structs
AppProps
Initializer
import { core } from '@monadahq/wingsdk'
const appProps: core.AppProps = { ... }
Properties
Name | Type | Description |
---|---|---|
synthesizer | @monadahq/wingsdk.core.Synthesizer | A synthesizer that handles setting up a CDK framework and registering a polycon factory. |
stateFile | string | The path to a state file which will track all synthesized files. |
synthesizer
Required
public readonly synthesizer: Synthesizer;
- Type: @monadahq/wingsdk.core.Synthesizer
A synthesizer that handles setting up a CDK framework and registering a polycon factory.
stateFile
Optional
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
Name | Type | Description |
---|---|---|
outdir | string | No description. |
outdir
Required
public readonly outdir: string;
- Type: string
BucketProps
Properties for Bucket
.
Initializer
import { cloud } from '@monadahq/wingsdk'
const bucketProps: cloud.BucketProps = { ... }
Properties
Name | Type | Description |
---|---|---|
public | boolean | Whether objects in the bucket are publicly accessible. |
public
Optional
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
Name | Type | Description |
---|---|---|
methods | string[] | Which methods are called on the captured object. |
obj | any | The captured object. |
methods
Optional
public readonly methods: string[];
- Type: string[]
Which methods are called on the captured object.
obj
Required
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
Name | Type | Description |
---|---|---|
methods | string[] | Which methods are called on the captured object. |
methods
Optional
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
Name | Type | Description |
---|---|---|
env | {[ key: string ]: string} | Environment variables to pass to the function. |
env
Optional
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
Name | Type | Description |
---|---|---|
captureClients | {[ key: string ]: @monadahq/wingsdk.core.Code} | A map of capture clients that can be bundled with the Inflight's code. |
captureScope | constructs.IConstruct | Associate the inflight bundle with a given capture scope. |
external | string[] | List of dependencies to exclude from the bundle. |
captureClients
Required
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.
captureScope
Optional
public readonly captureScope: IConstruct;
- Type: constructs.IConstruct
Associate the inflight bundle with a given capture scope.
external
Optional
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
Name | Type | Description |
---|---|---|
code | @monadahq/wingsdk.core.Code | Reference to code containing the entrypoint function. |
entrypoint | string | Name of the exported function to run. |
captures | {[ key: string ]: @monadahq/wingsdk.core.Capture} | Capture information. |
code
Required
public readonly code: Code;
- Type: @monadahq/wingsdk.core.Code
Reference to code containing the entrypoint function.
entrypoint
Required
public readonly entrypoint: string;
- Type: string
Name of the exported function to run.
Example
"exports.handler"
captures
Optional
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
Name | Type | Description |
---|---|---|
obj | any | The object that will be serialized into the file during synthesis. |
obj
Required
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
Name | Type | Description |
---|---|---|
action | string[] | No description. |
effect | string | No description. |
resource | string | string[] | No description. |
action
Optional
public readonly action: string[];
- Type: string[]
effect
Optional
public readonly effect: string;
- Type: string
resource
Optional
public readonly resource: string | string[];
- Type: string | string[]
QueueOnMessageProps
Options for Queue.onMessage.
Initializer
import { cloud } from '@monadahq/wingsdk'
const queueOnMessageProps: cloud.QueueOnMessageProps = { ... }
Properties
Name | Type | Description |
---|---|---|
env | {[ key: string ]: string} | Environment variables to pass to the function. |
batchSize | number | The maximum number of messages to send to subscribers at once. |
env
Optional
public readonly env: {[ key: string ]: string};
- Type: {[ key: string ]: string}
- Default: No environment variables.
Environment variables to pass to the function.
batchSize
Optional
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
Name | Type | Description |
---|---|---|
timeout | @monadahq/wingsdk.core.Duration | How long a queue's consumers have to process a message. |
timeout
Optional
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
Name | Type | Description |
---|---|---|
kind | string | No description. |
name | string | No description. |
props | any | No description. |
kind
Required
public readonly kind: string;
- Type: string
name
Required
public readonly name: string;
- Type: string
props
Required
public readonly props: any;
- Type: any
SynthesizerProps
Initializer
import { core } from '@monadahq/wingsdk'
const synthesizerProps: core.SynthesizerProps = { ... }
Properties
Name | Type | Description |
---|---|---|
customFactory | @monadahq/polycons.IPolyconFactory | No description. |
outdir | string | No description. |
customFactory
Optional
public readonly customFactory: IPolyconFactory;
- Type: @monadahq/polycons.IPolyconFactory
outdir
Optional
public readonly outdir: string;
- Type: string
TextFileProps
Initializer
import { fs } from '@monadahq/wingsdk'
const textFileProps: fs.TextFileProps = { ... }
Properties
Name | Type | Description |
---|---|---|
lines | string[] | No description. |
lines
Optional
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()
Name | Type | Description |
---|
Properties
Name | Type | Description |
---|---|---|
hash | string | Generate a hash of the code contents. |
language | @monadahq/wingsdk.core.Language | The language of the code. |
path | string | A path to the code in the user's file system that can be referenced for bundling purposes. |
text | string | The code contents. |
hash
Required
public readonly hash: string;
- Type: string
Generate a hash of the code contents.
language
Required
public readonly language: Language;
- Type: @monadahq/wingsdk.core.Language
The language of the code.
path
Required
public readonly path: string;
- Type: string
A path to the code in the user's file system that can be referenced for bundling purposes.
text
Required
public readonly text: string;
- Type: string
The code contents.
Duration
Static Functions
Name | Description |
---|---|
fromHours | No description. |
fromMinutes | No description. |
fromSeconds | No description. |
fromHours
import { core } from '@monadahq/wingsdk'
core.Duration.fromHours(amount: number)
amount
Required
- Type: number
fromMinutes
import { core } from '@monadahq/wingsdk'
core.Duration.fromMinutes(amount: number)
amount
Required
- Type: number
fromSeconds
import { core } from '@monadahq/wingsdk'
core.Duration.fromSeconds(amount: number)
amount
Required
- Type: number
Properties
Name | Type | Description |
---|---|---|
hours | number | No description. |
minutes | number | No description. |
seconds | number | No description. |
hours
Required
public readonly hours: number;
- Type: number
minutes
Required
public readonly minutes: number;
- Type: number
seconds
Required
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)
Name | Type | Description |
---|---|---|
props | @monadahq/wingsdk.core.InflightProps | No description. |
props
Required
- Type: @monadahq/wingsdk.core.InflightProps
Methods
Name | Description |
---|---|
bundle | Bundle this inflight process so that it can be used in the given capture scope. |
makeClients | Resolve 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:
- Read the file (let's say its path is path/to/foo.js)
- 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.
- Use esbuild to bundle all dependencies, outputting the result to path/to/foo.js.bundle/index.js.
options
Required
- 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.
captureScope
Required
- Type: constructs.IConstruct
Properties
Name | Type | Description |
---|---|---|
captures | {[ key: string ]: @monadahq/wingsdk.core.Capture} | Capture information. |
code | @monadahq/wingsdk.core.Code | Reference to code containing the entrypoint function. |
entrypoint | string | Name of the exported function which will be run. |
captures
Required
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.
code
Required
public readonly code: Code;
- Type: @monadahq/wingsdk.core.Code
Reference to code containing the entrypoint function.
entrypoint
Required
public readonly entrypoint: string;
- Type: string
Name of the exported function which will be run.
InflightClient
Static Functions
Name | Description |
---|---|
for | No description. |
for
import { core } from '@monadahq/wingsdk'
core.InflightClient.for(filename: string, clientClass: string, args: string[])
filename
Required
- Type: string
clientClass
Required
- Type: string
args
Required
- Type: string[]
NodeJsCode
Reference to a piece of Node.js code.
Static Functions
Name | Description |
---|---|
fromFile | Reference code from a file path. |
fromInline | Reference code directly from a string. |
fromFile
import { core } from '@monadahq/wingsdk'
core.NodeJsCode.fromFile(path: string)
Reference code from a file path.
path
Required
- Type: string
fromInline
import { core } from '@monadahq/wingsdk'
core.NodeJsCode.fromInline(text: string)
Reference code directly from a string.
text
Required
- Type: string
Properties
Name | Type | Description |
---|---|---|
hash | string | Generate a hash of the code contents. |
language | @monadahq/wingsdk.core.Language | The language of the code. |
path | string | No description. |
text | string | The code contents. |
hash
Required
public readonly hash: string;
- Type: string
Generate a hash of the code contents.
language
Required
public readonly language: Language;
- Type: @monadahq/wingsdk.core.Language
The language of the code.
path
Required
public readonly path: string;
- Type: string
text
Required
public readonly text: string;
- Type: string
The code contents.
PolyconFactory
- Implements: @monadahq/polycons.IPolyconFactory
Initializers
import { sim } from '@monadahq/wingsdk'
new sim.PolyconFactory()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
resolve | Resolve 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.
polyconId
Required
- Type: string
scope
Required
- Type: constructs.IConstruct
id
Required
- Type: string
args
Required
- Type: any
PolyconFactory
- Implements: @monadahq/polycons.IPolyconFactory
Initializers
import { tfaws } from '@monadahq/wingsdk'
new tfaws.PolyconFactory()
Name | Type | Description |
---|
Methods
Name | Description |
---|---|
resolve | Resolve 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.
polyconId
Required
- Type: string
scope
Required
- Type: constructs.IConstruct
id
Required
- Type: string
args
Required
- 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)
Name | Type | Description |
---|---|---|
props | @monadahq/wingsdk.core.SynthesizerProps | No description. |
props
Required
- Type: @monadahq/wingsdk.core.SynthesizerProps
Methods
Name | Description |
---|---|
synth | Synthesize the app. |
synth
public synth(): void
Synthesize the app.
Properties
Name | Type | Description |
---|---|---|
outdir | string | Path to the output directory. |
root | constructs.Construct | Place in the construct tree where all users constructs will get added. |
outdir
Required
public readonly outdir: string;
- Type: string
Path to the output directory.
For example, if synthesizing to terraform,
cdktf.out
will be created in here.
root
Required
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)
Name | Type | Description |
---|---|---|
props | @monadahq/wingsdk.core.SynthesizerProps | No description. |
props
Optional
- Type: @monadahq/wingsdk.core.SynthesizerProps
Methods
Name | Description |
---|---|
synth | Synthesize the app. |
synth
public synth(): void
Synthesize the app.
Properties
Name | Type | Description |
---|---|---|
outdir | string | Path to the output directory. |
root | constructs.Construct | Place in the construct tree where all users constructs will get added. |
outdir
Required
public readonly outdir: string;
- Type: string
Path to the output directory.
For example, if synthesizing to terraform,
cdktf.out
will be created in here.
root
Required
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)
Name | Type | Description |
---|---|---|
props | @monadahq/wingsdk.core.SynthesizerProps | No description. |
props
Optional
- Type: @monadahq/wingsdk.core.SynthesizerProps
Methods
Name | Description |
---|---|
synth | Synthesize the app. |
synth
public synth(): void
Synthesize the app.
Properties
Name | Type | Description |
---|---|---|
outdir | string | Path to the output directory. |
root | constructs.Construct | Place in the construct tree where all users constructs will get added. |
outdir
Required
public readonly outdir: string;
- Type: string
Path to the output directory.
For example, if synthesizing to terraform,
cdktf.out
will be created in here.
root
Required
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()
Name | Type | Description |
---|
Static Functions
Name | Description |
---|---|
inspectPrebundledCode | Obtain 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.
captureScope
Required
- Type: constructs.IConstruct
Protocols
IBucketClient
- Implemented By: @monadahq/wingsdk.cloud.IBucketClient
Inflight interface for Bucket
.
Methods
Name | Description |
---|---|
get | No description. |
put | No description. |
get
public get(key: string): string
key
Required
- Type: string
put
public put(key: string, body: string): Void
key
Required
- Type: string
body
Required
- 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
Name | Description |
---|---|
invoke | No description. |
invoke
public invoke(payload: string): string
payload
Required
- Type: string
IQueueClient
- Implemented By: @monadahq/wingsdk.cloud.IQueueClient
Inflight interface for Queue
.
Methods
Name | Description |
---|---|
push | Push a message to the queue. |
push
public push(message: string): Void
Push a message to the queue.
message
Required
- 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
Name | Type | Description |
---|---|---|
node | constructs.Node | The tree node. |
node
Required
public readonly node: Node;
- Type: constructs.Node
The tree node.
Enums
BucketInflightMethods
List of inflight operations available for Bucket
.
Members
Name | Description |
---|---|
PUT | No description. |
GET | No description. |
PUT
GET
FunctionInflightMethods
List of inflight operations available for Function
.
Members
Name | Description |
---|---|
INVOKE | No description. |
INVOKE
Language
The language of a piece of code.
Members
Name | Description |
---|---|
NODE_JS | No description. |
NODE_JS
QueueInflightMethods
List of inflight operations available for Queue
.
Members
Name | Description |
---|---|
PUSH | No description. |