Skip to content

Latest commit

 

History

History
202 lines (115 loc) · 9.33 KB

API.md

File metadata and controls

202 lines (115 loc) · 9.33 KB

API Reference

Classes

Name Description
DatabaseCluster No description
ServerlessApi Use ServerlessApi to create the serverless API resource.
ServerlessLaravel Use ServerlessLaravel to create the serverless Laravel resource.

Structs

Name Description
DatabaseConfig No description
DatabaseProps No description
ServerlessApiProps Construct properties for ServerlessApi.
ServerlessLaravelProps Construct properties for ServerlessLaravel.

class DatabaseCluster 🔹

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct

Initializer

new DatabaseCluster(scope: Construct, id: string, props: DatabaseProps)
  • scope (Construct) No description
  • id (string) No description
  • props (DatabaseProps) No description
    • vpc (IVpc) The VPC for the DatabaseCluster.
    • engine (IClusterEngine) database cluster engine. Default: AURORA_MYSQL
    • instanceCapacity (number) How many replicas/instances to create. Default: 1
    • instanceType (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 (DatabaseProxyOptions) RDS Proxy Options. Optional

Properties

Name Type Description
masterPassword🔹 ISecret
masterUser🔹 string
rdsProxy?🔹 DatabaseProxy Optional

class ServerlessApi 🔹

Use ServerlessApi to create the serverless API resource.

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct

Initializer

new ServerlessApi(scope: Construct, id: string, props: ServerlessApiProps)
  • scope (Construct) No description
  • id (string) No description
  • props (ServerlessApiProps) No description
    • brefLayerVersion (string) AWS Lambda layer version from the Bref runtime.
    • databaseConfig (DatabaseConfig) Database configurations. Optional
    • handler (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 (IDatabaseProxy) RDS Proxy for the Lambda function. Default: no db proxy
    • vpc (IVpc) The VPC for this stack. Optional

Properties

Name Type Description
handler🔹 IFunction
vpc?🔹 IVpc Optional

class ServerlessLaravel 🔹

Use ServerlessLaravel to create the serverless Laravel resource.

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: ServerlessApi

Initializer

new ServerlessLaravel(scope: Construct, id: string, props: ServerlessLaravelProps)
  • scope (Construct) No description
  • id (string) No description
  • props (ServerlessLaravelProps) No description
    • brefLayerVersion (string) AWS Lambda layer version from the Bref runtime.
    • databaseConfig (DatabaseConfig) Database configurations. Optional
    • handler (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 (IDatabaseProxy) RDS Proxy for the Lambda function. Default: no db proxy
    • vpc (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?🔹 ISecret The DB master password secret.
Optional
readerEndpoint?🔹 string The DB reader endpoint.
Optional

struct DatabaseProps 🔹

Name Type Description
vpc🔹 IVpc The VPC for the DatabaseCluster.
engine?🔹 IClusterEngine database cluster engine.
Default: AURORA_MYSQL
instanceCapacity?🔹 number How many replicas/instances to create.
Default: 1
instanceType?🔹 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?🔹 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 Database configurations.
Optional
handler?🔹 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?🔹 IDatabaseProxy RDS Proxy for the Lambda function.
Default: no db proxy
vpc?🔹 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 Database configurations.
Optional
handler?🔹 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?🔹 IDatabaseProxy RDS Proxy for the Lambda function.
Default: no db proxy
vpc?🔹 IVpc The VPC for this stack.
Optional