Skip to content

Commit f928b4b

Browse files
author
Shreya
authored
docs: add referable properties of sam resources (#1468)
1 parent c5221fc commit f928b4b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

versions/2016-10-31.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ The AWS Serverless Application Model (SAM) is licensed under [The Apache License
1616
* [Event source types](#event-source-types)
1717
* [Property types](#property-types)
1818
* [Data types](#data-types)
19+
* [Referable properties of SAM resources](#referable-properties-of-sam-resources)
1920

2021

2122
## Introduction
@@ -1273,3 +1274,34 @@ CorsConfiguration:
12731274
ExposeHeaders:
12741275
- "*"
12751276
```
1277+
1278+
### Referable properties of SAM resources
1279+
- [AWS::Serverless::Function](#referable-properties-of-serverless-function)
1280+
- [AWS::Serverless::Api](#referable-properties-of-serverless-RestApi)
1281+
- [AWS::Serverless::HttpApi](#referable-properties-of-serverless-HttpApi)
1282+
1283+
#### Referable properties of Serverless Function
1284+
Property Name | Reference | LogicalId | Description
1285+
---|:---:|---|---
1286+
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
1287+
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
1288+
DestinationTopic | `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
1289+
DestinationQueue | `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
1290+
1291+
#### Referable properties of Serverless RestApi
1292+
1293+
Property Name | Reference | LogicalId | Description
1294+
---|:---:|---|---
1295+
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
1296+
Deployment | `restapi-logical-id`.Deployment | `restapi-logical-id`Deployment`sha` | SAM generates `AWS::ApiGateway::Deployment` 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`.Deployment
1297+
DomainName | `restapi-logical-id`.DomainName | `domain-logical-id` | `AWS::ApiGateway::DomainName` resource can be referenced by using the resource logical id or `restapi-logical-id`.DomainName when `DomainName` resource is defined in `Domain` property of `AWS::Serverless::Api`
1298+
UsagePlan | `restapi-logical-id`.UsagePlan | `restapi-logical-id`UsagePlan | SAM generates UsagePlan, UsagePlanKey and ApiKey resources when `UsagePlan` property is set. UsagePlan resource can be referenced in intrinsic function using the resource logical id or `restapi-logical-id`.UsagePlan
1299+
UsagePlanKey | `restapi-logical-id`.UsagePlanKey |`restapi-logical-id`UsagePlanKey | SAM generates UsagePlan, UsagePlanKey and ApiKey resources when `UsagePlan` property is set. UsagePlanKey resource can be referenced in intrinsic function using the resource logical id or `restapi-logical-id`.UsagePlanKey
1300+
ApiKey | `restapi-logical-id`.ApiKey |`restapi-logical-id`ApiKey | SAM generates UsagePlan, UsagePlanKey and ApiKey resources when `UsagePlan` property is set. ApiKey resource can be referenced in intrinsic function using the resource logical id or `restapi-logical-id`.ApiKey
1301+
1302+
#### Referable properties of Serverless HttpApi
1303+
1304+
Property Name | Reference | LogicalId | Description
1305+
---|:---:|---|---
1306+
Stage | `httpapi-logical-id`.Stage | `httpapi-logical-id`ApiGatewayDefaultStage or `httpapi-logical-id` `StageName`Stage | SAM generates `AWS::ApiGatewayV2::Stage` resource with `httpapi-logical-id`ApiGatewayDefaultStage logical id if `StageName` property is not defined. If an explicit `StageName` property is defined them SAM generates `AWS::ApiGatewayV2::Stage` resource with `httpapi-logical-id` `StageName`Stage logicalId. This resource can be referenced in intrinsic functions using `httpapi-logical-id`.Stage
1307+
DomainName | `httpapi-logical-id`.DomainName | `domain-logical-id` | `AWS::ApiGatewayV2::DomainName` resource can be referenced by using the resource logical id or `restapi-logical-id`.DomainName when `DomainName` resource is defined in `Domain` property of `AWS::Serverless::Api`

0 commit comments

Comments
 (0)