# CfnProtectionProps

Properties for defining a `CfnProtection`.

Extends: CfnProtectionProps
Used as props by: CfnProtection

- Source: Generated code
- Type last changed: v2.82.0 · 2 Jun 2023

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_shield as shield } from 'aws-cdk-lib';

declare const block: any;
declare const count: any;
const cfnProtectionProps: shield.CfnProtectionProps = {
  name: 'name',
  resourceArn: 'resourceArn',

  // the properties below are optional
  applicationLayerAutomaticResponseConfiguration: {
    action: {
      block: block,
      count: count,
    },
    status: 'status',
  },
  healthCheckArns: ['healthCheckArns'],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `applicationLayerAutomaticResponseConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnProtection.ApplicationLayerAutomaticResponseConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_shield.CfnProtection.ApplicationLayerAutomaticResponseConfigurationProperty.html) — The automatic application layer DDoS mitigation settings for the protection.

  This configuration determines whether Shield Advanced automatically manages rules in the web ACL in order to respond to application layer events that Shield Advanced determines to be DDoS attacks.

  If you use CloudFormation to manage the web ACLs that you use with Shield Advanced automatic mitigation, see the additional guidance about web ACL management in the `AWS::WAFv2::WebACL` resource description.

- `healthCheckArns`: string[] — The ARN (Amazon Resource Name) of the health check to associate with the protection.

  Health-based detection provides improved responsiveness and accuracy in attack detection and mitigation.

  You can use this option with any resource type except for Route 53 hosted zones.

  For more information, see [Configuring health-based detection using health checks](https://docs.aws.amazon.com/waf/latest/developerguide/ddos-advanced-health-checks.html) in the *AWS Shield Advanced Developer Guide* .

- `name`: string (required) — The name of the protection. For example, `My CloudFront distributions` .

  > If you change the name of an existing protection, Shield Advanced deletes the protection and replaces it with a new one. While this is happening, the protection isn't available on the AWS resource.

- `resourceArn`: string (required) — The ARN (Amazon Resource Name) of the AWS resource that is protected.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Key:value pairs associated with an AWS resource.

  The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
