alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.vpc.getHavips

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

NOTE: Available in v1.120.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
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),
    };
});
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
	})
}
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()));
    }
}
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)
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);
variables:
  example:
    fn::invoke:
      Function: alicloud:vpc:getHavips
      Arguments:
        ids:
          - example_value
        nameRegex: the_resource_name
outputs:
  firstHavipId: ${example.havips[0].id}

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>
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]
func GetHavips(ctx *Context, args *GetHavipsArgs, opts ...InvokeOption) (*GetHavipsResult, error)
func GetHavipsOutput(ctx *Context, args *GetHavipsOutputArgs, opts ...InvokeOption) GetHavipsResultOutput

> 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)
}
public static CompletableFuture<GetHavipsResult> getHavips(GetHavipsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:vpc/getHavips:getHavips
  arguments:
    # arguments dictionary

The following arguments are supported:

Ids List<string>

A list of Ha Vip IDs.

NameRegex string

A regex string to filter results by Ha Vip name.

OutputFile string
Status string

The status.

Ids []string

A list of Ha Vip IDs.

NameRegex string

A regex string to filter results by Ha Vip name.

OutputFile string
Status string

The status.

ids List<String>

A list of Ha Vip IDs.

nameRegex String

A regex string to filter results by Ha Vip name.

outputFile String
status String

The status.

ids string[]

A list of Ha Vip IDs.

nameRegex string

A regex string to filter results by Ha Vip name.

outputFile string
status string

The status.

ids Sequence[str]

A list of Ha Vip IDs.

name_regex str

A regex string to filter results by Ha Vip name.

output_file str
status str

The status.

ids List<String>

A list of Ha Vip IDs.

nameRegex String

A regex string to filter results by Ha Vip name.

outputFile String
status String

The status.

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 List<string>

EIP bound to HaVip.

AssociatedInstances List<string>

An ECS instance that is bound to HaVip.

Description string

Dependence of a HaVip instance.

HavipId string

The ID of the resource.

HavipName string

The name of the HaVip instance.

Id string

The ID of the Ha Vip.

IpAddress string

IP address of private network.

MasterInstanceId string

The primary instance ID bound to HaVip.

Status string

The status.

VpcId string

The VPC ID to which the HaVip instance belongs.

VswitchId string

The vswitch id.

AssociatedEipAddresses []string

EIP bound to HaVip.

AssociatedInstances []string

An ECS instance that is bound to HaVip.

Description string

Dependence of a HaVip instance.

HavipId string

The ID of the resource.

HavipName string

The name of the HaVip instance.

Id string

The ID of the Ha Vip.

IpAddress string

IP address of private network.

MasterInstanceId string

The primary instance ID bound to HaVip.

Status string

The status.

VpcId string

The VPC ID to which the HaVip instance belongs.

VswitchId string

The vswitch id.

associatedEipAddresses List<String>

EIP bound to HaVip.

associatedInstances List<String>

An ECS instance that is bound to HaVip.

description String

Dependence of a HaVip instance.

havipId String

The ID of the resource.

havipName String

The name of the HaVip instance.

id String

The ID of the Ha Vip.

ipAddress String

IP address of private network.

masterInstanceId String

The primary instance ID bound to HaVip.

status String

The status.

vpcId String

The VPC ID to which the HaVip instance belongs.

vswitchId String

The vswitch id.

associatedEipAddresses string[]

EIP bound to HaVip.

associatedInstances string[]

An ECS instance that is bound to HaVip.

description string

Dependence of a HaVip instance.

havipId string

The ID of the resource.

havipName string

The name of the HaVip instance.

id string

The ID of the Ha Vip.

ipAddress string

IP address of private network.

masterInstanceId string

The primary instance ID bound to HaVip.

status string

The status.

vpcId string

The VPC ID to which the HaVip instance belongs.

vswitchId string

The vswitch id.

associated_eip_addresses Sequence[str]

EIP bound to HaVip.

associated_instances Sequence[str]

An ECS instance that is bound to HaVip.

description str

Dependence of a HaVip instance.

havip_id str

The ID of the resource.

havip_name str

The name of the HaVip instance.

id str

The ID of the Ha Vip.

ip_address str

IP address of private network.

master_instance_id str

The primary instance ID bound to HaVip.

status str

The status.

vpc_id str

The VPC ID to which the HaVip instance belongs.

vswitch_id str

The vswitch id.

associatedEipAddresses List<String>

EIP bound to HaVip.

associatedInstances List<String>

An ECS instance that is bound to HaVip.

description String

Dependence of a HaVip instance.

havipId String

The ID of the resource.

havipName String

The name of the HaVip instance.

id String

The ID of the Ha Vip.

ipAddress String

IP address of private network.

masterInstanceId String

The primary instance ID bound to HaVip.

status String

The status.

vpcId String

The VPC ID to which the HaVip instance belongs.

vswitchId 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.