1. Packages
  2. Linode
  3. API Docs
  4. getFirewall
Linode v4.23.0 published on Thursday, Jul 18, 2024 by Pulumi

linode.getFirewall

Explore with Pulumi AI

linode logo
Linode v4.23.0 published on Thursday, Jul 18, 2024 by Pulumi

    Provides details about a Linode Firewall. For more information, see the Linode APIv4 docs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as linode from "@pulumi/linode";
    
    const my-firewall = linode.getFirewall({
        id: 123,
    });
    
    import pulumi
    import pulumi_linode as linode
    
    my_firewall = linode.get_firewall(id=123)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := linode.LookupFirewall(ctx, &linode.LookupFirewallArgs{
    			Id: 123,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Linode = Pulumi.Linode;
    
    return await Deployment.RunAsync(() => 
    {
        var my_firewall = Linode.GetFirewall.Invoke(new()
        {
            Id = 123,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.linode.LinodeFunctions;
    import com.pulumi.linode.inputs.GetFirewallArgs;
    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 my-firewall = LinodeFunctions.getFirewall(GetFirewallArgs.builder()
                .id(123)
                .build());
    
        }
    }
    
    variables:
      my-firewall:
        fn::invoke:
          Function: linode:getFirewall
          Arguments:
            id: 123
    

    Using getFirewall

    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 getFirewall(args: GetFirewallArgs, opts?: InvokeOptions): Promise<GetFirewallResult>
    function getFirewallOutput(args: GetFirewallOutputArgs, opts?: InvokeOptions): Output<GetFirewallResult>
    def get_firewall(id: Optional[int] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFirewallResult
    def get_firewall_output(id: Optional[pulumi.Input[int]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetFirewallResult]
    func LookupFirewall(ctx *Context, args *LookupFirewallArgs, opts ...InvokeOption) (*LookupFirewallResult, error)
    func LookupFirewallOutput(ctx *Context, args *LookupFirewallOutputArgs, opts ...InvokeOption) LookupFirewallResultOutput

    > Note: This function is named LookupFirewall in the Go SDK.

    public static class GetFirewall 
    {
        public static Task<GetFirewallResult> InvokeAsync(GetFirewallArgs args, InvokeOptions? opts = null)
        public static Output<GetFirewallResult> Invoke(GetFirewallInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFirewallResult> getFirewall(GetFirewallArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: linode:index/getFirewall:getFirewall
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id int
    The Firewall's ID.
    Id int
    The Firewall's ID.
    id Integer
    The Firewall's ID.
    id number
    The Firewall's ID.
    id int
    The Firewall's ID.
    id Number
    The Firewall's ID.

    getFirewall Result

    The following output properties are available:

    Created string
    When this firewall was created.
    Devices List<GetFirewallDevice>
    Disabled bool
    If true, the firewall is inactive.
    Id int
    The ID of the Firewall Device.
    InboundPolicy string
    The default behavior for inbound traffic. (ACCEPT, DROP)
    Inbounds List<GetFirewallInbound>
    Label string
    The label of the underlying entity this device references.
    Linodes List<int>
    The IDs of Linodes assigned to this Firewall.
    Nodebalancers List<int>
    The IDs of NodeBalancers assigned to this Firewall.
    OutboundPolicy string
    The default behavior for outbound traffic. (ACCEPT, DROP)
    Outbounds List<GetFirewallOutbound>
    Status string
    The status of the firewall. (enabled, disabled, deleted)
    Tags List<string>
    The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
    Updated string
    When this firewall was last updated.
    Created string
    When this firewall was created.
    Devices []GetFirewallDeviceType
    Disabled bool
    If true, the firewall is inactive.
    Id int
    The ID of the Firewall Device.
    InboundPolicy string
    The default behavior for inbound traffic. (ACCEPT, DROP)
    Inbounds []GetFirewallInbound
    Label string
    The label of the underlying entity this device references.
    Linodes []int
    The IDs of Linodes assigned to this Firewall.
    Nodebalancers []int
    The IDs of NodeBalancers assigned to this Firewall.
    OutboundPolicy string
    The default behavior for outbound traffic. (ACCEPT, DROP)
    Outbounds []GetFirewallOutbound
    Status string
    The status of the firewall. (enabled, disabled, deleted)
    Tags []string
    The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
    Updated string
    When this firewall was last updated.
    created String
    When this firewall was created.
    devices List<GetFirewallDevice>
    disabled Boolean
    If true, the firewall is inactive.
    id Integer
    The ID of the Firewall Device.
    inboundPolicy String
    The default behavior for inbound traffic. (ACCEPT, DROP)
    inbounds List<GetFirewallInbound>
    label String
    The label of the underlying entity this device references.
    linodes List<Integer>
    The IDs of Linodes assigned to this Firewall.
    nodebalancers List<Integer>
    The IDs of NodeBalancers assigned to this Firewall.
    outboundPolicy String
    The default behavior for outbound traffic. (ACCEPT, DROP)
    outbounds List<GetFirewallOutbound>
    status String
    The status of the firewall. (enabled, disabled, deleted)
    tags List<String>
    The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
    updated String
    When this firewall was last updated.
    created string
    When this firewall was created.
    devices GetFirewallDevice[]
    disabled boolean
    If true, the firewall is inactive.
    id number
    The ID of the Firewall Device.
    inboundPolicy string
    The default behavior for inbound traffic. (ACCEPT, DROP)
    inbounds GetFirewallInbound[]
    label string
    The label of the underlying entity this device references.
    linodes number[]
    The IDs of Linodes assigned to this Firewall.
    nodebalancers number[]
    The IDs of NodeBalancers assigned to this Firewall.
    outboundPolicy string
    The default behavior for outbound traffic. (ACCEPT, DROP)
    outbounds GetFirewallOutbound[]
    status string
    The status of the firewall. (enabled, disabled, deleted)
    tags string[]
    The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
    updated string
    When this firewall was last updated.
    created str
    When this firewall was created.
    devices Sequence[GetFirewallDevice]
    disabled bool
    If true, the firewall is inactive.
    id int
    The ID of the Firewall Device.
    inbound_policy str
    The default behavior for inbound traffic. (ACCEPT, DROP)
    inbounds Sequence[GetFirewallInbound]
    label str
    The label of the underlying entity this device references.
    linodes Sequence[int]
    The IDs of Linodes assigned to this Firewall.
    nodebalancers Sequence[int]
    The IDs of NodeBalancers assigned to this Firewall.
    outbound_policy str
    The default behavior for outbound traffic. (ACCEPT, DROP)
    outbounds Sequence[GetFirewallOutbound]
    status str
    The status of the firewall. (enabled, disabled, deleted)
    tags Sequence[str]
    The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
    updated str
    When this firewall was last updated.
    created String
    When this firewall was created.
    devices List<Property Map>
    disabled Boolean
    If true, the firewall is inactive.
    id Number
    The ID of the Firewall Device.
    inboundPolicy String
    The default behavior for inbound traffic. (ACCEPT, DROP)
    inbounds List<Property Map>
    label String
    The label of the underlying entity this device references.
    linodes List<Number>
    The IDs of Linodes assigned to this Firewall.
    nodebalancers List<Number>
    The IDs of NodeBalancers assigned to this Firewall.
    outboundPolicy String
    The default behavior for outbound traffic. (ACCEPT, DROP)
    outbounds List<Property Map>
    status String
    The status of the firewall. (enabled, disabled, deleted)
    tags List<String>
    The tags applied to the firewall. Tags are case-insensitive and are for organizational purposes only.
    updated String
    When this firewall was last updated.

    Supporting Types

    GetFirewallDevice

    EntityId int
    The ID of the underlying entity this device references (i.e. the Linode's ID).
    Id int
    The Firewall's ID.
    Label string
    The label of the underlying entity this device references.
    Type string
    The type of Firewall Device.
    Url string
    The URL of the underlying entity this device references.
    EntityId int
    The ID of the underlying entity this device references (i.e. the Linode's ID).
    Id int
    The Firewall's ID.
    Label string
    The label of the underlying entity this device references.
    Type string
    The type of Firewall Device.
    Url string
    The URL of the underlying entity this device references.
    entityId Integer
    The ID of the underlying entity this device references (i.e. the Linode's ID).
    id Integer
    The Firewall's ID.
    label String
    The label of the underlying entity this device references.
    type String
    The type of Firewall Device.
    url String
    The URL of the underlying entity this device references.
    entityId number
    The ID of the underlying entity this device references (i.e. the Linode's ID).
    id number
    The Firewall's ID.
    label string
    The label of the underlying entity this device references.
    type string
    The type of Firewall Device.
    url string
    The URL of the underlying entity this device references.
    entity_id int
    The ID of the underlying entity this device references (i.e. the Linode's ID).
    id int
    The Firewall's ID.
    label str
    The label of the underlying entity this device references.
    type str
    The type of Firewall Device.
    url str
    The URL of the underlying entity this device references.
    entityId Number
    The ID of the underlying entity this device references (i.e. the Linode's ID).
    id Number
    The Firewall's ID.
    label String
    The label of the underlying entity this device references.
    type String
    The type of Firewall Device.
    url String
    The URL of the underlying entity this device references.

    GetFirewallInbound

    Action string
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    Ipv4s List<string>
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    Ipv6s List<string>
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    Label string
    The label of the underlying entity this device references.
    Ports string
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    Protocol string
    The network protocol this rule controls. (TCP, UDP, ICMP)
    Action string
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    Ipv4s []string
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    Ipv6s []string
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    Label string
    The label of the underlying entity this device references.
    Ports string
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    Protocol string
    The network protocol this rule controls. (TCP, UDP, ICMP)
    action String
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    ipv4s List<String>
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    ipv6s List<String>
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    label String
    The label of the underlying entity this device references.
    ports String
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    protocol String
    The network protocol this rule controls. (TCP, UDP, ICMP)
    action string
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    ipv4s string[]
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    ipv6s string[]
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    label string
    The label of the underlying entity this device references.
    ports string
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    protocol string
    The network protocol this rule controls. (TCP, UDP, ICMP)
    action str
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    ipv4s Sequence[str]
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    ipv6s Sequence[str]
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    label str
    The label of the underlying entity this device references.
    ports str
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    protocol str
    The network protocol this rule controls. (TCP, UDP, ICMP)
    action String
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    ipv4s List<String>
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    ipv6s List<String>
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    label String
    The label of the underlying entity this device references.
    ports String
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    protocol String
    The network protocol this rule controls. (TCP, UDP, ICMP)

    GetFirewallOutbound

    Action string
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    Ipv4s List<string>
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    Ipv6s List<string>
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    Label string
    The label of the underlying entity this device references.
    Ports string
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    Protocol string
    The network protocol this rule controls. (TCP, UDP, ICMP)
    Action string
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    Ipv4s []string
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    Ipv6s []string
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    Label string
    The label of the underlying entity this device references.
    Ports string
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    Protocol string
    The network protocol this rule controls. (TCP, UDP, ICMP)
    action String
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    ipv4s List<String>
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    ipv6s List<String>
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    label String
    The label of the underlying entity this device references.
    ports String
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    protocol String
    The network protocol this rule controls. (TCP, UDP, ICMP)
    action string
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    ipv4s string[]
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    ipv6s string[]
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    label string
    The label of the underlying entity this device references.
    ports string
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    protocol string
    The network protocol this rule controls. (TCP, UDP, ICMP)
    action str
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    ipv4s Sequence[str]
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    ipv6s Sequence[str]
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    label str
    The label of the underlying entity this device references.
    ports str
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    protocol str
    The network protocol this rule controls. (TCP, UDP, ICMP)
    action String
    Controls whether traffic is accepted or dropped by this rule. Overrides the Firewall’s inbound_policy if this is an inbound rule, or the outbound_policy if this is an outbound rule.
    ipv4s List<String>
    A list of IPv4 addresses or networks. Must be in IP/mask format.
    ipv6s List<String>
    A list of IPv6 addresses or networks. Must be in IP/mask format.
    label String
    The label of the underlying entity this device references.
    ports String
    A string representation of ports and/or port ranges (i.e. "443" or "80-90, 91").
    protocol String
    The network protocol this rule controls. (TCP, UDP, ICMP)

    Package Details

    Repository
    Linode pulumi/pulumi-linode
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the linode Terraform Provider.
    linode logo
    Linode v4.23.0 published on Thursday, Jul 18, 2024 by Pulumi