import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; export interface WafOwaspWhiteRuleConfig extends cdktf.TerraformMetaArguments { /** * Domain name. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#domain WafOwaspWhiteRule#domain} */ readonly domain: string; /** * If the JobDateTime field is not set, this field is used. 0 means permanent, other values indicate the cutoff time for scheduled effect (unit: seconds). * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#expire_time WafOwaspWhiteRule#expire_time} */ readonly expireTime: number; /** * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#id WafOwaspWhiteRule#id} * * Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. * If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable. */ readonly id?: string; /** * ID list of allowlisted rules. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#ids WafOwaspWhiteRule#ids} */ readonly ids: number[]; /** * Rule execution mode: TimedJob indicates scheduled execution. CronJob indicates periodic execution. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#job_type WafOwaspWhiteRule#job_type} */ readonly jobType: string; /** * Rule name. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#name WafOwaspWhiteRule#name} */ readonly name: string; /** * Rule status. valid values: 0 (disabled), 1 (enabled). enabled by default. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#status WafOwaspWhiteRule#status} */ readonly status?: number; /** * Allowlist type. valid values: 0 (allowlisting by specific rule ID), 1 (allowlisting by rule type). * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#type WafOwaspWhiteRule#type} */ readonly type: number; /** * job_date_time block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#job_date_time WafOwaspWhiteRule#job_date_time} */ readonly jobDateTime: WafOwaspWhiteRuleJobDateTime; /** * strategies block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#strategies WafOwaspWhiteRule#strategies} */ readonly strategies: WafOwaspWhiteRuleStrategies[] | cdktf.IResolvable; } export interface WafOwaspWhiteRuleJobDateTimeCron { /** * Execution day of each month. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#days WafOwaspWhiteRule#days} */ readonly days?: number[]; /** * End time. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#end_time WafOwaspWhiteRule#end_time} */ readonly endTime?: string; /** * Start time. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#start_time WafOwaspWhiteRule#start_time} */ readonly startTime?: string; /** * Execution day of each week. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#w_days WafOwaspWhiteRule#w_days} */ readonly wDays?: number[]; } export declare function wafOwaspWhiteRuleJobDateTimeCronToTerraform(struct?: WafOwaspWhiteRuleJobDateTimeCron | cdktf.IResolvable): any; export declare function wafOwaspWhiteRuleJobDateTimeCronToHclTerraform(struct?: WafOwaspWhiteRuleJobDateTimeCron | cdktf.IResolvable): any; export declare class WafOwaspWhiteRuleJobDateTimeCronOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): WafOwaspWhiteRuleJobDateTimeCron | cdktf.IResolvable | undefined; set internalValue(value: WafOwaspWhiteRuleJobDateTimeCron | cdktf.IResolvable | undefined); private _days?; get days(): number[]; set days(value: number[]); resetDays(): void; get daysInput(): number[]; private _endTime?; get endTime(): string; set endTime(value: string); resetEndTime(): void; get endTimeInput(): string; private _startTime?; get startTime(): string; set startTime(value: string); resetStartTime(): void; get startTimeInput(): string; private _wDays?; get wDays(): number[]; set wDays(value: number[]); resetWDays(): void; get wDaysInput(): number[]; } export declare class WafOwaspWhiteRuleJobDateTimeCronList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: WafOwaspWhiteRuleJobDateTimeCron[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): WafOwaspWhiteRuleJobDateTimeCronOutputReference; } export interface WafOwaspWhiteRuleJobDateTimeTimed { /** * End timestamp, in seconds. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#end_date_time WafOwaspWhiteRule#end_date_time} */ readonly endDateTime?: number; /** * Start timestamp, in seconds. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#start_date_time WafOwaspWhiteRule#start_date_time} */ readonly startDateTime?: number; } export declare function wafOwaspWhiteRuleJobDateTimeTimedToTerraform(struct?: WafOwaspWhiteRuleJobDateTimeTimed | cdktf.IResolvable): any; export declare function wafOwaspWhiteRuleJobDateTimeTimedToHclTerraform(struct?: WafOwaspWhiteRuleJobDateTimeTimed | cdktf.IResolvable): any; export declare class WafOwaspWhiteRuleJobDateTimeTimedOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): WafOwaspWhiteRuleJobDateTimeTimed | cdktf.IResolvable | undefined; set internalValue(value: WafOwaspWhiteRuleJobDateTimeTimed | cdktf.IResolvable | undefined); private _endDateTime?; get endDateTime(): number; set endDateTime(value: number); resetEndDateTime(): void; get endDateTimeInput(): number; private _startDateTime?; get startDateTime(): number; set startDateTime(value: number); resetStartDateTime(): void; get startDateTimeInput(): number; } export declare class WafOwaspWhiteRuleJobDateTimeTimedList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: WafOwaspWhiteRuleJobDateTimeTimed[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): WafOwaspWhiteRuleJobDateTimeTimedOutputReference; } export interface WafOwaspWhiteRuleJobDateTime { /** * Specifies the time zone. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#time_t_zone WafOwaspWhiteRule#time_t_zone} */ readonly timeTZone?: string; /** * cron block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#cron WafOwaspWhiteRule#cron} */ readonly cron?: WafOwaspWhiteRuleJobDateTimeCron[] | cdktf.IResolvable; /** * timed block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#timed WafOwaspWhiteRule#timed} */ readonly timed?: WafOwaspWhiteRuleJobDateTimeTimed[] | cdktf.IResolvable; } export declare function wafOwaspWhiteRuleJobDateTimeToTerraform(struct?: WafOwaspWhiteRuleJobDateTimeOutputReference | WafOwaspWhiteRuleJobDateTime): any; export declare function wafOwaspWhiteRuleJobDateTimeToHclTerraform(struct?: WafOwaspWhiteRuleJobDateTimeOutputReference | WafOwaspWhiteRuleJobDateTime): any; export declare class WafOwaspWhiteRuleJobDateTimeOutputReference extends cdktf.ComplexObject { private isEmptyObject; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string); get internalValue(): WafOwaspWhiteRuleJobDateTime | undefined; set internalValue(value: WafOwaspWhiteRuleJobDateTime | undefined); private _timeTZone?; get timeTZone(): string; set timeTZone(value: string); resetTimeTZone(): void; get timeTZoneInput(): string; private _cron; get cron(): WafOwaspWhiteRuleJobDateTimeCronList; putCron(value: WafOwaspWhiteRuleJobDateTimeCron[] | cdktf.IResolvable): void; resetCron(): void; get cronInput(): any; private _timed; get timed(): WafOwaspWhiteRuleJobDateTimeTimedList; putTimed(value: WafOwaspWhiteRuleJobDateTimeTimed[] | cdktf.IResolvable): void; resetTimed(): void; get timedInput(): any; } export interface WafOwaspWhiteRuleStrategies { /** * Specifies the matching parameter. * * Configuration parameters are divided into two data types: parameter not supported and support parameters. * When the match field is one of the following four, the matching parameter can be entered, otherwise not supported. * GET (get parameter value). * POST (post parameter value). * ARGS_COOKIE (COOKIE parameter value). * ARGS_HEADER (HEADER parameter value). * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#arg WafOwaspWhiteRule#arg} */ readonly arg: string; /** * Case-Sensitive. * Case-Insensitive. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#case_not_sensitive WafOwaspWhiteRule#case_not_sensitive} */ readonly caseNotSensitive?: number; /** * Specifies the logic symbol. * * Logical symbols are divided into the following types:. * Empty (content is empty). * null (not found). * Eq (equal to). * neq (not equal to). * contains (contain). * ncontains (do not contain). * strprefix (prefix matching). * strsuffix (suffix matching). * Len_eq (length equals to). * Len_gt (length greater than). * Len_lt (length less than). * ipmatch (belong). * ipnmatch (not_in). * numgt (value greater than). * NumValue smaller than]. * Value equal to. * numneq (value not equal to). * numle (less than or equal to). * numge (value is greater than or equal to). * geo_in (IP geographic belong). * geo_not_in (IP geographic not_in). * Specifies different logical operators for matching fields. for details, see the matching field table above. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#compare_func WafOwaspWhiteRule#compare_func} */ readonly compareFunc: string; /** * Specifies the match content. * * Currently, when the match field is COOKIE (COOKIE), match content is not required. all others are needed. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/1.82.49/docs/resources/waf_owasp_white_rule#content WafOwaspWhiteRule#content} */ readonly content: string; /** * Specifies the matching field. * * Different matching fields result in different matching parameters, logical operators, and matching contents. the details are as follows:. *
| Matching Field | Matching Parameter | Logical Symbol | Matching Content |
|---|---|---|---|
| IP (source IP) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | Multiple IP addresses are separated by commas. A maximum of 20 IP addresses are allowed. |
| IPv6 (source IPv6) | Parameters are not supported. | ipmatch (match) ipnmatch (mismatch) | A single IPv6 address is supported. |
| Referer (referer) | Parameters are not supported. | empty (Content is empty.) null (do not exist) eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content, with a maximum of 512 characters. |
| URL (request path) | Parameters are not supported. | eq (equal to) neq (not equal to) contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is * less than) strprefix (prefix matching) strsuffix (suffix matching) rematch (regular expression matching) | Enter the content starting with /, with a maximum of 512 characters. |
| UserAgent (UserAgent) | Parameters are not supported. | Same logical symbols as the matching field Referer | Enter the content with a maximum of 512 characters. |
| HTTP_METHOD (HTTP request method) | Parameters are not supported. | eq (equal to) neq (not equal to) | Enter the method name. The uppercase is recommended. |
| QUERY_STRING (request string) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the content with a maximum of 512 characters. |
| GET (GET parameter value) | Parameter entry is supported. | contains (contain) ncontains (do not contain) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
| GET_PARAMS_NAMES (GET parameter name) | Parameters are not supported. | exist (Parameter exists.) nexist (Parameter does not exist.) len_eq (length equals to) len_gt (length is greater than) len_lt (length is less than) strprefix (prefix matching) strsuffix (suffix matching) | Enter the content with a maximum of 512 characters. |
| POST (POST parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content with a maximum of 512 characters. |
| GET_POST_NAMES (POST parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
| POST_BODY (complete body) | Parameters are not supported. | Same logical symbol as the matching field Request Path | Enter the body content with a maximum of 512 characters. |
| COOKIE (cookie) | Parameters are not supported. | empty (Content is empty.) null (do not exist) rematch (regular expression matching) | Unsupported currently |
| GET_COOKIES_NAMES (cookie parameter name) | Parameters are not supported. | Same logical symbol as the matching field GET Parameter Name | Enter the content with a maximum of 512 characters. |
| ARGS_COOKIE (cookie parameter value) | Parameter entry is supported. | Same logical symbol as the matching field GET Parameter Value | Enter the content512 characters limit |
| GET_HEADERS_NAMES (Header parameter name) | parameter not supported | exsit (parameter exists) nexsit (parameter does not exist) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, lowercase is recommended, up to 512 characters |
| ARGS_Header (Header parameter value) | support parameter entry | contains (include) ncontains (does not include) len_eq (LENGTH equal) len_gt (LENGTH greater than) len_lt (LENGTH less than) strprefix (prefix match) strsuffix (suffix matching) rematch (regular expression matching) | enter CONTENT, up to 512 characters |
| CONTENT_LENGTH (CONTENT-LENGTH) | support parameter entry | numgt (value greater than) numlt (value smaller than) numeq (value equal to) | enter an integer between 0-9999999999999 |
| IP_GEO (source IP geolocation) | support parameter entry | GEO_in (belong) GEO_not_in (not_in) | enter CONTENT, up to 10240 characters, format: serialized JSON, format: [{"Country":"china","Region":"guangdong","City":"shenzhen"}] |
| CAPTCHA_RISK (CAPTCHA RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter RISK level value, value range 0-255 |
| CAPTCHA_DEVICE_RISK (CAPTCHA DEVICE RISK) | parameter not supported | eq (equal) neq (not equal to) belong (belong) not_belong (not belong to) null (nonexistent) exist (exist) | enter DEVICE RISK code, valid values: 101, 201, 301, 401, 501, 601, 701 |
| CAPTCHAR_SCORE (CAPTCHA RISK assessment SCORE) | parameter not supported | numeq (value equal to) numgt (value greater than) numlt (value smaller than) numle (less than or equal to) numge (value is greater than or equal to) null (nonexistent) exist (exist) | enter assessment SCORE, value range 0-100 |