1. Packages
  2. OVH
  3. API Docs
  4. Ip
  5. getFirewallRule
OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud

ovh.Ip.getFirewallRule

Explore with Pulumi AI

ovh logo
OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud

    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
    IpOnFirewall string
    IPv4 address
    Sequence double
    Rule position in the rules array
    Ip string
    The IP or the CIDR
    IpOnFirewall string
    IPv4 address
    Sequence float64
    Rule position in the rules array
    ip String
    The IP or the CIDR
    ipOnFirewall String
    IPv4 address
    sequence Double
    Rule position in the rules array
    ip string
    The IP or the CIDR
    ipOnFirewall string
    IPv4 address
    sequence number
    Rule position in the rules array
    ip str
    The IP or the CIDR
    ip_on_firewall str
    IPv4 address
    sequence float
    Rule position in the rules array
    ip String
    The IP or the CIDR
    ipOnFirewall String
    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)
    CreationDate string
    Creation date of the rule
    Destination string
    Destination IP for your rule
    DestinationPort 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
    IpOnFirewall string
    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)
    SourcePort string
    Source port for your rule. Only with TCP/UDP protocol
    State string
    Current state of your rule
    TcpOption string
    TCP option on your rule (syn|established)
    Action string
    Possible values for action (deny|permit)
    CreationDate string
    Creation date of the rule
    Destination string
    Destination IP for your rule
    DestinationPort 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
    IpOnFirewall string
    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)
    SourcePort string
    Source port for your rule. Only with TCP/UDP protocol
    State string
    Current state of your rule
    TcpOption string
    TCP option on your rule (syn|established)
    action String
    Possible values for action (deny|permit)
    creationDate String
    Creation date of the rule
    destination String
    Destination IP for your rule
    destinationPort 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
    ipOnFirewall String
    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)
    sourcePort String
    Source port for your rule. Only with TCP/UDP protocol
    state String
    Current state of your rule
    tcpOption String
    TCP option on your rule (syn|established)
    action string
    Possible values for action (deny|permit)
    creationDate string
    Creation date of the rule
    destination string
    Destination IP for your rule
    destinationPort 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
    ipOnFirewall string
    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)
    sourcePort string
    Source port for your rule. Only with TCP/UDP protocol
    state string
    Current state of your rule
    tcpOption 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_firewall str
    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)
    creationDate String
    Creation date of the rule
    destination String
    Destination IP for your rule
    destinationPort 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
    ipOnFirewall String
    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)
    sourcePort String
    Source port for your rule. Only with TCP/UDP protocol
    state String
    Current state of your rule
    tcpOption 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.
    ovh logo
    OVHCloud v0.50.0 published on Friday, Sep 20, 2024 by OVHcloud