# API Reference **Classes** Name|Description ----|----------- [DatabaseCluster](#cdk-serverless-lamp-databasecluster)|*No description* [ServerlessApi](#cdk-serverless-lamp-serverlessapi)|Use `ServerlessApi` to create the serverless API resource. [ServerlessLaravel](#cdk-serverless-lamp-serverlesslaravel)|Use `ServerlessLaravel` to create the serverless Laravel resource. **Structs** Name|Description ----|----------- [DatabaseConfig](#cdk-serverless-lamp-databaseconfig)|*No description* [DatabaseProps](#cdk-serverless-lamp-databaseprops)|*No description* [ServerlessApiProps](#cdk-serverless-lamp-serverlessapiprops)|Construct properties for `ServerlessApi`. [ServerlessLaravelProps](#cdk-serverless-lamp-serverlesslaravelprops)|Construct properties for `ServerlessLaravel`. ## class DatabaseCluster __Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable) __Extends__: [Construct](#constructs-construct) ### Initializer ```ts new DatabaseCluster(scope: Construct, id: string, props: DatabaseProps) ``` * **scope** ([Construct](#constructs-construct)) *No description* * **id** (string) *No description* * **props** ([DatabaseProps](#cdk-serverless-lamp-databaseprops)) *No description* * **vpc** ([aws_ec2.IVpc](#aws-cdk-lib-aws-ec2-ivpc)) The VPC for the DatabaseCluster. * **engine** ([aws_rds.IClusterEngine](#aws-cdk-lib-aws-rds-iclusterengine)) database cluster engine. __*Default*__: AURORA_MYSQL * **instanceCapacity** (number) How many replicas/instances to create. __*Default*__: 1 * **instanceType** ([aws_ec2.InstanceType](#aws-cdk-lib-aws-ec2-instancetype)) instance type of the cluster. __*Default*__: t3.medium (or, more precisely, db.t3.medium) * **masterUserName** (string) master username. __*Default*__: admin * **rdsProxy** (boolean) enable the Amazon RDS proxy. __*Default*__: true * **rdsProxyOptions** ([aws_rds.DatabaseProxyOptions](#aws-cdk-lib-aws-rds-databaseproxyoptions)) RDS Proxy Options. __*Optional*__ ### Properties Name | Type | Description -----|------|------------- **masterPassword** | [aws_secretsmanager.ISecret](#aws-cdk-lib-aws-secretsmanager-isecret) | **masterUser** | string | **rdsProxy**? | [aws_rds.DatabaseProxy](#aws-cdk-lib-aws-rds-databaseproxy) | __*Optional*__ ## class ServerlessApi Use `ServerlessApi` to create the serverless API resource. __Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable) __Extends__: [Construct](#constructs-construct) ### Initializer ```ts new ServerlessApi(scope: Construct, id: string, props: ServerlessApiProps) ``` * **scope** ([Construct](#constructs-construct)) *No description* * **id** (string) *No description* * **props** ([ServerlessApiProps](#cdk-serverless-lamp-serverlessapiprops)) *No description* * **brefLayerVersion** (string) AWS Lambda layer version from the Bref runtime. * **databaseConfig** ([DatabaseConfig](#cdk-serverless-lamp-databaseconfig)) Database configurations. __*Optional*__ * **handler** ([aws_lambda.IFunction](#aws-cdk-lib-aws-lambda-ifunction)) custom lambda function for the API. __*Default*__: A Lambda function with Lavavel and Bref support will be created * **lambdaCodePath** (string) custom lambda code asset path. __*Default*__: DEFAULT_LAMBDA_ASSET_PATH * **rdsProxy** ([aws_rds.IDatabaseProxy](#aws-cdk-lib-aws-rds-idatabaseproxy)) RDS Proxy for the Lambda function. __*Default*__: no db proxy * **vpc** ([aws_ec2.IVpc](#aws-cdk-lib-aws-ec2-ivpc)) The VPC for this stack. __*Optional*__ ### Properties Name | Type | Description -----|------|------------- **handler** | [aws_lambda.IFunction](#aws-cdk-lib-aws-lambda-ifunction) | **vpc**? | [aws_ec2.IVpc](#aws-cdk-lib-aws-ec2-ivpc) | __*Optional*__ ## class ServerlessLaravel Use `ServerlessLaravel` to create the serverless Laravel resource. __Implements__: [IConstruct](#constructs-iconstruct), [IDependable](#constructs-idependable) __Extends__: [Construct](#constructs-construct) ### Initializer ```ts new ServerlessLaravel(scope: Construct, id: string, props: ServerlessLaravelProps) ``` * **scope** ([Construct](#constructs-construct)) *No description* * **id** (string) *No description* * **props** ([ServerlessLaravelProps](#cdk-serverless-lamp-serverlesslaravelprops)) *No description* * **brefLayerVersion** (string) AWS Lambda layer version from the Bref runtime. * **databaseConfig** ([DatabaseConfig](#cdk-serverless-lamp-databaseconfig)) Database configurations. __*Optional*__ * **handler** ([aws_lambda.IFunction](#aws-cdk-lib-aws-lambda-ifunction)) custom lambda function for the API. __*Default*__: A Lambda function with Lavavel and Bref support will be created * **lambdaCodePath** (string) custom lambda code asset path. __*Default*__: DEFAULT_LAMBDA_ASSET_PATH * **rdsProxy** ([aws_rds.IDatabaseProxy](#aws-cdk-lib-aws-rds-idatabaseproxy)) RDS Proxy for the Lambda function. __*Default*__: no db proxy * **vpc** ([aws_ec2.IVpc](#aws-cdk-lib-aws-ec2-ivpc)) The VPC for this stack. __*Optional*__ * **laravelPath** (string) path to your local laravel directory with bref. ## struct DatabaseConfig Name | Type | Description -----|------|------------- **writerEndpoint** | string | The DB writer endpoint. **masterUserName**? | string | The DB master username.
__*Optional*__ **masterUserPasswordSecret**? | [aws_secretsmanager.ISecret](#aws-cdk-lib-aws-secretsmanager-isecret) | The DB master password secret.
__*Optional*__ **readerEndpoint**? | string | The DB reader endpoint.
__*Optional*__ ## struct DatabaseProps Name | Type | Description -----|------|------------- **vpc** | [aws_ec2.IVpc](#aws-cdk-lib-aws-ec2-ivpc) | The VPC for the DatabaseCluster. **engine**? | [aws_rds.IClusterEngine](#aws-cdk-lib-aws-rds-iclusterengine) | database cluster engine.
__*Default*__: AURORA_MYSQL **instanceCapacity**? | number | How many replicas/instances to create.
__*Default*__: 1 **instanceType**? | [aws_ec2.InstanceType](#aws-cdk-lib-aws-ec2-instancetype) | instance type of the cluster.
__*Default*__: t3.medium (or, more precisely, db.t3.medium) **masterUserName**? | string | master username.
__*Default*__: admin **rdsProxy**? | boolean | enable the Amazon RDS proxy.
__*Default*__: true **rdsProxyOptions**? | [aws_rds.DatabaseProxyOptions](#aws-cdk-lib-aws-rds-databaseproxyoptions) | RDS Proxy Options.
__*Optional*__ ## struct ServerlessApiProps Construct properties for `ServerlessApi`. Name | Type | Description -----|------|------------- **brefLayerVersion** | string | AWS Lambda layer version from the Bref runtime. **databaseConfig**? | [DatabaseConfig](#cdk-serverless-lamp-databaseconfig) | Database configurations.
__*Optional*__ **handler**? | [aws_lambda.IFunction](#aws-cdk-lib-aws-lambda-ifunction) | custom lambda function for the API.
__*Default*__: A Lambda function with Lavavel and Bref support will be created **lambdaCodePath**? | string | custom lambda code asset path.
__*Default*__: DEFAULT_LAMBDA_ASSET_PATH **rdsProxy**? | [aws_rds.IDatabaseProxy](#aws-cdk-lib-aws-rds-idatabaseproxy) | RDS Proxy for the Lambda function.
__*Default*__: no db proxy **vpc**? | [aws_ec2.IVpc](#aws-cdk-lib-aws-ec2-ivpc) | The VPC for this stack.
__*Optional*__ ## struct ServerlessLaravelProps Construct properties for `ServerlessLaravel`. Name | Type | Description -----|------|------------- **brefLayerVersion** | string | AWS Lambda layer version from the Bref runtime. **laravelPath** | string | path to your local laravel directory with bref. **databaseConfig**? | [DatabaseConfig](#cdk-serverless-lamp-databaseconfig) | Database configurations.
__*Optional*__ **handler**? | [aws_lambda.IFunction](#aws-cdk-lib-aws-lambda-ifunction) | custom lambda function for the API.
__*Default*__: A Lambda function with Lavavel and Bref support will be created **lambdaCodePath**? | string | custom lambda code asset path.
__*Default*__: DEFAULT_LAMBDA_ASSET_PATH **rdsProxy**? | [aws_rds.IDatabaseProxy](#aws-cdk-lib-aws-rds-idatabaseproxy) | RDS Proxy for the Lambda function.
__*Default*__: no db proxy **vpc**? | [aws_ec2.IVpc](#aws-cdk-lib-aws-ec2-ivpc) | The VPC for this stack.
__*Optional*__