published on Tuesday, Jun 30, 2026 by tencentcloudstack
published on Tuesday, Jun 30, 2026 by tencentcloudstack
Provides a resource to create a WAF api sec sensitive white rule
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.WafApiSecSensitiveWhiteRule("example", {
domain: "www.example.com",
ruleName: "tf-example",
status: 1,
whiteMode: 1,
description: "tf example white rule",
apiNameOps: [{
op: "belong",
values: ["/api/user/info"],
}],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.WafApiSecSensitiveWhiteRule("example",
domain="www.example.com",
rule_name="tf-example",
status=1,
white_mode=1,
description="tf example white rule",
api_name_ops=[{
"op": "belong",
"values": ["/api/user/info"],
}])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewWafApiSecSensitiveWhiteRule(ctx, "example", &tencentcloud.WafApiSecSensitiveWhiteRuleArgs{
Domain: pulumi.String("www.example.com"),
RuleName: pulumi.String("tf-example"),
Status: pulumi.Float64(1),
WhiteMode: pulumi.Float64(1),
Description: pulumi.String("tf example white rule"),
ApiNameOps: tencentcloud.WafApiSecSensitiveWhiteRuleApiNameOpArray{
&tencentcloud.WafApiSecSensitiveWhiteRuleApiNameOpArgs{
Op: pulumi.String("belong"),
Values: pulumi.StringArray{
pulumi.String("/api/user/info"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.WafApiSecSensitiveWhiteRule("example", new()
{
Domain = "www.example.com",
RuleName = "tf-example",
Status = 1,
WhiteMode = 1,
Description = "tf example white rule",
ApiNameOps = new[]
{
new Tencentcloud.Inputs.WafApiSecSensitiveWhiteRuleApiNameOpArgs
{
Op = "belong",
Values = new[]
{
"/api/user/info",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.WafApiSecSensitiveWhiteRule;
import com.pulumi.tencentcloud.WafApiSecSensitiveWhiteRuleArgs;
import com.pulumi.tencentcloud.inputs.WafApiSecSensitiveWhiteRuleApiNameOpArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new WafApiSecSensitiveWhiteRule("example", WafApiSecSensitiveWhiteRuleArgs.builder()
.domain("www.example.com")
.ruleName("tf-example")
.status(1.0)
.whiteMode(1.0)
.description("tf example white rule")
.apiNameOps(WafApiSecSensitiveWhiteRuleApiNameOpArgs.builder()
.op("belong")
.values("/api/user/info")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:WafApiSecSensitiveWhiteRule
properties:
domain: www.example.com
ruleName: tf-example
status: 1
whiteMode: 1
description: tf example white rule
apiNameOps:
- op: belong
values:
- /api/user/info
Example coming soon!
Create WafApiSecSensitiveWhiteRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafApiSecSensitiveWhiteRule(name: string, args: WafApiSecSensitiveWhiteRuleArgs, opts?: CustomResourceOptions);@overload
def WafApiSecSensitiveWhiteRule(resource_name: str,
args: WafApiSecSensitiveWhiteRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WafApiSecSensitiveWhiteRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
rule_name: Optional[str] = None,
status: Optional[float] = None,
api_name_ops: Optional[Sequence[WafApiSecSensitiveWhiteRuleApiNameOpArgs]] = None,
description: Optional[str] = None,
waf_api_sec_sensitive_white_rule_id: Optional[str] = None,
white_fields: Optional[Sequence[WafApiSecSensitiveWhiteRuleWhiteFieldArgs]] = None,
white_mode: Optional[float] = None)func NewWafApiSecSensitiveWhiteRule(ctx *Context, name string, args WafApiSecSensitiveWhiteRuleArgs, opts ...ResourceOption) (*WafApiSecSensitiveWhiteRule, error)public WafApiSecSensitiveWhiteRule(string name, WafApiSecSensitiveWhiteRuleArgs args, CustomResourceOptions? opts = null)
public WafApiSecSensitiveWhiteRule(String name, WafApiSecSensitiveWhiteRuleArgs args)
public WafApiSecSensitiveWhiteRule(String name, WafApiSecSensitiveWhiteRuleArgs args, CustomResourceOptions options)
type: tencentcloud:WafApiSecSensitiveWhiteRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_wafapisecsensitivewhiterule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args WafApiSecSensitiveWhiteRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WafApiSecSensitiveWhiteRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WafApiSecSensitiveWhiteRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafApiSecSensitiveWhiteRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafApiSecSensitiveWhiteRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
WafApiSecSensitiveWhiteRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The WafApiSecSensitiveWhiteRule resource accepts the following input properties:
- Domain string
- Domain name.
- Rule
Name string - White rule name.
- Status double
- Rule switch, 0: off, 1: on.
- Api
Name List<WafOps Api Sec Sensitive White Rule Api Name Op> - API match list.
- Description string
- Rule description.
- Waf
Api stringSec Sensitive White Rule Id - ID of the resource.
- White
Fields List<WafApi Sec Sensitive White Rule White Field> - White field config list.
- White
Mode double - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- Domain string
- Domain name.
- Rule
Name string - White rule name.
- Status float64
- Rule switch, 0: off, 1: on.
- Api
Name []WafOps Api Sec Sensitive White Rule Api Name Op Args - API match list.
- Description string
- Rule description.
- Waf
Api stringSec Sensitive White Rule Id - ID of the resource.
- White
Fields []WafApi Sec Sensitive White Rule White Field Args - White field config list.
- White
Mode float64 - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- domain string
- Domain name.
- rule_
name string - White rule name.
- status number
- Rule switch, 0: off, 1: on.
- api_
name_ list(object)ops - API match list.
- description string
- Rule description.
- waf_
api_ stringsec_ sensitive_ white_ rule_ id - ID of the resource.
- white_
fields list(object) - White field config list.
- white_
mode number - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- domain String
- Domain name.
- rule
Name String - White rule name.
- status Double
- Rule switch, 0: off, 1: on.
- api
Name List<WafOps Api Sec Sensitive White Rule Api Name Op> - API match list.
- description String
- Rule description.
- waf
Api StringSec Sensitive White Rule Id - ID of the resource.
- white
Fields List<WafApi Sec Sensitive White Rule White Field> - White field config list.
- white
Mode Double - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- domain string
- Domain name.
- rule
Name string - White rule name.
- status number
- Rule switch, 0: off, 1: on.
- api
Name WafOps Api Sec Sensitive White Rule Api Name Op[] - API match list.
- description string
- Rule description.
- waf
Api stringSec Sensitive White Rule Id - ID of the resource.
- white
Fields WafApi Sec Sensitive White Rule White Field[] - White field config list.
- white
Mode number - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- domain str
- Domain name.
- rule_
name str - White rule name.
- status float
- Rule switch, 0: off, 1: on.
- api_
name_ Sequence[Wafops Api Sec Sensitive White Rule Api Name Op Args] - API match list.
- description str
- Rule description.
- waf_
api_ strsec_ sensitive_ white_ rule_ id - ID of the resource.
- white_
fields Sequence[WafApi Sec Sensitive White Rule White Field Args] - White field config list.
- white_
mode float - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- domain String
- Domain name.
- rule
Name String - White rule name.
- status Number
- Rule switch, 0: off, 1: on.
- api
Name List<Property Map>Ops - API match list.
- description String
- Rule description.
- waf
Api StringSec Sensitive White Rule Id - ID of the resource.
- white
Fields List<Property Map> - White field config list.
- white
Mode Number - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafApiSecSensitiveWhiteRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time double - Update timestamp.
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time float64 - Update timestamp.
- id string
- The provider-assigned unique ID for this managed resource.
- update_
time number - Update timestamp.
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time Double - Update timestamp.
- id string
- The provider-assigned unique ID for this managed resource.
- update
Time number - Update timestamp.
- id str
- The provider-assigned unique ID for this managed resource.
- update_
time float - Update timestamp.
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time Number - Update timestamp.
Look up Existing WafApiSecSensitiveWhiteRule Resource
Get an existing WafApiSecSensitiveWhiteRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WafApiSecSensitiveWhiteRuleState, opts?: CustomResourceOptions): WafApiSecSensitiveWhiteRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_name_ops: Optional[Sequence[WafApiSecSensitiveWhiteRuleApiNameOpArgs]] = None,
description: Optional[str] = None,
domain: Optional[str] = None,
rule_name: Optional[str] = None,
status: Optional[float] = None,
update_time: Optional[float] = None,
waf_api_sec_sensitive_white_rule_id: Optional[str] = None,
white_fields: Optional[Sequence[WafApiSecSensitiveWhiteRuleWhiteFieldArgs]] = None,
white_mode: Optional[float] = None) -> WafApiSecSensitiveWhiteRulefunc GetWafApiSecSensitiveWhiteRule(ctx *Context, name string, id IDInput, state *WafApiSecSensitiveWhiteRuleState, opts ...ResourceOption) (*WafApiSecSensitiveWhiteRule, error)public static WafApiSecSensitiveWhiteRule Get(string name, Input<string> id, WafApiSecSensitiveWhiteRuleState? state, CustomResourceOptions? opts = null)public static WafApiSecSensitiveWhiteRule get(String name, Output<String> id, WafApiSecSensitiveWhiteRuleState state, CustomResourceOptions options)resources: _: type: tencentcloud:WafApiSecSensitiveWhiteRule get: id: ${id}import {
to = tencentcloud_wafapisecsensitivewhiterule.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Api
Name List<WafOps Api Sec Sensitive White Rule Api Name Op> - API match list.
- Description string
- Rule description.
- Domain string
- Domain name.
- Rule
Name string - White rule name.
- Status double
- Rule switch, 0: off, 1: on.
- Update
Time double - Update timestamp.
- Waf
Api stringSec Sensitive White Rule Id - ID of the resource.
- White
Fields List<WafApi Sec Sensitive White Rule White Field> - White field config list.
- White
Mode double - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- Api
Name []WafOps Api Sec Sensitive White Rule Api Name Op Args - API match list.
- Description string
- Rule description.
- Domain string
- Domain name.
- Rule
Name string - White rule name.
- Status float64
- Rule switch, 0: off, 1: on.
- Update
Time float64 - Update timestamp.
- Waf
Api stringSec Sensitive White Rule Id - ID of the resource.
- White
Fields []WafApi Sec Sensitive White Rule White Field Args - White field config list.
- White
Mode float64 - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- api_
name_ list(object)ops - API match list.
- description string
- Rule description.
- domain string
- Domain name.
- rule_
name string - White rule name.
- status number
- Rule switch, 0: off, 1: on.
- update_
time number - Update timestamp.
- waf_
api_ stringsec_ sensitive_ white_ rule_ id - ID of the resource.
- white_
fields list(object) - White field config list.
- white_
mode number - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- api
Name List<WafOps Api Sec Sensitive White Rule Api Name Op> - API match list.
- description String
- Rule description.
- domain String
- Domain name.
- rule
Name String - White rule name.
- status Double
- Rule switch, 0: off, 1: on.
- update
Time Double - Update timestamp.
- waf
Api StringSec Sensitive White Rule Id - ID of the resource.
- white
Fields List<WafApi Sec Sensitive White Rule White Field> - White field config list.
- white
Mode Double - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- api
Name WafOps Api Sec Sensitive White Rule Api Name Op[] - API match list.
- description string
- Rule description.
- domain string
- Domain name.
- rule
Name string - White rule name.
- status number
- Rule switch, 0: off, 1: on.
- update
Time number - Update timestamp.
- waf
Api stringSec Sensitive White Rule Id - ID of the resource.
- white
Fields WafApi Sec Sensitive White Rule White Field[] - White field config list.
- white
Mode number - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- api_
name_ Sequence[Wafops Api Sec Sensitive White Rule Api Name Op Args] - API match list.
- description str
- Rule description.
- domain str
- Domain name.
- rule_
name str - White rule name.
- status float
- Rule switch, 0: off, 1: on.
- update_
time float - Update timestamp.
- waf_
api_ strsec_ sensitive_ white_ rule_ id - ID of the resource.
- white_
fields Sequence[WafApi Sec Sensitive White Rule White Field Args] - White field config list.
- white_
mode float - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
- api
Name List<Property Map>Ops - API match list.
- description String
- Rule description.
- domain String
- Domain name.
- rule
Name String - White rule name.
- status Number
- Rule switch, 0: off, 1: on.
- update
Time Number - Update timestamp.
- waf
Api StringSec Sensitive White Rule Id - ID of the resource.
- white
Fields List<Property Map> - White field config list.
- white
Mode Number - White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
Supporting Types
WafApiSecSensitiveWhiteRuleApiNameOp, WafApiSecSensitiveWhiteRuleApiNameOpArgs
- Api
Name List<WafMethods Api Sec Sensitive White Rule Api Name Op Api Name Method> - When manually filtering, this structure should be passed.
- Op string
- Match method, such as belong and regex.
- Values List<string>
- Match value list.
- Api
Name []WafMethods Api Sec Sensitive White Rule Api Name Op Api Name Method - When manually filtering, this structure should be passed.
- Op string
- Match method, such as belong and regex.
- Values []string
- Match value list.
- api_
name_ list(object)methods - When manually filtering, this structure should be passed.
- op string
- Match method, such as belong and regex.
- values list(string)
- Match value list.
- api
Name List<WafMethods Api Sec Sensitive White Rule Api Name Op Api Name Method> - When manually filtering, this structure should be passed.
- op String
- Match method, such as belong and regex.
- values List<String>
- Match value list.
- api
Name WafMethods Api Sec Sensitive White Rule Api Name Op Api Name Method[] - When manually filtering, this structure should be passed.
- op string
- Match method, such as belong and regex.
- values string[]
- Match value list.
- api_
name_ Sequence[Wafmethods Api Sec Sensitive White Rule Api Name Op Api Name Method] - When manually filtering, this structure should be passed.
- op str
- Match method, such as belong and regex.
- values Sequence[str]
- Match value list.
- api
Name List<Property Map>Methods - When manually filtering, this structure should be passed.
- op String
- Match method, such as belong and regex.
- values List<String>
- Match value list.
WafApiSecSensitiveWhiteRuleApiNameOpApiNameMethod, WafApiSecSensitiveWhiteRuleApiNameOpApiNameMethodArgs
WafApiSecSensitiveWhiteRuleWhiteField, WafApiSecSensitiveWhiteRuleWhiteFieldArgs
- Field
Name string - Field name.
- Field
Type string - Field position.
- Sensitive
Types List<string> - Sensitive data type list.
- Field
Name string - Field name.
- Field
Type string - Field position.
- Sensitive
Types []string - Sensitive data type list.
- field_
name string - Field name.
- field_
type string - Field position.
- sensitive_
types list(string) - Sensitive data type list.
- field
Name String - Field name.
- field
Type String - Field position.
- sensitive
Types List<String> - Sensitive data type list.
- field
Name string - Field name.
- field
Type string - Field position.
- sensitive
Types string[] - Sensitive data type list.
- field_
name str - Field name.
- field_
type str - Field position.
- sensitive_
types Sequence[str] - Sensitive data type list.
- field
Name String - Field name.
- field
Type String - Field position.
- sensitive
Types List<String> - Sensitive data type list.
Import
WAF api sec sensitive white rule can be imported using the domain#ruleName, e.g.
$ pulumi import tencentcloud:index/wafApiSecSensitiveWhiteRule:WafApiSecSensitiveWhiteRule example www.example.com#tf-example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Tuesday, Jun 30, 2026 by tencentcloudstack