AWS::CloudFormation::Macro - AWS CloudFormation

AWS::CloudFormation::Macro

The AWS::CloudFormation::Macro resource is a CloudFormation resource type that creates a CloudFormation macro to perform custom processing on CloudFormation templates. For more information, see Using AWS CloudFormation macros to perform custom processing on templates.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::CloudFormation::Macro", "Properties" : { "Description" : String, "FunctionName" : String, "LogGroupName" : String, "LogRoleARN" : String, "Name" : String } }

YAML

Type: AWS::CloudFormation::Macro Properties: Description: String FunctionName: String LogGroupName: String LogRoleARN: String Name: String

Properties

Description

A description of the macro.

Required: No

Type: String

Update requires: No interruption

FunctionName

The Amazon Resource Name (ARN) of the underlying AWS Lambda function that you want AWS CloudFormation to invoke when the macro is run.

Required: Yes

Type: String

Update requires: No interruption

LogGroupName

The CloudWatch Logs group to which AWS CloudFormation sends error logging information when invoking the macro's underlying AWS Lambda function.

Required: No

Type: String

Update requires: No interruption

LogRoleARN

The ARN of the role AWS CloudFormation should assume when sending log entries to CloudWatch Logs.

Required: No

Type: String

Update requires: No interruption

Name

The name of the macro. The name of the macro must be unique across all macros in the account.

Required: Yes

Type: String

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource name. For example:

{ "Ref": "myMacro" }

For the macro myMacro, Ref returns the name of the macro.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

See also