import * as core from "@terrascript/core"; export interface DefaultActionArgs extends core.SchemaArgs { type: string | core.StringOut; } export class DefaultAction extends core.Schema { @core.attr(String) public type!: string | core.StringOut; } export interface FieldToMatchArgs extends core.SchemaArgs { data?: string | core.StringOut; type: string | core.StringOut; } export class FieldToMatch extends core.Schema { @core.attr(String) public data?: string | core.StringOut; @core.attr(String) public type!: string | core.StringOut; } export interface RedactedFieldsArgs extends core.SchemaArgs { fieldToMatch: core.Array | core.ArrayOut; } export class RedactedFields extends core.Schema { @core.attr(FieldToMatch, { kind: "array" }) public fieldToMatch!: core.Array | core.ArrayOut; } export interface LoggingConfigurationArgs extends core.SchemaArgs { logDestination: string | core.StringOut; redactedFields?: RedactedFields; } export class LoggingConfiguration extends core.Schema { @core.attr(String) public logDestination!: string | core.StringOut; @core.attr(RedactedFields) public redactedFields?: RedactedFields; } export interface ActionArgs extends core.SchemaArgs { type: string | core.StringOut; } export class Action extends core.Schema { @core.attr(String) public type!: string | core.StringOut; } export interface OverrideActionArgs extends core.SchemaArgs { type: string | core.StringOut; } export class OverrideAction extends core.Schema { @core.attr(String) public type!: string | core.StringOut; } export interface RulesArgs extends core.SchemaArgs { action?: Action; overrideAction?: OverrideAction; priority: number | core.NumberOut; ruleId: string | core.StringOut; type?: string | core.StringOut; } export class Rules extends core.Schema { @core.attr(Action) public action?: Action; @core.attr(OverrideAction) public overrideAction?: OverrideAction; @core.attr(Number) public priority!: number | core.NumberOut; @core.attr(String) public ruleId!: string | core.StringOut; @core.attr(String) public type?: string | core.StringOut; } export interface WebAclArgs extends core.ResourceArgs { /** * (Required) Configuration block with action that you want AWS WAF to take when a request doesn't matc * h the criteria in any of the rules that are associated with the web ACL. Detailed below. */ defaultAction: DefaultAction; /** * (Optional) Configuration block to enable WAF logging. Detailed below. */ loggingConfiguration?: LoggingConfiguration; /** * (Required) The name or description for the Amazon CloudWatch metric of this web ACL. */ metricName: string | core.StringOut; /** * (Required) The name or description of the web ACL. */ name: string | core.StringOut; /** * (Optional) Configuration blocks containing rules to associate with the web ACL and the settings for * each rule. Detailed below. */ rules?: core.Array | core.ArrayOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; } export class WebAcl extends core.Resource { /** * The ARN of the WAF WebACL. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Required) Configuration block with action that you want AWS WAF to take when a request doesn't matc * h the criteria in any of the rules that are associated with the web ACL. Detailed below. */ @core.attr(DefaultAction) public defaultAction!: DefaultAction; /** * The ID of the WAF WebACL. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Configuration block to enable WAF logging. Detailed below. */ @core.attr(LoggingConfiguration) public loggingConfiguration?: LoggingConfiguration; /** * (Required) The name or description for the Amazon CloudWatch metric of this web ACL. */ @core.attr(String) public metricName!: string | core.StringOut; /** * (Required) The name or description of the web ACL. */ @core.attr(String) public name!: string | core.StringOut; /** * (Optional) Configuration blocks containing rules to associate with the web ACL and the settings for * each rule. Detailed below. */ @core.attr(Rules, { kind: "array" }) public rules?: core.Array | core.ArrayOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati * on-block) present, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; constructor(name: string, args?: WebAclArgs) { super(name, "aws_waf_web_acl", args); } public override getNamespace(): string { return "aws_waf"; } }