1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getEip
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.getEip

Explore with Pulumi AI

tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

Provides an available EIP for the user.

The EIP data source fetch proper EIP from user’s EIP pool.

NOTE: It has been deprecated and replaced by tencentcloud_eips.

Example Usage

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

const myEip = tencentcloud.getEip({
    filters: [{
        name: "address-status",
        values: ["UNBIND"],
    }],
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

my_eip = tencentcloud.get_eip(filters=[{
    "name": "address-status",
    "values": ["UNBIND"],
}])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := tencentcloud.LookupEip(ctx, &tencentcloud.LookupEipArgs{
			Filters: []tencentcloud.GetEipFilter{
				{
					Name: "address-status",
					Values: []string{
						"UNBIND",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var myEip = Tencentcloud.GetEip.Invoke(new()
    {
        Filters = new[]
        {
            new Tencentcloud.Inputs.GetEipFilterInputArgs
            {
                Name = "address-status",
                Values = new[]
                {
                    "UNBIND",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetEipArgs;
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 myEip = TencentcloudFunctions.getEip(GetEipArgs.builder()
            .filters(GetEipFilterArgs.builder()
                .name("address-status")
                .values("UNBIND")
                .build())
            .build());

    }
}
Copy
variables:
  myEip:
    fn::invoke:
      function: tencentcloud:getEip
      arguments:
        filters:
          - name: address-status
            values:
              - UNBIND
Copy

Using getEip

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 getEip(args: GetEipArgs, opts?: InvokeOptions): Promise<GetEipResult>
function getEipOutput(args: GetEipOutputArgs, opts?: InvokeOptions): Output<GetEipResult>
Copy
def get_eip(filters: Optional[Sequence[GetEipFilter]] = None,
            include_arrears: Optional[bool] = None,
            include_blocked: Optional[bool] = None,
            opts: Optional[InvokeOptions] = None) -> GetEipResult
def get_eip_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetEipFilterArgs]]]] = None,
            include_arrears: Optional[pulumi.Input[bool]] = None,
            include_blocked: Optional[pulumi.Input[bool]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[GetEipResult]
Copy
func LookupEip(ctx *Context, args *LookupEipArgs, opts ...InvokeOption) (*LookupEipResult, error)
func LookupEipOutput(ctx *Context, args *LookupEipOutputArgs, opts ...InvokeOption) LookupEipResultOutput
Copy

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

public static class GetEip 
{
    public static Task<GetEipResult> InvokeAsync(GetEipArgs args, InvokeOptions? opts = null)
    public static Output<GetEipResult> Invoke(GetEipInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEipResult> getEip(GetEipArgs args, InvokeOptions options)
public static Output<GetEipResult> getEip(GetEipArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getEip:getEip
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetEipFilter>
One or more name/value pairs to filter.
IncludeArrears bool
Whether the IP is arrears.
IncludeBlocked bool
Whether the IP is blocked.
Filters []GetEipFilter
One or more name/value pairs to filter.
IncludeArrears bool
Whether the IP is arrears.
IncludeBlocked bool
Whether the IP is blocked.
filters List<GetEipFilter>
One or more name/value pairs to filter.
includeArrears Boolean
Whether the IP is arrears.
includeBlocked Boolean
Whether the IP is blocked.
filters GetEipFilter[]
One or more name/value pairs to filter.
includeArrears boolean
Whether the IP is arrears.
includeBlocked boolean
Whether the IP is blocked.
filters Sequence[GetEipFilter]
One or more name/value pairs to filter.
include_arrears bool
Whether the IP is arrears.
include_blocked bool
Whether the IP is blocked.
filters List<Property Map>
One or more name/value pairs to filter.
includeArrears Boolean
Whether the IP is arrears.
includeBlocked Boolean
Whether the IP is blocked.

getEip Result

The following output properties are available:

Id string
An EIP id indicate the uniqueness of a certain EIP, which can be used for instance binding or network interface binding.
PublicIp string
An public IP address for the EIP.
Status string
The status of the EIP, there are several status like BIND, UNBIND, and BIND_ENI.
Filters List<GetEipFilter>
IncludeArrears bool
IncludeBlocked bool
Id string
An EIP id indicate the uniqueness of a certain EIP, which can be used for instance binding or network interface binding.
PublicIp string
An public IP address for the EIP.
Status string
The status of the EIP, there are several status like BIND, UNBIND, and BIND_ENI.
Filters []GetEipFilter
IncludeArrears bool
IncludeBlocked bool
id String
An EIP id indicate the uniqueness of a certain EIP, which can be used for instance binding or network interface binding.
publicIp String
An public IP address for the EIP.
status String
The status of the EIP, there are several status like BIND, UNBIND, and BIND_ENI.
filters List<GetEipFilter>
includeArrears Boolean
includeBlocked Boolean
id string
An EIP id indicate the uniqueness of a certain EIP, which can be used for instance binding or network interface binding.
publicIp string
An public IP address for the EIP.
status string
The status of the EIP, there are several status like BIND, UNBIND, and BIND_ENI.
filters GetEipFilter[]
includeArrears boolean
includeBlocked boolean
id str
An EIP id indicate the uniqueness of a certain EIP, which can be used for instance binding or network interface binding.
public_ip str
An public IP address for the EIP.
status str
The status of the EIP, there are several status like BIND, UNBIND, and BIND_ENI.
filters Sequence[GetEipFilter]
include_arrears bool
include_blocked bool
id String
An EIP id indicate the uniqueness of a certain EIP, which can be used for instance binding or network interface binding.
publicIp String
An public IP address for the EIP.
status String
The status of the EIP, there are several status like BIND, UNBIND, and BIND_ENI.
filters List<Property Map>
includeArrears Boolean
includeBlocked Boolean

Supporting Types

GetEipFilter

Name This property is required. string
Key of the filter, valid keys: address-id,address-name,address-ip.
Values This property is required. List<string>
Value of the filter.
Name This property is required. string
Key of the filter, valid keys: address-id,address-name,address-ip.
Values This property is required. []string
Value of the filter.
name This property is required. String
Key of the filter, valid keys: address-id,address-name,address-ip.
values This property is required. List<String>
Value of the filter.
name This property is required. string
Key of the filter, valid keys: address-id,address-name,address-ip.
values This property is required. string[]
Value of the filter.
name This property is required. str
Key of the filter, valid keys: address-id,address-name,address-ip.
values This property is required. Sequence[str]
Value of the filter.
name This property is required. String
Key of the filter, valid keys: address-id,address-name,address-ip.
values This property is required. List<String>
Value of the filter.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack