CfnMacroProps

class aws_cdk.aws_cloudformation.CfnMacroProps(*, function_name, name, description=None, log_group_name=None, log_role_arn=None)

Bases: object

Properties for defining a CfnMacro.

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

  • name (str) – The name of the macro. The name of the macro must be unique across all macros in the account.

  • description (Optional[str]) – A description of the macro.

  • log_group_name (Optional[str]) – The Amazon CloudWatch log group to which AWS CloudFormation sends error logging information when invoking the macro’s underlying AWS Lambda function.

  • log_role_arn (Optional[str]) – The ARN of the role AWS CloudFormation should assume when sending log entries to CloudWatch logs.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_cloudformation as cloudformation

cfn_macro_props = cloudformation.CfnMacroProps(
    function_name="functionName",
    name="name",

    # the properties below are optional
    description="description",
    log_group_name="logGroupName",
    log_role_arn="logRoleArn"
)

Attributes

description

A description of the macro.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-description

Return type

Optional[str]

function_name

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-functionname

Return type

str

log_group_name

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-loggroupname

Return type

Optional[str]

log_role_arn

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-logrolearn

Return type

Optional[str]

name

The name of the macro.

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

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-macro.html#cfn-cloudformation-macro-name

Return type

str