class FirewallDomains
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Route53Resolver.FirewallDomains |
Java | software.amazon.awscdk.services.route53resolver.FirewallDomains |
Python | aws_cdk.aws_route53resolver.FirewallDomains |
TypeScript (source) | @aws-cdk/aws-route53resolver » FirewallDomains |
A list of domains.
Example
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
new FirewallDomains()
Methods
Name | Description |
---|---|
bind(scope) | Binds the domains to a domain list. |
static from | Firewall domains created from a local disk path to a text file. |
static from | Firewall domains created from a list of domains. |
static from | Firewall domains created from a file stored in Amazon S3. |
static from | Firewall domains created from the URL of a file stored in Amazon S3. |
bind(scope)
public bind(scope: Construct): DomainsConfig
Parameters
- scope
Construct
Returns
Binds the domains to a domain list.
Asset(assetPath)
static frompublic static fromAsset(assetPath: string): FirewallDomains
Parameters
- assetPath
string
— path to the text file.
Returns
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.
List(list)
static frompublic static fromList(list: string[]): FirewallDomains
Parameters
- list
string[]
— the list of domains.
Returns
Firewall domains created from a list of domains.
S3(bucket, key)
static frompublic static fromS3(bucket: IBucket, key: string): FirewallDomains
Parameters
- bucket
IBucket
— S3 bucket. - key
string
— S3 key.
Returns
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
.
S3Url(url)
static frompublic static fromS3Url(url: string): FirewallDomains
Parameters
- url
string
— S3 bucket url (s3://bucket/prefix/objet).
Returns
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
.