Skip to content

Latest commit

 

History

History
585 lines (360 loc) · 20.3 KB

API.md

File metadata and controls

585 lines (360 loc) · 20.3 KB

API Reference

Constructs

IteratorLambda

Initializers

import { IteratorLambda } from 'cdk-lambda-subminute'

new IteratorLambda(scope: Construct, name: string, props: IteratorLambdaProps)
Name Type Description
scope constructs.Construct No description.
name string No description.
props IteratorLambdaProps No description.

scopeRequired
  • Type: constructs.Construct

nameRequired
  • Type: string

propsRequired

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
import { IteratorLambda } from 'cdk-lambda-subminute'

IteratorLambda.isConstruct(x: any)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
function aws-cdk-lib.aws_lambda.IFunction A Lambda function that plays the role of the iterator.

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

The tree node.


functionRequired
public readonly function: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

A Lambda function that plays the role of the iterator.


LambdaSubminute

Initializers

import { LambdaSubminute } from 'cdk-lambda-subminute'

new LambdaSubminute(parent: Construct, name: string, props: LambdaSubminuteProps)
Name Type Description
parent constructs.Construct No description.
name string No description.
props LambdaSubminuteProps No description.

parentRequired
  • Type: constructs.Construct

nameRequired
  • Type: string

propsRequired

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
import { LambdaSubminute } from 'cdk-lambda-subminute'

LambdaSubminute.isConstruct(x: any)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
iteratorFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function that plays the role of the iterator.
stateMachineArn string The ARN of the state machine that executes the target Lambda function per time unit less than one minute.

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

The tree node.


iteratorFunctionRequired
public readonly iteratorFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function that plays the role of the iterator.


stateMachineArnRequired
public readonly stateMachineArn: string;
  • Type: string

The ARN of the state machine that executes the target Lambda function per time unit less than one minute.


SubminuteStateMachine

Initializers

import { SubminuteStateMachine } from 'cdk-lambda-subminute'

new SubminuteStateMachine(scope: Construct, id: string, props: SubminuteStateMachineProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props SubminuteStateMachineProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

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
import { SubminuteStateMachine } from 'cdk-lambda-subminute'

SubminuteStateMachine.isConstruct(x: any)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
stateMachine aws-cdk-lib.aws_stepfunctions.StateMachine No description.

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

The tree node.


stateMachineRequired
public readonly stateMachine: StateMachine;
  • Type: aws-cdk-lib.aws_stepfunctions.StateMachine

Structs

IteratorLambdaProps

Initializer

import { IteratorLambdaProps } from 'cdk-lambda-subminute'

const iteratorLambdaProps: IteratorLambdaProps = { ... }

Properties

Name Type Description
targetFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function that is going to be executed per time unit less than one minute.

targetFunctionRequired
public readonly targetFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function that is going to be executed per time unit less than one minute.


LambdaSubminuteProps

Initializer

import { LambdaSubminuteProps } from 'cdk-lambda-subminute'

const lambdaSubminuteProps: LambdaSubminuteProps = { ... }

Properties

Name Type Description
targetFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function that is going to be executed per time unit less than one minute.
cronjobExpression string A pattern you want this statemachine to be executed.
frequency number How many times you intent to execute in a minute.
intervalTime number Seconds for an interval, the product of frequency and intervalTime should be approximagely 1 minute.

targetFunctionRequired
public readonly targetFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function that is going to be executed per time unit less than one minute.


cronjobExpressionOptional
public readonly cronjobExpression: string;
  • Type: string
  • Default: cron(50/1 15-17 ? * * *) UTC+0 being run every minute starting from 15:00 PM to 17:00 PM.

A pattern you want this statemachine to be executed.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html


frequencyOptional
public readonly frequency: number;
  • Type: number
  • Default: 6

How many times you intent to execute in a minute.


intervalTimeOptional
public readonly intervalTime: number;
  • Type: number
  • Default: 10

Seconds for an interval, the product of frequency and intervalTime should be approximagely 1 minute.


SubminuteStateMachineProps

Initializer

import { SubminuteStateMachineProps } from 'cdk-lambda-subminute'

const subminuteStateMachineProps: SubminuteStateMachineProps = { ... }

Properties

Name Type Description
frequency number How many times you intent to execute in a minute.
intervalTime number Seconds for an interval, the product of frequency and intervalTime should be approximagely 1 minute.
iteratorFunction aws-cdk-lib.aws_lambda.IFunction the iterator Lambda function for the target Lambda function.
stateMachineName string the name of the state machine.
targetFunction aws-cdk-lib.aws_lambda.IFunction the Lambda function that executes your intention.

frequencyRequired
public readonly frequency: number;
  • Type: number
  • Default: 6

How many times you intent to execute in a minute.


intervalTimeRequired
public readonly intervalTime: number;
  • Type: number
  • Default: 10

Seconds for an interval, the product of frequency and intervalTime should be approximagely 1 minute.


iteratorFunctionRequired
public readonly iteratorFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

the iterator Lambda function for the target Lambda function.


stateMachineNameRequired
public readonly stateMachineName: string;
  • Type: string

the name of the state machine.


targetFunctionRequired
public readonly targetFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

the Lambda function that executes your intention.