1. Packages
  2. Hcloud Provider
  3. API Docs
  4. getFloatingIps
Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi

hcloud.getFloatingIps

Explore with Pulumi AI

hcloud logo
Hetzner Cloud v1.21.0 published on Tuesday, Nov 12, 2024 by Pulumi

    Provides details about multiple Hetzner Cloud Floating IPs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hcloud from "@pulumi/hcloud";
    
    const ip2 = hcloud.getFloatingIps({
        withSelector: "key=value",
    });
    
    import pulumi
    import pulumi_hcloud as hcloud
    
    ip2 = hcloud.get_floating_ips(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.GetFloatingIps(ctx, &hcloud.GetFloatingIpsArgs{
    			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 ip2 = HCloud.GetFloatingIps.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.GetFloatingIpsArgs;
    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 ip2 = HcloudFunctions.getFloatingIps(GetFloatingIpsArgs.builder()
                .withSelector("key=value")
                .build());
    
        }
    }
    
    variables:
      ip2:
        fn::invoke:
          Function: hcloud:getFloatingIps
          Arguments:
            withSelector: key=value
    

    Using getFloatingIps

    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 getFloatingIps(args: GetFloatingIpsArgs, opts?: InvokeOptions): Promise<GetFloatingIpsResult>
    function getFloatingIpsOutput(args: GetFloatingIpsOutputArgs, opts?: InvokeOptions): Output<GetFloatingIpsResult>
    def get_floating_ips(with_selector: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetFloatingIpsResult
    def get_floating_ips_output(with_selector: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetFloatingIpsResult]
    func GetFloatingIps(ctx *Context, args *GetFloatingIpsArgs, opts ...InvokeOption) (*GetFloatingIpsResult, error)
    func GetFloatingIpsOutput(ctx *Context, args *GetFloatingIpsOutputArgs, opts ...InvokeOption) GetFloatingIpsResultOutput

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

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

    The following arguments are supported:

    getFloatingIps Result

    The following output properties are available:

    FloatingIps List<Pulumi.HCloud.Outputs.GetFloatingIpsFloatingIp>
    (list) List of all matching floating ips. See data.hcloud_floating_ip for schema.
    Id string
    The provider-assigned unique ID for this managed resource.
    WithSelector string
    FloatingIps []GetFloatingIpsFloatingIp
    (list) List of all matching floating ips. See data.hcloud_floating_ip for schema.
    Id string
    The provider-assigned unique ID for this managed resource.
    WithSelector string
    floatingIps List<GetFloatingIpsFloatingIp>
    (list) List of all matching floating ips. See data.hcloud_floating_ip for schema.
    id String
    The provider-assigned unique ID for this managed resource.
    withSelector String
    floatingIps GetFloatingIpsFloatingIp[]
    (list) List of all matching floating ips. See data.hcloud_floating_ip for schema.
    id string
    The provider-assigned unique ID for this managed resource.
    withSelector string
    floating_ips Sequence[GetFloatingIpsFloatingIp]
    (list) List of all matching floating ips. See data.hcloud_floating_ip for schema.
    id str
    The provider-assigned unique ID for this managed resource.
    with_selector str
    floatingIps List<Property Map>
    (list) List of all matching floating ips. See data.hcloud_floating_ip for schema.
    id String
    The provider-assigned unique ID for this managed resource.
    withSelector String

    Supporting Types

    GetFloatingIpsFloatingIp

    DeleteProtection bool
    Description string
    HomeLocation string
    Id int
    IpAddress string
    IpNetwork string
    Labels Dictionary<string, string>
    ServerId int
    Type string
    Name string
    DeleteProtection bool
    Description string
    HomeLocation string
    Id int
    IpAddress string
    IpNetwork string
    Labels map[string]string
    ServerId int
    Type string
    Name string
    deleteProtection Boolean
    description String
    homeLocation String
    id Integer
    ipAddress String
    ipNetwork String
    labels Map<String,String>
    serverId Integer
    type String
    name String
    deleteProtection boolean
    description string
    homeLocation string
    id number
    ipAddress string
    ipNetwork string
    labels {[key: string]: string}
    serverId number
    type string
    name string
    deleteProtection Boolean
    description String
    homeLocation String
    id Number
    ipAddress String
    ipNetwork String
    labels Map<String>
    serverId Number
    type String
    name 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.21.0 published on Tuesday, Nov 12, 2024 by Pulumi