import * as core from "@terrascript/core"; export interface PredicatesArgs extends core.SchemaArgs { dataId: string | core.StringOut; negated: boolean | core.BooleanOut; type: string | core.StringOut; } export class Predicates extends core.Schema { @core.attr(String) public dataId!: string | core.StringOut; @core.attr(Boolean) public negated!: boolean | core.BooleanOut; @core.attr(String) public type!: string | core.StringOut; } export interface RateBasedRuleArgs extends core.ResourceArgs { /** * (Required) The name or description for the Amazon CloudWatch metric of this rule. */ metricName: string | core.StringOut; /** * (Required) The name or description of the rule. */ name: string | core.StringOut; /** * (Optional) The objects to include in a rule (documented below). */ predicates?: core.Array | core.ArrayOut; /** * (Required) Valid value is IP. */ rateKey: string | core.StringOut; /** * (Required) The maximum number of requests, which have an identical value in the field specified by t * he RateKey, allowed in a five-minute period. Minimum value is 100. */ rateLimit: number | core.NumberOut; /** * (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 RateBasedRule extends core.Resource { /** * Amazon Resource Name (ARN) */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * The ID of the WAF rule. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required) The name or description for the Amazon CloudWatch metric of this rule. */ @core.attr(String) public metricName!: string | core.StringOut; /** * (Required) The name or description of the rule. */ @core.attr(String) public name!: string | core.StringOut; /** * (Optional) The objects to include in a rule (documented below). */ @core.attr(Predicates, { kind: "array" }) public predicates?: core.Array | core.ArrayOut; /** * (Required) Valid value is IP. */ @core.attr(String) public rateKey!: string | core.StringOut; /** * (Required) The maximum number of requests, which have an identical value in the field specified by t * he RateKey, allowed in a five-minute period. Minimum value is 100. */ @core.attr(Number) public rateLimit!: number | core.NumberOut; /** * (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?: RateBasedRuleArgs) { super(name, "aws_waf_rate_based_rule", args); } public override getNamespace(): string { return "aws_waf"; } }