GradientEdge CDK Utils
    Preparing search index...

    Provides operations on AWS API Gateway.

    • A new instance of this class is injected into CommonConstruct constructor.
    • If a custom construct extends CommonConstruct, an instance is available within the context.
    import { CommonConstruct } from '@gradientedge/cdk-utils'

    class CustomConstruct extends CommonConstruct {
    constructor(parent: Construct, id: string, props: common.CommonStackProps) {
    super(parent, id, props)
    this.props = props
    const lambdaFunction = this.lambdaManager.createLambdaFunction('MyFunction', this, role, layers, code)
    this.apiManager.createLambdaRestApi('MyCertificate', this, props, lambdaFunction)
    }
    }
    Index

    Constructors

    Methods

    • Parameters

      • id: string

        scoped id of the resource

      • scope: CommonConstruct

        scope in which this resource is defined

      • domainName: string

        the domain name to use

      • certificate: ICertificate

        the certificate used for custom restApi domain

      Returns DomainName

    • Parameters

      • id: string

        scoped id of the resource

      • scope: CommonConstruct

        scope in which this resource is defined

      • parent: IResource

        the parent API resource to attach this resource to

      • path: string

        the URL path segment for this resource

      • integration: Integration

        the backend integration for methods on this resource

      • addProxy: boolean

        whether to create a greedy proxy child resource ({path+})

      • Optionalauthorizer: IAuthorizer

        optional authorizer for the methods

      • OptionalallowedOrigins: string[]

        optional CORS allowed origins (defaults to all origins)

      • OptionalallowedMethods: string[]

        optional CORS allowed methods (defaults to all methods)

      • OptionalallowedHeaders: string[]

        optional CORS allowed headers (defaults to default headers)

      • OptionalmethodRequestParameters: { [param: string]: boolean }

        optional request parameter mappings for methods

      • OptionalproxyIntegration: Integration

        optional alternative integration for the proxy resource

      • OptionalenableDefaultCors: boolean

        set to false to disable automatic CORS preflight configuration

      • OptionalmockIntegration: Integration

        optional mock integration for OPTIONS when CORS is disabled

      • OptionalmockMethodResponses: MethodResponse[]

        optional method responses for the mock OPTIONS integration

      Returns Resource