Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(apigateway): cannot create an ApiKey with an imported RestApi #22368

Merged
merged 4 commits into from
Oct 11, 2022

Commits on Oct 5, 2022

  1. fix(apigateway): cannot create an ApiKey with an imported RestApi

    The current implementation of `ApiKey` is a little confusing. It takes a
    `resources` property which expects a list of `IRestApi`s. An ApiKey is
    not associated with a RestApi by itself though, it needs to be
    associated with a specific `Stage` on the RestApi. When you import a
    RestApi you cannot import it with a `Stage` and even if you could
    provide an `IStage` I don't think that makes the most sense (you can
    have multiple stages).
    
    Instead, this PR deprecates the `resources` prop and adds a new `stages`
    prop which expects a list of `IStage`s. To facilitate this I have also
    done a couple of other things
    
    - Added the ability to import a Stage using
      `Stage.fromStageAttributes()`.
    - Added an `addApiKey` method to `IStage`.
    - Added additional error handling if the user does try to create an
      ApiKey with an imported RestApi.
    
    fixes #22102
    corymhall committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    b0ff61a View commit details
    Browse the repository at this point in the history
  2. fixing linting errors

    corymhall committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    29ae2e5 View commit details
    Browse the repository at this point in the history
  3. fixing more linting errors

    corymhall committed Oct 5, 2022
    Configuration menu
    Copy the full SHA
    79b0b0d View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. Configuration menu
    Copy the full SHA
    a39db91 View commit details
    Browse the repository at this point in the history