1. Packages
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. WafApiSecSensitiveSceneRule
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 scene rule

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.WafApiSecSensitiveSceneRule("example", {
        domain: "www.example.com",
        ruleName: "tf-example",
        status: 1,
        source: "custom",
        ruleLists: [{
            key: "api",
            operate: "equal",
            values: [
                "/login",
                "/user",
            ],
        }],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.WafApiSecSensitiveSceneRule("example",
        domain="www.example.com",
        rule_name="tf-example",
        status=1,
        source="custom",
        rule_lists=[{
            "key": "api",
            "operate": "equal",
            "values": [
                "/login",
                "/user",
            ],
        }])
    
    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.NewWafApiSecSensitiveSceneRule(ctx, "example", &tencentcloud.WafApiSecSensitiveSceneRuleArgs{
    			Domain:   pulumi.String("www.example.com"),
    			RuleName: pulumi.String("tf-example"),
    			Status:   pulumi.Float64(1),
    			Source:   pulumi.String("custom"),
    			RuleLists: tencentcloud.WafApiSecSensitiveSceneRuleRuleListArray{
    				&tencentcloud.WafApiSecSensitiveSceneRuleRuleListArgs{
    					Key:     pulumi.String("api"),
    					Operate: pulumi.String("equal"),
    					Values: pulumi.StringArray{
    						pulumi.String("/login"),
    						pulumi.String("/user"),
    					},
    				},
    			},
    		})
    		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.WafApiSecSensitiveSceneRule("example", new()
        {
            Domain = "www.example.com",
            RuleName = "tf-example",
            Status = 1,
            Source = "custom",
            RuleLists = new[]
            {
                new Tencentcloud.Inputs.WafApiSecSensitiveSceneRuleRuleListArgs
                {
                    Key = "api",
                    Operate = "equal",
                    Values = new[]
                    {
                        "/login",
                        "/user",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.WafApiSecSensitiveSceneRule;
    import com.pulumi.tencentcloud.WafApiSecSensitiveSceneRuleArgs;
    import com.pulumi.tencentcloud.inputs.WafApiSecSensitiveSceneRuleRuleListArgs;
    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 WafApiSecSensitiveSceneRule("example", WafApiSecSensitiveSceneRuleArgs.builder()
                .domain("www.example.com")
                .ruleName("tf-example")
                .status(1.0)
                .source("custom")
                .ruleLists(WafApiSecSensitiveSceneRuleRuleListArgs.builder()
                    .key("api")
                    .operate("equal")
                    .values(                
                        "/login",
                        "/user")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:WafApiSecSensitiveSceneRule
        properties:
          domain: www.example.com
          ruleName: tf-example
          status: 1
          source: custom
          ruleLists:
            - key: api
              operate: equal
              values:
                - /login
                - /user
    
    Example coming soon!
    

    Create WafApiSecSensitiveSceneRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new WafApiSecSensitiveSceneRule(name: string, args: WafApiSecSensitiveSceneRuleArgs, opts?: CustomResourceOptions);
    @overload
    def WafApiSecSensitiveSceneRule(resource_name: str,
                                    args: WafApiSecSensitiveSceneRuleArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def WafApiSecSensitiveSceneRule(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    domain: Optional[str] = None,
                                    rule_name: Optional[str] = None,
                                    status: Optional[float] = None,
                                    rule_lists: Optional[Sequence[WafApiSecSensitiveSceneRuleRuleListArgs]] = None,
                                    source: Optional[str] = None,
                                    waf_api_sec_sensitive_scene_rule_id: Optional[str] = None)
    func NewWafApiSecSensitiveSceneRule(ctx *Context, name string, args WafApiSecSensitiveSceneRuleArgs, opts ...ResourceOption) (*WafApiSecSensitiveSceneRule, error)
    public WafApiSecSensitiveSceneRule(string name, WafApiSecSensitiveSceneRuleArgs args, CustomResourceOptions? opts = null)
    public WafApiSecSensitiveSceneRule(String name, WafApiSecSensitiveSceneRuleArgs args)
    public WafApiSecSensitiveSceneRule(String name, WafApiSecSensitiveSceneRuleArgs args, CustomResourceOptions options)
    
    type: tencentcloud:WafApiSecSensitiveSceneRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "tencentcloud_wafapisecsensitivescenerule" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args WafApiSecSensitiveSceneRuleArgs
    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 WafApiSecSensitiveSceneRuleArgs
    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 WafApiSecSensitiveSceneRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WafApiSecSensitiveSceneRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WafApiSecSensitiveSceneRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    WafApiSecSensitiveSceneRule 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 WafApiSecSensitiveSceneRule resource accepts the following input properties:

    Domain string
    Domain name.
    RuleName string
    Scene name.
    Status double
    Rule switch, 0: off, 1: on.
    RuleLists List<WafApiSecSensitiveSceneRuleRuleList>
    Rule list.
    Source string
    Rule source, system built-in: OS, customer custom: custom.
    WafApiSecSensitiveSceneRuleId string
    ID of the resource.
    Domain string
    Domain name.
    RuleName string
    Scene name.
    Status float64
    Rule switch, 0: off, 1: on.
    RuleLists []WafApiSecSensitiveSceneRuleRuleListArgs
    Rule list.
    Source string
    Rule source, system built-in: OS, customer custom: custom.
    WafApiSecSensitiveSceneRuleId string
    ID of the resource.
    domain string
    Domain name.
    rule_name string
    Scene name.
    status number
    Rule switch, 0: off, 1: on.
    rule_lists list(object)
    Rule list.
    source string
    Rule source, system built-in: OS, customer custom: custom.
    waf_api_sec_sensitive_scene_rule_id string
    ID of the resource.
    domain String
    Domain name.
    ruleName String
    Scene name.
    status Double
    Rule switch, 0: off, 1: on.
    ruleLists List<WafApiSecSensitiveSceneRuleRuleList>
    Rule list.
    source String
    Rule source, system built-in: OS, customer custom: custom.
    wafApiSecSensitiveSceneRuleId String
    ID of the resource.
    domain string
    Domain name.
    ruleName string
    Scene name.
    status number
    Rule switch, 0: off, 1: on.
    ruleLists WafApiSecSensitiveSceneRuleRuleList[]
    Rule list.
    source string
    Rule source, system built-in: OS, customer custom: custom.
    wafApiSecSensitiveSceneRuleId string
    ID of the resource.
    domain str
    Domain name.
    rule_name str
    Scene name.
    status float
    Rule switch, 0: off, 1: on.
    rule_lists Sequence[WafApiSecSensitiveSceneRuleRuleListArgs]
    Rule list.
    source str
    Rule source, system built-in: OS, customer custom: custom.
    waf_api_sec_sensitive_scene_rule_id str
    ID of the resource.
    domain String
    Domain name.
    ruleName String
    Scene name.
    status Number
    Rule switch, 0: off, 1: on.
    ruleLists List<Property Map>
    Rule list.
    source String
    Rule source, system built-in: OS, customer custom: custom.
    wafApiSecSensitiveSceneRuleId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WafApiSecSensitiveSceneRule 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 WafApiSecSensitiveSceneRule Resource

    Get an existing WafApiSecSensitiveSceneRule 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?: WafApiSecSensitiveSceneRuleState, opts?: CustomResourceOptions): WafApiSecSensitiveSceneRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain: Optional[str] = None,
            rule_lists: Optional[Sequence[WafApiSecSensitiveSceneRuleRuleListArgs]] = None,
            rule_name: Optional[str] = None,
            source: Optional[str] = None,
            status: Optional[float] = None,
            update_time: Optional[float] = None,
            waf_api_sec_sensitive_scene_rule_id: Optional[str] = None) -> WafApiSecSensitiveSceneRule
    func GetWafApiSecSensitiveSceneRule(ctx *Context, name string, id IDInput, state *WafApiSecSensitiveSceneRuleState, opts ...ResourceOption) (*WafApiSecSensitiveSceneRule, error)
    public static WafApiSecSensitiveSceneRule Get(string name, Input<string> id, WafApiSecSensitiveSceneRuleState? state, CustomResourceOptions? opts = null)
    public static WafApiSecSensitiveSceneRule get(String name, Output<String> id, WafApiSecSensitiveSceneRuleState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:WafApiSecSensitiveSceneRule    get:      id: ${id}
    import {
      to = tencentcloud_wafapisecsensitivescenerule.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:
    Domain string
    Domain name.
    RuleLists List<WafApiSecSensitiveSceneRuleRuleList>
    Rule list.
    RuleName string
    Scene name.
    Source string
    Rule source, system built-in: OS, customer custom: custom.
    Status double
    Rule switch, 0: off, 1: on.
    UpdateTime double
    Update timestamp.
    WafApiSecSensitiveSceneRuleId string
    ID of the resource.
    Domain string
    Domain name.
    RuleLists []WafApiSecSensitiveSceneRuleRuleListArgs
    Rule list.
    RuleName string
    Scene name.
    Source string
    Rule source, system built-in: OS, customer custom: custom.
    Status float64
    Rule switch, 0: off, 1: on.
    UpdateTime float64
    Update timestamp.
    WafApiSecSensitiveSceneRuleId string
    ID of the resource.
    domain string
    Domain name.
    rule_lists list(object)
    Rule list.
    rule_name string
    Scene name.
    source string
    Rule source, system built-in: OS, customer custom: custom.
    status number
    Rule switch, 0: off, 1: on.
    update_time number
    Update timestamp.
    waf_api_sec_sensitive_scene_rule_id string
    ID of the resource.
    domain String
    Domain name.
    ruleLists List<WafApiSecSensitiveSceneRuleRuleList>
    Rule list.
    ruleName String
    Scene name.
    source String
    Rule source, system built-in: OS, customer custom: custom.
    status Double
    Rule switch, 0: off, 1: on.
    updateTime Double
    Update timestamp.
    wafApiSecSensitiveSceneRuleId String
    ID of the resource.
    domain string
    Domain name.
    ruleLists WafApiSecSensitiveSceneRuleRuleList[]
    Rule list.
    ruleName string
    Scene name.
    source string
    Rule source, system built-in: OS, customer custom: custom.
    status number
    Rule switch, 0: off, 1: on.
    updateTime number
    Update timestamp.
    wafApiSecSensitiveSceneRuleId string
    ID of the resource.
    domain str
    Domain name.
    rule_lists Sequence[WafApiSecSensitiveSceneRuleRuleListArgs]
    Rule list.
    rule_name str
    Scene name.
    source str
    Rule source, system built-in: OS, customer custom: custom.
    status float
    Rule switch, 0: off, 1: on.
    update_time float
    Update timestamp.
    waf_api_sec_sensitive_scene_rule_id str
    ID of the resource.
    domain String
    Domain name.
    ruleLists List<Property Map>
    Rule list.
    ruleName String
    Scene name.
    source String
    Rule source, system built-in: OS, customer custom: custom.
    status Number
    Rule switch, 0: off, 1: on.
    updateTime Number
    Update timestamp.
    wafApiSecSensitiveSceneRuleId String
    ID of the resource.

    Supporting Types

    WafApiSecSensitiveSceneRuleRuleList, WafApiSecSensitiveSceneRuleRuleListArgs

    Key string
    Match field.
    Name string
    When the match field is get parameter value, post parameter value, cookie parameter value, header parameter value or rsp parameter value, this field can be filled.
    Operate string
    Operator.
    Values List<string>
    Match value.
    Key string
    Match field.
    Name string
    When the match field is get parameter value, post parameter value, cookie parameter value, header parameter value or rsp parameter value, this field can be filled.
    Operate string
    Operator.
    Values []string
    Match value.
    key string
    Match field.
    name string
    When the match field is get parameter value, post parameter value, cookie parameter value, header parameter value or rsp parameter value, this field can be filled.
    operate string
    Operator.
    values list(string)
    Match value.
    key String
    Match field.
    name String
    When the match field is get parameter value, post parameter value, cookie parameter value, header parameter value or rsp parameter value, this field can be filled.
    operate String
    Operator.
    values List<String>
    Match value.
    key string
    Match field.
    name string
    When the match field is get parameter value, post parameter value, cookie parameter value, header parameter value or rsp parameter value, this field can be filled.
    operate string
    Operator.
    values string[]
    Match value.
    key str
    Match field.
    name str
    When the match field is get parameter value, post parameter value, cookie parameter value, header parameter value or rsp parameter value, this field can be filled.
    operate str
    Operator.
    values Sequence[str]
    Match value.
    key String
    Match field.
    name String
    When the match field is get parameter value, post parameter value, cookie parameter value, header parameter value or rsp parameter value, this field can be filled.
    operate String
    Operator.
    values List<String>
    Match value.

    Import

    WAF api sec sensitive scene rule can be imported using the domain#ruleName, e.g.

    $ pulumi import tencentcloud:index/wafApiSecSensitiveSceneRule:WafApiSecSensitiveSceneRule 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