AWS::CloudFormation::HookTypeConfig - AWS CloudFormation

AWS::CloudFormation::HookTypeConfig

The HookTypeConfig resource specifies the configuration of a hook.

Syntax

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

JSON

{ "Type" : "AWS::CloudFormation::HookTypeConfig", "Properties" : { "Configuration" : String, "ConfigurationAlias" : String, "TypeArn" : String, "TypeName" : String } }

YAML

Type: AWS::CloudFormation::HookTypeConfig Properties: Configuration: String ConfigurationAlias: String TypeArn: String TypeName: String

Properties

Configuration

Specifies the activated hook type configuration, in this AWS account and AWS Region.

You must specify either TypeName and Configuration or TypeARN and Configuration.

Required: Conditional

Type: String

Update requires: No interruption

ConfigurationAlias

Specifies the activated hook type configuration, in this AWS account and AWS Region.

Defaults to default alias. Hook types currently support default configuration alias.

Required: No

Type: String

Update requires: Replacement

TypeArn

The Amazon Resource Number (ARN) for the hook to set Configuration for.

You must specify either TypeName and Configuration or TypeARN and Configuration.

Required: Conditional

Type: String

Update requires: No interruption

TypeName

The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of Organization::Service::Hook.

You must specify either TypeName and Configuration or TypeARN and Configuration.

Required: Conditional

Type: String

Minimum: 10

Maximum: 196

Update requires: No interruption

Return values

Ref

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

arn:aws:cloudformation:us-west-2:123456789012:type-configuration/hook/My-Sample-Hook/default

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.

ConfigurationArn

The Amazon Resource Number (ARN) of the activated hook type configuration, in this account and Region.

Examples

Specifying the configuration of a hook using TypeName

The following example demonstrates how to specify a new hook configuration with the TypeName property type.

JSON

{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "HookTypeConfig": { "Type": "AWS::CloudFormation::HookTypeConfig", "Properties": { "TypeName": "My::Sample::Hook", "Configuration": "{\"CloudFormationConfiguration\":{\"HookConfiguration\":{\"TargetStacks\":\"ALL\",\"FailureMode\":\"WARN\",\"Properties\":{\"limitSize\": \"1\",\"encryptionAlgorithm\": \"aws:kms\"}}}}" } } } }

YAML

AWSTemplateFormatVersion: 2010-09-09 Resources: HookTypeConfig: Type: AWS::CloudFormation::HookTypeConfig Properties: TypeName: My::Sample::Hook Configuration: '{"CloudFormationConfiguration":{"HookConfiguration":{"TargetStacks":"ALL","FailureMode":"WARN","Properties":{"limitSize": "1","encryptionAlgorithm": "aws:kms"}}}}'

Specifying the configuration of a hook using TypeArn

The following example demonstrates how to specify a new hook configuration with the TypeArn property type.

JSON

{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "HookTypeConfig": { "Type": "AWS::CloudFormation::HookTypeConfig", "Properties": { "TypeArn": "arn:aws:cloudformation:us-west-2:123456789012:type/hook/My-Sample-Hook", "Configuration": "{\"CloudFormationConfiguration\":{\"HookConfiguration\":{\"TargetStacks\":\"ALL\",\"FailureMode\":\"WARN\",\"Properties\":{\"limitSize\": \"1\",\"encryptionAlgorithm\": \"aws:kms\"}}}}" } } } }

YAML

AWSTemplateFormatVersion: 2010-09-09 Resources: HookTypeConfig: Type: AWS::CloudFormation::HookTypeConfig Properties: TypeArn: arn:aws:cloudformation:us-west-2:123456789012:type/hook/My-Sample-Hook Configuration: '{"CloudFormationConfiguration":{"HookConfiguration":{"TargetStacks":"ALL","FailureMode":"WARN","Properties":{"limitSize": "1","encryptionAlgorithm": "aws:kms"}}}}'