gcore.WaapFirewallRule
Explore with Pulumi AI
Represent WAAP Firewall Rule
Create WaapFirewallRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WaapFirewallRule(name: string, args: WaapFirewallRuleArgs, opts?: CustomResourceOptions);
@overload
def WaapFirewallRule(resource_name: str,
args: WaapFirewallRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WaapFirewallRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[WaapFirewallRuleActionArgs] = None,
conditions: Optional[WaapFirewallRuleConditionsArgs] = None,
domain_id: Optional[float] = None,
enabled: Optional[bool] = None,
description: Optional[str] = None,
name: Optional[str] = None,
waap_firewall_rule_id: Optional[str] = None)
func NewWaapFirewallRule(ctx *Context, name string, args WaapFirewallRuleArgs, opts ...ResourceOption) (*WaapFirewallRule, error)
public WaapFirewallRule(string name, WaapFirewallRuleArgs args, CustomResourceOptions? opts = null)
public WaapFirewallRule(String name, WaapFirewallRuleArgs args)
public WaapFirewallRule(String name, WaapFirewallRuleArgs args, CustomResourceOptions options)
type: gcore:WaapFirewallRule
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 WaapFirewallRuleArgs
- 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 WaapFirewallRuleArgs
- 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 WaapFirewallRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WaapFirewallRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WaapFirewallRuleArgs
- 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 waapFirewallRuleResource = new Gcore.WaapFirewallRule("waapFirewallRuleResource", new()
{
Action = new Gcore.Inputs.WaapFirewallRuleActionArgs
{
Allow = false,
Block = new Gcore.Inputs.WaapFirewallRuleActionBlockArgs
{
ActionDuration = "string",
StatusCode = 0,
},
},
Conditions = new Gcore.Inputs.WaapFirewallRuleConditionsArgs
{
Ip = new Gcore.Inputs.WaapFirewallRuleConditionsIpArgs
{
IpAddress = "string",
Negation = false,
},
IpRange = new Gcore.Inputs.WaapFirewallRuleConditionsIpRangeArgs
{
LowerBound = "string",
UpperBound = "string",
Negation = false,
},
},
DomainId = 0,
Enabled = false,
Description = "string",
Name = "string",
WaapFirewallRuleId = "string",
});
example, err := gcore.NewWaapFirewallRule(ctx, "waapFirewallRuleResource", &gcore.WaapFirewallRuleArgs{
Action: &gcore.WaapFirewallRuleActionArgs{
Allow: pulumi.Bool(false),
Block: &gcore.WaapFirewallRuleActionBlockArgs{
ActionDuration: pulumi.String("string"),
StatusCode: pulumi.Float64(0),
},
},
Conditions: &gcore.WaapFirewallRuleConditionsArgs{
Ip: &gcore.WaapFirewallRuleConditionsIpArgs{
IpAddress: pulumi.String("string"),
Negation: pulumi.Bool(false),
},
IpRange: &gcore.WaapFirewallRuleConditionsIpRangeArgs{
LowerBound: pulumi.String("string"),
UpperBound: pulumi.String("string"),
Negation: pulumi.Bool(false),
},
},
DomainId: pulumi.Float64(0),
Enabled: pulumi.Bool(false),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
WaapFirewallRuleId: pulumi.String("string"),
})
var waapFirewallRuleResource = new WaapFirewallRule("waapFirewallRuleResource", WaapFirewallRuleArgs.builder()
.action(WaapFirewallRuleActionArgs.builder()
.allow(false)
.block(WaapFirewallRuleActionBlockArgs.builder()
.actionDuration("string")
.statusCode(0.0)
.build())
.build())
.conditions(WaapFirewallRuleConditionsArgs.builder()
.ip(WaapFirewallRuleConditionsIpArgs.builder()
.ipAddress("string")
.negation(false)
.build())
.ipRange(WaapFirewallRuleConditionsIpRangeArgs.builder()
.lowerBound("string")
.upperBound("string")
.negation(false)
.build())
.build())
.domainId(0.0)
.enabled(false)
.description("string")
.name("string")
.waapFirewallRuleId("string")
.build());
waap_firewall_rule_resource = gcore.WaapFirewallRule("waapFirewallRuleResource",
action={
"allow": False,
"block": {
"action_duration": "string",
"status_code": 0,
},
},
conditions={
"ip": {
"ip_address": "string",
"negation": False,
},
"ip_range": {
"lower_bound": "string",
"upper_bound": "string",
"negation": False,
},
},
domain_id=0,
enabled=False,
description="string",
name="string",
waap_firewall_rule_id="string")
const waapFirewallRuleResource = new gcore.WaapFirewallRule("waapFirewallRuleResource", {
action: {
allow: false,
block: {
actionDuration: "string",
statusCode: 0,
},
},
conditions: {
ip: {
ipAddress: "string",
negation: false,
},
ipRange: {
lowerBound: "string",
upperBound: "string",
negation: false,
},
},
domainId: 0,
enabled: false,
description: "string",
name: "string",
waapFirewallRuleId: "string",
});
type: gcore:WaapFirewallRule
properties:
action:
allow: false
block:
actionDuration: string
statusCode: 0
conditions:
ip:
ipAddress: string
negation: false
ipRange:
lowerBound: string
negation: false
upperBound: string
description: string
domainId: 0
enabled: false
name: string
waapFirewallRuleId: string
WaapFirewallRule 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 WaapFirewallRule resource accepts the following input properties:
- Action
Waap
Firewall Rule Action - The action that the rule takes when triggered.
- Conditions
Waap
Firewall Rule Conditions - The condition required for the WAAP engine to trigger the rule.
- Domain
Id double - The WAAP domain ID for which the Firewall Rule is configured.
- Enabled bool
- Whether the rule is enabled.
- Description string
- Description of the firewall rule.
- Name string
- Name of the firewall rule.
- Waap
Firewall stringRule Id - The ID of this resource.
- Action
Waap
Firewall Rule Action Args - The action that the rule takes when triggered.
- Conditions
Waap
Firewall Rule Conditions Args - The condition required for the WAAP engine to trigger the rule.
- Domain
Id float64 - The WAAP domain ID for which the Firewall Rule is configured.
- Enabled bool
- Whether the rule is enabled.
- Description string
- Description of the firewall rule.
- Name string
- Name of the firewall rule.
- Waap
Firewall stringRule Id - The ID of this resource.
- action
Waap
Firewall Rule Action - The action that the rule takes when triggered.
- conditions
Waap
Firewall Rule Conditions - The condition required for the WAAP engine to trigger the rule.
- domain
Id Double - The WAAP domain ID for which the Firewall Rule is configured.
- enabled Boolean
- Whether the rule is enabled.
- description String
- Description of the firewall rule.
- name String
- Name of the firewall rule.
- waap
Firewall StringRule Id - The ID of this resource.
- action
Waap
Firewall Rule Action - The action that the rule takes when triggered.
- conditions
Waap
Firewall Rule Conditions - The condition required for the WAAP engine to trigger the rule.
- domain
Id number - The WAAP domain ID for which the Firewall Rule is configured.
- enabled boolean
- Whether the rule is enabled.
- description string
- Description of the firewall rule.
- name string
- Name of the firewall rule.
- waap
Firewall stringRule Id - The ID of this resource.
- action
Waap
Firewall Rule Action Args - The action that the rule takes when triggered.
- conditions
Waap
Firewall Rule Conditions Args - The condition required for the WAAP engine to trigger the rule.
- domain_
id float - The WAAP domain ID for which the Firewall Rule is configured.
- enabled bool
- Whether the rule is enabled.
- description str
- Description of the firewall rule.
- name str
- Name of the firewall rule.
- waap_
firewall_ strrule_ id - The ID of this resource.
- action Property Map
- The action that the rule takes when triggered.
- conditions Property Map
- The condition required for the WAAP engine to trigger the rule.
- domain
Id Number - The WAAP domain ID for which the Firewall Rule is configured.
- enabled Boolean
- Whether the rule is enabled.
- description String
- Description of the firewall rule.
- name String
- Name of the firewall rule.
- waap
Firewall StringRule Id - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the WaapFirewallRule 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 WaapFirewallRule Resource
Get an existing WaapFirewallRule 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?: WaapFirewallRuleState, opts?: CustomResourceOptions): WaapFirewallRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[WaapFirewallRuleActionArgs] = None,
conditions: Optional[WaapFirewallRuleConditionsArgs] = None,
description: Optional[str] = None,
domain_id: Optional[float] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
waap_firewall_rule_id: Optional[str] = None) -> WaapFirewallRule
func GetWaapFirewallRule(ctx *Context, name string, id IDInput, state *WaapFirewallRuleState, opts ...ResourceOption) (*WaapFirewallRule, error)
public static WaapFirewallRule Get(string name, Input<string> id, WaapFirewallRuleState? state, CustomResourceOptions? opts = null)
public static WaapFirewallRule get(String name, Output<String> id, WaapFirewallRuleState state, CustomResourceOptions options)
resources: _: type: gcore:WaapFirewallRule 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
Waap
Firewall Rule Action - The action that the rule takes when triggered.
- Conditions
Waap
Firewall Rule Conditions - The condition required for the WAAP engine to trigger the rule.
- Description string
- Description of the firewall rule.
- Domain
Id double - The WAAP domain ID for which the Firewall Rule is configured.
- Enabled bool
- Whether the rule is enabled.
- Name string
- Name of the firewall rule.
- Waap
Firewall stringRule Id - The ID of this resource.
- Action
Waap
Firewall Rule Action Args - The action that the rule takes when triggered.
- Conditions
Waap
Firewall Rule Conditions Args - The condition required for the WAAP engine to trigger the rule.
- Description string
- Description of the firewall rule.
- Domain
Id float64 - The WAAP domain ID for which the Firewall Rule is configured.
- Enabled bool
- Whether the rule is enabled.
- Name string
- Name of the firewall rule.
- Waap
Firewall stringRule Id - The ID of this resource.
- action
Waap
Firewall Rule Action - The action that the rule takes when triggered.
- conditions
Waap
Firewall Rule Conditions - The condition required for the WAAP engine to trigger the rule.
- description String
- Description of the firewall rule.
- domain
Id Double - The WAAP domain ID for which the Firewall Rule is configured.
- enabled Boolean
- Whether the rule is enabled.
- name String
- Name of the firewall rule.
- waap
Firewall StringRule Id - The ID of this resource.
- action
Waap
Firewall Rule Action - The action that the rule takes when triggered.
- conditions
Waap
Firewall Rule Conditions - The condition required for the WAAP engine to trigger the rule.
- description string
- Description of the firewall rule.
- domain
Id number - The WAAP domain ID for which the Firewall Rule is configured.
- enabled boolean
- Whether the rule is enabled.
- name string
- Name of the firewall rule.
- waap
Firewall stringRule Id - The ID of this resource.
- action
Waap
Firewall Rule Action Args - The action that the rule takes when triggered.
- conditions
Waap
Firewall Rule Conditions Args - The condition required for the WAAP engine to trigger the rule.
- description str
- Description of the firewall rule.
- domain_
id float - The WAAP domain ID for which the Firewall Rule is configured.
- enabled bool
- Whether the rule is enabled.
- name str
- Name of the firewall rule.
- waap_
firewall_ strrule_ id - The ID of this resource.
- action Property Map
- The action that the rule takes when triggered.
- conditions Property Map
- The condition required for the WAAP engine to trigger the rule.
- description String
- Description of the firewall rule.
- domain
Id Number - The WAAP domain ID for which the Firewall Rule is configured.
- enabled Boolean
- Whether the rule is enabled.
- name String
- Name of the firewall rule.
- waap
Firewall StringRule Id - The ID of this resource.
Supporting Types
WaapFirewallRuleAction, WaapFirewallRuleActionArgs
- Allow bool
- The WAAP allows the request.
- Block
Waap
Firewall Rule Action Block - The WAAP blocks the request.
- Allow bool
- The WAAP allows the request.
- Block
Waap
Firewall Rule Action Block - The WAAP blocks the request.
- allow Boolean
- The WAAP allows the request.
- block
Waap
Firewall Rule Action Block - The WAAP blocks the request.
- allow boolean
- The WAAP allows the request.
- block
Waap
Firewall Rule Action Block - The WAAP blocks the request.
- allow bool
- The WAAP allows the request.
- block
Waap
Firewall Rule Action Block - The WAAP blocks the request.
- allow Boolean
- The WAAP allows the request.
- block Property Map
- The WAAP blocks the request.
WaapFirewallRuleActionBlock, WaapFirewallRuleActionBlockArgs
- Action
Duration string - How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
- Status
Code double - A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
- Action
Duration string - How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
- Status
Code float64 - A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
- action
Duration String - How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
- status
Code Double - A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
- action
Duration string - How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
- status
Code number - A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
- action_
duration str - How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
- status_
code float - A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
- action
Duration String - How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
- status
Code Number - A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
WaapFirewallRuleConditions, WaapFirewallRuleConditionsArgs
- Ip
Waap
Firewall Rule Conditions Ip - IP address condition. This condition matches a single IP address.
- Ip
Range WaapFirewall Rule Conditions Ip Range - IP range condition. This condition matches a range of IP addresses.
- Ip
Waap
Firewall Rule Conditions Ip - IP address condition. This condition matches a single IP address.
- Ip
Range WaapFirewall Rule Conditions Ip Range - IP range condition. This condition matches a range of IP addresses.
- ip
Waap
Firewall Rule Conditions Ip - IP address condition. This condition matches a single IP address.
- ip
Range WaapFirewall Rule Conditions Ip Range - IP range condition. This condition matches a range of IP addresses.
- ip
Waap
Firewall Rule Conditions Ip - IP address condition. This condition matches a single IP address.
- ip
Range WaapFirewall Rule Conditions Ip Range - IP range condition. This condition matches a range of IP addresses.
- ip
Waap
Firewall Rule Conditions Ip - IP address condition. This condition matches a single IP address.
- ip_
range WaapFirewall Rule Conditions Ip Range - IP range condition. This condition matches a range of IP addresses.
- ip Property Map
- IP address condition. This condition matches a single IP address.
- ip
Range Property Map - IP range condition. This condition matches a range of IP addresses.
WaapFirewallRuleConditionsIp, WaapFirewallRuleConditionsIpArgs
- ip_
address str - A single IPv4 or IPv6 address to match.
- negation bool
- Whether or not to apply a boolean NOT operation to the rule's condition.
WaapFirewallRuleConditionsIpRange, WaapFirewallRuleConditionsIpRangeArgs
- Lower
Bound string - The lower bound IPv4 or IPv6 address to match against.
- Upper
Bound string - The upper bound IPv4 or IPv6 address to match against.
- Negation bool
- Whether or not to apply a boolean NOT operation to the rule's condition.
- Lower
Bound string - The lower bound IPv4 or IPv6 address to match against.
- Upper
Bound string - The upper bound IPv4 or IPv6 address to match against.
- Negation bool
- Whether or not to apply a boolean NOT operation to the rule's condition.
- lower
Bound String - The lower bound IPv4 or IPv6 address to match against.
- upper
Bound String - The upper bound IPv4 or IPv6 address to match against.
- negation Boolean
- Whether or not to apply a boolean NOT operation to the rule's condition.
- lower
Bound string - The lower bound IPv4 or IPv6 address to match against.
- upper
Bound string - The upper bound IPv4 or IPv6 address to match against.
- negation boolean
- Whether or not to apply a boolean NOT operation to the rule's condition.
- lower_
bound str - The lower bound IPv4 or IPv6 address to match against.
- upper_
bound str - The upper bound IPv4 or IPv6 address to match against.
- negation bool
- Whether or not to apply a boolean NOT operation to the rule's condition.
- lower
Bound String - The lower bound IPv4 or IPv6 address to match against.
- upper
Bound String - The upper bound IPv4 or IPv6 address to match against.
- negation Boolean
- Whether or not to apply a boolean NOT operation to the rule's condition.
Import
import using <domain_id>:<rule_id>
$ pulumi import gcore:index/waapFirewallRule:WaapFirewallRule firewall_rule 136578:912200
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcore
Terraform Provider.