1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. WafWebtamperprotectionRuleV1
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.WafWebtamperprotectionRuleV1

Explore with Pulumi AI

Up-to-date reference of API arguments for WAF web tamper protection rule you can get at documentation portal

Manages a WAF Web Tamper Protection Rule resource within OpenTelekomCloud.

Example Usage

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

const policy1 = new opentelekomcloud.WafPolicyV1("policy1", {});
const rule1 = new opentelekomcloud.WafWebtamperprotectionRuleV1("rule1", {
    policyId: policy1.wafPolicyV1Id,
    hostname: "www.abc.com",
    url: "/a",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

policy1 = opentelekomcloud.WafPolicyV1("policy1")
rule1 = opentelekomcloud.WafWebtamperprotectionRuleV1("rule1",
    policy_id=policy1.waf_policy_v1_id,
    hostname="www.abc.com",
    url="/a")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		policy1, err := opentelekomcloud.NewWafPolicyV1(ctx, "policy1", nil)
		if err != nil {
			return err
		}
		_, err = opentelekomcloud.NewWafWebtamperprotectionRuleV1(ctx, "rule1", &opentelekomcloud.WafWebtamperprotectionRuleV1Args{
			PolicyId: policy1.WafPolicyV1Id,
			Hostname: pulumi.String("www.abc.com"),
			Url:      pulumi.String("/a"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var policy1 = new Opentelekomcloud.WafPolicyV1("policy1");

    var rule1 = new Opentelekomcloud.WafWebtamperprotectionRuleV1("rule1", new()
    {
        PolicyId = policy1.WafPolicyV1Id,
        Hostname = "www.abc.com",
        Url = "/a",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.WafPolicyV1;
import com.pulumi.opentelekomcloud.WafWebtamperprotectionRuleV1;
import com.pulumi.opentelekomcloud.WafWebtamperprotectionRuleV1Args;
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 policy1 = new WafPolicyV1("policy1");

        var rule1 = new WafWebtamperprotectionRuleV1("rule1", WafWebtamperprotectionRuleV1Args.builder()
            .policyId(policy1.wafPolicyV1Id())
            .hostname("www.abc.com")
            .url("/a")
            .build());

    }
}
Copy
resources:
  policy1:
    type: opentelekomcloud:WafPolicyV1
  rule1:
    type: opentelekomcloud:WafWebtamperprotectionRuleV1
    properties:
      policyId: ${policy1.wafPolicyV1Id}
      hostname: www.abc.com
      url: /a
Copy

Create WafWebtamperprotectionRuleV1 Resource

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

Constructor syntax

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

@overload
def WafWebtamperprotectionRuleV1(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 hostname: Optional[str] = None,
                                 policy_id: Optional[str] = None,
                                 url: Optional[str] = None,
                                 timeouts: Optional[WafWebtamperprotectionRuleV1TimeoutsArgs] = None,
                                 waf_webtamperprotection_rule_v1_id: Optional[str] = None)
func NewWafWebtamperprotectionRuleV1(ctx *Context, name string, args WafWebtamperprotectionRuleV1Args, opts ...ResourceOption) (*WafWebtamperprotectionRuleV1, error)
public WafWebtamperprotectionRuleV1(string name, WafWebtamperprotectionRuleV1Args args, CustomResourceOptions? opts = null)
public WafWebtamperprotectionRuleV1(String name, WafWebtamperprotectionRuleV1Args args)
public WafWebtamperprotectionRuleV1(String name, WafWebtamperprotectionRuleV1Args args, CustomResourceOptions options)
type: opentelekomcloud:WafWebtamperprotectionRuleV1
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. WafWebtamperprotectionRuleV1Args
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. WafWebtamperprotectionRuleV1Args
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. WafWebtamperprotectionRuleV1Args
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. WafWebtamperprotectionRuleV1Args
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. WafWebtamperprotectionRuleV1Args
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var wafWebtamperprotectionRuleV1Resource = new Opentelekomcloud.WafWebtamperprotectionRuleV1("wafWebtamperprotectionRuleV1Resource", new()
{
    Hostname = "string",
    PolicyId = "string",
    Url = "string",
    Timeouts = new Opentelekomcloud.Inputs.WafWebtamperprotectionRuleV1TimeoutsArgs
    {
        Create = "string",
        Delete = "string",
    },
    WafWebtamperprotectionRuleV1Id = "string",
});
Copy
example, err := opentelekomcloud.NewWafWebtamperprotectionRuleV1(ctx, "wafWebtamperprotectionRuleV1Resource", &opentelekomcloud.WafWebtamperprotectionRuleV1Args{
	Hostname: pulumi.String("string"),
	PolicyId: pulumi.String("string"),
	Url:      pulumi.String("string"),
	Timeouts: &opentelekomcloud.WafWebtamperprotectionRuleV1TimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
	},
	WafWebtamperprotectionRuleV1Id: pulumi.String("string"),
})
Copy
var wafWebtamperprotectionRuleV1Resource = new WafWebtamperprotectionRuleV1("wafWebtamperprotectionRuleV1Resource", WafWebtamperprotectionRuleV1Args.builder()
    .hostname("string")
    .policyId("string")
    .url("string")
    .timeouts(WafWebtamperprotectionRuleV1TimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .build())
    .wafWebtamperprotectionRuleV1Id("string")
    .build());
Copy
waf_webtamperprotection_rule_v1_resource = opentelekomcloud.WafWebtamperprotectionRuleV1("wafWebtamperprotectionRuleV1Resource",
    hostname="string",
    policy_id="string",
    url="string",
    timeouts={
        "create": "string",
        "delete": "string",
    },
    waf_webtamperprotection_rule_v1_id="string")
Copy
const wafWebtamperprotectionRuleV1Resource = new opentelekomcloud.WafWebtamperprotectionRuleV1("wafWebtamperprotectionRuleV1Resource", {
    hostname: "string",
    policyId: "string",
    url: "string",
    timeouts: {
        create: "string",
        "delete": "string",
    },
    wafWebtamperprotectionRuleV1Id: "string",
});
Copy
type: opentelekomcloud:WafWebtamperprotectionRuleV1
properties:
    hostname: string
    policyId: string
    timeouts:
        create: string
        delete: string
    url: string
    wafWebtamperprotectionRuleV1Id: string
Copy

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

Hostname This property is required. string
Specifies the domain name. Changing this creates a new rule.
PolicyId This property is required. string
The WAF policy ID. Changing this creates a new rule.
Url This property is required. string
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
Timeouts WafWebtamperprotectionRuleV1Timeouts
WafWebtamperprotectionRuleV1Id string
ID of the rule.
Hostname This property is required. string
Specifies the domain name. Changing this creates a new rule.
PolicyId This property is required. string
The WAF policy ID. Changing this creates a new rule.
Url This property is required. string
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
Timeouts WafWebtamperprotectionRuleV1TimeoutsArgs
WafWebtamperprotectionRuleV1Id string
ID of the rule.
hostname This property is required. String
Specifies the domain name. Changing this creates a new rule.
policyId This property is required. String
The WAF policy ID. Changing this creates a new rule.
url This property is required. String
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
timeouts WafWebtamperprotectionRuleV1Timeouts
wafWebtamperprotectionRuleV1Id String
ID of the rule.
hostname This property is required. string
Specifies the domain name. Changing this creates a new rule.
policyId This property is required. string
The WAF policy ID. Changing this creates a new rule.
url This property is required. string
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
timeouts WafWebtamperprotectionRuleV1Timeouts
wafWebtamperprotectionRuleV1Id string
ID of the rule.
hostname This property is required. str
Specifies the domain name. Changing this creates a new rule.
policy_id This property is required. str
The WAF policy ID. Changing this creates a new rule.
url This property is required. str
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
timeouts WafWebtamperprotectionRuleV1TimeoutsArgs
waf_webtamperprotection_rule_v1_id str
ID of the rule.
hostname This property is required. String
Specifies the domain name. Changing this creates a new rule.
policyId This property is required. String
The WAF policy ID. Changing this creates a new rule.
url This property is required. String
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
timeouts Property Map
wafWebtamperprotectionRuleV1Id String
ID of the rule.

Outputs

All input properties are implicitly available as output properties. Additionally, the WafWebtamperprotectionRuleV1 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 str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing WafWebtamperprotectionRuleV1 Resource

Get an existing WafWebtamperprotectionRuleV1 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?: WafWebtamperprotectionRuleV1State, opts?: CustomResourceOptions): WafWebtamperprotectionRuleV1
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        hostname: Optional[str] = None,
        policy_id: Optional[str] = None,
        timeouts: Optional[WafWebtamperprotectionRuleV1TimeoutsArgs] = None,
        url: Optional[str] = None,
        waf_webtamperprotection_rule_v1_id: Optional[str] = None) -> WafWebtamperprotectionRuleV1
func GetWafWebtamperprotectionRuleV1(ctx *Context, name string, id IDInput, state *WafWebtamperprotectionRuleV1State, opts ...ResourceOption) (*WafWebtamperprotectionRuleV1, error)
public static WafWebtamperprotectionRuleV1 Get(string name, Input<string> id, WafWebtamperprotectionRuleV1State? state, CustomResourceOptions? opts = null)
public static WafWebtamperprotectionRuleV1 get(String name, Output<String> id, WafWebtamperprotectionRuleV1State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:WafWebtamperprotectionRuleV1    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:
Hostname string
Specifies the domain name. Changing this creates a new rule.
PolicyId string
The WAF policy ID. Changing this creates a new rule.
Timeouts WafWebtamperprotectionRuleV1Timeouts
Url string
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
WafWebtamperprotectionRuleV1Id string
ID of the rule.
Hostname string
Specifies the domain name. Changing this creates a new rule.
PolicyId string
The WAF policy ID. Changing this creates a new rule.
Timeouts WafWebtamperprotectionRuleV1TimeoutsArgs
Url string
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
WafWebtamperprotectionRuleV1Id string
ID of the rule.
hostname String
Specifies the domain name. Changing this creates a new rule.
policyId String
The WAF policy ID. Changing this creates a new rule.
timeouts WafWebtamperprotectionRuleV1Timeouts
url String
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
wafWebtamperprotectionRuleV1Id String
ID of the rule.
hostname string
Specifies the domain name. Changing this creates a new rule.
policyId string
The WAF policy ID. Changing this creates a new rule.
timeouts WafWebtamperprotectionRuleV1Timeouts
url string
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
wafWebtamperprotectionRuleV1Id string
ID of the rule.
hostname str
Specifies the domain name. Changing this creates a new rule.
policy_id str
The WAF policy ID. Changing this creates a new rule.
timeouts WafWebtamperprotectionRuleV1TimeoutsArgs
url str
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
waf_webtamperprotection_rule_v1_id str
ID of the rule.
hostname String
Specifies the domain name. Changing this creates a new rule.
policyId String
The WAF policy ID. Changing this creates a new rule.
timeouts Property Map
url String
Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
wafWebtamperprotectionRuleV1Id String
ID of the rule.

Supporting Types

WafWebtamperprotectionRuleV1Timeouts
, WafWebtamperprotectionRuleV1TimeoutsArgs

Create string
Delete string
Create string
Delete string
create String
delete String
create string
delete string
create str
delete str
create String
delete String

Import

Web Tamper Protection Rules can be imported using the policy_id/id, e.g.

$ pulumi import opentelekomcloud:index/wafWebtamperprotectionRuleV1:WafWebtamperprotectionRuleV1 rule_1 ff95e71c8ae74eba9887193ab22c5757/7117d38e4c8f4624a505-bd96b97d024c
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

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