0.1.9 • Published 6 months ago

@winglibs/eventbridge v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

eventbridge

A Wing library for working with Amazon EventBridge.

Prerequisites

Installation

npm i @winglibs/eventbridge

Usage

bring cloud;
bring eventbridge;

let bus = new eventbridge.Bus(name: "my-bus");

bus.onEvent("github.pull-request.created", inflight (event) => {
  log("subscribed event received {Json.stringify(event)}");
}, {
  "detail-type": [{"prefix": "pull-request."}],
  "source": ["github.com"],
});

new cloud.Function(inflight () => {
  bus.putEvents({
    detailType: "pull-request.created",
    resources: ["test"],
    source: "github.com",
    version: "0",
    detail: {
      "test": "test",
    },
  });
});

Parameters

  • eventBridgeName - str - Optional. Name of an existing EventBridge to reference.

Usage

wing compile -t @winglang/platform-awscdk -v eventBridgeName="my-bus" main.w

License

This library is licensed under the MIT License.

0.1.9

6 months ago

0.1.8

11 months ago

0.1.7

11 months ago

0.1.6

12 months ago

0.1.5

12 months ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago