Skip to content

Latest commit

 

History

History
3882 lines (2339 loc) · 134 KB

API.md

File metadata and controls

3882 lines (2339 loc) · 134 KB

API Reference

Constructs

BashJobOrchestrator

Provides a BashJobOrchestrator to execute a BashJobRunner.

Initializers

import { BashJobOrchestrator } from '@cdklabs/sbt-aws'

new BashJobOrchestrator(scope: Construct, id: string, props: BashJobOrchestratorProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props BashJobOrchestratorProps 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 { BashJobOrchestrator } from '@cdklabs/sbt-aws'

BashJobOrchestrator.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
eventTarget aws-cdk-lib.aws_events.IRuleTarget The eventTarget to use when triggering this BashJobOrchestrator.
provisioningStateMachine aws-cdk-lib.aws_stepfunctions.StateMachine The StateMachine used to implement this BashJobOrchestrator.

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

The tree node.


eventTargetRequired
public readonly eventTarget: IRuleTarget;
  • Type: aws-cdk-lib.aws_events.IRuleTarget

The eventTarget to use when triggering this BashJobOrchestrator.


provisioningStateMachineRequired
public readonly provisioningStateMachine: StateMachine;
  • Type: aws-cdk-lib.aws_stepfunctions.StateMachine

The StateMachine used to implement this BashJobOrchestrator.


BashJobRunner

Provides a BashJobRunner to execute arbitrary bash code.

Initializers

import { BashJobRunner } from '@cdklabs/sbt-aws'

new BashJobRunner(scope: Construct, id: string, props: BashJobRunnerProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props BashJobRunnerProps 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 { BashJobRunner } from '@cdklabs/sbt-aws'

BashJobRunner.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
codebuildProject aws-cdk-lib.aws_codebuild.Project The codebuildProject used to implement this BashJobRunner.
eventTarget aws-cdk-lib.aws_events.IRuleTarget The eventTarget to use when triggering this BashJobRunner.
environmentVariablesToOutgoingEvent string[] The environment variables to export into the outgoing event once the BashJobRunner has finished.

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

The tree node.


codebuildProjectRequired
public readonly codebuildProject: Project;
  • Type: aws-cdk-lib.aws_codebuild.Project

The codebuildProject used to implement this BashJobRunner.


eventTargetRequired
public readonly eventTarget: IRuleTarget;
  • Type: aws-cdk-lib.aws_events.IRuleTarget

The eventTarget to use when triggering this BashJobRunner.


environmentVariablesToOutgoingEventOptional
public readonly environmentVariablesToOutgoingEvent: string[];
  • Type: string[]

The environment variables to export into the outgoing event once the BashJobRunner has finished.


BillingProvider

Represents a Billing Provider that handles billing-related operations.

This construct sets up event targets for various billing-related events and optionally creates an API Gateway resource for a webhook function.

Initializers

import { BillingProvider } from '@cdklabs/sbt-aws'

new BillingProvider(scope: Construct, id: string, props: BillingProviderProps)
Name Type Description
scope constructs.Construct The scope in which to define this construct.
id string The unique ID of this construct.
props BillingProviderProps The properties for the BillingProvider.

scopeRequired
  • Type: constructs.Construct

The scope in which to define this construct.


idRequired
  • Type: string

The unique ID of this construct.


propsRequired

The properties for the BillingProvider.


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 { BillingProvider } from '@cdklabs/sbt-aws'

BillingProvider.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
controlPlaneAPIBillingWebhookResource aws-cdk-lib.aws_apigateway.IResource The API Gateway resource containing the billing webhook resource.

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

The tree node.


controlPlaneAPIBillingWebhookResourceOptional
public readonly controlPlaneAPIBillingWebhookResource: IResource;
  • Type: aws-cdk-lib.aws_apigateway.IResource

The API Gateway resource containing the billing webhook resource.

Only set when the IBilling webhookFunction is defined.


CognitoAuth

Constructs for setting up Cognito authentication and user management.

Initializers

import { CognitoAuth } from '@cdklabs/sbt-aws'

new CognitoAuth(scope: Construct, id: string, props: CognitoAuthProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props CognitoAuthProps 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 { CognitoAuth } from '@cdklabs/sbt-aws'

CognitoAuth.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
authorizationServer string The authorization server for the control plane IdP.
authorizer aws-cdk-lib.aws_apigateway.IAuthorizer The API Gateway authorizer for authenticating requests.
clientId string The client ID for the control plane IdP.
controlPlaneIdpDetails any The details of the control plane Identity Provider (IdP).
createUserFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function for creating a user.
deleteUserFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function for deleting a user.
disableUserFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function for disabling a user.
enableUserFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function for enabling a user.
fetchAllUsersFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function for fetching all users.
fetchUserFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function for fetching a user.
updateUserFunction aws-cdk-lib.aws_lambda.IFunction The Lambda function for updating a user.
wellKnownEndpointUrl string The well-known endpoint URL for the control plane IdP.

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

The tree node.


authorizationServerRequired
public readonly authorizationServer: string;
  • Type: string

The authorization server for the control plane IdP.


authorizerRequired
public readonly authorizer: IAuthorizer;
  • Type: aws-cdk-lib.aws_apigateway.IAuthorizer

The API Gateway authorizer for authenticating requests.


clientIdRequired
public readonly clientId: string;
  • Type: string

The client ID for the control plane IdP.


controlPlaneIdpDetailsRequired
public readonly controlPlaneIdpDetails: any;
  • Type: any

The details of the control plane Identity Provider (IdP).


createUserFunctionRequired
public readonly createUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function for creating a user.


deleteUserFunctionRequired
public readonly deleteUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function for deleting a user.


disableUserFunctionRequired
public readonly disableUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function for disabling a user.


enableUserFunctionRequired
public readonly enableUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function for enabling a user.


fetchAllUsersFunctionRequired
public readonly fetchAllUsersFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function for fetching all users.


fetchUserFunctionRequired
public readonly fetchUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function for fetching a user.


updateUserFunctionRequired
public readonly updateUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Lambda function for updating a user.


wellKnownEndpointUrlRequired
public readonly wellKnownEndpointUrl: string;
  • Type: string

The well-known endpoint URL for the control plane IdP.


ControlPlane

Initializers

import { ControlPlane } from '@cdklabs/sbt-aws'

new ControlPlane(scope: Construct, id: string, props: ControlPlaneProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props ControlPlaneProps 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 { ControlPlane } from '@cdklabs/sbt-aws'

ControlPlane.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
controlPlaneAPIGatewayUrl string The URL of the control plane API Gateway.
eventManager IEventManager The EventManager instance that allows connecting to events flowing between the Control Plane and other components.
tables Tables The Tables instance containing the DynamoDB tables for tenant data and configurations.

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

The tree node.


controlPlaneAPIGatewayUrlRequired
public readonly controlPlaneAPIGatewayUrl: string;
  • Type: string

The URL of the control plane API Gateway.


eventManagerRequired
public readonly eventManager: IEventManager;

The EventManager instance that allows connecting to events flowing between the Control Plane and other components.


tablesRequired
public readonly tables: Tables;

The Tables instance containing the DynamoDB tables for tenant data and configurations.


ControlPlaneAPI

Initializers

import { ControlPlaneAPI } from '@cdklabs/sbt-aws'

new ControlPlaneAPI(scope: Construct, id: string, props: ControlPlaneAPIProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props ControlPlaneAPIProps 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 { ControlPlaneAPI } from '@cdklabs/sbt-aws'

ControlPlaneAPI.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
billingResource aws-cdk-lib.aws_apigateway.Resource No description.
tenantUpdateServiceTarget aws-cdk-lib.aws_events_targets.ApiGateway No description.
apiUrl any No description.

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

The tree node.


billingResourceRequired
public readonly billingResource: Resource;
  • Type: aws-cdk-lib.aws_apigateway.Resource

tenantUpdateServiceTargetRequired
public readonly tenantUpdateServiceTarget: ApiGateway;
  • Type: aws-cdk-lib.aws_events_targets.ApiGateway

apiUrlRequired
public readonly apiUrl: any;
  • Type: any

CoreApplicationPlane

Provides a CoreApplicationPlane.

This construct will help create resources to accelerate building an SBT-compliant Application Plane. It can be configured to attach itself to the EventBus created by the SBT Control Plane and listen to and respond to events created by the control plane.

Initializers

import { CoreApplicationPlane } from '@cdklabs/sbt-aws'

new CoreApplicationPlane(scope: Construct, id: string, props: CoreApplicationPlaneProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props CoreApplicationPlaneProps 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 { CoreApplicationPlane } from '@cdklabs/sbt-aws'

CoreApplicationPlane.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
eventManager IEventManager The EventManager instance that allows connecting to events flowing between the Control Plane and other components.

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

The tree node.


eventManagerRequired
public readonly eventManager: IEventManager;

The EventManager instance that allows connecting to events flowing between the Control Plane and other components.


EventManager

Provides an EventManager to interact with the EventBus shared with the SBT control plane.

Initializers

import { EventManager } from '@cdklabs/sbt-aws'

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

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsOptional

Methods

Name Description
toString Returns a string representation of this construct.
addTargetToEvent Adds an IRuleTarget to an event.
grantPutEventsTo Provides grantee the permissions to place events on the EventManager bus.

toString
public toString(): string

Returns a string representation of this construct.

addTargetToEvent
public addTargetToEvent(eventType: DetailType, target: IRuleTarget): void

Adds an IRuleTarget to an event.

eventTypeRequired

The detail type of the event to add a target to.


targetRequired
  • Type: aws-cdk-lib.aws_events.IRuleTarget

The target that will be added to the event.


grantPutEventsTo
public grantPutEventsTo(grantee: IGrantable): void

Provides grantee the permissions to place events on the EventManager bus.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The grantee resource that will be granted the permission(s).


Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { EventManager } from '@cdklabs/sbt-aws'

EventManager.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
applicationPlaneEventSource string The event source used for events emitted by the application plane.
busArn string The ARN/ID of the bus that will be used to send and receive events.
busName string The name of the bus that will be used to send and receive events.
controlPlaneEventSource string The event source used for events emitted by the control plane.
eventBus aws-cdk-lib.aws_events.IEventBus The eventBus resource that will be used to send and receive events.
supportedEvents {[ key: string ]: string} List of recognized events that are available as triggers.

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

The tree node.


applicationPlaneEventSourceRequired
public readonly applicationPlaneEventSource: string;
  • Type: string

The event source used for events emitted by the application plane.


busArnRequired
public readonly busArn: string;
  • Type: string

The ARN/ID of the bus that will be used to send and receive events.


busNameRequired
public readonly busName: string;
  • Type: string

The name of the bus that will be used to send and receive events.


controlPlaneEventSourceRequired
public readonly controlPlaneEventSource: string;
  • Type: string

The event source used for events emitted by the control plane.


eventBusRequired
public readonly eventBus: IEventBus;
  • Type: aws-cdk-lib.aws_events.IEventBus

The eventBus resource that will be used to send and receive events.


supportedEventsRequired
public readonly supportedEvents: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

List of recognized events that are available as triggers.


FirehoseAggregator

Creates a Kinesis Firehose to accept high-volume data, which it then routes to an s3 bucket.

The s3 bucket triggers a lambda which processes the data and stores it in a DynamoDB table containing the aggregated data.

Initializers

import { FirehoseAggregator } from '@cdklabs/sbt-aws'

new FirehoseAggregator(scope: Construct, id: string, props: FirehoseAggregatorProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props FirehoseAggregatorProps 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 { FirehoseAggregator } from '@cdklabs/sbt-aws'

FirehoseAggregator.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
dataAggregator aws-cdk-lib.aws_lambda.IFunction The Python Lambda function responsible for aggregating the raw data coming in via the dataIngestor.
dataIngestor @aws-cdk/aws-kinesisfirehose-alpha.DeliveryStream The Firehose DeliveryStream ingestor responsible for accepting the incoming data.
dataIngestorName string The name of the dataIngestor.
dataRepository aws-cdk-lib.aws_dynamodb.ITable The DynamoDB table containing the aggregated data.

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

The tree node.


dataAggregatorRequired
public readonly dataAggregator: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The Python Lambda function responsible for aggregating the raw data coming in via the dataIngestor.


dataIngestorRequired
public readonly dataIngestor: DeliveryStream;
  • Type: @aws-cdk/aws-kinesisfirehose-alpha.DeliveryStream

The Firehose DeliveryStream ingestor responsible for accepting the incoming data.


dataIngestorNameRequired
public readonly dataIngestorName: string;
  • Type: string

The name of the dataIngestor.

This is used for visibility.


dataRepositoryRequired
public readonly dataRepository: ITable;
  • Type: aws-cdk-lib.aws_dynamodb.ITable

The DynamoDB table containing the aggregated data.


Services

Initializers

import { Services } from '@cdklabs/sbt-aws'

new Services(scope: Construct, id: string, props: ServicesProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props ServicesProps 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 { Services } from '@cdklabs/sbt-aws'

Services.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
tenantManagementServices aws-cdk-lib.aws_lambda.Function No description.

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

The tree node.


tenantManagementServicesRequired
public readonly tenantManagementServices: Function;
  • Type: aws-cdk-lib.aws_lambda.Function

Tables

Initializers

import { Tables } from '@cdklabs/sbt-aws'

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

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

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 { Tables } from '@cdklabs/sbt-aws'

Tables.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
tenantConfigColumn string No description.
tenantConfigIndexName string No description.
tenantDetails aws-cdk-lib.aws_dynamodb.Table No description.
tenantIdColumn string No description.
tenantNameColumn string No description.

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

The tree node.


tenantConfigColumnRequired
public readonly tenantConfigColumn: string;
  • Type: string

tenantConfigIndexNameRequired
public readonly tenantConfigIndexName: string;
  • Type: string

tenantDetailsRequired
public readonly tenantDetails: Table;
  • Type: aws-cdk-lib.aws_dynamodb.Table

tenantIdColumnRequired
public readonly tenantIdColumn: string;
  • Type: string

tenantNameColumnRequired
public readonly tenantNameColumn: string;
  • Type: string

TenantConfigService

Initializers

import { TenantConfigService } from '@cdklabs/sbt-aws'

new TenantConfigService(scope: Construct, id: string, props: TenantConfigServiceProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props TenantConfigServiceProps 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 { TenantConfigService } from '@cdklabs/sbt-aws'

TenantConfigService.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
tenantConfigServiceLambda aws-cdk-lib.aws_lambda.Function No description.

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

The tree node.


tenantConfigServiceLambdaRequired
public readonly tenantConfigServiceLambda: Function;
  • Type: aws-cdk-lib.aws_lambda.Function

Structs

BashJobOrchestratorProps

Encapsulates the list of properties for a BashJobOrchestrator.

Initializer

import { BashJobOrchestratorProps } from '@cdklabs/sbt-aws'

const bashJobOrchestratorProps: BashJobOrchestratorProps = { ... }

Properties

Name Type Description
analyticsReporting boolean Include runtime versioning information in this Stack.
crossRegionReferences boolean Enable this flag to allow native cross region stack references.
description string A description of the stack.
env aws-cdk-lib.Environment The AWS environment (account/region) where this stack will be deployed.
permissionsBoundary aws-cdk-lib.PermissionsBoundary Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.
stackName string Name to deploy the stack with.
suppressTemplateIndentation boolean Enable this flag to suppress indentation in generated CloudFormation templates.
synthesizer aws-cdk-lib.IStackSynthesizer Synthesis method to use while deploying this stack.
tags {[ key: string ]: string} Stack tags that will be applied to all the taggable resources and the stack itself.
terminationProtection boolean Whether to enable termination protection for this stack.
bashJobRunner BashJobRunner The BashJobRunner to execute as part of this BashJobOrchestrator.
detailType string The detail type to use when publishing event bridge events.
eventSource string The event source to use when publishing event bridge events.
targetEventBus aws-cdk-lib.aws_events.IEventBus The event bus to publish the outgoing event to.
environmentJSONVariablesFromIncomingEvent string[] No description.
environmentStringVariablesFromIncomingEvent string[] Environment variables to import into the bash job from event details field.
environmentVariablesToOutgoingEvent string[] Environment variables to export into the outgoing event once the bash job has finished.

analyticsReportingOptional
public readonly analyticsReporting: boolean;
  • Type: boolean
  • Default: analyticsReporting setting of containing App, or value of 'aws:cdk:version-reporting' context key

Include runtime versioning information in this Stack.


crossRegionReferencesOptional
public readonly crossRegionReferences: boolean;
  • Type: boolean
  • Default: false

Enable this flag to allow native cross region stack references.

Enabling this will create a CloudFormation custom resource in both the producing stack and consuming stack in order to perform the export/import

This feature is currently experimental


descriptionOptional
public readonly description: string;
  • Type: string
  • Default: No description.

A description of the stack.


envOptional
public readonly env: Environment;
  • Type: aws-cdk-lib.Environment
  • Default: The environment of the containing Stage if available, otherwise create the stack will be environment-agnostic.

The AWS environment (account/region) where this stack will be deployed.

Set the region/account fields of env to either a concrete value to select the indicated environment (recommended for production stacks), or to the values of environment variables CDK_DEFAULT_REGION/CDK_DEFAULT_ACCOUNT to let the target environment depend on the AWS credentials/configuration that the CDK CLI is executed under (recommended for development stacks).

If the Stack is instantiated inside a Stage, any undefined region/account fields from env will default to the same field on the encompassing Stage, if configured there.

If either region or account are not set nor inherited from Stage, the Stack will be considered "environment-agnostic"". Environment-agnostic stacks can be deployed to any environment but may not be able to take advantage of all features of the CDK. For example, they will not be able to use environmental context lookups such as ec2.Vpc.fromLookup and will not automatically translate Service Principals to the right format based on the environment's AWS partition, and other such enhancements.


Example

// Use a concrete account and region to deploy this stack to:
// `.account` and `.region` will simply return these values.
new Stack(app, 'Stack1', {
  env: {
    account: '123456789012',
    region: 'us-east-1'
  },
});

// Use the CLI's current credentials to determine the target environment:
// `.account` and `.region` will reflect the account+region the CLI
// is configured to use (based on the user CLI credentials)
new Stack(app, 'Stack2', {
  env: {
    account: process.env.CDK_DEFAULT_ACCOUNT,
    region: process.env.CDK_DEFAULT_REGION
  },
});

// Define multiple stacks stage associated with an environment
const myStage = new Stage(app, 'MyStage', {
  env: {
    account: '123456789012',
    region: 'us-east-1'
  }
});

// both of these stacks will use the stage's account/region:
// `.account` and `.region` will resolve to the concrete values as above
new MyStack(myStage, 'Stack1');
new YourStack(myStage, 'Stack2');

// Define an environment-agnostic stack:
// `.account` and `.region` will resolve to `{ "Ref": "AWS::AccountId" }` and `{ "Ref": "AWS::Region" }` respectively.
// which will only resolve to actual values by CloudFormation during deployment.
new MyStack(app, 'Stack1');
permissionsBoundaryOptional
public readonly permissionsBoundary: PermissionsBoundary;
  • Type: aws-cdk-lib.PermissionsBoundary
  • Default: no permissions boundary is applied

Options for applying a permissions boundary to all IAM Roles and Users created within this Stage.


stackNameOptional
public readonly stackName: string;
  • Type: string
  • Default: Derived from construct path.

Name to deploy the stack with.


suppressTemplateIndentationOptional
public readonly suppressTemplateIndentation: boolean;
  • Type: boolean
  • Default: the value of @aws-cdk/core:suppressTemplateIndentation, or false if that is not set.

Enable this flag to suppress indentation in generated CloudFormation templates.

If not specified, the value of the @aws-cdk/core:suppressTemplateIndentation context key will be used. If that is not specified, then the default value false will be used.


synthesizerOptional
public readonly synthesizer: IStackSynthesizer;
  • Type: aws-cdk-lib.IStackSynthesizer
  • Default: The synthesizer specified on App, or DefaultStackSynthesizer otherwise.

Synthesis method to use while deploying this stack.

The Stack Synthesizer controls aspects of synthesis and deployment, like how assets are referenced and what IAM roles to use. For more information, see the README of the main CDK package.

If not specified, the defaultStackSynthesizer from App will be used. If that is not specified, DefaultStackSynthesizer is used if @aws-cdk/core:newStyleStackSynthesis is set to true or the CDK major version is v2. In CDK v1 LegacyStackSynthesizer is the default if no other synthesizer is specified.


tagsOptional
public readonly tags: {[ key: string ]: string};
  • Type: {[ key: string ]: string}
  • Default: {}

Stack tags that will be applied to all the taggable resources and the stack itself.


terminationProtectionOptional
public readonly terminationProtection: boolean;
  • Type: boolean
  • Default: false

Whether to enable termination protection for this stack.


bashJobRunnerRequired
public readonly bashJobRunner: BashJobRunner;

The BashJobRunner to execute as part of this BashJobOrchestrator.


detailTypeRequired
public readonly detailType: string;
  • Type: string

The detail type to use when publishing event bridge events.


eventSourceRequired
public readonly eventSource: string;
  • Type: string

The event source to use when publishing event bridge events.


targetEventBusRequired
public readonly targetEventBus: IEventBus;
  • Type: aws-cdk-lib.aws_events.IEventBus

The event bus to publish the outgoing event to.


environmentJSONVariablesFromIncomingEventOptional
public readonly environmentJSONVariablesFromIncomingEvent: string[];
  • Type: string[]

environmentStringVariablesFromIncomingEventOptional
public readonly environmentStringVariablesFromIncomingEvent: string[];
  • Type: string[]

Environment variables to import into the bash job from event details field.


environmentVariablesToOutgoingEventOptional
public readonly environmentVariablesToOutgoingEvent: string[];
  • Type: string[]

Environment variables to export into the outgoing event once the bash job has finished.


BashJobRunnerProps

Encapsulates the list of properties for a BashJobRunner.

Initializer

import { BashJobRunnerProps } from '@cdklabs/sbt-aws'

const bashJobRunnerProps: BashJobRunnerProps = { ... }

Properties

Name Type Description
name string The name of the BashJobRunner.
permissions aws-cdk-lib.aws_iam.PolicyDocument The IAM permission document for the BashJobRunner.
script string The bash script to run as part of the BashJobRunner.
environmentVariablesFromIncomingEvent string[] The environment variables to import into the BashJobRunner from event details field.
environmentVariablesToOutgoingEvent string[] The environment variables to export into the outgoing event once the BashJobRunner has finished.
postScript string The bash script to run after the main script has completed.
scriptEnvironmentVariables {[ key: string ]: string} The variables to pass into the codebuild BashJobRunner.

nameRequired
public readonly name: string;
  • Type: string

The name of the BashJobRunner.

Note that this value must be unique.


permissionsRequired
public readonly permissions: PolicyDocument;
  • Type: aws-cdk-lib.aws_iam.PolicyDocument

The IAM permission document for the BashJobRunner.


scriptRequired
public readonly script: string;
  • Type: string

The bash script to run as part of the BashJobRunner.


environmentVariablesFromIncomingEventOptional
public readonly environmentVariablesFromIncomingEvent: string[];
  • Type: string[]

The environment variables to import into the BashJobRunner from event details field.


environmentVariablesToOutgoingEventOptional
public readonly environmentVariablesToOutgoingEvent: string[];
  • Type: string[]

The environment variables to export into the outgoing event once the BashJobRunner has finished.


postScriptOptional
public readonly postScript: string;
  • Type: string

The bash script to run after the main script has completed.


scriptEnvironmentVariablesOptional
public readonly scriptEnvironmentVariables: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

The variables to pass into the codebuild BashJobRunner.


BillingProviderProps

Encapsulates the list of properties for a BillingProvider.

Initializer

import { BillingProviderProps } from '@cdklabs/sbt-aws'

const billingProviderProps: BillingProviderProps = { ... }

Properties

Name Type Description
billing IBilling An implementation of the IBilling interface.
controlPlaneAPIBillingResource aws-cdk-lib.aws_apigateway.IResource An API Gateway Resource for the BillingProvider to use when setting up API endpoints.
eventManager IEventManager An IEventManager object to help coordinate events.

billingRequired
public readonly billing: IBilling;

An implementation of the IBilling interface.


controlPlaneAPIBillingResourceRequired
public readonly controlPlaneAPIBillingResource: IResource;
  • Type: aws-cdk-lib.aws_apigateway.IResource

An API Gateway Resource for the BillingProvider to use when setting up API endpoints.


eventManagerRequired
public readonly eventManager: IEventManager;

An IEventManager object to help coordinate events.


CognitoAuthProps

Properties for the CognitoAuth construct.

Initializer

import { CognitoAuthProps } from '@cdklabs/sbt-aws'

const cognitoAuthProps: CognitoAuthProps = { ... }

Properties

Name Type Description
systemAdminEmail string The email address of the system admin.
controlPlaneCallbackURL string The callback URL for the control plane.
systemAdminRoleName string The name of the system admin role.

systemAdminEmailRequired
public readonly systemAdminEmail: string;
  • Type: string

The email address of the system admin.


controlPlaneCallbackURLOptional
public readonly controlPlaneCallbackURL: string;

The callback URL for the control plane.


systemAdminRoleNameOptional
public readonly systemAdminRoleName: string;
  • Type: string
  • Default: 'SystemAdmin'

The name of the system admin role.


ControlPlaneAPIProps

Initializer

import { ControlPlaneAPIProps } from '@cdklabs/sbt-aws'

const controlPlaneAPIProps: ControlPlaneAPIProps = { ... }

Properties

Name Type Description
auth IAuth No description.
services Services No description.
tenantConfigServiceLambda aws-cdk-lib.aws_lambda.Function No description.
disableAPILogging boolean No description.

authRequired
public readonly auth: IAuth;

servicesRequired
public readonly services: Services;

tenantConfigServiceLambdaRequired
public readonly tenantConfigServiceLambda: Function;
  • Type: aws-cdk-lib.aws_lambda.Function

disableAPILoggingOptional
public readonly disableAPILogging: boolean;
  • Type: boolean

ControlPlaneProps

Initializer

import { ControlPlaneProps } from '@cdklabs/sbt-aws'

const controlPlaneProps: ControlPlaneProps = { ... }

Properties

Name Type Description
auth IAuth The authentication provider for the control plane.
billing IBilling The billing provider configuration.
disableAPILogging boolean If true, the API Gateway will not log requests to the CloudWatch Logs.
eventManager IEventManager The event manager instance.

authRequired
public readonly auth: IAuth;

The authentication provider for the control plane.


billingOptional
public readonly billing: IBilling;

The billing provider configuration.


disableAPILoggingOptional
public readonly disableAPILogging: boolean;
  • Type: boolean
  • Default: false

If true, the API Gateway will not log requests to the CloudWatch Logs.


eventManagerOptional
public readonly eventManager: IEventManager;

The event manager instance.

If not provided, a new instance will be created.


CoreApplicationPlaneJobRunnerProps

Encapsulates the list of properties for a CoreApplicationPlaneJobRunner.

Initializer

import { CoreApplicationPlaneJobRunnerProps } from '@cdklabs/sbt-aws'

const coreApplicationPlaneJobRunnerProps: CoreApplicationPlaneJobRunnerProps = { ... }

Properties

Name Type Description
incomingEvent DetailType The incoming event DetailType that triggers this job.
name string The name of the CoreApplicationPlaneJobRunner.
outgoingEvent DetailType The outgoing event DetailType that is emitted upon job completion.
permissions aws-cdk-lib.aws_iam.PolicyDocument The IAM permission document for the CoreApplicationPlaneJobRunner.
script string The bash script to run as part of the CoreApplicationPlaneJobRunner.
environmentJSONVariablesFromIncomingEvent string[] The environment variables to import into the CoreApplicationPlaneJobRunner from event details field.
environmentStringVariablesFromIncomingEvent string[] The environment variables to import into the CoreApplicationPlaneJobRunner from event details field.
environmentVariablesToOutgoingEvent string[] The environment variables to export into the outgoing event once the CoreApplicationPlaneJobRunner has finished.
postScript string The bash script to run after the main script has completed.
scriptEnvironmentVariables {[ key: string ]: string} The variables to pass into the codebuild CoreApplicationPlaneJobRunner.

incomingEventRequired
public readonly incomingEvent: DetailType;

The incoming event DetailType that triggers this job.


nameRequired
public readonly name: string;
  • Type: string

The name of the CoreApplicationPlaneJobRunner.

Note that this value must be unique.


outgoingEventRequired
public readonly outgoingEvent: DetailType;

The outgoing event DetailType that is emitted upon job completion.


permissionsRequired
public readonly permissions: PolicyDocument;
  • Type: aws-cdk-lib.aws_iam.PolicyDocument

The IAM permission document for the CoreApplicationPlaneJobRunner.


scriptRequired
public readonly script: string;
  • Type: string

The bash script to run as part of the CoreApplicationPlaneJobRunner.


environmentJSONVariablesFromIncomingEventOptional
public readonly environmentJSONVariablesFromIncomingEvent: string[];
  • Type: string[]

The environment variables to import into the CoreApplicationPlaneJobRunner from event details field.

This argument consists of the names of only JSON-formatted string type variables. Ex. '{"test": 2}'


environmentStringVariablesFromIncomingEventOptional
public readonly environmentStringVariablesFromIncomingEvent: string[];
  • Type: string[]

The environment variables to import into the CoreApplicationPlaneJobRunner from event details field.

This argument consists of the names of only string type variables. Ex. 'test'


environmentVariablesToOutgoingEventOptional
public readonly environmentVariablesToOutgoingEvent: string[];
  • Type: string[]

The environment variables to export into the outgoing event once the CoreApplicationPlaneJobRunner has finished.


postScriptOptional
public readonly postScript: string;
  • Type: string

The bash script to run after the main script has completed.


scriptEnvironmentVariablesOptional
public readonly scriptEnvironmentVariables: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

The variables to pass into the codebuild CoreApplicationPlaneJobRunner.


CoreApplicationPlaneProps

Encapsulates the list of properties for a CoreApplicationPlane.

Initializer

import { CoreApplicationPlaneProps } from '@cdklabs/sbt-aws'

const coreApplicationPlaneProps: CoreApplicationPlaneProps = { ... }

Properties

Name Type Description
eventManager IEventManager No description.
jobRunnerPropsList CoreApplicationPlaneJobRunnerProps[] The list of JobRunner definitions to create.

eventManagerOptional
public readonly eventManager: IEventManager;

jobRunnerPropsListOptional
public readonly jobRunnerPropsList: CoreApplicationPlaneJobRunnerProps[];

The list of JobRunner definitions to create.


EventManagerProps

Encapsulates the properties for an EventManager.

Initializer

import { EventManagerProps } from '@cdklabs/sbt-aws'

const eventManagerProps: EventManagerProps = { ... }

Properties

Name Type Description
applicationPlaneEventSource string The name of the event source for events coming from the SBT application plane.
controlPlaneEventSource string The name of the event source for events coming from the SBT control plane.
eventBus aws-cdk-lib.aws_events.IEventBus The event bus to register new rules with.
eventMetadata {[ key: string ]: string} The EventMetadata to use to update the event defaults.

applicationPlaneEventSourceOptional
public readonly applicationPlaneEventSource: string;
  • Type: string

The name of the event source for events coming from the SBT application plane.


controlPlaneEventSourceOptional
public readonly controlPlaneEventSource: string;
  • Type: string

The name of the event source for events coming from the SBT control plane.


eventBusOptional
public readonly eventBus: IEventBus;
  • Type: aws-cdk-lib.aws_events.IEventBus

The event bus to register new rules with.

One will be created if not provided.


eventMetadataOptional
public readonly eventMetadata: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

The EventMetadata to use to update the event defaults.


FirehoseAggregatorProps

Encapsulates the list of properties for a FirehoseAggregator construct.

Initializer

import { FirehoseAggregatorProps } from '@cdklabs/sbt-aws'

const firehoseAggregatorProps: FirehoseAggregatorProps = { ... }

Properties

Name Type Description
aggregateKeyPath string The JMESPath to find the key value in the incoming data stream that will be aggregated.
aggregateValuePath string The JMESPath to find the numeric value of key in the incoming data stream that will be aggregated.
primaryKeyColumn string The name to use for the primary key column for the dynamoDB database.
primaryKeyPath string The JMESPath to find the primary key value in the incoming data stream.

aggregateKeyPathRequired
public readonly aggregateKeyPath: string;
  • Type: string

The JMESPath to find the key value in the incoming data stream that will be aggregated.


aggregateValuePathRequired
public readonly aggregateValuePath: string;
  • Type: string

The JMESPath to find the numeric value of key in the incoming data stream that will be aggregated.


primaryKeyColumnRequired
public readonly primaryKeyColumn: string;
  • Type: string

The name to use for the primary key column for the dynamoDB database.


primaryKeyPathRequired
public readonly primaryKeyPath: string;
  • Type: string

The JMESPath to find the primary key value in the incoming data stream.


ServicesProps

Initializer

import { ServicesProps } from '@cdklabs/sbt-aws'

const servicesProps: ServicesProps = { ... }

Properties

Name Type Description
eventManager IEventManager No description.
tables Tables No description.

eventManagerRequired
public readonly eventManager: IEventManager;

tablesRequired
public readonly tables: Tables;

Tenant

Initializer

import { Tenant } from '@cdklabs/sbt-aws'

const tenant: Tenant = { ... }

Properties

Name Type Description
adminEmail string No description.
adminUserName string No description.
callbackUrls string[] No description.
clientId string No description.
clientName string No description.
customDomainName string No description.
groupName string No description.
id string No description.
idpDetails string No description.
name string No description.
oidcClientId string No description.
oidcClientSecret string No description.
oidcIssuer string No description.
providerName string No description.
supportedIdentityProviders string[] No description.
tenantDomain string No description.
tier string No description.
uniqueName string No description.

adminEmailOptional
public readonly adminEmail: string;
  • Type: string

adminUserNameOptional
public readonly adminUserName: string;
  • Type: string

callbackUrlsOptional
public readonly callbackUrls: string[];
  • Type: string[]

clientIdOptional
public readonly clientId: string;
  • Type: string

clientNameOptional
public readonly clientName: string;
  • Type: string

customDomainNameOptional
public readonly customDomainName: string;
  • Type: string

groupNameOptional
public readonly groupName: string;
  • Type: string

idOptional
public readonly id: string;
  • Type: string

idpDetailsOptional
public readonly idpDetails: string;
  • Type: string

nameOptional
public readonly name: string;
  • Type: string

oidcClientIdOptional
public readonly oidcClientId: string;
  • Type: string

oidcClientSecretOptional
public readonly oidcClientSecret: string;
  • Type: string

oidcIssuerOptional
public readonly oidcIssuer: string;
  • Type: string

providerNameOptional
public readonly providerName: string;
  • Type: string

supportedIdentityProvidersOptional
public readonly supportedIdentityProviders: string[];
  • Type: string[]

tenantDomainOptional
public readonly tenantDomain: string;
  • Type: string

tierOptional
public readonly tier: string;
  • Type: string

uniqueNameOptional
public readonly uniqueName: string;
  • Type: string

TenantConfigServiceProps

Initializer

import { TenantConfigServiceProps } from '@cdklabs/sbt-aws'

const tenantConfigServiceProps: TenantConfigServiceProps = { ... }

Properties

Name Type Description
tenantConfigIndexName string No description.
tenantDetails aws-cdk-lib.aws_dynamodb.Table No description.
tenantDetailsTenantConfigColumn string No description.
tenantDetailsTenantNameColumn string No description.

tenantConfigIndexNameRequired
public readonly tenantConfigIndexName: string;
  • Type: string

tenantDetailsRequired
public readonly tenantDetails: Table;
  • Type: aws-cdk-lib.aws_dynamodb.Table

tenantDetailsTenantConfigColumnRequired
public readonly tenantDetailsTenantConfigColumn: string;
  • Type: string

tenantDetailsTenantNameColumnRequired
public readonly tenantDetailsTenantNameColumn: string;
  • Type: string

Protocols

IAuth

Encapsulates the list of properties expected as outputs of Auth plugins.

Properties

Name Type Description
authorizationServer string Authorization server Url.
authorizer aws-cdk-lib.aws_apigateway.IAuthorizer Authorizer referenced by the ControlPlaneAPI.
clientId string The OAuth clientId for the identity provider.
controlPlaneIdpDetails any Contains any information relevant to the IDP implementation required by the Authorizer and User Function implementations.
createUserFunction aws-cdk-lib.aws_lambda.IFunction Function referenced by the ControlPlaneAPI -- POST /users.
deleteUserFunction aws-cdk-lib.aws_lambda.IFunction Function referenced by the ControlPlaneAPI -- DELETE /user/{username}.
disableUserFunction aws-cdk-lib.aws_lambda.IFunction Function referenced by the ControlPlaneAPI -- PUT /user/{username}/disable.
enableUserFunction aws-cdk-lib.aws_lambda.IFunction Function referenced by the ControlPlaneAPI -- PUT /user/{username}/enable.
fetchAllUsersFunction aws-cdk-lib.aws_lambda.IFunction Function referenced by the ControlPlaneAPI -- GET /users.
fetchUserFunction aws-cdk-lib.aws_lambda.IFunction Function referenced by the ControlPlaneAPI -- GET /user/{username}.
updateUserFunction aws-cdk-lib.aws_lambda.IFunction Function referenced by the ControlPlaneAPI -- PUT /user/{username}.
wellKnownEndpointUrl string OpenID configuration Url.

authorizationServerRequired
public readonly authorizationServer: string;
  • Type: string

Authorization server Url.


authorizerRequired
public readonly authorizer: IAuthorizer;
  • Type: aws-cdk-lib.aws_apigateway.IAuthorizer

Authorizer referenced by the ControlPlaneAPI.


clientIdRequired
public readonly clientId: string;
  • Type: string

The OAuth clientId for the identity provider.


controlPlaneIdpDetailsRequired
public readonly controlPlaneIdpDetails: any;
  • Type: any

Contains any information relevant to the IDP implementation required by the Authorizer and User Function implementations.


createUserFunctionRequired
public readonly createUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

Function referenced by the ControlPlaneAPI -- POST /users.


deleteUserFunctionRequired
public readonly deleteUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

Function referenced by the ControlPlaneAPI -- DELETE /user/{username}.


disableUserFunctionRequired
public readonly disableUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

Function referenced by the ControlPlaneAPI -- PUT /user/{username}/disable.


enableUserFunctionRequired
public readonly enableUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

Function referenced by the ControlPlaneAPI -- PUT /user/{username}/enable.


fetchAllUsersFunctionRequired
public readonly fetchAllUsersFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

Function referenced by the ControlPlaneAPI -- GET /users.


fetchUserFunctionRequired
public readonly fetchUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

Function referenced by the ControlPlaneAPI -- GET /user/{username}.


updateUserFunctionRequired
public readonly updateUserFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

Function referenced by the ControlPlaneAPI -- PUT /user/{username}.


wellKnownEndpointUrlRequired
public readonly wellKnownEndpointUrl: string;
  • Type: string

OpenID configuration Url.


IBilling

Encapsulates the list of properties for an IBilling construct.

Properties

Name Type Description
createCustomerFunction aws-cdk-lib.aws_lambda.IFunction | IFunctionTrigger The function to trigger to create a new customer.
deleteCustomerFunction aws-cdk-lib.aws_lambda.IFunction | IFunctionTrigger The function to trigger to delete a customer.
createUserFunction aws-cdk-lib.aws_lambda.IFunction | IFunctionTrigger The function to trigger to create a new user.
deleteUserFunction aws-cdk-lib.aws_lambda.IFunction | IFunctionTrigger The function to trigger to delete a user.
ingestor IDataIngestorAggregator The IDataIngestorAggregator responsible for accepting and aggregating the raw billing data.
putUsageFunction aws-cdk-lib.aws_lambda.IFunction | IFunctionSchedule The function responsible for taking the aggregated data and pushing that to the billing provider.
webhookFunction aws-cdk-lib.aws_lambda.IFunction The function to trigger when a webhook request is received.
webhookPath string The path to the webhook resource.

createCustomerFunctionRequired
public readonly createCustomerFunction: IFunction | IFunctionTrigger;

The function to trigger to create a new customer.

(Customer in this context is an entity that has zero or more Users.)


deleteCustomerFunctionRequired
public readonly deleteCustomerFunction: IFunction | IFunctionTrigger;

The function to trigger to delete a customer.

(Customer in this context is an entity that has zero or more Users.)


createUserFunctionOptional
public readonly createUserFunction: IFunction | IFunctionTrigger;

The function to trigger to create a new user.

(User in this context is an entity that belongs to a Customer.)


deleteUserFunctionOptional
public readonly deleteUserFunction: IFunction | IFunctionTrigger;

The function to trigger to delete a user.

(User in this context is an entity that belongs to a Customer.)


ingestorOptional
public readonly ingestor: IDataIngestorAggregator;

The IDataIngestorAggregator responsible for accepting and aggregating the raw billing data.


putUsageFunctionOptional
public readonly putUsageFunction: IFunction | IFunctionSchedule;

The function responsible for taking the aggregated data and pushing that to the billing provider.


webhookFunctionOptional
public readonly webhookFunction: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The function to trigger when a webhook request is received.


webhookPathOptional
public readonly webhookPath: string;
  • Type: string

The path to the webhook resource.


IDataIngestorAggregator

Encapsulates the list of properties for a IDataIngestorAggregator.

Properties

Name Type Description
dataAggregator aws-cdk-lib.aws_lambda.IFunction The function responsible for aggregating the raw data coming in via the dataIngestor.
dataIngestorName string The ingestor responsible for accepting and storing the incoming data.
dataRepository aws-cdk-lib.aws_dynamodb.ITable The table containing the aggregated data.

dataAggregatorRequired
public readonly dataAggregator: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The function responsible for aggregating the raw data coming in via the dataIngestor.


dataIngestorNameRequired
public readonly dataIngestorName: string;
  • Type: string

The ingestor responsible for accepting and storing the incoming data.


dataRepositoryRequired
public readonly dataRepository: ITable;
  • Type: aws-cdk-lib.aws_dynamodb.ITable

The table containing the aggregated data.


IEventManager

Methods

Name Description
addTargetToEvent Adds an IRuleTarget to an event.
grantPutEventsTo Provides grantee the permissions to place events on the EventManager bus.

addTargetToEvent
public addTargetToEvent(eventType: DetailType, target: IRuleTarget): void

Adds an IRuleTarget to an event.

eventTypeRequired

The detail type of the event to add a target to.


targetRequired
  • Type: aws-cdk-lib.aws_events.IRuleTarget

The target that will be added to the event.


grantPutEventsTo
public grantPutEventsTo(grantee: IGrantable): void

Provides grantee the permissions to place events on the EventManager bus.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The grantee resource that will be granted the permission(s).


Properties

Name Type Description
applicationPlaneEventSource string The event source used for events emitted by the application plane.
busArn string The ARN/ID of the bus that will be used to send and receive events.
busName string The name of the bus that will be used to send and receive events.
controlPlaneEventSource string The event source used for events emitted by the control plane.
supportedEvents {[ key: string ]: string} List of recognized events that are available as triggers.

applicationPlaneEventSourceRequired
public readonly applicationPlaneEventSource: string;
  • Type: string

The event source used for events emitted by the application plane.


busArnRequired
public readonly busArn: string;
  • Type: string

The ARN/ID of the bus that will be used to send and receive events.


busNameRequired
public readonly busName: string;
  • Type: string

The name of the bus that will be used to send and receive events.


controlPlaneEventSourceRequired
public readonly controlPlaneEventSource: string;
  • Type: string

The event source used for events emitted by the control plane.


supportedEventsRequired
public readonly supportedEvents: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

List of recognized events that are available as triggers.


IFunctionSchedule

Optional interface that allows specifying both the function to trigger and the schedule by which to trigger it.

Properties

Name Type Description
handler aws-cdk-lib.aws_lambda.IFunction The function definition.
schedule aws-cdk-lib.aws_events.Schedule The schedule that will trigger the handler function.

handlerRequired
public readonly handler: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The function definition.


scheduleRequired
public readonly schedule: Schedule;
  • Type: aws-cdk-lib.aws_events.Schedule

The schedule that will trigger the handler function.


IFunctionTrigger

Optional interface that allows specifying both the function to trigger and the event that will trigger it.

Properties

Name Type Description
handler aws-cdk-lib.aws_lambda.IFunction The function definition.
trigger DetailType The detail-type that will trigger the handler function.

handlerRequired
public readonly handler: IFunction;
  • Type: aws-cdk-lib.aws_lambda.IFunction

The function definition.


triggerRequired
public readonly trigger: DetailType;

The detail-type that will trigger the handler function.


Enums

DetailType

Provides an easy way of accessing event detail types.

The string values represent the "detail-type" used in events sent across the EventBus.

Members

Name Description
ONBOARDING_REQUEST Event detail type for onboarding request.
ONBOARDING_SUCCESS Event detail type for successful onboarding.
ONBOARDING_FAILURE Event detail type for failed onboarding.
OFFBOARDING_REQUEST Event detail type for offboarding request.
OFFBOARDING_SUCCESS Event detail type for successful offboarding.
OFFBOARDING_FAILURE Event detail type for failed offboarding.
PROVISION_SUCCESS Event detail type for successful provisioning.
PROVISION_FAILURE Event detail type for failed provisioning.
DEPROVISION_SUCCESS Event detail type for successful deprovisioning.
DEPROVISION_FAILURE Event detail type for failed deprovisioning.
BILLING_SUCCESS Event detail type for successful billing configuration.
BILLING_FAILURE Event detail type for failure to configure billing.
ACTIVATE_REQUEST Event detail type for activation request.
ACTIVATE_SUCCESS Event detail type for successful activation.
ACTIVATE_FAILURE Event detail type for failed activation.
DEACTIVATE_REQUEST Event detail type for deactivation request.
DEACTIVATE_SUCCESS Event detail type for successful deactivation.
DEACTIVATE_FAILURE Event detail type for failed deactivation.
TENANT_USER_CREATED Event detail type for user creation on the app-plane side.
TENANT_USER_DELETED Event detail type for user deletion on the app-plane side.

ONBOARDING_REQUEST

Event detail type for onboarding request.


ONBOARDING_SUCCESS

Event detail type for successful onboarding.


ONBOARDING_FAILURE

Event detail type for failed onboarding.


OFFBOARDING_REQUEST

Event detail type for offboarding request.


OFFBOARDING_SUCCESS

Event detail type for successful offboarding.


OFFBOARDING_FAILURE

Event detail type for failed offboarding.


PROVISION_SUCCESS

Event detail type for successful provisioning.


PROVISION_FAILURE

Event detail type for failed provisioning.


DEPROVISION_SUCCESS

Event detail type for successful deprovisioning.


DEPROVISION_FAILURE

Event detail type for failed deprovisioning.


BILLING_SUCCESS

Event detail type for successful billing configuration.


BILLING_FAILURE

Event detail type for failure to configure billing.


ACTIVATE_REQUEST

Event detail type for activation request.


ACTIVATE_SUCCESS

Event detail type for successful activation.


ACTIVATE_FAILURE

Event detail type for failed activation.


DEACTIVATE_REQUEST

Event detail type for deactivation request.


DEACTIVATE_SUCCESS

Event detail type for successful deactivation.


DEACTIVATE_FAILURE

Event detail type for failed deactivation.


TENANT_USER_CREATED

Event detail type for user creation on the app-plane side.

Note that sbt-aws components do not emit this event. This event should be emitted by the application plane.


TENANT_USER_DELETED

Event detail type for user deletion on the app-plane side.

Note that sbt-aws components do not emit this event. This event should be emitted by the application plane.