Skip to content

Latest commit

 

History

History
233 lines (141 loc) · 7.18 KB

File metadata and controls

233 lines (141 loc) · 7.18 KB

API Reference

Constructs

EventNotify

Event Notfiy Construct Class.

Initializers

import { EventNotify } from 'cdk-events-notify'

new EventNotify(scope: Construct, id: string, props?: EventNotifyProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props EventNotifyProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsOptional

Methods

Name Description
toString Returns a string representation of this construct.
with Applies one or more mixins to this construct.

toString
public toString(): string

Returns a string representation of this construct.

with
public with(mixins: ...IMixin[]): IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

mixinsRequired
  • Type: ...constructs.IMixin[]

The mixins to apply.


Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { EventNotify } from 'cdk-events-notify'

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

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

The tree node.


Structs

EventNotifyProps

event notify interface.

Initializer

import { EventNotifyProps } from 'cdk-events-notify'

const eventNotifyProps: EventNotifyProps = { ... }

Properties

Name Type Description
lineNotifyToken string Line Notify Token for Lambda send notify permission.
slack ISlackEventNotify Notify target to Slack channel.

lineNotifyTokenOptional
public readonly lineNotifyToken: string;
  • Type: string
  • Default: none

Line Notify Token for Lambda send notify permission.


slackOptional
public readonly slack: ISlackEventNotify;

Notify target to Slack channel.


Protocols

ISlackEventNotify

slack event notify interface.

Properties

Name Type Description
slackChannelName string slack Channel Name for Lambda send message to slack.
slackWebhookUrl string slack Webhook Url for Lambda send message to slack.

slackChannelNameRequired
public readonly slackChannelName: string;
  • Type: string

slack Channel Name for Lambda send message to slack.


slackWebhookUrlRequired
public readonly slackWebhookUrl: string;
  • Type: string

slack Webhook Url for Lambda send message to slack.