@rogerchi/cdk-listener-next-available-priority
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

ListenerNextAvailablePriority

This is a CDK construct which implements a custom resource that gets the next available priority in a listener. This is useful if you don't want to manually manage priorities (which are a required field for rules), mainly used in the context of host-name matching rules. Currently just supports getting one priority at a time, so you may need to set up a dependency chain if you are adding multiple rules.

Usage

const listenerNextAvailablePriority = new ListenerNextAvailablePriority(
  this,
  'next-priority',
  { listener },
);

listener.addTargets('host', {
  conditions: [ListenerCondition.hostHeaders([domainName])],
  targets: [
    /* targets here */
  ],
  priority: listenerNextAvailablePriority.nextPriority,
});

Readme

Keywords

Package Sidebar

Install

npm i @rogerchi/cdk-listener-next-available-priority

Weekly Downloads

25

Version

0.0.1

License

Apache-2.0

Unpacked Size

5.95 MB

Total Files

3164

Last publish

Collaborators

  • rogerchi