opentelekomcloud.WafDedicatedWebTamperRuleV1
Explore with Pulumi AI
Up-to-date reference of API arguments for WAF dedicated Web Tamper rule you can get at documentation portal.
Manages a WAF Dedicated Web Tamper Rule resource within OpenTelekomCloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as opentelekomcloud from "@pulumi/opentelekomcloud";
const policy1 = new opentelekomcloud.WafDedicatedPolicyV1("policy1", {});
const rule1 = new opentelekomcloud.WafDedicatedWebTamperRuleV1("rule1", {
policyId: policy1.wafDedicatedPolicyV1Id,
hostname: "www.domain.com",
url: "/login",
description: "test description",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
policy1 = opentelekomcloud.WafDedicatedPolicyV1("policy1")
rule1 = opentelekomcloud.WafDedicatedWebTamperRuleV1("rule1",
policy_id=policy1.waf_dedicated_policy_v1_id,
hostname="www.domain.com",
url="/login",
description="test description")
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.NewWafDedicatedPolicyV1(ctx, "policy1", nil)
if err != nil {
return err
}
_, err = opentelekomcloud.NewWafDedicatedWebTamperRuleV1(ctx, "rule1", &opentelekomcloud.WafDedicatedWebTamperRuleV1Args{
PolicyId: policy1.WafDedicatedPolicyV1Id,
Hostname: pulumi.String("www.domain.com"),
Url: pulumi.String("/login"),
Description: pulumi.String("test description"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;
return await Deployment.RunAsync(() =>
{
var policy1 = new Opentelekomcloud.WafDedicatedPolicyV1("policy1");
var rule1 = new Opentelekomcloud.WafDedicatedWebTamperRuleV1("rule1", new()
{
PolicyId = policy1.WafDedicatedPolicyV1Id,
Hostname = "www.domain.com",
Url = "/login",
Description = "test description",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.WafDedicatedPolicyV1;
import com.pulumi.opentelekomcloud.WafDedicatedWebTamperRuleV1;
import com.pulumi.opentelekomcloud.WafDedicatedWebTamperRuleV1Args;
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 WafDedicatedPolicyV1("policy1");
var rule1 = new WafDedicatedWebTamperRuleV1("rule1", WafDedicatedWebTamperRuleV1Args.builder()
.policyId(policy1.wafDedicatedPolicyV1Id())
.hostname("www.domain.com")
.url("/login")
.description("test description")
.build());
}
}
resources:
policy1:
type: opentelekomcloud:WafDedicatedPolicyV1
rule1:
type: opentelekomcloud:WafDedicatedWebTamperRuleV1
properties:
policyId: ${policy1.wafDedicatedPolicyV1Id}
hostname: www.domain.com
url: /login
description: test description
Create WafDedicatedWebTamperRuleV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafDedicatedWebTamperRuleV1(name: string, args: WafDedicatedWebTamperRuleV1Args, opts?: CustomResourceOptions);
@overload
def WafDedicatedWebTamperRuleV1(resource_name: str,
args: WafDedicatedWebTamperRuleV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def WafDedicatedWebTamperRuleV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
hostname: Optional[str] = None,
policy_id: Optional[str] = None,
url: Optional[str] = None,
description: Optional[str] = None,
timeouts: Optional[WafDedicatedWebTamperRuleV1TimeoutsArgs] = None,
update_cache: Optional[bool] = None,
waf_dedicated_web_tamper_rule_v1_id: Optional[str] = None)
func NewWafDedicatedWebTamperRuleV1(ctx *Context, name string, args WafDedicatedWebTamperRuleV1Args, opts ...ResourceOption) (*WafDedicatedWebTamperRuleV1, error)
public WafDedicatedWebTamperRuleV1(string name, WafDedicatedWebTamperRuleV1Args args, CustomResourceOptions? opts = null)
public WafDedicatedWebTamperRuleV1(String name, WafDedicatedWebTamperRuleV1Args args)
public WafDedicatedWebTamperRuleV1(String name, WafDedicatedWebTamperRuleV1Args args, CustomResourceOptions options)
type: opentelekomcloud:WafDedicatedWebTamperRuleV1
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WafDedicatedWebTamperRuleV1Args
- 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 WafDedicatedWebTamperRuleV1Args
- 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 WafDedicatedWebTamperRuleV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafDedicatedWebTamperRuleV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafDedicatedWebTamperRuleV1Args
- 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 wafDedicatedWebTamperRuleV1Resource = new Opentelekomcloud.WafDedicatedWebTamperRuleV1("wafDedicatedWebTamperRuleV1Resource", new()
{
Hostname = "string",
PolicyId = "string",
Url = "string",
Description = "string",
Timeouts = new Opentelekomcloud.Inputs.WafDedicatedWebTamperRuleV1TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
UpdateCache = false,
WafDedicatedWebTamperRuleV1Id = "string",
});
example, err := opentelekomcloud.NewWafDedicatedWebTamperRuleV1(ctx, "wafDedicatedWebTamperRuleV1Resource", &opentelekomcloud.WafDedicatedWebTamperRuleV1Args{
Hostname: pulumi.String("string"),
PolicyId: pulumi.String("string"),
Url: pulumi.String("string"),
Description: pulumi.String("string"),
Timeouts: &opentelekomcloud.WafDedicatedWebTamperRuleV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
UpdateCache: pulumi.Bool(false),
WafDedicatedWebTamperRuleV1Id: pulumi.String("string"),
})
var wafDedicatedWebTamperRuleV1Resource = new WafDedicatedWebTamperRuleV1("wafDedicatedWebTamperRuleV1Resource", WafDedicatedWebTamperRuleV1Args.builder()
.hostname("string")
.policyId("string")
.url("string")
.description("string")
.timeouts(WafDedicatedWebTamperRuleV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.updateCache(false)
.wafDedicatedWebTamperRuleV1Id("string")
.build());
waf_dedicated_web_tamper_rule_v1_resource = opentelekomcloud.WafDedicatedWebTamperRuleV1("wafDedicatedWebTamperRuleV1Resource",
hostname="string",
policy_id="string",
url="string",
description="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
update_cache=False,
waf_dedicated_web_tamper_rule_v1_id="string")
const wafDedicatedWebTamperRuleV1Resource = new opentelekomcloud.WafDedicatedWebTamperRuleV1("wafDedicatedWebTamperRuleV1Resource", {
hostname: "string",
policyId: "string",
url: "string",
description: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
updateCache: false,
wafDedicatedWebTamperRuleV1Id: "string",
});
type: opentelekomcloud:WafDedicatedWebTamperRuleV1
properties:
description: string
hostname: string
policyId: string
timeouts:
create: string
delete: string
update: string
updateCache: false
url: string
wafDedicatedWebTamperRuleV1Id: string
WafDedicatedWebTamperRuleV1 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 WafDedicatedWebTamperRuleV1 resource accepts the following input properties:
- Hostname string
- Protected website.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Url string
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- Description string
- Rule description.
- Timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts - Update
Cache bool - To update the cache for a web tamper protection Rule.
- Waf
Dedicated stringWeb Tamper Rule V1Id - ID of the rule.
- Hostname string
- Protected website.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Url string
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- Description string
- Rule description.
- Timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts Args - Update
Cache bool - To update the cache for a web tamper protection Rule.
- Waf
Dedicated stringWeb Tamper Rule V1Id - ID of the rule.
- hostname String
- Protected website.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- url String
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- description String
- Rule description.
- timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts - update
Cache Boolean - To update the cache for a web tamper protection Rule.
- waf
Dedicated StringWeb Tamper Rule V1Id - ID of the rule.
- hostname string
- Protected website.
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- url string
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- description string
- Rule description.
- timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts - update
Cache boolean - To update the cache for a web tamper protection Rule.
- waf
Dedicated stringWeb Tamper Rule V1Id - ID of the rule.
- hostname str
- Protected website.
- policy_
id str - The WAF policy ID. Changing this creates a new rule.
- url str
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- description str
- Rule description.
- timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts Args - update_
cache bool - To update the cache for a web tamper protection Rule.
- waf_
dedicated_ strweb_ tamper_ rule_ v1_ id - ID of the rule.
- hostname String
- Protected website.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- url String
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- description String
- Rule description.
- timeouts Property Map
- update
Cache Boolean - To update the cache for a web tamper protection Rule.
- waf
Dedicated StringWeb Tamper Rule V1Id - ID of the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafDedicatedWebTamperRuleV1 resource produces the following output properties:
- created_
at float - Timestamp the rule is created.
- id str
- The provider-assigned unique ID for this managed resource.
- status float
- Rule status. The value can be:
Look up Existing WafDedicatedWebTamperRuleV1 Resource
Get an existing WafDedicatedWebTamperRuleV1 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?: WafDedicatedWebTamperRuleV1State, opts?: CustomResourceOptions): WafDedicatedWebTamperRuleV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[float] = None,
description: Optional[str] = None,
hostname: Optional[str] = None,
policy_id: Optional[str] = None,
status: Optional[float] = None,
timeouts: Optional[WafDedicatedWebTamperRuleV1TimeoutsArgs] = None,
update_cache: Optional[bool] = None,
url: Optional[str] = None,
waf_dedicated_web_tamper_rule_v1_id: Optional[str] = None) -> WafDedicatedWebTamperRuleV1
func GetWafDedicatedWebTamperRuleV1(ctx *Context, name string, id IDInput, state *WafDedicatedWebTamperRuleV1State, opts ...ResourceOption) (*WafDedicatedWebTamperRuleV1, error)
public static WafDedicatedWebTamperRuleV1 Get(string name, Input<string> id, WafDedicatedWebTamperRuleV1State? state, CustomResourceOptions? opts = null)
public static WafDedicatedWebTamperRuleV1 get(String name, Output<String> id, WafDedicatedWebTamperRuleV1State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:WafDedicatedWebTamperRuleV1 get: 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.
- Created
At double - Timestamp the rule is created.
- Description string
- Rule description.
- Hostname string
- Protected website.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Status double
- Rule status. The value can be:
- Timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts - Update
Cache bool - To update the cache for a web tamper protection Rule.
- Url string
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- Waf
Dedicated stringWeb Tamper Rule V1Id - ID of the rule.
- Created
At float64 - Timestamp the rule is created.
- Description string
- Rule description.
- Hostname string
- Protected website.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Status float64
- Rule status. The value can be:
- Timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts Args - Update
Cache bool - To update the cache for a web tamper protection Rule.
- Url string
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- Waf
Dedicated stringWeb Tamper Rule V1Id - ID of the rule.
- created
At Double - Timestamp the rule is created.
- description String
- Rule description.
- hostname String
- Protected website.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- status Double
- Rule status. The value can be:
- timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts - update
Cache Boolean - To update the cache for a web tamper protection Rule.
- url String
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- waf
Dedicated StringWeb Tamper Rule V1Id - ID of the rule.
- created
At number - Timestamp the rule is created.
- description string
- Rule description.
- hostname string
- Protected website.
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- status number
- Rule status. The value can be:
- timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts - update
Cache boolean - To update the cache for a web tamper protection Rule.
- url string
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- waf
Dedicated stringWeb Tamper Rule V1Id - ID of the rule.
- created_
at float - Timestamp the rule is created.
- description str
- Rule description.
- hostname str
- Protected website.
- policy_
id str - The WAF policy ID. Changing this creates a new rule.
- status float
- Rule status. The value can be:
- timeouts
Waf
Dedicated Web Tamper Rule V1Timeouts Args - update_
cache bool - To update the cache for a web tamper protection Rule.
- url str
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- waf_
dedicated_ strweb_ tamper_ rule_ v1_ id - ID of the rule.
- created
At Number - Timestamp the rule is created.
- description String
- Rule description.
- hostname String
- Protected website.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- status Number
- Rule status. The value can be:
- timeouts Property Map
- update
Cache Boolean - To update the cache for a web tamper protection Rule.
- url String
- URL protected by the web tamper protection rule.
The value must be in the standard URL format, for example,
/admin
- waf
Dedicated StringWeb Tamper Rule V1Id - ID of the rule.
Supporting Types
WafDedicatedWebTamperRuleV1Timeouts, WafDedicatedWebTamperRuleV1TimeoutsArgs
Import
Dedicated WAF Web Tamper Rules can be imported using policy_id/id
, e.g.
$ pulumi import opentelekomcloud:index/wafDedicatedWebTamperRuleV1:WafDedicatedWebTamperRuleV1 rule_1 ff95e71c8ae74eba9887193ab22c5757/b39f3a5a1b4f447a8030f0b0703f47f5
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.