flexibleengine.WafRuleBlacklist
Explore with Pulumi AI
Manages a WAF blacklist and whitelist rule resource within FlexibleEngine.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const policy1 = new flexibleengine.WafPolicy("policy1", {});
const rule1 = new flexibleengine.WafRuleBlacklist("rule1", {
policyId: policy1.wafPolicyId,
address: "192.168.0.0/24",
});
import pulumi
import pulumi_flexibleengine as flexibleengine
policy1 = flexibleengine.WafPolicy("policy1")
rule1 = flexibleengine.WafRuleBlacklist("rule1",
policy_id=policy1.waf_policy_id,
address="192.168.0.0/24")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
policy1, err := flexibleengine.NewWafPolicy(ctx, "policy1", nil)
if err != nil {
return err
}
_, err = flexibleengine.NewWafRuleBlacklist(ctx, "rule1", &flexibleengine.WafRuleBlacklistArgs{
PolicyId: policy1.WafPolicyId,
Address: pulumi.String("192.168.0.0/24"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var policy1 = new Flexibleengine.WafPolicy("policy1");
var rule1 = new Flexibleengine.WafRuleBlacklist("rule1", new()
{
PolicyId = policy1.WafPolicyId,
Address = "192.168.0.0/24",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.WafPolicy;
import com.pulumi.flexibleengine.WafRuleBlacklist;
import com.pulumi.flexibleengine.WafRuleBlacklistArgs;
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 WafPolicy("policy1");
var rule1 = new WafRuleBlacklist("rule1", WafRuleBlacklistArgs.builder()
.policyId(policy1.wafPolicyId())
.address("192.168.0.0/24")
.build());
}
}
resources:
policy1:
type: flexibleengine:WafPolicy
rule1:
type: flexibleengine:WafRuleBlacklist
properties:
policyId: ${policy1.wafPolicyId}
address: 192.168.0.0/24
Create WafRuleBlacklist Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WafRuleBlacklist(name: string, args: WafRuleBlacklistArgs, opts?: CustomResourceOptions);
@overload
def WafRuleBlacklist(resource_name: str,
args: WafRuleBlacklistArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WafRuleBlacklist(resource_name: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
policy_id: Optional[str] = None,
action: Optional[float] = None,
waf_rule_blacklist_id: Optional[str] = None)
func NewWafRuleBlacklist(ctx *Context, name string, args WafRuleBlacklistArgs, opts ...ResourceOption) (*WafRuleBlacklist, error)
public WafRuleBlacklist(string name, WafRuleBlacklistArgs args, CustomResourceOptions? opts = null)
public WafRuleBlacklist(String name, WafRuleBlacklistArgs args)
public WafRuleBlacklist(String name, WafRuleBlacklistArgs args, CustomResourceOptions options)
type: flexibleengine:WafRuleBlacklist
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 WafRuleBlacklistArgs
- 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 WafRuleBlacklistArgs
- 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 WafRuleBlacklistArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WafRuleBlacklistArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WafRuleBlacklistArgs
- 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 wafRuleBlacklistResource = new Flexibleengine.WafRuleBlacklist("wafRuleBlacklistResource", new()
{
Address = "string",
PolicyId = "string",
Action = 0,
WafRuleBlacklistId = "string",
});
example, err := flexibleengine.NewWafRuleBlacklist(ctx, "wafRuleBlacklistResource", &flexibleengine.WafRuleBlacklistArgs{
Address: pulumi.String("string"),
PolicyId: pulumi.String("string"),
Action: pulumi.Float64(0),
WafRuleBlacklistId: pulumi.String("string"),
})
var wafRuleBlacklistResource = new WafRuleBlacklist("wafRuleBlacklistResource", WafRuleBlacklistArgs.builder()
.address("string")
.policyId("string")
.action(0)
.wafRuleBlacklistId("string")
.build());
waf_rule_blacklist_resource = flexibleengine.WafRuleBlacklist("wafRuleBlacklistResource",
address="string",
policy_id="string",
action=0,
waf_rule_blacklist_id="string")
const wafRuleBlacklistResource = new flexibleengine.WafRuleBlacklist("wafRuleBlacklistResource", {
address: "string",
policyId: "string",
action: 0,
wafRuleBlacklistId: "string",
});
type: flexibleengine:WafRuleBlacklist
properties:
action: 0
address: string
policyId: string
wafRuleBlacklistId: string
WafRuleBlacklist 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 WafRuleBlacklist resource accepts the following input properties:
- Address string
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Action double
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- Waf
Rule stringBlacklist Id - The rule ID in UUID format.
- Address string
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Action float64
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- Waf
Rule stringBlacklist Id - The rule ID in UUID format.
- address String
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- action Double
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- waf
Rule StringBlacklist Id - The rule ID in UUID format.
- address string
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- action number
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- waf
Rule stringBlacklist Id - The rule ID in UUID format.
- address str
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- policy_
id str - Specifies the WAF policy ID. Changing this creates a new rule.
- action float
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- waf_
rule_ strblacklist_ id - The rule ID in UUID format.
- address String
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- action Number
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- waf
Rule StringBlacklist Id - The rule ID in UUID format.
Outputs
All input properties are implicitly available as output properties. Additionally, the WafRuleBlacklist 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 WafRuleBlacklist Resource
Get an existing WafRuleBlacklist 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?: WafRuleBlacklistState, opts?: CustomResourceOptions): WafRuleBlacklist
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[float] = None,
address: Optional[str] = None,
policy_id: Optional[str] = None,
waf_rule_blacklist_id: Optional[str] = None) -> WafRuleBlacklist
func GetWafRuleBlacklist(ctx *Context, name string, id IDInput, state *WafRuleBlacklistState, opts ...ResourceOption) (*WafRuleBlacklist, error)
public static WafRuleBlacklist Get(string name, Input<string> id, WafRuleBlacklistState? state, CustomResourceOptions? opts = null)
public static WafRuleBlacklist get(String name, Output<String> id, WafRuleBlacklistState state, CustomResourceOptions options)
resources: _: type: flexibleengine:WafRuleBlacklist 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
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- Address string
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Waf
Rule stringBlacklist Id - The rule ID in UUID format.
- Action float64
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- Address string
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- Policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- Waf
Rule stringBlacklist Id - The rule ID in UUID format.
- action Double
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- address String
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- waf
Rule StringBlacklist Id - The rule ID in UUID format.
- action number
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- address string
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- policy
Id string - Specifies the WAF policy ID. Changing this creates a new rule.
- waf
Rule stringBlacklist Id - The rule ID in UUID format.
- action float
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- address str
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- policy_
id str - Specifies the WAF policy ID. Changing this creates a new rule.
- waf_
rule_ strblacklist_ id - The rule ID in UUID format.
- action Number
- Specifies the protective action. 1: Whitelist, 0: Blacklist. If you do not configure the parameter, the value is Blacklist by default.
- address String
- Specifies the IP address or range. For example, 192.168.0.125 or 192.168.0.0/24.
- policy
Id String - Specifies the WAF policy ID. Changing this creates a new rule.
- waf
Rule StringBlacklist Id - The rule ID in UUID format.
Import
Blacklist Rules can be imported using the policy ID and rule ID
separated by a slash, e.g.:
$ pulumi import flexibleengine:index/wafRuleBlacklist:WafRuleBlacklist rule_1 523083f4543c497faecd25fcfcc0b2a0/e7f49f736bc74b828ce45e0e5c49d156
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.