OVHCloud v0.45.0 published on Tuesday, Jun 4, 2024 by OVHcloud
ovh.Ip.getFirewallRule
Explore with Pulumi AI
Use this data source to retrieve information about a rule on an IP firewall.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";
const myfirewallrule = ovh.Ip.getFirewallRule({
ip: "XXXXXX",
ipOnFirewall: "XXXXXX",
sequence: 0,
});
import pulumi
import pulumi_ovh as ovh
myfirewallrule = ovh.Ip.get_firewall_rule(ip="XXXXXX",
ip_on_firewall="XXXXXX",
sequence=0)
package main
import (
"github.com/ovh/pulumi-ovh/sdk/go/ovh/Ip"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Ip.GetFirewallRule(ctx, &ip.GetFirewallRuleArgs{
Ip: "XXXXXX",
IpOnFirewall: "XXXXXX",
Sequence: 0,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;
return await Deployment.RunAsync(() =>
{
var myfirewallrule = Ovh.Ip.GetFirewallRule.Invoke(new()
{
Ip = "XXXXXX",
IpOnFirewall = "XXXXXX",
Sequence = 0,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ovh.Ip.IpFunctions;
import com.pulumi.ovh.Ip.inputs.GetFirewallRuleArgs;
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) {
final var myfirewallrule = IpFunctions.getFirewallRule(GetFirewallRuleArgs.builder()
.ip("XXXXXX")
.ipOnFirewall("XXXXXX")
.sequence(0)
.build());
}
}
variables:
myfirewallrule:
fn::invoke:
Function: ovh:Ip:getFirewallRule
Arguments:
ip: XXXXXX
ipOnFirewall: XXXXXX
sequence: 0
Using getFirewallRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getFirewallRule(args: GetFirewallRuleArgs, opts?: InvokeOptions): Promise<GetFirewallRuleResult>
function getFirewallRuleOutput(args: GetFirewallRuleOutputArgs, opts?: InvokeOptions): Output<GetFirewallRuleResult>
def get_firewall_rule(ip: Optional[str] = None,
ip_on_firewall: Optional[str] = None,
sequence: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetFirewallRuleResult
def get_firewall_rule_output(ip: Optional[pulumi.Input[str]] = None,
ip_on_firewall: Optional[pulumi.Input[str]] = None,
sequence: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFirewallRuleResult]
func GetFirewallRule(ctx *Context, args *GetFirewallRuleArgs, opts ...InvokeOption) (*GetFirewallRuleResult, error)
func GetFirewallRuleOutput(ctx *Context, args *GetFirewallRuleOutputArgs, opts ...InvokeOption) GetFirewallRuleResultOutput
> Note: This function is named GetFirewallRule
in the Go SDK.
public static class GetFirewallRule
{
public static Task<GetFirewallRuleResult> InvokeAsync(GetFirewallRuleArgs args, InvokeOptions? opts = null)
public static Output<GetFirewallRuleResult> Invoke(GetFirewallRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFirewallRuleResult> getFirewallRule(GetFirewallRuleArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ovh:Ip/getFirewallRule:getFirewallRule
arguments:
# arguments dictionary
The following arguments are supported:
- Ip string
- The IP or the CIDR
- Ip
On stringFirewall - IPv4 address
- Sequence double
- Rule position in the rules array
- Ip string
- The IP or the CIDR
- Ip
On stringFirewall - IPv4 address
- Sequence float64
- Rule position in the rules array
- ip String
- The IP or the CIDR
- ip
On StringFirewall - IPv4 address
- sequence Double
- Rule position in the rules array
- ip string
- The IP or the CIDR
- ip
On stringFirewall - IPv4 address
- sequence number
- Rule position in the rules array
- ip str
- The IP or the CIDR
- ip_
on_ strfirewall - IPv4 address
- sequence float
- Rule position in the rules array
- ip String
- The IP or the CIDR
- ip
On StringFirewall - IPv4 address
- sequence Number
- Rule position in the rules array
getFirewallRule Result
The following output properties are available:
- Action string
- Possible values for action (deny|permit)
- Creation
Date string - Creation date of the rule
- Destination string
- Destination IP for your rule
- Destination
Port string - Destination port for your rule. Only with TCP/UDP protocol
- Fragments bool
- Fragments option
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip string
- The IP or the CIDR
- Ip
On stringFirewall - IPv4 address
- Protocol string
- Possible values for protocol (ah|esp|gre|icmp|ipv4|tcp|udp)
- Rule string
- Description of the rule
- Sequence double
- Rule position in the rules array
- Source string
- IPv4 CIDR notation (e.g., 192.0.2.0/24)
- Source
Port string - Source port for your rule. Only with TCP/UDP protocol
- State string
- Current state of your rule
- Tcp
Option string - TCP option on your rule (syn|established)
- Action string
- Possible values for action (deny|permit)
- Creation
Date string - Creation date of the rule
- Destination string
- Destination IP for your rule
- Destination
Port string - Destination port for your rule. Only with TCP/UDP protocol
- Fragments bool
- Fragments option
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip string
- The IP or the CIDR
- Ip
On stringFirewall - IPv4 address
- Protocol string
- Possible values for protocol (ah|esp|gre|icmp|ipv4|tcp|udp)
- Rule string
- Description of the rule
- Sequence float64
- Rule position in the rules array
- Source string
- IPv4 CIDR notation (e.g., 192.0.2.0/24)
- Source
Port string - Source port for your rule. Only with TCP/UDP protocol
- State string
- Current state of your rule
- Tcp
Option string - TCP option on your rule (syn|established)
- action String
- Possible values for action (deny|permit)
- creation
Date String - Creation date of the rule
- destination String
- Destination IP for your rule
- destination
Port String - Destination port for your rule. Only with TCP/UDP protocol
- fragments Boolean
- Fragments option
- id String
- The provider-assigned unique ID for this managed resource.
- ip String
- The IP or the CIDR
- ip
On StringFirewall - IPv4 address
- protocol String
- Possible values for protocol (ah|esp|gre|icmp|ipv4|tcp|udp)
- rule String
- Description of the rule
- sequence Double
- Rule position in the rules array
- source String
- IPv4 CIDR notation (e.g., 192.0.2.0/24)
- source
Port String - Source port for your rule. Only with TCP/UDP protocol
- state String
- Current state of your rule
- tcp
Option String - TCP option on your rule (syn|established)
- action string
- Possible values for action (deny|permit)
- creation
Date string - Creation date of the rule
- destination string
- Destination IP for your rule
- destination
Port string - Destination port for your rule. Only with TCP/UDP protocol
- fragments boolean
- Fragments option
- id string
- The provider-assigned unique ID for this managed resource.
- ip string
- The IP or the CIDR
- ip
On stringFirewall - IPv4 address
- protocol string
- Possible values for protocol (ah|esp|gre|icmp|ipv4|tcp|udp)
- rule string
- Description of the rule
- sequence number
- Rule position in the rules array
- source string
- IPv4 CIDR notation (e.g., 192.0.2.0/24)
- source
Port string - Source port for your rule. Only with TCP/UDP protocol
- state string
- Current state of your rule
- tcp
Option string - TCP option on your rule (syn|established)
- action str
- Possible values for action (deny|permit)
- creation_
date str - Creation date of the rule
- destination str
- Destination IP for your rule
- destination_
port str - Destination port for your rule. Only with TCP/UDP protocol
- fragments bool
- Fragments option
- id str
- The provider-assigned unique ID for this managed resource.
- ip str
- The IP or the CIDR
- ip_
on_ strfirewall - IPv4 address
- protocol str
- Possible values for protocol (ah|esp|gre|icmp|ipv4|tcp|udp)
- rule str
- Description of the rule
- sequence float
- Rule position in the rules array
- source str
- IPv4 CIDR notation (e.g., 192.0.2.0/24)
- source_
port str - Source port for your rule. Only with TCP/UDP protocol
- state str
- Current state of your rule
- tcp_
option str - TCP option on your rule (syn|established)
- action String
- Possible values for action (deny|permit)
- creation
Date String - Creation date of the rule
- destination String
- Destination IP for your rule
- destination
Port String - Destination port for your rule. Only with TCP/UDP protocol
- fragments Boolean
- Fragments option
- id String
- The provider-assigned unique ID for this managed resource.
- ip String
- The IP or the CIDR
- ip
On StringFirewall - IPv4 address
- protocol String
- Possible values for protocol (ah|esp|gre|icmp|ipv4|tcp|udp)
- rule String
- Description of the rule
- sequence Number
- Rule position in the rules array
- source String
- IPv4 CIDR notation (e.g., 192.0.2.0/24)
- source
Port String - Source port for your rule. Only with TCP/UDP protocol
- state String
- Current state of your rule
- tcp
Option String - TCP option on your rule (syn|established)
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovh
Terraform Provider.