1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. TseWafProtection
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.TseWafProtection

Explore with Pulumi AI

Provides a resource to create a tse waf_protection

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const wafProtection = new tencentcloud.TseWafProtection("wafProtection", {
    gatewayId: "gateway-ed63e957",
    lists: ["7324a769-9d87-48ce-a904-48c3defc4abd"],
    operate: "open",
    type: "Route",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

waf_protection = tencentcloud.TseWafProtection("wafProtection",
    gateway_id="gateway-ed63e957",
    lists=["7324a769-9d87-48ce-a904-48c3defc4abd"],
    operate="open",
    type="Route")
Copy
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.NewTseWafProtection(ctx, "wafProtection", &tencentcloud.TseWafProtectionArgs{
			GatewayId: pulumi.String("gateway-ed63e957"),
			Lists: pulumi.StringArray{
				pulumi.String("7324a769-9d87-48ce-a904-48c3defc4abd"),
			},
			Operate: pulumi.String("open"),
			Type:    pulumi.String("Route"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var wafProtection = new Tencentcloud.TseWafProtection("wafProtection", new()
    {
        GatewayId = "gateway-ed63e957",
        Lists = new[]
        {
            "7324a769-9d87-48ce-a904-48c3defc4abd",
        },
        Operate = "open",
        Type = "Route",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TseWafProtection;
import com.pulumi.tencentcloud.TseWafProtectionArgs;
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 wafProtection = new TseWafProtection("wafProtection", TseWafProtectionArgs.builder()
            .gatewayId("gateway-ed63e957")
            .lists("7324a769-9d87-48ce-a904-48c3defc4abd")
            .operate("open")
            .type("Route")
            .build());

    }
}
Copy
resources:
  wafProtection:
    type: tencentcloud:TseWafProtection
    properties:
      gatewayId: gateway-ed63e957
      lists:
        - 7324a769-9d87-48ce-a904-48c3defc4abd
      operate: open
      type: Route
Copy

Create TseWafProtection Resource

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

Constructor syntax

new TseWafProtection(name: string, args: TseWafProtectionArgs, opts?: CustomResourceOptions);
@overload
def TseWafProtection(resource_name: str,
                     args: TseWafProtectionArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def TseWafProtection(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     gateway_id: Optional[str] = None,
                     operate: Optional[str] = None,
                     type: Optional[str] = None,
                     lists: Optional[Sequence[str]] = None,
                     tse_waf_protection_id: Optional[str] = None)
func NewTseWafProtection(ctx *Context, name string, args TseWafProtectionArgs, opts ...ResourceOption) (*TseWafProtection, error)
public TseWafProtection(string name, TseWafProtectionArgs args, CustomResourceOptions? opts = null)
public TseWafProtection(String name, TseWafProtectionArgs args)
public TseWafProtection(String name, TseWafProtectionArgs args, CustomResourceOptions options)
type: tencentcloud:TseWafProtection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TseWafProtectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TseWafProtectionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TseWafProtectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TseWafProtectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TseWafProtectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

GatewayId This property is required. string
Gateway ID.
Operate This property is required. string
open: open the protection, close: close the protection.
Type This property is required. string
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
Lists List<string>
Means the list of services or routes when the resource type Type is Service or Route.
TseWafProtectionId string
ID of the resource.
GatewayId This property is required. string
Gateway ID.
Operate This property is required. string
open: open the protection, close: close the protection.
Type This property is required. string
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
Lists []string
Means the list of services or routes when the resource type Type is Service or Route.
TseWafProtectionId string
ID of the resource.
gatewayId This property is required. String
Gateway ID.
operate This property is required. String
open: open the protection, close: close the protection.
type This property is required. String
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
lists List<String>
Means the list of services or routes when the resource type Type is Service or Route.
tseWafProtectionId String
ID of the resource.
gatewayId This property is required. string
Gateway ID.
operate This property is required. string
open: open the protection, close: close the protection.
type This property is required. string
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
lists string[]
Means the list of services or routes when the resource type Type is Service or Route.
tseWafProtectionId string
ID of the resource.
gateway_id This property is required. str
Gateway ID.
operate This property is required. str
open: open the protection, close: close the protection.
type This property is required. str
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
lists Sequence[str]
Means the list of services or routes when the resource type Type is Service or Route.
tse_waf_protection_id str
ID of the resource.
gatewayId This property is required. String
Gateway ID.
operate This property is required. String
open: open the protection, close: close the protection.
type This property is required. String
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
lists List<String>
Means the list of services or routes when the resource type Type is Service or Route.
tseWafProtectionId String
ID of the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the TseWafProtection resource produces the following output properties:

GlobalStatus string
Global protection status.
Id string
The provider-assigned unique ID for this managed resource.
GlobalStatus string
Global protection status.
Id string
The provider-assigned unique ID for this managed resource.
globalStatus String
Global protection status.
id String
The provider-assigned unique ID for this managed resource.
globalStatus string
Global protection status.
id string
The provider-assigned unique ID for this managed resource.
global_status str
Global protection status.
id str
The provider-assigned unique ID for this managed resource.
globalStatus String
Global protection status.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing TseWafProtection Resource

Get an existing TseWafProtection 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?: TseWafProtectionState, opts?: CustomResourceOptions): TseWafProtection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        gateway_id: Optional[str] = None,
        global_status: Optional[str] = None,
        lists: Optional[Sequence[str]] = None,
        operate: Optional[str] = None,
        tse_waf_protection_id: Optional[str] = None,
        type: Optional[str] = None) -> TseWafProtection
func GetTseWafProtection(ctx *Context, name string, id IDInput, state *TseWafProtectionState, opts ...ResourceOption) (*TseWafProtection, error)
public static TseWafProtection Get(string name, Input<string> id, TseWafProtectionState? state, CustomResourceOptions? opts = null)
public static TseWafProtection get(String name, Output<String> id, TseWafProtectionState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:TseWafProtection    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
GatewayId string
Gateway ID.
GlobalStatus string
Global protection status.
Lists List<string>
Means the list of services or routes when the resource type Type is Service or Route.
Operate string
open: open the protection, close: close the protection.
TseWafProtectionId string
ID of the resource.
Type string
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
GatewayId string
Gateway ID.
GlobalStatus string
Global protection status.
Lists []string
Means the list of services or routes when the resource type Type is Service or Route.
Operate string
open: open the protection, close: close the protection.
TseWafProtectionId string
ID of the resource.
Type string
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
gatewayId String
Gateway ID.
globalStatus String
Global protection status.
lists List<String>
Means the list of services or routes when the resource type Type is Service or Route.
operate String
open: open the protection, close: close the protection.
tseWafProtectionId String
ID of the resource.
type String
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
gatewayId string
Gateway ID.
globalStatus string
Global protection status.
lists string[]
Means the list of services or routes when the resource type Type is Service or Route.
operate string
open: open the protection, close: close the protection.
tseWafProtectionId string
ID of the resource.
type string
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
gateway_id str
Gateway ID.
global_status str
Global protection status.
lists Sequence[str]
Means the list of services or routes when the resource type Type is Service or Route.
operate str
open: open the protection, close: close the protection.
tse_waf_protection_id str
ID of the resource.
type str
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).
gatewayId String
Gateway ID.
globalStatus String
Global protection status.
lists List<String>
Means the list of services or routes when the resource type Type is Service or Route.
operate String
open: open the protection, close: close the protection.
tseWafProtectionId String
ID of the resource.
type String
The type of protection resource. Reference value: Global: instance, Service: service, Route: route, Object: obejct (This interface does not currently support this type).

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.