Hetzner Cloud

v1.10.1 published on Wednesday, Aug 3, 2022 by Pulumi

getFirewalls

Provides details about multiple Hetzner Cloud Firewall.

Example Usage

using Pulumi;
using HCloud = Pulumi.HCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var sampleFirewall1 = Output.Create(HCloud.GetFirewalls.InvokeAsync(new HCloud.GetFirewallsArgs
        {
            WithSelector = "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, &GetFirewallsArgs{
			WithSelector: pulumi.StringRef("key=value"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var sampleFirewall1 = Output.of(HcloudFunctions.getFirewalls(GetFirewallsArgs.builder()
            .withSelector("key=value")
            .build()));

    }
}
import pulumi
import pulumi_hcloud as hcloud

sample_firewall1 = hcloud.get_firewalls(with_selector="key=value")
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const sampleFirewall1 = pulumi.output(hcloud.getFirewalls({
    withSelector: "key=value",
}));
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
https://github.com/pulumi/pulumi-hcloud
License
Apache-2.0
Notes

This Pulumi package is based on the hcloud Terraform Provider.