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",
});
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")
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
})
}
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",
});
});
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());
}
}
resources:
policy1:
type: opentelekomcloud:WafPolicyV1
rule1:
type: opentelekomcloud:WafWebtamperprotectionRuleV1
properties:
policyId: ${policy1.wafPolicyV1Id}
hostname: www.abc.com
url: /a
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 string
- The unique name of the resource.
- args WafWebtamperprotectionRuleV1Args
- 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 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 string
- The unique name of the resource.
- args WafWebtamperprotectionRuleV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafWebtamperprotectionRuleV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var wafWebtamperprotectionRuleV1Resource = new WafWebtamperprotectionRuleV1("wafWebtamperprotectionRuleV1Resource", WafWebtamperprotectionRuleV1Args.builder()
.hostname("string")
.policyId("string")
.url("string")
.timeouts(WafWebtamperprotectionRuleV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.wafWebtamperprotectionRuleV1Id("string")
.build());
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")
const wafWebtamperprotectionRuleV1Resource = new opentelekomcloud.WafWebtamperprotectionRuleV1("wafWebtamperprotectionRuleV1Resource", {
hostname: "string",
policyId: "string",
url: "string",
timeouts: {
create: "string",
"delete": "string",
},
wafWebtamperprotectionRuleV1Id: "string",
});
type: opentelekomcloud:WafWebtamperprotectionRuleV1
properties:
hostname: string
policyId: string
timeouts:
create: string
delete: string
url: string
wafWebtamperprotectionRuleV1Id: string
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 string
- Specifies the domain name. Changing this creates a new rule.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Url string
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- Timeouts
Waf
Webtamperprotection Rule V1Timeouts - Waf
Webtamperprotection stringRule V1Id - ID of the rule.
- Hostname string
- Specifies the domain name. Changing this creates a new rule.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Url string
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- Timeouts
Waf
Webtamperprotection Rule V1Timeouts Args - Waf
Webtamperprotection stringRule V1Id - ID of the rule.
- hostname String
- Specifies the domain name. Changing this creates a new rule.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- url String
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- timeouts
Waf
Webtamperprotection Rule V1Timeouts - waf
Webtamperprotection StringRule V1Id - ID of the rule.
- hostname string
- Specifies the domain name. Changing this creates a new rule.
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- url string
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- timeouts
Waf
Webtamperprotection Rule V1Timeouts - waf
Webtamperprotection stringRule V1Id - 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.
- url str
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- timeouts
Waf
Webtamperprotection Rule V1Timeouts Args - waf_
webtamperprotection_ strrule_ v1_ id - ID of the rule.
- hostname String
- Specifies the domain name. Changing this creates a new rule.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- url String
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- timeouts Property Map
- waf
Webtamperprotection StringRule V1Id - 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
- 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.
- Hostname string
- Specifies the domain name. Changing this creates a new rule.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Timeouts
Waf
Webtamperprotection Rule V1Timeouts - Url string
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- Waf
Webtamperprotection stringRule V1Id - ID of the rule.
- Hostname string
- Specifies the domain name. Changing this creates a new rule.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Timeouts
Waf
Webtamperprotection Rule V1Timeouts Args - Url string
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- Waf
Webtamperprotection stringRule V1Id - ID of the rule.
- hostname String
- Specifies the domain name. Changing this creates a new rule.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- timeouts
Waf
Webtamperprotection Rule V1Timeouts - url String
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- waf
Webtamperprotection StringRule V1Id - ID of the rule.
- hostname string
- Specifies the domain name. Changing this creates a new rule.
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- timeouts
Waf
Webtamperprotection Rule V1Timeouts - url string
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- waf
Webtamperprotection stringRule V1Id - 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
Waf
Webtamperprotection Rule V1Timeouts Args - url str
- Specifies the URL protected by the web tamper protection rule, excluding a domain name. Changing this creates a new rule.
- waf_
webtamperprotection_ strrule_ v1_ id - ID of the rule.
- hostname String
- Specifies the domain name. Changing this creates a new rule.
- policy
Id 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.
- waf
Webtamperprotection StringRule V1Id - ID of the rule.
Supporting Types
WafWebtamperprotectionRuleV1Timeouts, WafWebtamperprotectionRuleV1TimeoutsArgs
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
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.