Experimental
@aws-cdk/aws-route53resolver-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
FirewallDomains Class
A list of domains.
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()
python
FirewallDomains()
java
new FirewallDomains()
csharp
new FirewallDomains()
go
NewFirewallDomains()
Methods
bind(scope: Construct): DomainsConfigdef bind(self, scope: Construct) -> DomainsConfigpublic DomainsConfig bind(Construct scope)public DomainsConfig Bind(Construct scope)func Bind(Scope Construct) DomainsConfig#Binds the domains to a domain list.
fromAsset(assetPath: string): FirewallDomains // chainable@staticmethod def from_asset(asset_path: str) -> FirewallDomainspublic static FirewallDomains fromAsset(String assetPath)public static FirewallDomains FromAsset(string assetPath)func FromAsset(AssetPath *string) FirewallDomainsstatic#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.
1 parameter
Parameters
assetPathasset_pathassetPathassetPathAssetPath— path to the text file.
fromList(list: string[]): FirewallDomains // chainable@staticmethod def from_list(list: typing.List[str]) -> FirewallDomainspublic static FirewallDomains fromList(List<String> list)public static FirewallDomains FromList(string[] list)func FromList(List *[]*string) FirewallDomainsstatic#Firewall domains created from a list of domains.
1 parameter
Parameters
listlistlistlistList— the list of domains.
fromS3(bucket: IBucket, key: string): FirewallDomains // chainable@staticmethod def from_s3(bucket: IBucket, key: str) -> FirewallDomainspublic static FirewallDomains fromS3(IBucket bucket, String key)public static FirewallDomains FromS3(IBucket bucket, string key)func FromS3(Bucket IBucket, Key *string) FirewallDomainsstatic#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.
2 parameters
Parameters
bucketbucketbucketbucketBucket— S3 bucket.keykeykeykeyKey— S3 key.
fromS3Url(url: string): FirewallDomains // chainable@staticmethod def from_s3_url(url: str) -> FirewallDomainspublic static FirewallDomains fromS3Url(String url)public static FirewallDomains FromS3Url(string url)func FromS3Url(Url *string) FirewallDomainsstatic#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.
1 parameter
Parameters
urlurlurlurlUrl— S3 bucket url (s3://bucket/prefix/objet).