Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ApiViewConstruct

API endpoint CDK construct.

Defines a route and Lambda function handler on an HttpApi.

Hierarchy

  • ApiViewMixin
    • ApiViewConstruct

Implements

  • IEndpoint

Index

Constructors

constructor

Properties

handlerFunction

handlerFunction: JetKitLambdaFunction

httpApi

httpApi: HttpApi

lambdaApiIntegration

lambdaApiIntegration: LambdaProxyIntegration

Optional methods

methods?: HttpMethod[]

Readonly node

node: ConstructNode

The construct tree node associated with this construct.

stability

stable

path

path: string

Methods

addRoutes

  • addRoutes(__namedParameters: IAddRoutes): void

Protected onPrepare

  • onPrepare(): void
  • Perform final modifications before synthesis.

    This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.

    This is an advanced framework feature. Only use this if you understand the implications.

    stability

    stable

    Returns void

Protected onSynthesize

  • onSynthesize(session: ISynthesisSession): void
  • Allows this construct to emit artifacts into the cloud assembly during synthesis.

    This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

    stability

    stable

    Parameters

    • session: ISynthesisSession

      The synthesis session.

    Returns void

Protected onValidate

  • onValidate(): string[]
  • Validate the current construct.

    This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

    stability

    stable

    Returns string[]

    An array of validation error messages, or an empty array if the construct is valid.

Protected prepare

  • prepare(): void
  • Perform final modifications before synthesis.

    This method can be implemented by derived constructs in order to perform final changes before synthesis. prepare() will be called after child constructs have been prepared.

    This is an advanced framework feature. Only use this if you understand the implications.

    stability

    stable

    Returns void

Protected synthesize

  • synthesize(session: ISynthesisSession): void
  • Allows this construct to emit artifacts into the cloud assembly during synthesis.

    This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

    stability

    stable

    Parameters

    • session: ISynthesisSession

      The synthesis session.

    Returns void

toString

  • toString(): string
  • Returns a string representation of this construct.

    stability

    stable

    Returns string

Protected validate

  • validate(): string[]
  • Validate the current construct.

    This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

    stability

    stable

    Returns string[]

    An array of validation error messages, or an empty array if the construct is valid.

Static isConstruct

  • isConstruct(x: any): x is Construct
  • Return whether the given object is a Construct.

    stability

    stable

    Parameters

    • x: any

    Returns x is Construct

Generated using TypeDoc