Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi
hcloud.getFirewalls
Explore with Pulumi AI
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:
- Most
Recent bool - Sorts list by date.
- With
Selector string - Label selector
- Most
Recent bool - Sorts list by date.
- With
Selector string - Label selector
- most
Recent Boolean - Sorts list by date.
- with
Selector String - Label selector
- most
Recent boolean - Sorts list by date.
- with
Selector string - Label selector
- most_
recent bool - Sorts list by date.
- with_
selector str - Label selector
- most
Recent Boolean - Sorts list by date.
- with
Selector String - Label selector
getFirewalls Result
The following output properties are available:
- Firewalls
List<Pulumi.
HCloud. Outputs. Get Firewalls Firewall> - (list) List of all matching firewalls. See
data.hcloud_firewall
for schema. - Id string
- The provider-assigned unique ID for this managed resource.
- Most
Recent bool - With
Selector string
- Firewalls
[]Get
Firewalls Firewall - (list) List of all matching firewalls. See
data.hcloud_firewall
for schema. - Id string
- The provider-assigned unique ID for this managed resource.
- Most
Recent bool - With
Selector string
- firewalls
List<Get
Firewalls Firewall> - (list) List of all matching firewalls. See
data.hcloud_firewall
for schema. - id String
- The provider-assigned unique ID for this managed resource.
- most
Recent Boolean - with
Selector String
- firewalls
Get
Firewalls Firewall[] - (list) List of all matching firewalls. See
data.hcloud_firewall
for schema. - id string
- The provider-assigned unique ID for this managed resource.
- most
Recent boolean - with
Selector string
- firewalls
Sequence[Get
Firewalls Firewall] - (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.
- most
Recent Boolean - with
Selector String
Supporting Types
GetFirewallsFirewall
- Name string
- Apply
Tos List<Pulumi.HCloud. Inputs. Get Firewalls Firewall Apply To> - Id int
- Labels Dictionary<string, string>
- Rules
List<Pulumi.
HCloud. Inputs. Get Firewalls Firewall Rule>
- Name string
- Apply
Tos []GetFirewalls Firewall Apply To - Id int
- Labels map[string]string
- Rules
[]Get
Firewalls Firewall Rule
- name String
- apply
Tos List<GetFirewalls Firewall Apply To> - id Integer
- labels Map<String,String>
- rules
List<Get
Firewalls Firewall Rule>
- name string
- apply
Tos GetFirewalls Firewall Apply To[] - id number
- labels {[key: string]: string}
- rules
Get
Firewalls Firewall Rule[]
- name str
- apply_
tos Sequence[GetFirewalls Firewall Apply To] - id int
- labels Mapping[str, str]
- rules
Sequence[Get
Firewalls Firewall Rule]
- name String
- apply
Tos List<Property Map> - id Number
- labels Map<String>
- rules List<Property Map>
GetFirewallsFirewallApplyTo
- Label
Selector string - Server int
- Label
Selector string - Server int
- label
Selector String - server Integer
- label
Selector string - server number
- label_
selector str - server int
- label
Selector String - server Number
GetFirewallsFirewallRule
- Direction string
- Description string
- Destination
Ips List<string> - Port string
- Protocol string
- Source
Ips List<string>
- Direction string
- Description string
- Destination
Ips []string - Port string
- Protocol string
- Source
Ips []string
- direction String
- description String
- destination
Ips List<String> - port String
- protocol String
- source
Ips List<String>
- direction string
- description string
- destination
Ips string[] - port string
- protocol string
- source
Ips string[]
- direction str
- description str
- destination_
ips Sequence[str] - port str
- protocol str
- source_
ips Sequence[str]
- direction String
- description String
- destination
Ips List<String> - port String
- protocol String
- source
Ips 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.