AWS::CloudFormation::Macro - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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 Amazon CloudFormation macros to perform custom processing on templates.

Syntax

To declare this entity in your Amazon 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 Amazon Lambda function that you want Amazon CloudFormation to invoke when the macro is run.

Required: Yes

Type: String

Update requires: No interruption

LogGroupName

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

Required: No

Type: String

Update requires: No interruption

LogRoleARN

The ARN of the role Amazon 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