-
Notifications
You must be signed in to change notification settings - Fork 2.4k
docs: add referable properties of sam resources #1468
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
Conversation
This is just for referencing other CloudFormation resources that SAM creates, correct? Thank you for including the properties that cause SAM to create these resources. |
Codecov Report
@@ Coverage Diff @@
## develop #1468 +/- ##
===========================================
+ Coverage 94.39% 94.39% +<.01%
===========================================
Files 78 78
Lines 4709 4714 +5
Branches 944 948 +4
===========================================
+ Hits 4445 4450 +5
Misses 121 121
Partials 143 143
Continue to review full report at Codecov.
|
Yes, this doc is for all referable properties(CFN resources) that SAM creates when SAM resources are defined in the template |
70f0b11
to
20b9d85
Compare
20b9d85
to
cddb69e
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1468 +/- ##
========================================
Coverage 94.39% 94.39%
========================================
Files 78 78
Lines 4709 4714 +5
Branches 944 948 +4
========================================
+ Hits 4445 4450 +5
Misses 121 121
Partials 143 143
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## develop #1468 +/- ##
===========================================
+ Coverage 94.39% 94.39% +<.01%
===========================================
Files 78 78
Lines 4709 4714 +5
Branches 944 948 +4
===========================================
+ Hits 4445 4450 +5
Misses 121 121
Partials 143 143
Continue to review full report at Codecov.
|
|
||
Property Name | Reference | LogicalId | Description | ||
---|:---:|---|--- | ||
Stage | `restapi-logical-id`.Stage | `restapi-logical-id` `StageName`Stage | SAM generates `AWS::ApiGateway::Stage` resource when `AWS::Serverless::Api` resource is defined. This resource can be referenced in intrinsic function using the resource logical id or `restapi-logical-id`.Stage |
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.
Approving, as I believe the information here is correct. However, there is another case for the logical id of the stage, and that is when SAM can't resolve the actual stage name (because it's using intrinsics that SAM can't read).
Codecov Report
@@ Coverage Diff @@
## develop #1468 +/- ##
========================================
Coverage 94.39% 94.39%
========================================
Files 78 78
Lines 4709 4714 +5
Branches 944 948 +4
========================================
+ Hits 4445 4450 +5
Misses 121 121
Partials 143 143
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## develop #1468 +/- ##
========================================
Coverage 94.15% 94.15%
========================================
Files 78 78
Lines 4789 4789
Branches 967 967
========================================
Hits 4509 4509
Misses 130 130
Partials 150 150
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## develop #1468 +/- ##
========================================
Coverage 94.15% 94.15%
========================================
Files 78 78
Lines 4789 4789
Branches 967 967
========================================
Hits 4509 4509
Misses 130 130
Partials 150 150 Continue to review full report at Codecov.
|
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.
This also reminded me to actually make the domainname referable! :D Thanks!
versions/2016-10-31.md
Outdated
---|:---:|---|--- | ||
Alias | `function-logical-id`.Alias | `function-logical-id`Alias`alias-name` | SAM generates an `AWS::Lambda::Alias` resource when `AutoPublishAlias` property is set. This resource can be referenced in intrinsic functions by using the resource logical ID or `function-logical-id`.Alias | ||
Version | `function-logical-id`.Version | `function-logical-id`Version`sha` | SAM generates an `AWS::Lambda::Version` resource when `AutoPublishAlias` property is set. This resource can be referenced in intrinsic functions by using the resource logical ID or `function-logical-id`.Version | ||
Destination (for SNS Topic) | `function-logical-id`.DestinationTopic |`function-logical-id`EventInvokeConfig`OnSuccess/OnFailure`Topic| SAM auto creates an `AWS::SNS::Topic` resource when `Destination` property of `DestinationConfig` property in `EventInvokeConfig` property is not specified. This generated resource can be referenced by using `function-logical-id`.DestinationTopic |
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.
I would make the property name DestinationTopic
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.
Thank you, I will update
versions/2016-10-31.md
Outdated
Alias | `function-logical-id`.Alias | `function-logical-id`Alias`alias-name` | SAM generates an `AWS::Lambda::Alias` resource when `AutoPublishAlias` property is set. This resource can be referenced in intrinsic functions by using the resource logical ID or `function-logical-id`.Alias | ||
Version | `function-logical-id`.Version | `function-logical-id`Version`sha` | SAM generates an `AWS::Lambda::Version` resource when `AutoPublishAlias` property is set. This resource can be referenced in intrinsic functions by using the resource logical ID or `function-logical-id`.Version | ||
Destination (for SNS Topic) | `function-logical-id`.DestinationTopic |`function-logical-id`EventInvokeConfig`OnSuccess/OnFailure`Topic| SAM auto creates an `AWS::SNS::Topic` resource when `Destination` property of `DestinationConfig` property in `EventInvokeConfig` property is not specified. This generated resource can be referenced by using `function-logical-id`.DestinationTopic | ||
Destination (for SQS Queue) | `function-logical-id`.DestinationQueue |`function-logical-id`EventInvokeConfig`OnSuccess/OnFailure`Queue | SAM auto creates an `AWS::SQS::Queue` resource when `Destination` property of `DestinationConfig` property in `EventInvokeConfig` property is not specified. This generated resource can be referenced by using `function-logical-id`.DestinationQueue |
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.
PropertyName DestinationQueue
Codecov Report
@@ Coverage Diff @@
## develop #1468 +/- ##
========================================
Coverage 94.15% 94.15%
========================================
Files 78 78
Lines 4789 4789
Branches 967 967
========================================
Hits 4509 4509
Misses 130 130
Partials 150 150
Continue to review full report at Codecov.
|
|
||
Property Name | Reference | LogicalId | Description | ||
---|:---:|---|--- | ||
Stage | `restapi-logical-id`.Stage | `restapi-logical-id` `StageName`Stage | SAM generates `AWS::ApiGateway::Stage` resource when `AWS::Serverless::Api` resource is defined. This resource can be referenced in intrinsic function using the resource logical id or `restapi-logical-id`.Stage |
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.
As far as I know, Stage LogicalId does not contain StageName
, so it will be "restapi-logical-id
Stage". Please refer #259 (comment)
I'm not sure HTTPApi is same or not.
Issue #, if available:
Description of changes:
Added documentation for referable properties in SAM.
Description of how you validated changes:
Checklist:
make pr
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.