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): Add stage ARN attribute #18170
Conversation
This adds an attribute to retrieve the resource ARN of a stage (not the execute-api ARN). This is useful when integrating with services such as WAF or when writing IAM policies for managing the API.
80e9384
to
b49eb9a
Compare
service: 'apigateway', | ||
account: '', | ||
resource: 'restapis', | ||
resourceName: `${this.restApi.restApiId}/stages/${this.stageName}`, |
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.
What if this.stageName
is unresolved? Can that happen?
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.
It should always be a Ref
to the CfnStage
(L257), which would be safe to concatenate here. I'm not sure if it'd be possible for it to be any other type of token since it's not based on the input via StageOptions
/StageProps
directly.
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). |
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). |
This adds an attribute to retrieve the resource ARN of a stage (not the execute-api ARN). This is useful when integrating with services such as WAF or when writing IAM policies for managing the API. ARNs for v1 REST APIs are at https://docs.aws.amazon.com/apigateway/latest/developerguide/arn-format-reference.html#apigateway-v1-arns ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This adds an attribute to retrieve the resource ARN of a stage (not the
execute-api ARN). This is useful when integrating with services such as
WAF or when writing IAM policies for managing the API.
ARNs for v1 REST APIs are at https://docs.aws.amazon.com/apigateway/latest/developerguide/arn-format-reference.html#apigateway-v1-arns
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license