@pwrdrvr/microapps-cdk
Version:
MicroApps framework, by PwrDrvr LLC, delivered as an AWS CDK construct that provides the DynamoDB, Router service, Deploy service, API Gateway, and CloudFront distribution.
1,360 lines (836 loc) • 123 kB
Markdown
# API Reference <a name="API Reference" id="api-reference"></a>
## Constructs <a name="Constructs" id="Constructs"></a>
### MicroApps <a name="MicroApps" id="@pwrdrvr/microapps-cdk.MicroApps"></a>
- *Implements:* <a href="#@pwrdrvr/microapps-cdk.IMicroApps">IMicroApps</a>
Create a new MicroApps "turnkey" construct for simple deployments and for initial evaulation of the MicroApps framework.
Use this construct to create a PoC working entire stack.
Do not use this construct when adding MicroApps to an existing
CloudFront, API Gateway, S3 Bucket, etc. or where access
to all features of the AWS Resources are needed (e.g. to
add additional Behaviors to the CloudFront distribution, set authorizors
on API Gateway, etc.).
> [{@link https://github.com/pwrdrvr/microapps-core/blob/main/packages/cdk/lib/MicroApps.ts example usage in a CDK Stack }]({@link https://github.com/pwrdrvr/microapps-core/blob/main/packages/cdk/lib/MicroApps.ts example usage in a CDK Stack })
#### Initializers <a name="Initializers" id="@pwrdrvr/microapps-cdk.MicroApps.Initializer"></a>
```typescript
import { MicroApps } from '@pwrdrvr/microapps-cdk'
new MicroApps(scope: Construct, id: string, props?: MicroAppsProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.Initializer.parameter.props">props</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsProps">MicroAppsProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="@pwrdrvr/microapps-cdk.MicroApps.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="@pwrdrvr/microapps-cdk.MicroApps.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Optional</sup> <a name="props" id="@pwrdrvr/microapps-cdk.MicroApps.Initializer.parameter.props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.MicroAppsProps">MicroAppsProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="@pwrdrvr/microapps-cdk.MicroApps.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="@pwrdrvr/microapps-cdk.MicroApps.isConstruct"></a>
```typescript
import { MicroApps } from '@pwrdrvr/microapps-cdk'
MicroApps.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.
###### `x`<sup>Required</sup> <a name="x" id="@pwrdrvr/microapps-cdk.MicroApps.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.property.cf">cf</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.IMicroAppsCF">IMicroAppsCF</a></code> | {@inheritdoc IMicroAppsCF}. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.property.s3">s3</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.IMicroAppsS3">IMicroAppsS3</a></code> | {@inheritdoc IMicroAppsS3}. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.property.svcs">svcs</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.IMicroAppsSvcs">IMicroAppsSvcs</a></code> | {@inheritdoc IMicroAppsSvcs}. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroApps.property.edgeToOrigin">edgeToOrigin</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin">IMicroAppsEdgeToOrigin</a></code> | {@inheritdoc IMicroAppsEdgeToOrigin}. |
---
##### `node`<sup>Required</sup> <a name="node" id="@pwrdrvr/microapps-cdk.MicroApps.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `cf`<sup>Required</sup> <a name="cf" id="@pwrdrvr/microapps-cdk.MicroApps.property.cf"></a>
```typescript
public readonly cf: IMicroAppsCF;
```
- *Type:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsCF">IMicroAppsCF</a>
{@inheritdoc IMicroAppsCF}.
---
##### `s3`<sup>Required</sup> <a name="s3" id="@pwrdrvr/microapps-cdk.MicroApps.property.s3"></a>
```typescript
public readonly s3: IMicroAppsS3;
```
- *Type:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsS3">IMicroAppsS3</a>
{@inheritdoc IMicroAppsS3}.
---
##### `svcs`<sup>Required</sup> <a name="svcs" id="@pwrdrvr/microapps-cdk.MicroApps.property.svcs"></a>
```typescript
public readonly svcs: IMicroAppsSvcs;
```
- *Type:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsSvcs">IMicroAppsSvcs</a>
{@inheritdoc IMicroAppsSvcs}.
---
##### `edgeToOrigin`<sup>Optional</sup> <a name="edgeToOrigin" id="@pwrdrvr/microapps-cdk.MicroApps.property.edgeToOrigin"></a>
```typescript
public readonly edgeToOrigin: IMicroAppsEdgeToOrigin;
```
- *Type:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin">IMicroAppsEdgeToOrigin</a>
{@inheritdoc IMicroAppsEdgeToOrigin}.
---
### MicroAppsCF <a name="MicroAppsCF" id="@pwrdrvr/microapps-cdk.MicroAppsCF"></a>
- *Implements:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsCF">IMicroAppsCF</a>
Create a new MicroApps CloudFront Distribution.
#### Initializers <a name="Initializers" id="@pwrdrvr/microapps-cdk.MicroAppsCF.Initializer"></a>
```typescript
import { MicroAppsCF } from '@pwrdrvr/microapps-cdk'
new MicroAppsCF(scope: Construct, id: string, props: MicroAppsCFProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCF.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCF.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCF.Initializer.parameter.props">props</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCFProps">MicroAppsCFProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="@pwrdrvr/microapps-cdk.MicroAppsCF.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="@pwrdrvr/microapps-cdk.MicroAppsCF.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="@pwrdrvr/microapps-cdk.MicroAppsCF.Initializer.parameter.props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.MicroAppsCFProps">MicroAppsCFProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCF.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="@pwrdrvr/microapps-cdk.MicroAppsCF.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCF.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCF.addRoutes">addRoutes</a></code> | Add API Gateway and S3 routes to an existing CloudFront Distribution. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCF.createAPIOriginPolicy">createAPIOriginPolicy</a></code> | Create or get the origin request policy. |
---
##### `isConstruct` <a name="isConstruct" id="@pwrdrvr/microapps-cdk.MicroAppsCF.isConstruct"></a>
```typescript
import { MicroAppsCF } from '@pwrdrvr/microapps-cdk'
MicroAppsCF.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.
###### `x`<sup>Required</sup> <a name="x" id="@pwrdrvr/microapps-cdk.MicroAppsCF.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
##### `addRoutes` <a name="addRoutes" id="@pwrdrvr/microapps-cdk.MicroAppsCF.addRoutes"></a>
```typescript
import { MicroAppsCF } from '@pwrdrvr/microapps-cdk'
MicroAppsCF.addRoutes(_scope: Construct, props: AddRoutesOptions)
```
Add API Gateway and S3 routes to an existing CloudFront Distribution.
###### `_scope`<sup>Required</sup> <a name="_scope" id="@pwrdrvr/microapps-cdk.MicroAppsCF.addRoutes.parameter._scope"></a>
- *Type:* constructs.Construct
---
###### `props`<sup>Required</sup> <a name="props" id="@pwrdrvr/microapps-cdk.MicroAppsCF.addRoutes.parameter.props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.AddRoutesOptions">AddRoutesOptions</a>
---
##### `createAPIOriginPolicy` <a name="createAPIOriginPolicy" id="@pwrdrvr/microapps-cdk.MicroAppsCF.createAPIOriginPolicy"></a>
```typescript
import { MicroAppsCF } from '@pwrdrvr/microapps-cdk'
MicroAppsCF.createAPIOriginPolicy(_scope: Construct, _props: CreateAPIOriginPolicyOptions)
```
Create or get the origin request policy.
If a custom domain name is NOT used for the origin then a policy
will be created.
If a custom domain name IS used for the origin then the ALL_VIEWER
policy will be returned. This policy passes the Host header to the
origin, which is fine when using a custom domain name on the origin.
###### `_scope`<sup>Required</sup> <a name="_scope" id="@pwrdrvr/microapps-cdk.MicroAppsCF.createAPIOriginPolicy.parameter._scope"></a>
- *Type:* constructs.Construct
---
###### `_props`<sup>Required</sup> <a name="_props" id="@pwrdrvr/microapps-cdk.MicroAppsCF.createAPIOriginPolicy.parameter._props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions">CreateAPIOriginPolicyOptions</a>
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCF.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsCF.property.cloudFrontDistro">cloudFrontDistro</a></code> | <code>aws-cdk-lib.aws_cloudfront.Distribution</code> | The CloudFront distribution. |
---
##### `node`<sup>Required</sup> <a name="node" id="@pwrdrvr/microapps-cdk.MicroAppsCF.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `cloudFrontDistro`<sup>Required</sup> <a name="cloudFrontDistro" id="@pwrdrvr/microapps-cdk.MicroAppsCF.property.cloudFrontDistro"></a>
```typescript
public readonly cloudFrontDistro: Distribution;
```
- *Type:* aws-cdk-lib.aws_cloudfront.Distribution
The CloudFront distribution.
---
### MicroAppsChildDeployer <a name="MicroAppsChildDeployer" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer"></a>
- *Implements:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsChildDeployer">IMicroAppsChildDeployer</a>
Create a new MicroApps Child Deployer construct.
#### Initializers <a name="Initializers" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.Initializer"></a>
```typescript
import { MicroAppsChildDeployer } from '@pwrdrvr/microapps-cdk'
new MicroAppsChildDeployer(scope: Construct, id: string, props?: MicroAppsChildDeployerProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.Initializer.parameter.props">props</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsChildDeployerProps">MicroAppsChildDeployerProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Optional</sup> <a name="props" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.Initializer.parameter.props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.MicroAppsChildDeployerProps">MicroAppsChildDeployerProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.isConstruct"></a>
```typescript
import { MicroAppsChildDeployer } from '@pwrdrvr/microapps-cdk'
MicroAppsChildDeployer.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.
###### `x`<sup>Required</sup> <a name="x" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.property.deployerFunc">deployerFunc</a></code> | <code>aws-cdk-lib.aws_lambda.IFunction</code> | Lambda function for the Deployer. |
---
##### `node`<sup>Required</sup> <a name="node" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `deployerFunc`<sup>Required</sup> <a name="deployerFunc" id="@pwrdrvr/microapps-cdk.MicroAppsChildDeployer.property.deployerFunc"></a>
```typescript
public readonly deployerFunc: IFunction;
```
- *Type:* aws-cdk-lib.aws_lambda.IFunction
Lambda function for the Deployer.
---
### MicroAppsEdgeToOrigin <a name="MicroAppsEdgeToOrigin" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin"></a>
- *Implements:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin">IMicroAppsEdgeToOrigin</a>
Create a new MicroApps Edge to Origin Function w/ `config.yml`.
#### Initializers <a name="Initializers" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.Initializer"></a>
```typescript
import { MicroAppsEdgeToOrigin } from '@pwrdrvr/microapps-cdk'
new MicroAppsEdgeToOrigin(scope: Construct, id: string, props: MicroAppsEdgeToOriginProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.Initializer.parameter.props">props</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOriginProps">MicroAppsEdgeToOriginProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.Initializer.parameter.props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOriginProps">MicroAppsEdgeToOriginProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.generateEdgeToOriginConfig">generateEdgeToOriginConfig</a></code> | Generate the yaml config for the edge lambda. |
---
##### `isConstruct` <a name="isConstruct" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.isConstruct"></a>
```typescript
import { MicroAppsEdgeToOrigin } from '@pwrdrvr/microapps-cdk'
MicroAppsEdgeToOrigin.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.
###### `x`<sup>Required</sup> <a name="x" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
##### `generateEdgeToOriginConfig` <a name="generateEdgeToOriginConfig" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.generateEdgeToOriginConfig"></a>
```typescript
import { MicroAppsEdgeToOrigin } from '@pwrdrvr/microapps-cdk'
MicroAppsEdgeToOrigin.generateEdgeToOriginConfig(props: GenerateEdgeToOriginConfigOptions)
```
Generate the yaml config for the edge lambda.
###### `props`<sup>Required</sup> <a name="props" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.generateEdgeToOriginConfig.parameter.props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions">GenerateEdgeToOriginConfigOptions</a>
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.property.edgeToOriginFunction">edgeToOriginFunction</a></code> | <code>aws-cdk-lib.aws_lambda.Function \| aws-cdk-lib.aws_cloudfront.experimental.EdgeFunction</code> | The edge to origin function for API Gateway Request Origin Edge Lambda. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.property.edgeToOriginLambdas">edgeToOriginLambdas</a></code> | <code>aws-cdk-lib.aws_cloudfront.EdgeLambda[]</code> | Configuration of the edge to origin lambda functions. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.property.edgeToOriginRole">edgeToOriginRole</a></code> | <code>aws-cdk-lib.aws_iam.Role</code> | The IAM Role for the edge to origin function. |
---
##### `node`<sup>Required</sup> <a name="node" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `edgeToOriginFunction`<sup>Required</sup> <a name="edgeToOriginFunction" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.property.edgeToOriginFunction"></a>
```typescript
public readonly edgeToOriginFunction: Function | EdgeFunction;
```
- *Type:* aws-cdk-lib.aws_lambda.Function | aws-cdk-lib.aws_cloudfront.experimental.EdgeFunction
The edge to origin function for API Gateway Request Origin Edge Lambda.
The generated `config.yml` is included in the Lambda's code.
---
##### `edgeToOriginLambdas`<sup>Required</sup> <a name="edgeToOriginLambdas" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.property.edgeToOriginLambdas"></a>
```typescript
public readonly edgeToOriginLambdas: EdgeLambda[];
```
- *Type:* aws-cdk-lib.aws_cloudfront.EdgeLambda[]
Configuration of the edge to origin lambda functions.
---
##### `edgeToOriginRole`<sup>Required</sup> <a name="edgeToOriginRole" id="@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin.property.edgeToOriginRole"></a>
```typescript
public readonly edgeToOriginRole: Role;
```
- *Type:* aws-cdk-lib.aws_iam.Role
The IAM Role for the edge to origin function.
---
### MicroAppsS3 <a name="MicroAppsS3" id="@pwrdrvr/microapps-cdk.MicroAppsS3"></a>
- *Implements:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsS3">IMicroAppsS3</a>
Create the durable MicroApps S3 Buckets.
These should be created in a stack that will not be deleted if
there are breaking changes to MicroApps in the future.
#### Initializers <a name="Initializers" id="@pwrdrvr/microapps-cdk.MicroAppsS3.Initializer"></a>
```typescript
import { MicroAppsS3 } from '@pwrdrvr/microapps-cdk'
new MicroAppsS3(scope: Construct, id: string, props?: MicroAppsS3Props)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.Initializer.parameter.props">props</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3Props">MicroAppsS3Props</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="@pwrdrvr/microapps-cdk.MicroAppsS3.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="@pwrdrvr/microapps-cdk.MicroAppsS3.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Optional</sup> <a name="props" id="@pwrdrvr/microapps-cdk.MicroAppsS3.Initializer.parameter.props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.MicroAppsS3Props">MicroAppsS3Props</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="@pwrdrvr/microapps-cdk.MicroAppsS3.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="@pwrdrvr/microapps-cdk.MicroAppsS3.isConstruct"></a>
```typescript
import { MicroAppsS3 } from '@pwrdrvr/microapps-cdk'
MicroAppsS3.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.
###### `x`<sup>Required</sup> <a name="x" id="@pwrdrvr/microapps-cdk.MicroAppsS3.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketApps">bucketApps</a></code> | <code>aws-cdk-lib.aws_s3.IBucket</code> | S3 bucket for deployed applications. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketAppsOAI">bucketAppsOAI</a></code> | <code>aws-cdk-lib.aws_cloudfront.OriginAccessIdentity</code> | CloudFront Origin Access Identity for the deployed applications bucket. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketAppsOriginApp">bucketAppsOriginApp</a></code> | <code>aws-cdk-lib.aws_cloudfront_origins.S3Origin</code> | CloudFront Origin for the deployed applications bucket Marked with `x-microapps-origin: app` so the OriginRequest function knows to send the request to the application origin first, if configured for a particular application. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketAppsOriginS3">bucketAppsOriginS3</a></code> | <code>aws-cdk-lib.aws_cloudfront_origins.S3Origin</code> | CloudFront Origin for the deployed applications bucket Marked with `x-microapps-origin: s3` so the OriginRequest function knows to NOT send the request to the application origin and instead let it fall through to the S3 bucket. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketAppsStaging">bucketAppsStaging</a></code> | <code>aws-cdk-lib.aws_s3.IBucket</code> | S3 bucket for staged applications (prior to deploy). |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketLogs">bucketLogs</a></code> | <code>aws-cdk-lib.aws_s3.IBucket</code> | S3 bucket for CloudFront logs. |
---
##### `node`<sup>Required</sup> <a name="node" id="@pwrdrvr/microapps-cdk.MicroAppsS3.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `bucketApps`<sup>Required</sup> <a name="bucketApps" id="@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketApps"></a>
```typescript
public readonly bucketApps: IBucket;
```
- *Type:* aws-cdk-lib.aws_s3.IBucket
S3 bucket for deployed applications.
---
##### `bucketAppsOAI`<sup>Required</sup> <a name="bucketAppsOAI" id="@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketAppsOAI"></a>
```typescript
public readonly bucketAppsOAI: OriginAccessIdentity;
```
- *Type:* aws-cdk-lib.aws_cloudfront.OriginAccessIdentity
CloudFront Origin Access Identity for the deployed applications bucket.
---
##### `bucketAppsOriginApp`<sup>Required</sup> <a name="bucketAppsOriginApp" id="@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketAppsOriginApp"></a>
```typescript
public readonly bucketAppsOriginApp: S3Origin;
```
- *Type:* aws-cdk-lib.aws_cloudfront_origins.S3Origin
CloudFront Origin for the deployed applications bucket Marked with `x-microapps-origin: app` so the OriginRequest function knows to send the request to the application origin first, if configured for a particular application.
---
##### `bucketAppsOriginS3`<sup>Required</sup> <a name="bucketAppsOriginS3" id="@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketAppsOriginS3"></a>
```typescript
public readonly bucketAppsOriginS3: S3Origin;
```
- *Type:* aws-cdk-lib.aws_cloudfront_origins.S3Origin
CloudFront Origin for the deployed applications bucket Marked with `x-microapps-origin: s3` so the OriginRequest function knows to NOT send the request to the application origin and instead let it fall through to the S3 bucket.
---
##### `bucketAppsStaging`<sup>Required</sup> <a name="bucketAppsStaging" id="@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketAppsStaging"></a>
```typescript
public readonly bucketAppsStaging: IBucket;
```
- *Type:* aws-cdk-lib.aws_s3.IBucket
S3 bucket for staged applications (prior to deploy).
---
##### `bucketLogs`<sup>Required</sup> <a name="bucketLogs" id="@pwrdrvr/microapps-cdk.MicroAppsS3.property.bucketLogs"></a>
```typescript
public readonly bucketLogs: IBucket;
```
- *Type:* aws-cdk-lib.aws_s3.IBucket
S3 bucket for CloudFront logs.
---
### MicroAppsSvcs <a name="MicroAppsSvcs" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs"></a>
- *Implements:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsSvcs">IMicroAppsSvcs</a>
Create a new MicroApps Services construct, including the Deployer and Router Lambda Functions, and the DynamoDB Table used by both.
#### Initializers <a name="Initializers" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.Initializer"></a>
```typescript
import { MicroAppsSvcs } from '@pwrdrvr/microapps-cdk'
new MicroAppsSvcs(scope: Construct, id: string, props?: MicroAppsSvcsProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcs.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcs.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcs.Initializer.parameter.props">props</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcsProps">MicroAppsSvcsProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Optional</sup> <a name="props" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.Initializer.parameter.props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcsProps">MicroAppsSvcsProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcs.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcs.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.isConstruct"></a>
```typescript
import { MicroAppsSvcs } from '@pwrdrvr/microapps-cdk'
MicroAppsSvcs.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.
###### `x`<sup>Required</sup> <a name="x" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcs.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcs.property.deployerFunc">deployerFunc</a></code> | <code>aws-cdk-lib.aws_lambda.Function</code> | Lambda function for the Deployer. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcs.property.table">table</a></code> | <code>aws-cdk-lib.aws_dynamodb.ITable</code> | DynamoDB table used by Router, Deployer, and Release console app. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsSvcs.property.routerFunc">routerFunc</a></code> | <code>aws-cdk-lib.aws_lambda.Function</code> | Lambda function for the Router. |
---
##### `node`<sup>Required</sup> <a name="node" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `deployerFunc`<sup>Required</sup> <a name="deployerFunc" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.property.deployerFunc"></a>
```typescript
public readonly deployerFunc: Function;
```
- *Type:* aws-cdk-lib.aws_lambda.Function
Lambda function for the Deployer.
---
##### `table`<sup>Required</sup> <a name="table" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.property.table"></a>
```typescript
public readonly table: ITable;
```
- *Type:* aws-cdk-lib.aws_dynamodb.ITable
DynamoDB table used by Router, Deployer, and Release console app.
---
##### `routerFunc`<sup>Optional</sup> <a name="routerFunc" id="@pwrdrvr/microapps-cdk.MicroAppsSvcs.property.routerFunc"></a>
```typescript
public readonly routerFunc: Function;
```
- *Type:* aws-cdk-lib.aws_lambda.Function
Lambda function for the Router.
---
### MicroAppsTable <a name="MicroAppsTable" id="@pwrdrvr/microapps-cdk.MicroAppsTable"></a>
- *Implements:* <a href="#@pwrdrvr/microapps-cdk.IMicroAppsTable">IMicroAppsTable</a>
Create a new MicroApps Table for apps / versions / rules.
#### Initializers <a name="Initializers" id="@pwrdrvr/microapps-cdk.MicroAppsTable.Initializer"></a>
```typescript
import { MicroAppsTable } from '@pwrdrvr/microapps-cdk'
new MicroAppsTable(scope: Construct, id: string, props?: MicroAppsTableProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsTable.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsTable.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsTable.Initializer.parameter.props">props</a></code> | <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsTableProps">MicroAppsTableProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="@pwrdrvr/microapps-cdk.MicroAppsTable.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="@pwrdrvr/microapps-cdk.MicroAppsTable.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Optional</sup> <a name="props" id="@pwrdrvr/microapps-cdk.MicroAppsTable.Initializer.parameter.props"></a>
- *Type:* <a href="#@pwrdrvr/microapps-cdk.MicroAppsTableProps">MicroAppsTableProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsTable.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="@pwrdrvr/microapps-cdk.MicroAppsTable.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsTable.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### `isConstruct` <a name="isConstruct" id="@pwrdrvr/microapps-cdk.MicroAppsTable.isConstruct"></a>
```typescript
import { MicroAppsTable } from '@pwrdrvr/microapps-cdk'
MicroAppsTable.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.
###### `x`<sup>Required</sup> <a name="x" id="@pwrdrvr/microapps-cdk.MicroAppsTable.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsTable.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#@pwrdrvr/microapps-cdk.MicroAppsTable.property.table">table</a></code> | <code>aws-cdk-lib.aws_dynamodb.Table</code> | DynamoDB table used by Router, Deployer, and Release console app. |
---
##### `node`<sup>Required</sup> <a name="node" id="@pwrdrvr/microapps-cdk.MicroAppsTable.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `table`<sup>Required</sup> <a name="table" id="@pwrdrvr/microapps-cdk.MicroAppsTable.property.table"></a>
```typescript
public readonly table: Table;
```
- *Type:* aws-cdk-lib.aws_dynamodb.Table
DynamoDB table used by Router, Deployer, and Release console app.
---
## Structs <a name="Structs" id="Structs"></a>
### AddRoutesOptions <a name="AddRoutesOptions" id="@pwrdrvr/microapps-cdk.AddRoutesOptions"></a>
Options for `AddRoutes`.
#### Initializer <a name="Initializer" id="@pwrdrvr/microapps-cdk.AddRoutesOptions.Initializer"></a>
```typescript
import { AddRoutesOptions } from '@pwrdrvr/microapps-cdk'
const addRoutesOptions: AddRoutesOptions = { ... }
```
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.AddRoutesOptions.property.appOnlyOrigin">appOnlyOrigin</a></code> | <code>aws-cdk-lib.aws_cloudfront.IOrigin</code> | Application origin. |
| <code><a href="#@pwrdrvr/microapps-cdk.AddRoutesOptions.property.appOriginRequestPolicy">appOriginRequestPolicy</a></code> | <code>aws-cdk-lib.aws_cloudfront.IOriginRequestPolicy</code> | Origin Request policy for API Gateway Origin. |
| <code><a href="#@pwrdrvr/microapps-cdk.AddRoutesOptions.property.bucketOriginFallbackToApp">bucketOriginFallbackToApp</a></code> | <code>aws-cdk-lib.aws_cloudfront_origins.OriginGroup</code> | Origin Group with Primary of S3 bucket with `x-microapps-origin: s3` custom header and Fallback of `appOnlyOrigin`. |
| <code><a href="#@pwrdrvr/microapps-cdk.AddRoutesOptions.property.distro">distro</a></code> | <code>aws-cdk-lib.aws_cloudfront.Distribution</code> | CloudFront Distribution to add the Behaviors (Routes) to. |
| <code><a href="#@pwrdrvr/microapps-cdk.AddRoutesOptions.property.edgeLambdas">edgeLambdas</a></code> | <code>aws-cdk-lib.aws_cloudfront.EdgeLambda[]</code> | Edge lambdas to associate with the API Gateway routes. |
| <code><a href="#@pwrdrvr/microapps-cdk.AddRoutesOptions.property.rootPathPrefix">rootPathPrefix</a></code> | <code>string</code> | Path prefix on the root of the CloudFront distribution. |
---
##### `appOnlyOrigin`<sup>Required</sup> <a name="appOnlyOrigin" id="@pwrdrvr/microapps-cdk.AddRoutesOptions.property.appOnlyOrigin"></a>
```typescript
public readonly appOnlyOrigin: IOrigin;
```
- *Type:* aws-cdk-lib.aws_cloudfront.IOrigin
Application origin.
Typically an S3 bucket with a `x-microapps-origin: app` custom header
The request never actually falls through to the S3 bucket.
---
##### `appOriginRequestPolicy`<sup>Required</sup> <a name="appOriginRequestPolicy" id="@pwrdrvr/microapps-cdk.AddRoutesOptions.property.appOriginRequestPolicy"></a>
```typescript
public readonly appOriginRequestPolicy: IOriginRequestPolicy;
```
- *Type:* aws-cdk-lib.aws_cloudfront.IOriginRequestPolicy
Origin Request policy for API Gateway Origin.
---
##### `bucketOriginFallbackToApp`<sup>Required</sup> <a name="bucketOriginFallbackToApp" id="@pwrdrvr/microapps-cdk.AddRoutesOptions.property.bucketOriginFallbackToApp"></a>
```typescript
public readonly bucketOriginFallbackToApp: OriginGroup;
```
- *Type:* aws-cdk-lib.aws_cloudfront_origins.OriginGroup
Origin Group with Primary of S3 bucket with `x-microapps-origin: s3` custom header and Fallback of `appOnlyOrigin`.
---
##### `distro`<sup>Required</sup> <a name="distro" id="@pwrdrvr/microapps-cdk.AddRoutesOptions.property.distro"></a>
```typescript
public readonly distro: Distribution;
```
- *Type:* aws-cdk-lib.aws_cloudfront.Distribution
CloudFront Distribution to add the Behaviors (Routes) to.
---
##### `edgeLambdas`<sup>Optional</sup> <a name="edgeLambdas" id="@pwrdrvr/microapps-cdk.AddRoutesOptions.property.edgeLambdas"></a>
```typescript
public readonly edgeLambdas: EdgeLambda[];
```
- *Type:* aws-cdk-lib.aws_cloudfront.EdgeLambda[]
Edge lambdas to associate with the API Gateway routes.
---
##### `rootPathPrefix`<sup>Optional</sup> <a name="rootPathPrefix" id="@pwrdrvr/microapps-cdk.AddRoutesOptions.property.rootPathPrefix"></a>
```typescript
public readonly rootPathPrefix: string;
```
- *Type:* string
Path prefix on the root of the CloudFront distribution.
---
*Example*
```typescript
dev/
```
### CreateAPIOriginPolicyOptions <a name="CreateAPIOriginPolicyOptions" id="@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions"></a>
Options for the `CreateAPIOriginPolicy`.
#### Initializer <a name="Initializer" id="@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions.Initializer"></a>
```typescript
import { CreateAPIOriginPolicyOptions } from '@pwrdrvr/microapps-cdk'
const createAPIOriginPolicyOptions: CreateAPIOriginPolicyOptions = { ... }
```
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions.property.assetNameRoot">assetNameRoot</a></code> | <code>string</code> | Optional asset name root. |
| <code><a href="#@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions.property.assetNameSuffix">assetNameSuffix</a></code> | <code>string</code> | Optional asset name suffix. |
| <code><a href="#@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions.property.domainNameEdge">domainNameEdge</a></code> | <code>string</code> | Edge domain name used by CloudFront - If set a custom OriginRequestPolicy will be created that prevents the Host header from being passed to the origin. |
---
##### `assetNameRoot`<sup>Optional</sup> <a name="assetNameRoot" id="@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions.property.assetNameRoot"></a>
```typescript
public readonly assetNameRoot: string;
```
- *Type:* string
- *Default:* resource names auto assigned
Optional asset name root.
---
*Example*
```typescript
microapps
```
##### `assetNameSuffix`<sup>Optional</sup> <a name="assetNameSuffix" id="@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions.property.assetNameSuffix"></a>
```typescript
public readonly assetNameSuffix: string;
```
- *Type:* string
- *Default:* none
Optional asset name suffix.
---
*Example*
```typescript
-dev-pr-12
```
##### `domainNameEdge`<sup>Optional</sup> <a name="domainNameEdge" id="@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions.property.domainNameEdge"></a>
```typescript
public readonly domainNameEdge: string;
```
- *Type:* string
Edge domain name used by CloudFront - If set a custom OriginRequestPolicy will be created that prevents the Host header from being passed to the origin.
---
### GenerateEdgeToOriginConfigOptions <a name="GenerateEdgeToOriginConfigOptions" id="@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions"></a>
#### Initializer <a name="Initializer" id="@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions.Initializer"></a>
```typescript
import { GenerateEdgeToOriginConfigOptions } from '@pwrdrvr/microapps-cdk'
const generateEdgeToOriginConfigOptions: GenerateEdgeToOriginConfigOptions = { ... }
```
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions.property.addXForwardedHostHeader">addXForwardedHostHeader</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions.property.originRegion">originRegion</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions.property.replaceHostHeader">replaceHostHeader</a></code> | <code>boolean</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions.property.signingMode">signingMode</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions.property.locales">locales</a></code> | <code>string[]</code> | *No description.* |
| <code><a href="#@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions.property.rootPathPrefix">rootPathPrefix</a></code> | <code>string</code> | *No description.* |
| <code><a href="#@pwrdrvr/m