-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(apigateway): grant methods to ApiKey #10633
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I like the changes in this PR 🙌
Suggestion:
If you could implement these APIs on a class called ApiKeyBase
and then have both ApiKey
and the Import
class extend this base class, then this functionality is also available to imported keys.
Something like this -
class ApiKeyBase extends Resource implements IApiKey {
public grantRead(...) { ... }
public grantWrite(...) { ... }
...
}
export class ApiKey extends ApiKeyBase {
public static fromApiKeyId(scope: Construct, id: string, apiKeyId: string): IApiKey {
class Import extends ApiKeyBase {
public keyId = apiKeyId;
}
return new Import(scope, id);
}
}
Note that, ApiKeyBase
is not exported.
Hi @nija-at , you might have to add the pr-readme-exempt label to this one. |
Instead, how about creating a new section called 'Api Key' at line 154 (and in the table of contents)? It feels like lines154-239 are talking about API keys. Then, add a couple of sentences around the grant APIs to that section |
I would prefer not to export I've pushed a commit that changes this and restructures the code so the export is not needed. Take a look and let me know what you think. |
These changes look good to me. Thanks! |
Co-authored-by: Niranjan Jayakar <[email protected]>
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
feat(apigateway): Add grant* methods to ApiKey
Ref
close #8060
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license