Hetzner Cloud

Pulumi Official
Package maintained by Pulumi
v1.8.0 published on Wednesday, Mar 9, 2022 by Pulumi

getNetworks

Provides details about multiple Hetzner Cloud Networks.

Example Usage

using Pulumi;
using HCloud = Pulumi.HCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var network2 = Output.Create(HCloud.GetNetwork.InvokeAsync());
        var network3 = Output.Create(HCloud.GetNetwork.InvokeAsync(new HCloud.GetNetworkArgs
        {
            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.LookupNetwork(ctx, nil, nil)
		if err != nil {
			return err
		}
		opt0 := "key=value"
		_, err = hcloud.LookupNetwork(ctx, &GetNetworkArgs{
			WithSelector: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_hcloud as hcloud

network2 = hcloud.get_network()
network3 = hcloud.get_network(with_selector="key=value")
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";

const network2 = pulumi.output(hcloud.getNetwork());
const network3 = pulumi.output(hcloud.getNetwork({
    withSelector: "key=value",
}));

Coming soon!

Using getNetworks

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 getNetworks(args: GetNetworksArgs, opts?: InvokeOptions): Promise<GetNetworksResult>
function getNetworksOutput(args: GetNetworksOutputArgs, opts?: InvokeOptions): Output<GetNetworksResult>
def get_networks(with_selector: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetNetworksResult
def get_networks_output(with_selector: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetNetworksResult]
func GetNetworks(ctx *Context, args *GetNetworksArgs, opts ...InvokeOption) (*GetNetworksResult, error)
func GetNetworksOutput(ctx *Context, args *GetNetworksOutputArgs, opts ...InvokeOption) GetNetworksResultOutput

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

public static class GetNetworks 
{
    public static Task<GetNetworksResult> InvokeAsync(GetNetworksArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworksResult> Invoke(GetNetworksInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworksResult> getNetworks(GetNetworksArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: hcloud:index/getNetworks:getNetworks
  Arguments:
    # Arguments dictionary

The following arguments are supported:

getNetworks Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Networks List<Pulumi.HCloud.Outputs.GetNetworksNetwork>

(list) List of all matching networks. See data.hcloud_network for schema.

WithSelector string
Id string

The provider-assigned unique ID for this managed resource.

Networks []GetNetworksNetwork

(list) List of all matching networks. See data.hcloud_network for schema.

WithSelector string
id String

The provider-assigned unique ID for this managed resource.

networks ListNetworksNetwork>

(list) List of all matching networks. See data.hcloud_network for schema.

withSelector String
id string

The provider-assigned unique ID for this managed resource.

networks GetNetworksNetwork[]

(list) List of all matching networks. See data.hcloud_network for schema.

withSelector string
id str

The provider-assigned unique ID for this managed resource.

networks Sequence[GetNetworksNetwork]

(list) List of all matching networks. See data.hcloud_network for schema.

with_selector str
id String

The provider-assigned unique ID for this managed resource.

networks List

(list) List of all matching networks. See data.hcloud_network for schema.

withSelector String

Supporting Types

GetNetworksNetwork

DeleteProtection bool
Id int
IpRange string
Labels Dictionary<string, object>
Name string
DeleteProtection bool
Id int
IpRange string
Labels map[string]interface{}
Name string
deleteProtection Boolean
id Integer
ipRange String
labels Map
name String
deleteProtection boolean
id number
ipRange string
labels {[key: string]: any}
name string
delete_protection bool
id int
ip_range str
labels Mapping[str, Any]
name str
deleteProtection Boolean
id Number
ipRange String
labels Map
name 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.