Skip to content

(apigatewayv2): Change defaultStage to an IHttpStage #14787

@hffmnn

Description

@hffmnn

❓ General Issue

The Question

Via #14541 the metricXXX method moved from IStage to IHttpStage. The defaultStage of a HttpApi returns a IStage, so the methods are not available.

Question: How to access the methods of the default stage?

Environment

  • CDK CLI Version:
  • Module Version: > 1.103.0
  • Node.js Version: v12.19.0
  • OS: macOS BigSur
  • Language (Version): TypeScript (4.2.4)

Other information

When casting api.defaultStage! as IHttpStage; and calling the metricXXX methods generate the expected code, so I guess the defaultStage could return IHttpStage directly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-apigatewayv2Related to Amazon API Gateway v2bugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions