FirewallDomains

class aws_cdk.aws_route53resolver.FirewallDomains

Bases: object

(experimental) A list of domains.

Stability:

experimental

ExampleMetadata:

infused

Example:

block_list = route53resolver.FirewallDomainList(self, "BlockList",
    domains=route53resolver.FirewallDomains.from_list(["bad-domain.com", "bot-domain.net"])
)

s3_list = route53resolver.FirewallDomainList(self, "S3List",
    domains=route53resolver.FirewallDomains.from_s3_url("s3://bucket/prefix/object")
)

asset_list = route53resolver.FirewallDomainList(self, "AssetList",
    domains=route53resolver.FirewallDomains.from_asset("/path/to/domains.txt")
)
Stability:

experimental

Methods

abstract bind(scope)

(experimental) Binds the domains to a domain list.

Parameters:

scope (Construct) –

Stability:

experimental

Return type:

DomainsConfig

Static Methods

classmethod from_asset(asset_path)

(experimental) 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:

asset_path (str) – path to the text file.

Stability:

experimental

Return type:

FirewallDomains

classmethod from_list(list)

(experimental) Firewall domains created from a list of domains.

Parameters:

list (Sequence[str]) – the list of domains.

Stability:

experimental

Return type:

FirewallDomains

classmethod from_s3(bucket, key)

(experimental) 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 (IBucket) – S3 bucket.

  • key (str) – S3 key.

Stability:

experimental

Return type:

FirewallDomains

classmethod from_s3_url(url)

(experimental) 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 (str) – S3 bucket url (s3://bucket/prefix/objet).

Stability:

experimental

Return type:

FirewallDomains