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 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.
- Rule
Name string - Scene name.
- Status double
- Rule switch, 0: off, 1: on.
- Rule
Lists List<WafApi Sec Sensitive Scene Rule Rule List> - Rule list.
- Source string
- Rule source, system built-in: OS, customer custom: custom.
- Waf
Api stringSec Sensitive Scene Rule Id - ID of the resource.
- Domain string
- Domain name.
- Rule
Name string - Scene name.
- Status float64
- Rule switch, 0: off, 1: on.
- Rule
Lists []WafApi Sec Sensitive Scene Rule Rule List Args - Rule list.
- Source string
- Rule source, system built-in: OS, customer custom: custom.
- Waf
Api stringSec Sensitive Scene Rule Id - 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_ stringsec_ sensitive_ scene_ rule_ id - ID of the resource.
- domain String
- Domain name.
- rule
Name String - Scene name.
- status Double
- Rule switch, 0: off, 1: on.
- rule
Lists List<WafApi Sec Sensitive Scene Rule Rule List> - Rule list.
- source String
- Rule source, system built-in: OS, customer custom: custom.
- waf
Api StringSec Sensitive Scene Rule Id - ID of the resource.
- domain string
- Domain name.
- rule
Name string - Scene name.
- status number
- Rule switch, 0: off, 1: on.
- rule
Lists WafApi Sec Sensitive Scene Rule Rule List[] - Rule list.
- source string
- Rule source, system built-in: OS, customer custom: custom.
- waf
Api stringSec Sensitive Scene Rule Id - ID of the resource.
- domain str
- Domain name.
- rule_
name str - Scene name.
- status float
- Rule switch, 0: off, 1: on.
- rule_
lists Sequence[WafApi Sec Sensitive Scene Rule Rule List Args] - Rule list.
- source str
- Rule source, system built-in: OS, customer custom: custom.
- waf_
api_ strsec_ sensitive_ scene_ rule_ id - ID of the resource.
- domain String
- Domain name.
- rule
Name String - Scene name.
- status Number
- Rule switch, 0: off, 1: on.
- rule
Lists List<Property Map> - Rule list.
- source String
- Rule source, system built-in: OS, customer custom: custom.
- waf
Api StringSec Sensitive Scene Rule Id - 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.
- 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 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) -> WafApiSecSensitiveSceneRulefunc 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.
- Domain string
- Domain name.
- Rule
Lists List<WafApi Sec Sensitive Scene Rule Rule List> - Rule list.
- Rule
Name string - Scene name.
- Source string
- Rule source, system built-in: OS, customer custom: custom.
- Status double
- Rule switch, 0: off, 1: on.
- Update
Time double - Update timestamp.
- Waf
Api stringSec Sensitive Scene Rule Id - ID of the resource.
- Domain string
- Domain name.
- Rule
Lists []WafApi Sec Sensitive Scene Rule Rule List Args - Rule list.
- Rule
Name string - Scene name.
- Source string
- Rule source, system built-in: OS, customer custom: custom.
- Status float64
- Rule switch, 0: off, 1: on.
- Update
Time float64 - Update timestamp.
- Waf
Api stringSec Sensitive Scene Rule Id - 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_ stringsec_ sensitive_ scene_ rule_ id - ID of the resource.
- domain String
- Domain name.
- rule
Lists List<WafApi Sec Sensitive Scene Rule Rule List> - Rule list.
- rule
Name String - Scene name.
- source String
- Rule source, system built-in: OS, customer custom: custom.
- status Double
- Rule switch, 0: off, 1: on.
- update
Time Double - Update timestamp.
- waf
Api StringSec Sensitive Scene Rule Id - ID of the resource.
- domain string
- Domain name.
- rule
Lists WafApi Sec Sensitive Scene Rule Rule List[] - 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 stringSec Sensitive Scene Rule Id - ID of the resource.
- domain str
- Domain name.
- rule_
lists Sequence[WafApi Sec Sensitive Scene Rule Rule List Args] - 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_ strsec_ sensitive_ scene_ rule_ id - ID of the resource.
- domain String
- Domain name.
- rule
Lists List<Property Map> - 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 StringSec Sensitive Scene Rule Id - ID of the resource.
Supporting Types
WafApiSecSensitiveSceneRuleRuleList, WafApiSecSensitiveSceneRuleRuleListArgs
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
tencentcloudTerraform Provider.
published on Tuesday, Jun 30, 2026 by tencentcloudstack