AWS::CloudFormation::HookTypeConfig
The HookTypeConfig resource specifies the configuration of a hook.
Syntax
To declare this entity in your Amazon 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:StringConfigurationAlias:StringTypeArn:StringTypeName:String
Properties
Configuration-
Specifies the activated hook type configuration, in this Amazon Web Services account and Amazon Web Services Region.
You must specify either
TypeNameandConfigurationorTypeARNandConfiguration.Required: Conditional
Type: String
Update requires: No interruption
ConfigurationAlias-
Specifies the activated hook type configuration, in this Amazon Web Services account and Amazon Web Services Region.
Defaults to
defaultalias. 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
Configurationfor.You must specify either
TypeNameandConfigurationorTypeARNandConfiguration.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
TypeNameandConfigurationorTypeARNandConfiguration.Required: Conditional
Type: String
Minimum:
10Maximum:
196Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns 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 Reffunction, see Ref.
Fn::GetAtt
The Fn::GetAttintrinsic 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::GetAttintrinsic function, see Fn::GetAtt.
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"}}}}'