1. Packages
  2. Hetzner Cloud
  3. API Docs
  4. getFirewalls
Hetzner Cloud v1.19.1 published on Friday, May 10, 2024 by Pulumi

hcloud.getFirewalls

Explore with Pulumi AI

hcloud logo
Hetzner Cloud v1.19.1 published on Friday, May 10, 2024 by Pulumi

    Provides details about multiple Hetzner Cloud Firewall.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hcloud from "@pulumi/hcloud";
    
    const sampleFirewall1 = hcloud.getFirewalls({
        withSelector: "key=value",
    });
    
    import pulumi
    import pulumi_hcloud as hcloud
    
    sample_firewall1 = hcloud.get_firewalls(with_selector="key=value")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hcloud.GetFirewalls(ctx, &hcloud.GetFirewallsArgs{
    			WithSelector: pulumi.StringRef("key=value"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using HCloud = Pulumi.HCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var sampleFirewall1 = HCloud.GetFirewalls.Invoke(new()
        {
            WithSelector = "key=value",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hcloud.HcloudFunctions;
    import com.pulumi.hcloud.inputs.GetFirewallsArgs;
    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 sampleFirewall1 = HcloudFunctions.getFirewalls(GetFirewallsArgs.builder()
                .withSelector("key=value")
                .build());
    
        }
    }
    
    variables:
      sampleFirewall1:
        fn::invoke:
          Function: hcloud:getFirewalls
          Arguments:
            withSelector: key=value
    

    Using getFirewalls

    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 getFirewalls(args: GetFirewallsArgs, opts?: InvokeOptions): Promise<GetFirewallsResult>
    function getFirewallsOutput(args: GetFirewallsOutputArgs, opts?: InvokeOptions): Output<GetFirewallsResult>
    def get_firewalls(most_recent: Optional[bool] = None,
                      with_selector: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetFirewallsResult
    def get_firewalls_output(most_recent: Optional[pulumi.Input[bool]] = None,
                      with_selector: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetFirewallsResult]
    func GetFirewalls(ctx *Context, args *GetFirewallsArgs, opts ...InvokeOption) (*GetFirewallsResult, error)
    func GetFirewallsOutput(ctx *Context, args *GetFirewallsOutputArgs, opts ...InvokeOption) GetFirewallsResultOutput

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

    public static class GetFirewalls 
    {
        public static Task<GetFirewallsResult> InvokeAsync(GetFirewallsArgs args, InvokeOptions? opts = null)
        public static Output<GetFirewallsResult> Invoke(GetFirewallsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFirewallsResult> getFirewalls(GetFirewallsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: hcloud:index/getFirewalls:getFirewalls
      arguments:
        # arguments dictionary

    The following arguments are supported:

    MostRecent bool
    Sorts list by date.
    WithSelector string
    Label selector
    MostRecent bool
    Sorts list by date.
    WithSelector string
    Label selector
    mostRecent Boolean
    Sorts list by date.
    withSelector String
    Label selector
    mostRecent boolean
    Sorts list by date.
    withSelector string
    Label selector
    most_recent bool
    Sorts list by date.
    with_selector str
    Label selector
    mostRecent Boolean
    Sorts list by date.
    withSelector String
    Label selector

    getFirewalls Result

    The following output properties are available:

    Firewalls List<Pulumi.HCloud.Outputs.GetFirewallsFirewall>
    (list) List of all matching firewalls. See data.hcloud_firewall for schema.
    Id string
    The provider-assigned unique ID for this managed resource.
    MostRecent bool
    WithSelector string
    Firewalls []GetFirewallsFirewall
    (list) List of all matching firewalls. See data.hcloud_firewall for schema.
    Id string
    The provider-assigned unique ID for this managed resource.
    MostRecent bool
    WithSelector string
    firewalls List<GetFirewallsFirewall>
    (list) List of all matching firewalls. See data.hcloud_firewall for schema.
    id String
    The provider-assigned unique ID for this managed resource.
    mostRecent Boolean
    withSelector String
    firewalls GetFirewallsFirewall[]
    (list) List of all matching firewalls. See data.hcloud_firewall for schema.
    id string
    The provider-assigned unique ID for this managed resource.
    mostRecent boolean
    withSelector string
    firewalls Sequence[GetFirewallsFirewall]
    (list) List of all matching firewalls. See data.hcloud_firewall for schema.
    id str
    The provider-assigned unique ID for this managed resource.
    most_recent bool
    with_selector str
    firewalls List<Property Map>
    (list) List of all matching firewalls. See data.hcloud_firewall for schema.
    id String
    The provider-assigned unique ID for this managed resource.
    mostRecent Boolean
    withSelector String

    Supporting Types

    GetFirewallsFirewall

    GetFirewallsFirewallApplyTo

    labelSelector String
    server Integer
    labelSelector string
    server number
    labelSelector String
    server Number

    GetFirewallsFirewallRule

    Direction string
    Description string
    DestinationIps List<string>
    Port string
    Protocol string
    SourceIps List<string>
    Direction string
    Description string
    DestinationIps []string
    Port string
    Protocol string
    SourceIps []string
    direction String
    description String
    destinationIps List<String>
    port String
    protocol String
    sourceIps List<String>
    direction string
    description string
    destinationIps string[]
    port string
    protocol string
    sourceIps string[]
    direction str
    description str
    destination_ips Sequence[str]
    port str
    protocol str
    source_ips Sequence[str]
    direction String
    description String
    destinationIps List<String>
    port String
    protocol String
    sourceIps List<String>

    Package Details

    Repository
    Hetzner Cloud pulumi/pulumi-hcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the hcloud Terraform Provider.
    hcloud logo
    Hetzner Cloud v1.19.1 published on Friday, May 10, 2024 by Pulumi