0.0.5 • Published 1 year ago

cdk-api-gateway-helper-lib v0.0.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

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)
NameTypeDescription
stackaws-cdk-lib.StackNo description.
resourceNamestringNo description.

stackRequired
  • Type: aws-cdk-lib.Stack

resourceNameRequired
  • Type: string

Methods

NameDescription
addApiToGatewayNo description.
addDefaultAuthErrorResponseNo description.
addUsagePlanNo description.
returnGatewayNo description.

addApiToGateway
public addApiToGateway(params: IGatewayIF): Method
paramsRequired
  • Type: IGatewayIF

addDefaultAuthErrorResponse
public addDefaultAuthErrorResponse(name: string): void
nameRequired
  • Type: string

addUsagePlan
public addUsagePlan(planName: string, defaultPlan: UsagePlanProps, throttlePerMethod?: ThrottlingPerMethod[], apiKey?: IApiKey): void
planNameRequired
  • Type: string

defaultPlanRequired
  • Type: aws-cdk-lib.aws_apigateway.UsagePlanProps

throttlePerMethodOptional
  • Type: aws-cdk-lib.aws_apigateway.ThrottlingPerMethod[]

apiKeyOptional
  • Type: IApiKey

returnGateway
public returnGateway(): RestApi

Properties

NameTypeDescription
gatewayaws-cdk-lib.aws_apigateway.RestApiNo description.
resourceNamestringNo description.
stackaws-cdk-lib.StackNo description.
throttlingArraws-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

NameTypeDescription
keyaws-cdk-lib.aws_apigateway.IApiKeyNo description.
overrideLogicalIdstringNo 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

NameTypeDescription
lambdaFunctionaws-cdk-lib.aws_lambda.IFunctionNo description.
methodTypestringNo description.
resourceNamestringNo description.
resourceVersionstringNo description.
useApiKeybooleanNo description.
useAuthorizerbooleanNo description.
userPoolIDstringNo description.
pathParamsstringNo description.
throttlingaws-cdk-lib.aws_apigateway.ThrottleSettingsNo 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

0.0.3

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago