published on Monday, May 11, 2026 by tencentcloudstack
published on Monday, May 11, 2026 by tencentcloudstack
Provides a resource to create a TEO security JavaScript injection rule.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.TeoSecurityJsInjectionRule("example", {
zoneId: "zone-3fkff38fyw8s",
jsInjectionRules: {
name: "tf-example",
priority: 50,
condition: "${http.request.host} in ['www.demo.com']",
injectJs: "inject-sdk-only",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.TeoSecurityJsInjectionRule("example",
zone_id="zone-3fkff38fyw8s",
js_injection_rules={
"name": "tf-example",
"priority": 50,
"condition": "${http.request.host} in ['www.demo.com']",
"inject_js": "inject-sdk-only",
})
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.NewTeoSecurityJsInjectionRule(ctx, "example", &tencentcloud.TeoSecurityJsInjectionRuleArgs{
ZoneId: pulumi.String("zone-3fkff38fyw8s"),
JsInjectionRules: &tencentcloud.TeoSecurityJsInjectionRuleJsInjectionRulesArgs{
Name: pulumi.String("tf-example"),
Priority: pulumi.Float64(50),
Condition: pulumi.String("${http.request.host} in ['www.demo.com']"),
InjectJs: pulumi.String("inject-sdk-only"),
},
})
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.TeoSecurityJsInjectionRule("example", new()
{
ZoneId = "zone-3fkff38fyw8s",
JsInjectionRules = new Tencentcloud.Inputs.TeoSecurityJsInjectionRuleJsInjectionRulesArgs
{
Name = "tf-example",
Priority = 50,
Condition = "${http.request.host} in ['www.demo.com']",
InjectJs = "inject-sdk-only",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TeoSecurityJsInjectionRule;
import com.pulumi.tencentcloud.TeoSecurityJsInjectionRuleArgs;
import com.pulumi.tencentcloud.inputs.TeoSecurityJsInjectionRuleJsInjectionRulesArgs;
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 TeoSecurityJsInjectionRule("example", TeoSecurityJsInjectionRuleArgs.builder()
.zoneId("zone-3fkff38fyw8s")
.jsInjectionRules(TeoSecurityJsInjectionRuleJsInjectionRulesArgs.builder()
.name("tf-example")
.priority(50.0)
.condition("${http.request.host} in ['www.demo.com']")
.injectJs("inject-sdk-only")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:TeoSecurityJsInjectionRule
properties:
zoneId: zone-3fkff38fyw8s
jsInjectionRules:
name: tf-example
priority: 50
condition: $${http.request.host} in ['www.demo.com']
injectJs: inject-sdk-only
Example coming soon!
Create TeoSecurityJsInjectionRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TeoSecurityJsInjectionRule(name: string, args: TeoSecurityJsInjectionRuleArgs, opts?: CustomResourceOptions);@overload
def TeoSecurityJsInjectionRule(resource_name: str,
args: TeoSecurityJsInjectionRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TeoSecurityJsInjectionRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
js_injection_rules: Optional[TeoSecurityJsInjectionRuleJsInjectionRulesArgs] = None,
zone_id: Optional[str] = None,
teo_security_js_injection_rule_id: Optional[str] = None)func NewTeoSecurityJsInjectionRule(ctx *Context, name string, args TeoSecurityJsInjectionRuleArgs, opts ...ResourceOption) (*TeoSecurityJsInjectionRule, error)public TeoSecurityJsInjectionRule(string name, TeoSecurityJsInjectionRuleArgs args, CustomResourceOptions? opts = null)
public TeoSecurityJsInjectionRule(String name, TeoSecurityJsInjectionRuleArgs args)
public TeoSecurityJsInjectionRule(String name, TeoSecurityJsInjectionRuleArgs args, CustomResourceOptions options)
type: tencentcloud:TeoSecurityJsInjectionRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_teosecurityjsinjectionrule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args TeoSecurityJsInjectionRuleArgs
- 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 TeoSecurityJsInjectionRuleArgs
- 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 TeoSecurityJsInjectionRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeoSecurityJsInjectionRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeoSecurityJsInjectionRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TeoSecurityJsInjectionRule 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 TeoSecurityJsInjectionRule resource accepts the following input properties:
- Js
Injection TeoRules Security Js Injection Rule Js Injection Rules - JavaScript injection rule configuration. Only one rule is allowed per request.
- Zone
Id string - Site ID.
- Teo
Security stringJs Injection Rule Id - ID of the resource.
- Js
Injection TeoRules Security Js Injection Rule Js Injection Rules Args - JavaScript injection rule configuration. Only one rule is allowed per request.
- Zone
Id string - Site ID.
- Teo
Security stringJs Injection Rule Id - ID of the resource.
- js_
injection_ objectrules - JavaScript injection rule configuration. Only one rule is allowed per request.
- zone_
id string - Site ID.
- teo_
security_ stringjs_ injection_ rule_ id - ID of the resource.
- js
Injection TeoRules Security Js Injection Rule Js Injection Rules - JavaScript injection rule configuration. Only one rule is allowed per request.
- zone
Id String - Site ID.
- teo
Security StringJs Injection Rule Id - ID of the resource.
- js
Injection TeoRules Security Js Injection Rule Js Injection Rules - JavaScript injection rule configuration. Only one rule is allowed per request.
- zone
Id string - Site ID.
- teo
Security stringJs Injection Rule Id - ID of the resource.
- js_
injection_ Teorules Security Js Injection Rule Js Injection Rules Args - JavaScript injection rule configuration. Only one rule is allowed per request.
- zone_
id str - Site ID.
- teo_
security_ strjs_ injection_ rule_ id - ID of the resource.
- js
Injection Property MapRules - JavaScript injection rule configuration. Only one rule is allowed per request.
- zone
Id String - Site ID.
- teo
Security StringJs Injection Rule Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TeoSecurityJsInjectionRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TeoSecurityJsInjectionRule Resource
Get an existing TeoSecurityJsInjectionRule 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?: TeoSecurityJsInjectionRuleState, opts?: CustomResourceOptions): TeoSecurityJsInjectionRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
js_injection_rules: Optional[TeoSecurityJsInjectionRuleJsInjectionRulesArgs] = None,
teo_security_js_injection_rule_id: Optional[str] = None,
zone_id: Optional[str] = None) -> TeoSecurityJsInjectionRulefunc GetTeoSecurityJsInjectionRule(ctx *Context, name string, id IDInput, state *TeoSecurityJsInjectionRuleState, opts ...ResourceOption) (*TeoSecurityJsInjectionRule, error)public static TeoSecurityJsInjectionRule Get(string name, Input<string> id, TeoSecurityJsInjectionRuleState? state, CustomResourceOptions? opts = null)public static TeoSecurityJsInjectionRule get(String name, Output<String> id, TeoSecurityJsInjectionRuleState state, CustomResourceOptions options)resources: _: type: tencentcloud:TeoSecurityJsInjectionRule get: id: ${id}import {
to = tencentcloud_teosecurityjsinjectionrule.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.
- Js
Injection TeoRules Security Js Injection Rule Js Injection Rules - JavaScript injection rule configuration. Only one rule is allowed per request.
- Teo
Security stringJs Injection Rule Id - ID of the resource.
- Zone
Id string - Site ID.
- Js
Injection TeoRules Security Js Injection Rule Js Injection Rules Args - JavaScript injection rule configuration. Only one rule is allowed per request.
- Teo
Security stringJs Injection Rule Id - ID of the resource.
- Zone
Id string - Site ID.
- js_
injection_ objectrules - JavaScript injection rule configuration. Only one rule is allowed per request.
- teo_
security_ stringjs_ injection_ rule_ id - ID of the resource.
- zone_
id string - Site ID.
- js
Injection TeoRules Security Js Injection Rule Js Injection Rules - JavaScript injection rule configuration. Only one rule is allowed per request.
- teo
Security StringJs Injection Rule Id - ID of the resource.
- zone
Id String - Site ID.
- js
Injection TeoRules Security Js Injection Rule Js Injection Rules - JavaScript injection rule configuration. Only one rule is allowed per request.
- teo
Security stringJs Injection Rule Id - ID of the resource.
- zone
Id string - Site ID.
- js_
injection_ Teorules Security Js Injection Rule Js Injection Rules Args - JavaScript injection rule configuration. Only one rule is allowed per request.
- teo_
security_ strjs_ injection_ rule_ id - ID of the resource.
- zone_
id str - Site ID.
- js
Injection Property MapRules - JavaScript injection rule configuration. Only one rule is allowed per request.
- teo
Security StringJs Injection Rule Id - ID of the resource.
- zone
Id String - Site ID.
Supporting Types
TeoSecurityJsInjectionRuleJsInjectionRules, TeoSecurityJsInjectionRuleJsInjectionRulesArgs
- Condition string
- Match condition expression, e.g.
${http.request.host} in ['www.example.com'] and ${http.request.uri.path} in ['/path']. - Inject
Js string - JavaScript injection option. Valid values:
no-injection(do not inject JS);inject-sdk-only(inject SDK for all supported authentication methods, currently TC-RCE and TC-CAPTCHA). - Name string
- Rule name.
- Priority double
- Rule priority. Range: 0-100, smaller value means higher priority. Default: 0.
- Rule
Id string - Rule ID, e.g.
injection-xxxxxxxx.
- Condition string
- Match condition expression, e.g.
${http.request.host} in ['www.example.com'] and ${http.request.uri.path} in ['/path']. - Inject
Js string - JavaScript injection option. Valid values:
no-injection(do not inject JS);inject-sdk-only(inject SDK for all supported authentication methods, currently TC-RCE and TC-CAPTCHA). - Name string
- Rule name.
- Priority float64
- Rule priority. Range: 0-100, smaller value means higher priority. Default: 0.
- Rule
Id string - Rule ID, e.g.
injection-xxxxxxxx.
- condition string
- Match condition expression, e.g.
${http.request.host} in ['www.example.com'] and ${http.request.uri.path} in ['/path']. - inject_
js string - JavaScript injection option. Valid values:
no-injection(do not inject JS);inject-sdk-only(inject SDK for all supported authentication methods, currently TC-RCE and TC-CAPTCHA). - name string
- Rule name.
- priority number
- Rule priority. Range: 0-100, smaller value means higher priority. Default: 0.
- rule_
id string - Rule ID, e.g.
injection-xxxxxxxx.
- condition String
- Match condition expression, e.g.
${http.request.host} in ['www.example.com'] and ${http.request.uri.path} in ['/path']. - inject
Js String - JavaScript injection option. Valid values:
no-injection(do not inject JS);inject-sdk-only(inject SDK for all supported authentication methods, currently TC-RCE and TC-CAPTCHA). - name String
- Rule name.
- priority Double
- Rule priority. Range: 0-100, smaller value means higher priority. Default: 0.
- rule
Id String - Rule ID, e.g.
injection-xxxxxxxx.
- condition string
- Match condition expression, e.g.
${http.request.host} in ['www.example.com'] and ${http.request.uri.path} in ['/path']. - inject
Js string - JavaScript injection option. Valid values:
no-injection(do not inject JS);inject-sdk-only(inject SDK for all supported authentication methods, currently TC-RCE and TC-CAPTCHA). - name string
- Rule name.
- priority number
- Rule priority. Range: 0-100, smaller value means higher priority. Default: 0.
- rule
Id string - Rule ID, e.g.
injection-xxxxxxxx.
- condition str
- Match condition expression, e.g.
${http.request.host} in ['www.example.com'] and ${http.request.uri.path} in ['/path']. - inject_
js str - JavaScript injection option. Valid values:
no-injection(do not inject JS);inject-sdk-only(inject SDK for all supported authentication methods, currently TC-RCE and TC-CAPTCHA). - name str
- Rule name.
- priority float
- Rule priority. Range: 0-100, smaller value means higher priority. Default: 0.
- rule_
id str - Rule ID, e.g.
injection-xxxxxxxx.
- condition String
- Match condition expression, e.g.
${http.request.host} in ['www.example.com'] and ${http.request.uri.path} in ['/path']. - inject
Js String - JavaScript injection option. Valid values:
no-injection(do not inject JS);inject-sdk-only(inject SDK for all supported authentication methods, currently TC-RCE and TC-CAPTCHA). - name String
- Rule name.
- priority Number
- Rule priority. Range: 0-100, smaller value means higher priority. Default: 0.
- rule
Id String - Rule ID, e.g.
injection-xxxxxxxx.
Import
TEO security JavaScript injection rule can be imported using the zoneId#ruleId, e.g.
$ pulumi import tencentcloud:index/teoSecurityJsInjectionRule:TeoSecurityJsInjectionRule example zone-3fkff38fyw8s#inject-0000040467
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 Monday, May 11, 2026 by tencentcloudstack
