Hetzner Cloud v1.19.1 published on Friday, May 10, 2024 by Pulumi
hcloud.getPrimaryIps
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- With
Selector string - Label selector
 
- With
Selector string - Label selector
 
- with
Selector String - Label selector
 
- with
Selector string - Label selector
 
- with
Selector String - Label selector
 
getPrimaryIps Result
The following output properties are available:
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Primary
Ips List<Pulumi.HCloud. Outputs. Get Primary Ips Primary Ip>  - (list) List of all matching primary ips. See 
data.hcloud_primary_ipfor schema. - With
Selector string 
- Id string
 - The provider-assigned unique ID for this managed resource.
 - Primary
Ips []GetPrimary Ips Primary Ip  - (list) List of all matching primary ips. See 
data.hcloud_primary_ipfor schema. - With
Selector string 
- id String
 - The provider-assigned unique ID for this managed resource.
 - primary
Ips List<GetPrimary Ips Primary Ip>  - (list) List of all matching primary ips. See 
data.hcloud_primary_ipfor schema. - with
Selector String 
- id string
 - The provider-assigned unique ID for this managed resource.
 - primary
Ips GetPrimary Ips Primary Ip[]  - (list) List of all matching primary ips. See 
data.hcloud_primary_ipfor schema. - with
Selector string 
- id str
 - The provider-assigned unique ID for this managed resource.
 - primary_
ips Sequence[GetPrimary Ips Primary Ip]  - (list) List of all matching primary ips. See 
data.hcloud_primary_ipfor schema. - with_
selector str 
- id String
 - The provider-assigned unique ID for this managed resource.
 - primary
Ips List<Property Map> - (list) List of all matching primary ips. See 
data.hcloud_primary_ipfor schema. - with
Selector String 
Supporting Types
GetPrimaryIpsPrimaryIp    
- Assignee
Id int - Assignee
Type string - Auto
Delete bool - Datacenter string
 - Delete
Protection bool - Id int
 - Ip
Address string - Ip
Network string - Labels Dictionary<string, object>
 - Type string
 - Name string
 
- Assignee
Id int - Assignee
Type string - Auto
Delete bool - Datacenter string
 - Delete
Protection bool - Id int
 - Ip
Address string - Ip
Network string - Labels map[string]interface{}
 - Type string
 - Name string
 
- assignee
Id Integer - assignee
Type String - auto
Delete Boolean - datacenter String
 - delete
Protection Boolean - id Integer
 - ip
Address String - ip
Network String - labels Map<String,Object>
 - type String
 - name String
 
- assignee
Id number - assignee
Type string - auto
Delete boolean - datacenter string
 - delete
Protection boolean - id number
 - ip
Address string - ip
Network string - labels {[key: string]: any}
 - type string
 - name string
 
- assignee_
id int - assignee_
type str - auto_
delete bool - datacenter str
 - delete_
protection bool - id int
 - ip_
address str - ip_
network str - labels Mapping[str, Any]
 - type str
 - name str
 
- assignee
Id Number - assignee
Type String - auto
Delete Boolean - datacenter String
 - delete
Protection Boolean - id Number
 - ip
Address String - ip
Network 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 
hcloudTerraform Provider.