cdk-api-gateway-helper-lib
v0.0.5
Published
This package is used as a helper for API Gateway, to easily add lambda functions to an API Gateway
Readme
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
- Type: aws-cdk-lib.Stack
resourceNameRequired
- Type: string
Methods
| Name | Description | | --- | --- | | addApiToGateway | No description. | | addDefaultAuthErrorResponse | No description. | | addUsagePlan | No description. | | returnGateway | No description. |
addApiToGateway
public addApiToGateway(params: IGatewayIF): MethodparamsRequired
- Type: IGatewayIF
addDefaultAuthErrorResponse
public addDefaultAuthErrorResponse(name: string): voidnameRequired
- Type: string
addUsagePlan
public addUsagePlan(planName: string, defaultPlan: UsagePlanProps, throttlePerMethod?: ThrottlingPerMethod[], apiKey?: IApiKey): voidplanNameRequired
- Type: string
defaultPlanRequired
- Type: aws-cdk-lib.aws_apigateway.UsagePlanProps
throttlePerMethodOptional
- Type: aws-cdk-lib.aws_apigateway.ThrottlingPerMethod[]
apiKeyOptional
- Type: IApiKey
returnGateway
public returnGateway(): RestApiProperties
| 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;- Type: string
stackRequired
public readonly stack: Stack;- Type: aws-cdk-lib.Stack
throttlingArrRequired
public readonly throttlingArr: ThrottlingPerMethod[];- Type: aws-cdk-lib.aws_apigateway.ThrottlingPerMethod[]
Protocols
IApiKey
- Implemented By: 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;- Type: 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;- Type: string
resourceNameRequired
public readonly resourceName: string;- Type: string
resourceVersionRequired
public readonly resourceVersion: string;- Type: string
useApiKeyRequired
public readonly useApiKey: boolean;- Type: boolean
useAuthorizerRequired
public readonly useAuthorizer: boolean;- Type: boolean
userPoolIDRequired
public readonly userPoolID: string;- Type: string
pathParamsOptional
public readonly pathParams: string;- Type: string
throttlingOptional
public readonly throttling: ThrottleSettings;- Type: aws-cdk-lib.aws_apigateway.ThrottleSettings
