pl.wrzasq.cform.macro.apigateway.Utils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cform-macro Show documentation
Show all versions of cform-macro Show documentation
AWS CloudFormation template processing macro.
/**
* This file is part of the pl.wrzasq.cform.
*
* @license http://mit-license.org/ The MIT license
* @copyright 2021 © by Rafał Wrzeszcz - Wrzasq.pl.
*/
package pl.wrzasq.cform.macro.apigateway
/**
* Builds API Gateway URI for Lambda invocation.
*
* @param lambda Lambda reference.
* @return Integration URI.
*/
fun lambdaUri(lambda: String) = "arn:\${AWS::Partition}:apigateway:\${AWS::Region}:lambda:path/2015-03-31/functions/" +
"arn:\${AWS::Partition}:lambda:\${AWS::Region}:\${AWS::AccountId}:function:$lambda/invocations"