1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. vpc
  5. getHavips
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.vpc.getHavips

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides the Havips of the current Alibaba Cloud user.

NOTE: Available in v1.120.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = alicloud.vpc.getHavips({
    ids: ["example_value"],
    nameRegex: "the_resource_name",
});
export const firstHavipId = example.then(example => example.havips?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.vpc.get_havips(ids=["example_value"],
    name_regex="the_resource_name")
pulumi.export("firstHavipId", example.havips[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := vpc.GetHavips(ctx, &vpc.GetHavipsArgs{
			Ids: []string{
				"example_value",
			},
			NameRegex: pulumi.StringRef("the_resource_name"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstHavipId", example.Havips[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var example = AliCloud.Vpc.GetHavips.Invoke(new()
    {
        Ids = new[]
        {
            "example_value",
        },
        NameRegex = "the_resource_name",
    });

    return new Dictionary<string, object?>
    {
        ["firstHavipId"] = example.Apply(getHavipsResult => getHavipsResult.Havips[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetHavipsArgs;
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 example = VpcFunctions.getHavips(GetHavipsArgs.builder()
            .ids("example_value")
            .nameRegex("the_resource_name")
            .build());

        ctx.export("firstHavipId", example.applyValue(getHavipsResult -> getHavipsResult.havips()[0].id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: alicloud:vpc:getHavips
      arguments:
        ids:
          - example_value
        nameRegex: the_resource_name
outputs:
  firstHavipId: ${example.havips[0].id}
Copy

Using getHavips

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 getHavips(args: GetHavipsArgs, opts?: InvokeOptions): Promise<GetHavipsResult>
function getHavipsOutput(args: GetHavipsOutputArgs, opts?: InvokeOptions): Output<GetHavipsResult>
Copy
def get_havips(ids: Optional[Sequence[str]] = None,
               name_regex: Optional[str] = None,
               output_file: Optional[str] = None,
               status: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetHavipsResult
def get_havips_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               name_regex: Optional[pulumi.Input[str]] = None,
               output_file: Optional[pulumi.Input[str]] = None,
               status: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetHavipsResult]
Copy
func GetHavips(ctx *Context, args *GetHavipsArgs, opts ...InvokeOption) (*GetHavipsResult, error)
func GetHavipsOutput(ctx *Context, args *GetHavipsOutputArgs, opts ...InvokeOption) GetHavipsResultOutput
Copy

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

public static class GetHavips 
{
    public static Task<GetHavipsResult> InvokeAsync(GetHavipsArgs args, InvokeOptions? opts = null)
    public static Output<GetHavipsResult> Invoke(GetHavipsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetHavipsResult> getHavips(GetHavipsArgs args, InvokeOptions options)
public static Output<GetHavipsResult> getHavips(GetHavipsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:vpc/getHavips:getHavips
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of Ha Vip IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Ha Vip name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of HaVip instance. Valid value: Available, InUse and Pending.
Ids Changes to this property will trigger replacement. []string
A list of Ha Vip IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Ha Vip name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Status Changes to this property will trigger replacement. string
The status of HaVip instance. Valid value: Available, InUse and Pending.
ids Changes to this property will trigger replacement. List<String>
A list of Ha Vip IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Ha Vip name.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of HaVip instance. Valid value: Available, InUse and Pending.
ids Changes to this property will trigger replacement. string[]
A list of Ha Vip IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Ha Vip name.
outputFile string
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. string
The status of HaVip instance. Valid value: Available, InUse and Pending.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Ha Vip IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Ha Vip name.
output_file str
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. str
The status of HaVip instance. Valid value: Available, InUse and Pending.
ids Changes to this property will trigger replacement. List<String>
A list of Ha Vip IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Ha Vip name.
outputFile String
File name where to save data source results (after running pulumi preview).
status Changes to this property will trigger replacement. String
The status of HaVip instance. Valid value: Available, InUse and Pending.

getHavips Result

The following output properties are available:

Havips List<Pulumi.AliCloud.Vpc.Outputs.GetHavipsHavip>
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
NameRegex string
OutputFile string
Status string
Havips []GetHavipsHavip
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
NameRegex string
OutputFile string
Status string
havips List<GetHavipsHavip>
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
nameRegex String
outputFile String
status String
havips GetHavipsHavip[]
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
nameRegex string
outputFile string
status string
havips Sequence[GetHavipsHavip]
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
name_regex str
output_file str
status str
havips List<Property Map>
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
nameRegex String
outputFile String
status String

Supporting Types

GetHavipsHavip

AssociatedEipAddresses This property is required. List<string>
EIP bound to HaVip.
AssociatedInstances This property is required. List<string>
An ECS instance that is bound to HaVip.
Description This property is required. string
Dependence of a HaVip instance.
HavipId This property is required. string
The ID of the resource.
HavipName This property is required. string
The name of the HaVip instance.
Id This property is required. string
The ID of the Ha Vip.
IpAddress This property is required. string
IP address of private network.
MasterInstanceId This property is required. string
The primary instance ID bound to HaVip.
Status This property is required. string
The status.
VpcId This property is required. string
The VPC ID to which the HaVip instance belongs.
VswitchId This property is required. string
The vswitch id.
AssociatedEipAddresses This property is required. []string
EIP bound to HaVip.
AssociatedInstances This property is required. []string
An ECS instance that is bound to HaVip.
Description This property is required. string
Dependence of a HaVip instance.
HavipId This property is required. string
The ID of the resource.
HavipName This property is required. string
The name of the HaVip instance.
Id This property is required. string
The ID of the Ha Vip.
IpAddress This property is required. string
IP address of private network.
MasterInstanceId This property is required. string
The primary instance ID bound to HaVip.
Status This property is required. string
The status.
VpcId This property is required. string
The VPC ID to which the HaVip instance belongs.
VswitchId This property is required. string
The vswitch id.
associatedEipAddresses This property is required. List<String>
EIP bound to HaVip.
associatedInstances This property is required. List<String>
An ECS instance that is bound to HaVip.
description This property is required. String
Dependence of a HaVip instance.
havipId This property is required. String
The ID of the resource.
havipName This property is required. String
The name of the HaVip instance.
id This property is required. String
The ID of the Ha Vip.
ipAddress This property is required. String
IP address of private network.
masterInstanceId This property is required. String
The primary instance ID bound to HaVip.
status This property is required. String
The status.
vpcId This property is required. String
The VPC ID to which the HaVip instance belongs.
vswitchId This property is required. String
The vswitch id.
associatedEipAddresses This property is required. string[]
EIP bound to HaVip.
associatedInstances This property is required. string[]
An ECS instance that is bound to HaVip.
description This property is required. string
Dependence of a HaVip instance.
havipId This property is required. string
The ID of the resource.
havipName This property is required. string
The name of the HaVip instance.
id This property is required. string
The ID of the Ha Vip.
ipAddress This property is required. string
IP address of private network.
masterInstanceId This property is required. string
The primary instance ID bound to HaVip.
status This property is required. string
The status.
vpcId This property is required. string
The VPC ID to which the HaVip instance belongs.
vswitchId This property is required. string
The vswitch id.
associated_eip_addresses This property is required. Sequence[str]
EIP bound to HaVip.
associated_instances This property is required. Sequence[str]
An ECS instance that is bound to HaVip.
description This property is required. str
Dependence of a HaVip instance.
havip_id This property is required. str
The ID of the resource.
havip_name This property is required. str
The name of the HaVip instance.
id This property is required. str
The ID of the Ha Vip.
ip_address This property is required. str
IP address of private network.
master_instance_id This property is required. str
The primary instance ID bound to HaVip.
status This property is required. str
The status.
vpc_id This property is required. str
The VPC ID to which the HaVip instance belongs.
vswitch_id This property is required. str
The vswitch id.
associatedEipAddresses This property is required. List<String>
EIP bound to HaVip.
associatedInstances This property is required. List<String>
An ECS instance that is bound to HaVip.
description This property is required. String
Dependence of a HaVip instance.
havipId This property is required. String
The ID of the resource.
havipName This property is required. String
The name of the HaVip instance.
id This property is required. String
The ID of the Ha Vip.
ipAddress This property is required. String
IP address of private network.
masterInstanceId This property is required. String
The primary instance ID bound to HaVip.
status This property is required. String
The status.
vpcId This property is required. String
The VPC ID to which the HaVip instance belongs.
vswitchId This property is required. String
The vswitch id.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi