CDK - API Gateway Helper
This package is used as a helper for API Gateway, to easily add lambda functions to an API Gateway
API Reference
Classes
ApiGatewayHelper
Initializers
import { ApiGatewayHelper } from 'cdk-api-gateway-helper-lib'
new ApiGatewayHelper(stack: Stack, resourceName: string)
| Name | Type | Description |
|---|
| stack | aws-cdk-lib.Stack | No description. |
| resourceName | string | No description. |
stackRequired
resourceNameRequired
Methods
| Name | Description |
|---|
| addApiToGateway | No description. |
| addDefaultAuthErrorResponse | No description. |
| addUsagePlan | No description. |
| returnGateway | No description. |
addApiToGateway
public addApiToGateway(params: IGatewayIF): Method
paramsRequired
addDefaultAuthErrorResponse
public addDefaultAuthErrorResponse(name: string): void
nameRequired
addUsagePlan
public addUsagePlan(planName: string, defaultPlan: UsagePlanProps, throttlePerMethod?: ThrottlingPerMethod[], apiKey?: IApiKey): void
planNameRequired
defaultPlanRequired
- Type: aws-cdk-lib.aws_apigateway.UsagePlanProps
throttlePerMethodOptional
- Type: aws-cdk-lib.aws_apigateway.ThrottlingPerMethod[]
apiKeyOptional
returnGateway
public returnGateway(): RestApi
Properties
| Name | Type | Description |
|---|
| gateway | aws-cdk-lib.aws_apigateway.RestApi | No description. |
| resourceName | string | No description. |
| stack | aws-cdk-lib.Stack | No description. |
| throttlingArr | aws-cdk-lib.aws_apigateway.ThrottlingPerMethod[] | No description. |
gatewayRequired
public readonly gateway: RestApi;
- Type: aws-cdk-lib.aws_apigateway.RestApi
resourceNameRequired
public readonly resourceName: string;
stackRequired
public readonly stack: Stack;
throttlingArrRequired
public readonly throttlingArr: ThrottlingPerMethod[];
- Type: aws-cdk-lib.aws_apigateway.ThrottlingPerMethod[]
Protocols
IApiKey
Properties
| Name | Type | Description |
|---|
| key | aws-cdk-lib.aws_apigateway.IApiKey | No description. |
| overrideLogicalId | string | No description. |
keyRequired
public readonly key: IApiKey;
- Type: aws-cdk-lib.aws_apigateway.IApiKey
overrideLogicalIdRequired
public readonly overrideLogicalId: string;
IGatewayIF
- Implemented By: IGatewayIF
Properties
| Name | Type | Description |
|---|
| lambdaFunction | aws-cdk-lib.aws_lambda.IFunction | No description. |
| methodType | string | No description. |
| resourceName | string | No description. |
| resourceVersion | string | No description. |
| useApiKey | boolean | No description. |
| useAuthorizer | boolean | No description. |
| userPoolID | string | No description. |
| pathParams | string | No description. |
| throttling | aws-cdk-lib.aws_apigateway.ThrottleSettings | No description. |
lambdaFunctionRequired
public readonly lambdaFunction: IFunction;
- Type: aws-cdk-lib.aws_lambda.IFunction
methodTypeRequired
public readonly methodType: string;
resourceNameRequired
public readonly resourceName: string;
resourceVersionRequired
public readonly resourceVersion: string;
useApiKeyRequired
public readonly useApiKey: boolean;
useAuthorizerRequired
public readonly useAuthorizer: boolean;
userPoolIDRequired
public readonly userPoolID: string;
pathParamsOptional
public readonly pathParams: string;
throttlingOptional
public readonly throttling: ThrottleSettings;
- Type: aws-cdk-lib.aws_apigateway.ThrottleSettings