@pwrdrvr/microapps-app-release-cdk
Version:
Release app for the MicroApps framework, by PwrDrvr LLC. Provides the ability to control which version of an app is launched.
78 lines (77 loc) • 2.1 kB
TypeScript
import { RemovalPolicy } from 'aws-cdk-lib';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
import { Construct } from 'constructs';
/**
* Properties to initialize an instance of `MicroAppsAppRelease`.
*
* @stability stable
*/
export interface MicroAppsAppReleaseProps {
/**
* Name for the Lambda function.
*
* While this can be random, it's much easier to make it deterministic
* so it can be computed for passing to `microapps-publish`.
*
* @default auto-generated
* @stability stable
*/
readonly functionName?: string;
/**
* DynamoDB table for data displayed / edited in the app.
*
* This table is used by @pwrdrvr/microapps-datalib.
*
* @stability stable
*/
readonly table: dynamodb.ITable;
/**
* Removal Policy to pass to assets (e.g. Lambda function).
*
* @stability stable
*/
readonly removalPolicy?: RemovalPolicy;
/**
* NODE_ENV to set on Lambda.
*
* @stability stable
*/
readonly nodeEnv?: 'dev' | 'qa' | 'prod';
}
/**
* Represents a Release app.
*
* @stability stable
*/
export interface IMicroAppsAppRelease {
/**
* The Lambda function created.
*
* @stability stable
*/
readonly lambdaFunction: lambda.IFunction;
}
/**
* Release app for MicroApps framework.
*
* @stability stable
* @remarks The Release app lists apps, versions, and allows setting the default
* version of an app. The app is just an example of what can be done, it
* is not feature complete for all use cases.
*/
export declare class MicroAppsAppRelease extends Construct implements IMicroAppsAppRelease {
private _lambdaFunction;
/**
* The Lambda function created.
*
* @stability stable
*/
get lambdaFunction(): lambda.IFunction;
/**
* Lambda function, permissions, and assets used by the MicroApps Release app.
*
* @stability stable
*/
constructor(scope: Construct, id: string, props: MicroAppsAppReleaseProps);
}