

This is the new *Amazon CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [Amazon CloudFormation User Guide](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::Shield::Protection Action
<a name="aws-properties-shield-protection-action"></a>

Specifies the action setting that Shield Advanced should use in the Amazon WAF rules that it creates on behalf of the protected resource in response to DDoS attacks. You specify this as part of the configuration for the automatic application layer DDoS mitigation feature, when you enable or update automatic mitigation. Shield Advanced creates the Amazon WAF rules in a Shield Advanced-managed rule group, inside the web ACL that you have associated with the resource. 

## Syntax
<a name="aws-properties-shield-protection-action-syntax"></a>

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

### JSON
<a name="aws-properties-shield-protection-action-syntax.json"></a>

```
{
  "[Block](#cfn-shield-protection-action-block)" : {{Json}},
  "[Count](#cfn-shield-protection-action-count)" : {{Json}}
}
```

### YAML
<a name="aws-properties-shield-protection-action-syntax.yaml"></a>

```
  [Block](#cfn-shield-protection-action-block): {{Json}}
  [Count](#cfn-shield-protection-action-count): {{Json}}
```

## Properties
<a name="aws-properties-shield-protection-action-properties"></a>

`Block`  <a name="cfn-shield-protection-action-block"></a>
Specifies that Shield Advanced should configure its Amazon WAF rules with the Amazon WAF`Block` action.   
You must specify exactly one action, either `Block` or `Count`.  
Example JSON: `{ "Block": {} }`  
Example YAML: `Block: {}`  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Count`  <a name="cfn-shield-protection-action-count"></a>
Specifies that Shield Advanced should configure its Amazon WAF rules with the Amazon WAF`Count` action.   
You must specify exactly one action, either `Block` or `Count`.  
Example JSON: `{ "Count": {} }`  
Example YAML: `Count: {}`  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)