1. Packages
  2. Hetzner Cloud
  3. API Docs
  4. getPrimaryIps
Hetzner Cloud v1.18.1 published on Tuesday, Apr 9, 2024 by Pulumi

hcloud.getPrimaryIps

Explore with Pulumi AI

hcloud logo
Hetzner Cloud v1.18.1 published on Tuesday, Apr 9, 2024 by Pulumi

    Provides details about multiple Hetzner Cloud Primary IPs.

    Example Usage

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

    Using getPrimaryIps

    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 getPrimaryIps(args: GetPrimaryIpsArgs, opts?: InvokeOptions): Promise<GetPrimaryIpsResult>
    function getPrimaryIpsOutput(args: GetPrimaryIpsOutputArgs, opts?: InvokeOptions): Output<GetPrimaryIpsResult>
    def get_primary_ips(with_selector: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetPrimaryIpsResult
    def get_primary_ips_output(with_selector: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetPrimaryIpsResult]
    func GetPrimaryIps(ctx *Context, args *GetPrimaryIpsArgs, opts ...InvokeOption) (*GetPrimaryIpsResult, error)
    func GetPrimaryIpsOutput(ctx *Context, args *GetPrimaryIpsOutputArgs, opts ...InvokeOption) GetPrimaryIpsResultOutput

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

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

    The following arguments are supported:

    getPrimaryIps Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    PrimaryIps List<Pulumi.HCloud.Outputs.GetPrimaryIpsPrimaryIp>
    (list) List of all matching primary ips. See data.hcloud_primary_ip for schema.
    WithSelector string
    Id string
    The provider-assigned unique ID for this managed resource.
    PrimaryIps []GetPrimaryIpsPrimaryIp
    (list) List of all matching primary ips. See data.hcloud_primary_ip for schema.
    WithSelector string
    id String
    The provider-assigned unique ID for this managed resource.
    primaryIps List<GetPrimaryIpsPrimaryIp>
    (list) List of all matching primary ips. See data.hcloud_primary_ip for schema.
    withSelector String
    id string
    The provider-assigned unique ID for this managed resource.
    primaryIps GetPrimaryIpsPrimaryIp[]
    (list) List of all matching primary ips. See data.hcloud_primary_ip for schema.
    withSelector string
    id str
    The provider-assigned unique ID for this managed resource.
    primary_ips Sequence[GetPrimaryIpsPrimaryIp]
    (list) List of all matching primary ips. See data.hcloud_primary_ip for schema.
    with_selector str
    id String
    The provider-assigned unique ID for this managed resource.
    primaryIps List<Property Map>
    (list) List of all matching primary ips. See data.hcloud_primary_ip for schema.
    withSelector String

    Supporting Types

    GetPrimaryIpsPrimaryIp

    AssigneeId int
    AssigneeType string
    AutoDelete bool
    Datacenter string
    DeleteProtection bool
    Id int
    IpAddress string
    IpNetwork string
    Labels Dictionary<string, object>
    Type string
    Name string
    AssigneeId int
    AssigneeType string
    AutoDelete bool
    Datacenter string
    DeleteProtection bool
    Id int
    IpAddress string
    IpNetwork string
    Labels map[string]interface{}
    Type string
    Name string
    assigneeId Integer
    assigneeType String
    autoDelete Boolean
    datacenter String
    deleteProtection Boolean
    id Integer
    ipAddress String
    ipNetwork String
    labels Map<String,Object>
    type String
    name String
    assigneeId number
    assigneeType string
    autoDelete boolean
    datacenter string
    deleteProtection boolean
    id number
    ipAddress string
    ipNetwork string
    labels {[key: string]: any}
    type string
    name string
    assigneeId Number
    assigneeType String
    autoDelete Boolean
    datacenter String
    deleteProtection Boolean
    id Number
    ipAddress String
    ipNetwork String
    labels Map<Any>
    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.18.1 published on Tuesday, Apr 9, 2024 by Pulumi