opentelekomcloud.WafDedicatedAntiLeakageRuleV1
Explore with Pulumi AI
Up-to-date reference of API arguments for WAF dedicated Information Leakage Protection rule you can get at documentation portal.
Manages a WAF Dedicated Information Leakage Protection 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.WafDedicatedAntiLeakageRuleV1("rule1", {
policyId: policy1.wafDedicatedPolicyV1Id,
url: "/attack",
category: "sensitive",
contents: ["id_card"],
description: "test description",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
policy1 = opentelekomcloud.WafDedicatedPolicyV1("policy1")
rule1 = opentelekomcloud.WafDedicatedAntiLeakageRuleV1("rule1",
policy_id=policy1.waf_dedicated_policy_v1_id,
url="/attack",
category="sensitive",
contents=["id_card"],
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.NewWafDedicatedAntiLeakageRuleV1(ctx, "rule1", &opentelekomcloud.WafDedicatedAntiLeakageRuleV1Args{
PolicyId: policy1.WafDedicatedPolicyV1Id,
Url: pulumi.String("/attack"),
Category: pulumi.String("sensitive"),
Contents: pulumi.StringArray{
pulumi.String("id_card"),
},
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.WafDedicatedAntiLeakageRuleV1("rule1", new()
{
PolicyId = policy1.WafDedicatedPolicyV1Id,
Url = "/attack",
Category = "sensitive",
Contents = new[]
{
"id_card",
},
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.WafDedicatedAntiLeakageRuleV1;
import com.pulumi.opentelekomcloud.WafDedicatedAntiLeakageRuleV1Args;
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 WafDedicatedAntiLeakageRuleV1("rule1", WafDedicatedAntiLeakageRuleV1Args.builder()
.policyId(policy1.wafDedicatedPolicyV1Id())
.url("/attack")
.category("sensitive")
.contents("id_card")
.description("test description")
.build());
}
}
resources:
policy1:
type: opentelekomcloud:WafDedicatedPolicyV1
rule1:
type: opentelekomcloud:WafDedicatedAntiLeakageRuleV1
properties:
policyId: ${policy1.wafDedicatedPolicyV1Id}
url: /attack
category: sensitive
contents:
- id_card
description: test description
Create WafDedicatedAntiLeakageRuleV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafDedicatedAntiLeakageRuleV1(name: string, args: WafDedicatedAntiLeakageRuleV1Args, opts?: CustomResourceOptions);
@overload
def WafDedicatedAntiLeakageRuleV1(resource_name: str,
args: WafDedicatedAntiLeakageRuleV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def WafDedicatedAntiLeakageRuleV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
category: Optional[str] = None,
contents: Optional[Sequence[str]] = None,
policy_id: Optional[str] = None,
url: Optional[str] = None,
description: Optional[str] = None,
timeouts: Optional[WafDedicatedAntiLeakageRuleV1TimeoutsArgs] = None,
waf_dedicated_anti_leakage_rule_v1_id: Optional[str] = None)
func NewWafDedicatedAntiLeakageRuleV1(ctx *Context, name string, args WafDedicatedAntiLeakageRuleV1Args, opts ...ResourceOption) (*WafDedicatedAntiLeakageRuleV1, error)
public WafDedicatedAntiLeakageRuleV1(string name, WafDedicatedAntiLeakageRuleV1Args args, CustomResourceOptions? opts = null)
public WafDedicatedAntiLeakageRuleV1(String name, WafDedicatedAntiLeakageRuleV1Args args)
public WafDedicatedAntiLeakageRuleV1(String name, WafDedicatedAntiLeakageRuleV1Args args, CustomResourceOptions options)
type: opentelekomcloud:WafDedicatedAntiLeakageRuleV1
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 WafDedicatedAntiLeakageRuleV1Args
- 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 WafDedicatedAntiLeakageRuleV1Args
- 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 WafDedicatedAntiLeakageRuleV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafDedicatedAntiLeakageRuleV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafDedicatedAntiLeakageRuleV1Args
- 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 wafDedicatedAntiLeakageRuleV1Resource = new Opentelekomcloud.WafDedicatedAntiLeakageRuleV1("wafDedicatedAntiLeakageRuleV1Resource", new()
{
Category = "string",
Contents = new[]
{
"string",
},
PolicyId = "string",
Url = "string",
Description = "string",
Timeouts = new Opentelekomcloud.Inputs.WafDedicatedAntiLeakageRuleV1TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
WafDedicatedAntiLeakageRuleV1Id = "string",
});
example, err := opentelekomcloud.NewWafDedicatedAntiLeakageRuleV1(ctx, "wafDedicatedAntiLeakageRuleV1Resource", &opentelekomcloud.WafDedicatedAntiLeakageRuleV1Args{
Category: pulumi.String("string"),
Contents: pulumi.StringArray{
pulumi.String("string"),
},
PolicyId: pulumi.String("string"),
Url: pulumi.String("string"),
Description: pulumi.String("string"),
Timeouts: &opentelekomcloud.WafDedicatedAntiLeakageRuleV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
WafDedicatedAntiLeakageRuleV1Id: pulumi.String("string"),
})
var wafDedicatedAntiLeakageRuleV1Resource = new WafDedicatedAntiLeakageRuleV1("wafDedicatedAntiLeakageRuleV1Resource", WafDedicatedAntiLeakageRuleV1Args.builder()
.category("string")
.contents("string")
.policyId("string")
.url("string")
.description("string")
.timeouts(WafDedicatedAntiLeakageRuleV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.wafDedicatedAntiLeakageRuleV1Id("string")
.build());
waf_dedicated_anti_leakage_rule_v1_resource = opentelekomcloud.WafDedicatedAntiLeakageRuleV1("wafDedicatedAntiLeakageRuleV1Resource",
category="string",
contents=["string"],
policy_id="string",
url="string",
description="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
waf_dedicated_anti_leakage_rule_v1_id="string")
const wafDedicatedAntiLeakageRuleV1Resource = new opentelekomcloud.WafDedicatedAntiLeakageRuleV1("wafDedicatedAntiLeakageRuleV1Resource", {
category: "string",
contents: ["string"],
policyId: "string",
url: "string",
description: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
wafDedicatedAntiLeakageRuleV1Id: "string",
});
type: opentelekomcloud:WafDedicatedAntiLeakageRuleV1
properties:
category: string
contents:
- string
description: string
policyId: string
timeouts:
create: string
delete: string
update: string
url: string
wafDedicatedAntiLeakageRuleV1Id: string
WafDedicatedAntiLeakageRuleV1 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 WafDedicatedAntiLeakageRuleV1 resource accepts the following input properties:
- Category string
- Sensitive information type in the information leakage prevention rule. Values:
- Contents List<string>
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Url string
- URL to which the rule applies, for example,
/admin
- Description string
- Rule description.
- Timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts - Waf
Dedicated stringAnti Leakage Rule V1Id - ID of the rule.
- Category string
- Sensitive information type in the information leakage prevention rule. Values:
- Contents []string
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Url string
- URL to which the rule applies, for example,
/admin
- Description string
- Rule description.
- Timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts Args - Waf
Dedicated stringAnti Leakage Rule V1Id - ID of the rule.
- category String
- Sensitive information type in the information leakage prevention rule. Values:
- contents List<String>
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- url String
- URL to which the rule applies, for example,
/admin
- description String
- Rule description.
- timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts - waf
Dedicated StringAnti Leakage Rule V1Id - ID of the rule.
- category string
- Sensitive information type in the information leakage prevention rule. Values:
- contents string[]
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- url string
- URL to which the rule applies, for example,
/admin
- description string
- Rule description.
- timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts - waf
Dedicated stringAnti Leakage Rule V1Id - ID of the rule.
- category str
- Sensitive information type in the information leakage prevention rule. Values:
- contents Sequence[str]
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- policy_
id str - The WAF policy ID. Changing this creates a new rule.
- url str
- URL to which the rule applies, for example,
/admin
- description str
- Rule description.
- timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts Args - waf_
dedicated_ stranti_ leakage_ rule_ v1_ id - ID of the rule.
- category String
- Sensitive information type in the information leakage prevention rule. Values:
- contents List<String>
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- url String
- URL to which the rule applies, for example,
/admin
- description String
- Rule description.
- timeouts Property Map
- waf
Dedicated StringAnti Leakage Rule V1Id - ID of the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafDedicatedAntiLeakageRuleV1 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 WafDedicatedAntiLeakageRuleV1 Resource
Get an existing WafDedicatedAntiLeakageRuleV1 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?: WafDedicatedAntiLeakageRuleV1State, opts?: CustomResourceOptions): WafDedicatedAntiLeakageRuleV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
category: Optional[str] = None,
contents: Optional[Sequence[str]] = None,
created_at: Optional[float] = None,
description: Optional[str] = None,
policy_id: Optional[str] = None,
status: Optional[float] = None,
timeouts: Optional[WafDedicatedAntiLeakageRuleV1TimeoutsArgs] = None,
url: Optional[str] = None,
waf_dedicated_anti_leakage_rule_v1_id: Optional[str] = None) -> WafDedicatedAntiLeakageRuleV1
func GetWafDedicatedAntiLeakageRuleV1(ctx *Context, name string, id IDInput, state *WafDedicatedAntiLeakageRuleV1State, opts ...ResourceOption) (*WafDedicatedAntiLeakageRuleV1, error)
public static WafDedicatedAntiLeakageRuleV1 Get(string name, Input<string> id, WafDedicatedAntiLeakageRuleV1State? state, CustomResourceOptions? opts = null)
public static WafDedicatedAntiLeakageRuleV1 get(String name, Output<String> id, WafDedicatedAntiLeakageRuleV1State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:WafDedicatedAntiLeakageRuleV1 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.
- Category string
- Sensitive information type in the information leakage prevention rule. Values:
- Contents List<string>
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- Created
At double - Timestamp the rule is created.
- Description string
- Rule description.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Status double
- Rule status. The value can be:
- Timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts - Url string
- URL to which the rule applies, for example,
/admin
- Waf
Dedicated stringAnti Leakage Rule V1Id - ID of the rule.
- Category string
- Sensitive information type in the information leakage prevention rule. Values:
- Contents []string
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- Created
At float64 - Timestamp the rule is created.
- Description string
- Rule description.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule.
- Status float64
- Rule status. The value can be:
- Timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts Args - Url string
- URL to which the rule applies, for example,
/admin
- Waf
Dedicated stringAnti Leakage Rule V1Id - ID of the rule.
- category String
- Sensitive information type in the information leakage prevention rule. Values:
- contents List<String>
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- created
At Double - Timestamp the rule is created.
- description String
- Rule description.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- status Double
- Rule status. The value can be:
- timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts - url String
- URL to which the rule applies, for example,
/admin
- waf
Dedicated StringAnti Leakage Rule V1Id - ID of the rule.
- category string
- Sensitive information type in the information leakage prevention rule. Values:
- contents string[]
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- created
At number - Timestamp the rule is created.
- description string
- Rule description.
- policy
Id string - The WAF policy ID. Changing this creates a new rule.
- status number
- Rule status. The value can be:
- timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts - url string
- URL to which the rule applies, for example,
/admin
- waf
Dedicated stringAnti Leakage Rule V1Id - ID of the rule.
- category str
- Sensitive information type in the information leakage prevention rule. Values:
- contents Sequence[str]
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- created_
at float - Timestamp the rule is created.
- description str
- Rule description.
- policy_
id str - The WAF policy ID. Changing this creates a new rule.
- status float
- Rule status. The value can be:
- timeouts
Waf
Dedicated Anti Leakage Rule V1Timeouts Args - url str
- URL to which the rule applies, for example,
/admin
- waf_
dedicated_ stranti_ leakage_ rule_ v1_ id - ID of the rule.
- category String
- Sensitive information type in the information leakage prevention rule. Values:
- contents List<String>
- Content corresponding to the sensitive information type.
Multiple options can be set.
- When category is set to
code
, the pages that contain the following HTTP response codes will be blocked:400
,401
,402
,403
,404
,405
,500
,501
,502
,503
,504
and507
. - When category is set to
sensitive
, parametersphone
,id_card
, andemail
can be set.
- When category is set to
- created
At Number - Timestamp the rule is created.
- description String
- Rule description.
- policy
Id String - The WAF policy ID. Changing this creates a new rule.
- status Number
- Rule status. The value can be:
- timeouts Property Map
- url String
- URL to which the rule applies, for example,
/admin
- waf
Dedicated StringAnti Leakage Rule V1Id - ID of the rule.
Supporting Types
WafDedicatedAntiLeakageRuleV1Timeouts, WafDedicatedAntiLeakageRuleV1TimeoutsArgs
Import
Dedicated WAF Web Information Leakage Protection rules can be imported using policy_id/id
, e.g.
$ pulumi import opentelekomcloud:index/wafDedicatedAntiLeakageRuleV1:WafDedicatedAntiLeakageRuleV1 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.