opentelekomcloud.WafDedicatedBlacklistRuleV1
Explore with Pulumi AI
Up-to-date reference of API arguments for WAF dedicated Blacklist rule you can get at documentation portal.
Manages a WAF Dedicated Blacklist 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.WafDedicatedBlacklistRuleV1("rule1", {
policyId: policy1.wafDedicatedPolicyV1Id,
ipAddress: "192.168.1.0/24",
action: 0,
description: "test description",
});
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud
policy1 = opentelekomcloud.WafDedicatedPolicyV1("policy1")
rule1 = opentelekomcloud.WafDedicatedBlacklistRuleV1("rule1",
policy_id=policy1.waf_dedicated_policy_v1_id,
ip_address="192.168.1.0/24",
action=0,
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.NewWafDedicatedBlacklistRuleV1(ctx, "rule1", &opentelekomcloud.WafDedicatedBlacklistRuleV1Args{
PolicyId: policy1.WafDedicatedPolicyV1Id,
IpAddress: pulumi.String("192.168.1.0/24"),
Action: pulumi.Float64(0),
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.WafDedicatedBlacklistRuleV1("rule1", new()
{
PolicyId = policy1.WafDedicatedPolicyV1Id,
IpAddress = "192.168.1.0/24",
Action = 0,
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.WafDedicatedBlacklistRuleV1;
import com.pulumi.opentelekomcloud.WafDedicatedBlacklistRuleV1Args;
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 WafDedicatedBlacklistRuleV1("rule1", WafDedicatedBlacklistRuleV1Args.builder()
.policyId(policy1.wafDedicatedPolicyV1Id())
.ipAddress("192.168.1.0/24")
.action(0)
.description("test description")
.build());
}
}
resources:
policy1:
type: opentelekomcloud:WafDedicatedPolicyV1
rule1:
type: opentelekomcloud:WafDedicatedBlacklistRuleV1
properties:
policyId: ${policy1.wafDedicatedPolicyV1Id}
ipAddress: 192.168.1.0/24
action: 0
description: test description
Create WafDedicatedBlacklistRuleV1 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafDedicatedBlacklistRuleV1(name: string, args: WafDedicatedBlacklistRuleV1Args, opts?: CustomResourceOptions);
@overload
def WafDedicatedBlacklistRuleV1(resource_name: str,
args: WafDedicatedBlacklistRuleV1Args,
opts: Optional[ResourceOptions] = None)
@overload
def WafDedicatedBlacklistRuleV1(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[float] = None,
ip_address: Optional[str] = None,
policy_id: Optional[str] = None,
description: Optional[str] = None,
followed_action_id: Optional[str] = None,
name: Optional[str] = None,
timeouts: Optional[WafDedicatedBlacklistRuleV1TimeoutsArgs] = None,
waf_dedicated_blacklist_rule_v1_id: Optional[str] = None)
func NewWafDedicatedBlacklistRuleV1(ctx *Context, name string, args WafDedicatedBlacklistRuleV1Args, opts ...ResourceOption) (*WafDedicatedBlacklistRuleV1, error)
public WafDedicatedBlacklistRuleV1(string name, WafDedicatedBlacklistRuleV1Args args, CustomResourceOptions? opts = null)
public WafDedicatedBlacklistRuleV1(String name, WafDedicatedBlacklistRuleV1Args args)
public WafDedicatedBlacklistRuleV1(String name, WafDedicatedBlacklistRuleV1Args args, CustomResourceOptions options)
type: opentelekomcloud:WafDedicatedBlacklistRuleV1
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 WafDedicatedBlacklistRuleV1Args
- 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 WafDedicatedBlacklistRuleV1Args
- 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 WafDedicatedBlacklistRuleV1Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafDedicatedBlacklistRuleV1Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafDedicatedBlacklistRuleV1Args
- 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 wafDedicatedBlacklistRuleV1Resource = new Opentelekomcloud.WafDedicatedBlacklistRuleV1("wafDedicatedBlacklistRuleV1Resource", new()
{
Action = 0,
IpAddress = "string",
PolicyId = "string",
Description = "string",
FollowedActionId = "string",
Name = "string",
Timeouts = new Opentelekomcloud.Inputs.WafDedicatedBlacklistRuleV1TimeoutsArgs
{
Create = "string",
Delete = "string",
},
WafDedicatedBlacklistRuleV1Id = "string",
});
example, err := opentelekomcloud.NewWafDedicatedBlacklistRuleV1(ctx, "wafDedicatedBlacklistRuleV1Resource", &opentelekomcloud.WafDedicatedBlacklistRuleV1Args{
Action: pulumi.Float64(0),
IpAddress: pulumi.String("string"),
PolicyId: pulumi.String("string"),
Description: pulumi.String("string"),
FollowedActionId: pulumi.String("string"),
Name: pulumi.String("string"),
Timeouts: &opentelekomcloud.WafDedicatedBlacklistRuleV1TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
WafDedicatedBlacklistRuleV1Id: pulumi.String("string"),
})
var wafDedicatedBlacklistRuleV1Resource = new WafDedicatedBlacklistRuleV1("wafDedicatedBlacklistRuleV1Resource", WafDedicatedBlacklistRuleV1Args.builder()
.action(0)
.ipAddress("string")
.policyId("string")
.description("string")
.followedActionId("string")
.name("string")
.timeouts(WafDedicatedBlacklistRuleV1TimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.wafDedicatedBlacklistRuleV1Id("string")
.build());
waf_dedicated_blacklist_rule_v1_resource = opentelekomcloud.WafDedicatedBlacklistRuleV1("wafDedicatedBlacklistRuleV1Resource",
action=0,
ip_address="string",
policy_id="string",
description="string",
followed_action_id="string",
name="string",
timeouts={
"create": "string",
"delete": "string",
},
waf_dedicated_blacklist_rule_v1_id="string")
const wafDedicatedBlacklistRuleV1Resource = new opentelekomcloud.WafDedicatedBlacklistRuleV1("wafDedicatedBlacklistRuleV1Resource", {
action: 0,
ipAddress: "string",
policyId: "string",
description: "string",
followedActionId: "string",
name: "string",
timeouts: {
create: "string",
"delete": "string",
},
wafDedicatedBlacklistRuleV1Id: "string",
});
type: opentelekomcloud:WafDedicatedBlacklistRuleV1
properties:
action: 0
description: string
followedActionId: string
ipAddress: string
name: string
policyId: string
timeouts:
create: string
delete: string
wafDedicatedBlacklistRuleV1Id: string
WafDedicatedBlacklistRuleV1 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 WafDedicatedBlacklistRuleV1 resource accepts the following input properties:
- Action double
- Protective action. Changing this creates a new rule. The value can be:
- Ip
Address string - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- Policy
Id string - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- Description string
- Rule description. Changing this creates a new rule.
- Followed
Action stringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - Name string
- Rule name. Changing this creates a new rule.
- Timeouts
Waf
Dedicated Blacklist Rule V1Timeouts - Waf
Dedicated stringBlacklist Rule V1Id - ID of the rule.
- Action float64
- Protective action. Changing this creates a new rule. The value can be:
- Ip
Address string - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- Policy
Id string - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- Description string
- Rule description. Changing this creates a new rule.
- Followed
Action stringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - Name string
- Rule name. Changing this creates a new rule.
- Timeouts
Waf
Dedicated Blacklist Rule V1Timeouts Args - Waf
Dedicated stringBlacklist Rule V1Id - ID of the rule.
- action Double
- Protective action. Changing this creates a new rule. The value can be:
- ip
Address String - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- policy
Id String - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- description String
- Rule description. Changing this creates a new rule.
- followed
Action StringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - name String
- Rule name. Changing this creates a new rule.
- timeouts
Waf
Dedicated Blacklist Rule V1Timeouts - waf
Dedicated StringBlacklist Rule V1Id - ID of the rule.
- action number
- Protective action. Changing this creates a new rule. The value can be:
- ip
Address string - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- policy
Id string - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- description string
- Rule description. Changing this creates a new rule.
- followed
Action stringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - name string
- Rule name. Changing this creates a new rule.
- timeouts
Waf
Dedicated Blacklist Rule V1Timeouts - waf
Dedicated stringBlacklist Rule V1Id - ID of the rule.
- action float
- Protective action. Changing this creates a new rule. The value can be:
- ip_
address str - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- policy_
id str - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- description str
- Rule description. Changing this creates a new rule.
- followed_
action_ strid - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - name str
- Rule name. Changing this creates a new rule.
- timeouts
Waf
Dedicated Blacklist Rule V1Timeouts Args - waf_
dedicated_ strblacklist_ rule_ v1_ id - ID of the rule.
- action Number
- Protective action. Changing this creates a new rule. The value can be:
- ip
Address String - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- policy
Id String - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- description String
- Rule description. Changing this creates a new rule.
- followed
Action StringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - name String
- Rule name. Changing this creates a new rule.
- timeouts Property Map
- waf
Dedicated StringBlacklist Rule V1Id - ID of the rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafDedicatedBlacklistRuleV1 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 WafDedicatedBlacklistRuleV1 Resource
Get an existing WafDedicatedBlacklistRuleV1 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?: WafDedicatedBlacklistRuleV1State, opts?: CustomResourceOptions): WafDedicatedBlacklistRuleV1
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[float] = None,
created_at: Optional[float] = None,
description: Optional[str] = None,
followed_action_id: Optional[str] = None,
ip_address: Optional[str] = None,
name: Optional[str] = None,
policy_id: Optional[str] = None,
status: Optional[float] = None,
timeouts: Optional[WafDedicatedBlacklistRuleV1TimeoutsArgs] = None,
waf_dedicated_blacklist_rule_v1_id: Optional[str] = None) -> WafDedicatedBlacklistRuleV1
func GetWafDedicatedBlacklistRuleV1(ctx *Context, name string, id IDInput, state *WafDedicatedBlacklistRuleV1State, opts ...ResourceOption) (*WafDedicatedBlacklistRuleV1, error)
public static WafDedicatedBlacklistRuleV1 Get(string name, Input<string> id, WafDedicatedBlacklistRuleV1State? state, CustomResourceOptions? opts = null)
public static WafDedicatedBlacklistRuleV1 get(String name, Output<String> id, WafDedicatedBlacklistRuleV1State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:WafDedicatedBlacklistRuleV1 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.
- Action double
- Protective action. Changing this creates a new rule. The value can be:
- Created
At double - Timestamp the rule is created.
- Description string
- Rule description. Changing this creates a new rule.
- Followed
Action stringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - Ip
Address string - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- Name string
- Rule name. Changing this creates a new rule.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- Status double
- Rule status. The value can be:
- Timeouts
Waf
Dedicated Blacklist Rule V1Timeouts - Waf
Dedicated stringBlacklist Rule V1Id - ID of the rule.
- Action float64
- Protective action. Changing this creates a new rule. The value can be:
- Created
At float64 - Timestamp the rule is created.
- Description string
- Rule description. Changing this creates a new rule.
- Followed
Action stringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - Ip
Address string - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- Name string
- Rule name. Changing this creates a new rule.
- Policy
Id string - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- Status float64
- Rule status. The value can be:
- Timeouts
Waf
Dedicated Blacklist Rule V1Timeouts Args - Waf
Dedicated stringBlacklist Rule V1Id - ID of the rule.
- action Double
- Protective action. Changing this creates a new rule. The value can be:
- created
At Double - Timestamp the rule is created.
- description String
- Rule description. Changing this creates a new rule.
- followed
Action StringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - ip
Address String - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- name String
- Rule name. Changing this creates a new rule.
- policy
Id String - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- status Double
- Rule status. The value can be:
- timeouts
Waf
Dedicated Blacklist Rule V1Timeouts - waf
Dedicated StringBlacklist Rule V1Id - ID of the rule.
- action number
- Protective action. Changing this creates a new rule. The value can be:
- created
At number - Timestamp the rule is created.
- description string
- Rule description. Changing this creates a new rule.
- followed
Action stringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - ip
Address string - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- name string
- Rule name. Changing this creates a new rule.
- policy
Id string - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- status number
- Rule status. The value can be:
- timeouts
Waf
Dedicated Blacklist Rule V1Timeouts - waf
Dedicated stringBlacklist Rule V1Id - ID of the rule.
- action float
- Protective action. Changing this creates a new rule. The value can be:
- created_
at float - Timestamp the rule is created.
- description str
- Rule description. Changing this creates a new rule.
- followed_
action_ strid - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - ip_
address str - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- name str
- Rule name. Changing this creates a new rule.
- policy_
id str - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- status float
- Rule status. The value can be:
- timeouts
Waf
Dedicated Blacklist Rule V1Timeouts Args - waf_
dedicated_ strblacklist_ rule_ v1_ id - ID of the rule.
- action Number
- Protective action. Changing this creates a new rule. The value can be:
- created
At Number - Timestamp the rule is created.
- description String
- Rule description. Changing this creates a new rule.
- followed
Action StringId - ID of a known attack source rule. Changing this creates a new rule.
This parameter can be configured only when
action
is set to0
. - ip
Address String - IP addresses or an IP address range to be added to the blacklist or whitelist. Changing this creates a new rule.
For example,
192.x.x.3
or10.x.x.0/24
- name String
- Rule name. Changing this creates a new rule.
- policy
Id String - The WAF policy ID. Changing this creates a new rule. Changing this creates a new rule.
- status Number
- Rule status. The value can be:
- timeouts Property Map
- waf
Dedicated StringBlacklist Rule V1Id - ID of the rule.
Supporting Types
WafDedicatedBlacklistRuleV1Timeouts, WafDedicatedBlacklistRuleV1TimeoutsArgs
Import
Dedicated WAF Blacklist Rules can be imported using policy_id/id
, e.g.
$ pulumi import opentelekomcloud:index/wafDedicatedBlacklistRuleV1:WafDedicatedBlacklistRuleV1 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.