1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. WafApiSecSensitiveWhiteRule
Viewing docs for tencentcloud 1.83.7
published on Tuesday, Jun 30, 2026 by tencentcloudstack
Viewing docs for tencentcloud 1.83.7
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.
    RuleName string
    White rule name.
    Status double
    Rule switch, 0: off, 1: on.
    ApiNameOps List<WafApiSecSensitiveWhiteRuleApiNameOp>
    API match list.
    Description string
    Rule description.
    WafApiSecSensitiveWhiteRuleId string
    ID of the resource.
    WhiteFields List<WafApiSecSensitiveWhiteRuleWhiteField>
    White field config list.
    WhiteMode double
    White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
    Domain string
    Domain name.
    RuleName string
    White rule name.
    Status float64
    Rule switch, 0: off, 1: on.
    ApiNameOps []WafApiSecSensitiveWhiteRuleApiNameOpArgs
    API match list.
    Description string
    Rule description.
    WafApiSecSensitiveWhiteRuleId string
    ID of the resource.
    WhiteFields []WafApiSecSensitiveWhiteRuleWhiteFieldArgs
    White field config list.
    WhiteMode 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_ops list(object)
    API match list.
    description string
    Rule description.
    waf_api_sec_sensitive_white_rule_id string
    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.
    ruleName String
    White rule name.
    status Double
    Rule switch, 0: off, 1: on.
    apiNameOps List<WafApiSecSensitiveWhiteRuleApiNameOp>
    API match list.
    description String
    Rule description.
    wafApiSecSensitiveWhiteRuleId String
    ID of the resource.
    whiteFields List<WafApiSecSensitiveWhiteRuleWhiteField>
    White field config list.
    whiteMode Double
    White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
    domain string
    Domain name.
    ruleName string
    White rule name.
    status number
    Rule switch, 0: off, 1: on.
    apiNameOps WafApiSecSensitiveWhiteRuleApiNameOp[]
    API match list.
    description string
    Rule description.
    wafApiSecSensitiveWhiteRuleId string
    ID of the resource.
    whiteFields WafApiSecSensitiveWhiteRuleWhiteField[]
    White field config list.
    whiteMode 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_ops Sequence[WafApiSecSensitiveWhiteRuleApiNameOpArgs]
    API match list.
    description str
    Rule description.
    waf_api_sec_sensitive_white_rule_id str
    ID of the resource.
    white_fields Sequence[WafApiSecSensitiveWhiteRuleWhiteFieldArgs]
    White field config list.
    white_mode float
    White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
    domain String
    Domain name.
    ruleName String
    White rule name.
    status Number
    Rule switch, 0: off, 1: on.
    apiNameOps List<Property Map>
    API match list.
    description String
    Rule description.
    wafApiSecSensitiveWhiteRuleId String
    ID of the resource.
    whiteFields List<Property Map>
    White field config list.
    whiteMode 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.
    UpdateTime double
    Update timestamp.
    Id string
    The provider-assigned unique ID for this managed resource.
    UpdateTime 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.
    updateTime Double
    Update timestamp.
    id string
    The provider-assigned unique ID for this managed resource.
    updateTime 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.
    updateTime 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) -> WafApiSecSensitiveWhiteRule
    func 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.
    The following state arguments are supported:
    ApiNameOps List<WafApiSecSensitiveWhiteRuleApiNameOp>
    API match list.
    Description string
    Rule description.
    Domain string
    Domain name.
    RuleName string
    White rule name.
    Status double
    Rule switch, 0: off, 1: on.
    UpdateTime double
    Update timestamp.
    WafApiSecSensitiveWhiteRuleId string
    ID of the resource.
    WhiteFields List<WafApiSecSensitiveWhiteRuleWhiteField>
    White field config list.
    WhiteMode double
    White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
    ApiNameOps []WafApiSecSensitiveWhiteRuleApiNameOpArgs
    API match list.
    Description string
    Rule description.
    Domain string
    Domain name.
    RuleName string
    White rule name.
    Status float64
    Rule switch, 0: off, 1: on.
    UpdateTime float64
    Update timestamp.
    WafApiSecSensitiveWhiteRuleId string
    ID of the resource.
    WhiteFields []WafApiSecSensitiveWhiteRuleWhiteFieldArgs
    White field config list.
    WhiteMode float64
    White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
    api_name_ops list(object)
    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_sec_sensitive_white_rule_id string
    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.
    apiNameOps List<WafApiSecSensitiveWhiteRuleApiNameOp>
    API match list.
    description String
    Rule description.
    domain String
    Domain name.
    ruleName String
    White rule name.
    status Double
    Rule switch, 0: off, 1: on.
    updateTime Double
    Update timestamp.
    wafApiSecSensitiveWhiteRuleId String
    ID of the resource.
    whiteFields List<WafApiSecSensitiveWhiteRuleWhiteField>
    White field config list.
    whiteMode Double
    White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
    apiNameOps WafApiSecSensitiveWhiteRuleApiNameOp[]
    API match list.
    description string
    Rule description.
    domain string
    Domain name.
    ruleName string
    White rule name.
    status number
    Rule switch, 0: off, 1: on.
    updateTime number
    Update timestamp.
    wafApiSecSensitiveWhiteRuleId string
    ID of the resource.
    whiteFields WafApiSecSensitiveWhiteRuleWhiteField[]
    White field config list.
    whiteMode number
    White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
    api_name_ops Sequence[WafApiSecSensitiveWhiteRuleApiNameOpArgs]
    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_sec_sensitive_white_rule_id str
    ID of the resource.
    white_fields Sequence[WafApiSecSensitiveWhiteRuleWhiteFieldArgs]
    White field config list.
    white_mode float
    White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.
    apiNameOps List<Property Map>
    API match list.
    description String
    Rule description.
    domain String
    Domain name.
    ruleName String
    White rule name.
    status Number
    Rule switch, 0: off, 1: on.
    updateTime Number
    Update timestamp.
    wafApiSecSensitiveWhiteRuleId String
    ID of the resource.
    whiteFields List<Property Map>
    White field config list.
    whiteMode Number
    White mode. Enum values: 1: whitelist the whole API, 2: whitelist specified fields.

    Supporting Types

    WafApiSecSensitiveWhiteRuleApiNameOp, WafApiSecSensitiveWhiteRuleApiNameOpArgs

    ApiNameMethods List<WafApiSecSensitiveWhiteRuleApiNameOpApiNameMethod>
    When manually filtering, this structure should be passed.
    Op string
    Match method, such as belong and regex.
    Values List<string>
    Match value list.
    ApiNameMethods []WafApiSecSensitiveWhiteRuleApiNameOpApiNameMethod
    When manually filtering, this structure should be passed.
    Op string
    Match method, such as belong and regex.
    Values []string
    Match value list.
    api_name_methods list(object)
    When manually filtering, this structure should be passed.
    op string
    Match method, such as belong and regex.
    values list(string)
    Match value list.
    apiNameMethods List<WafApiSecSensitiveWhiteRuleApiNameOpApiNameMethod>
    When manually filtering, this structure should be passed.
    op String
    Match method, such as belong and regex.
    values List<String>
    Match value list.
    apiNameMethods WafApiSecSensitiveWhiteRuleApiNameOpApiNameMethod[]
    When manually filtering, this structure should be passed.
    op string
    Match method, such as belong and regex.
    values string[]
    Match value list.
    api_name_methods Sequence[WafApiSecSensitiveWhiteRuleApiNameOpApiNameMethod]
    When manually filtering, this structure should be passed.
    op str
    Match method, such as belong and regex.
    values Sequence[str]
    Match value list.
    apiNameMethods List<Property Map>
    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

    ApiName string
    API name.
    Count double
    API request count in the last 30 days.
    Labels List<string>
    API label.
    Method string
    API request method.
    ApiName string
    API name.
    Count float64
    API request count in the last 30 days.
    Labels []string
    API label.
    Method string
    API request method.
    api_name string
    API name.
    count number
    API request count in the last 30 days.
    labels list(string)
    API label.
    method string
    API request method.
    apiName String
    API name.
    count Double
    API request count in the last 30 days.
    labels List<String>
    API label.
    method String
    API request method.
    apiName string
    API name.
    count number
    API request count in the last 30 days.
    labels string[]
    API label.
    method string
    API request method.
    api_name str
    API name.
    count float
    API request count in the last 30 days.
    labels Sequence[str]
    API label.
    method str
    API request method.
    apiName String
    API name.
    count Number
    API request count in the last 30 days.
    labels List<String>
    API label.
    method String
    API request method.

    WafApiSecSensitiveWhiteRuleWhiteField, WafApiSecSensitiveWhiteRuleWhiteFieldArgs

    FieldName string
    Field name.
    FieldType string
    Field position.
    SensitiveTypes List<string>
    Sensitive data type list.
    FieldName string
    Field name.
    FieldType string
    Field position.
    SensitiveTypes []string
    Sensitive data type list.
    field_name string
    Field name.
    field_type string
    Field position.
    sensitive_types list(string)
    Sensitive data type list.
    fieldName String
    Field name.
    fieldType String
    Field position.
    sensitiveTypes List<String>
    Sensitive data type list.
    fieldName string
    Field name.
    fieldType string
    Field position.
    sensitiveTypes string[]
    Sensitive data type list.
    field_name str
    Field name.
    field_type str
    Field position.
    sensitive_types Sequence[str]
    Sensitive data type list.
    fieldName String
    Field name.
    fieldType String
    Field position.
    sensitiveTypes 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 tencentcloud Terraform Provider.
    Viewing docs for tencentcloud 1.83.7
    published on Tuesday, Jun 30, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial