> **Experimental**
>
> `@aws-cdk/aws-route53resolver-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# FirewallDomains

A list of domains.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/firewall-domain-list.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-route53resolver-alpha/lib/firewall-domain-list.ts#L44)

## Example

```ts
const blockList = new route53resolver.FirewallDomainList(this, 'BlockList', {
  domains: route53resolver.FirewallDomains.fromList(['bad-domain.com', 'bot-domain.net']),
});

const s3List = new route53resolver.FirewallDomainList(this, 'S3List', {
  domains: route53resolver.FirewallDomains.fromS3Url('s3://bucket/prefix/object'),
});

const assetList = new route53resolver.FirewallDomainList(this, 'AssetList', {
  domains: route53resolver.FirewallDomains.fromAsset('/path/to/domains.txt'),
});
```

## Initializer

```ts
new FirewallDomains()
```

## Methods

- `bind(scope: Construct): DomainsConfig` — Binds the domains to a domain list.

- `fromAsset(assetPath: string): FirewallDomains // chainable` (static) — Firewall domains created from a local disk path to a text file.

  The file must be a text file (`.txt` extension) and must contain a single
  domain per line. It will be uploaded to S3.

  **Parameters**

  - `assetPath` — path to the text file.

- `fromList(list: string[]): FirewallDomains // chainable` (static) — Firewall domains created from a list of domains.

  **Parameters**

  - `list` — the list of domains.

- `fromS3(bucket: IBucket, key: string): FirewallDomains // chainable` (static) — Firewall domains created from a file stored in Amazon S3.

  The file must be a text file and must contain a single domain per line.
  The content type of the S3 object must be `plain/text`.

  **Parameters**

  - `bucket` — S3 bucket.
  - `key` — S3 key.

- `fromS3Url(url: string): FirewallDomains // chainable` (static) — Firewall domains created from the URL of a file stored in Amazon S3.

  The file must be a text file and must contain a single domain per line.
  The content type of the S3 object must be `plain/text`.

  **Parameters**

  - `url` — S3 bucket url (s3://bucket/prefix/objet).
