1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getEips
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getEips

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query eip instances.

    Example Usage

    Query all eip instances

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getEips({});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_eips()
    
    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.GetEips(ctx, &tencentcloud.GetEipsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetEips.Invoke();
    
    });
    
    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.GetEipsArgs;
    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 = TencentcloudFunctions.getEips();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getEips
          arguments: {}
    

    Query eip instances by eip ID

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getEips({
        eipId: "eip-ry9h95hg",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_eips(eip_id="eip-ry9h95hg")
    
    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.GetEips(ctx, &tencentcloud.GetEipsArgs{
    			EipId: pulumi.StringRef("eip-ry9h95hg"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetEips.Invoke(new()
        {
            EipId = "eip-ry9h95hg",
        });
    
    });
    
    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.GetEipsArgs;
    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 = TencentcloudFunctions.getEips(GetEipsArgs.builder()
                .eipId("eip-ry9h95hg")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getEips
          arguments:
            eipId: eip-ry9h95hg
    

    Query eip instances by eip name

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getEips({
        eipName: "tf-example",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_eips(eip_name="tf-example")
    
    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.GetEips(ctx, &tencentcloud.GetEipsArgs{
    			EipName: pulumi.StringRef("tf-example"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetEips.Invoke(new()
        {
            EipName = "tf-example",
        });
    
    });
    
    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.GetEipsArgs;
    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 = TencentcloudFunctions.getEips(GetEipsArgs.builder()
                .eipName("tf-example")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getEips
          arguments:
            eipName: tf-example
    

    Query eip instances by public ip

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getEips({
        publicIp: "1.12.62.3",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_eips(public_ip="1.12.62.3")
    
    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.GetEips(ctx, &tencentcloud.GetEipsArgs{
    			PublicIp: pulumi.StringRef("1.12.62.3"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetEips.Invoke(new()
        {
            PublicIp = "1.12.62.3",
        });
    
    });
    
    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.GetEipsArgs;
    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 = TencentcloudFunctions.getEips(GetEipsArgs.builder()
                .publicIp("1.12.62.3")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getEips
          arguments:
            publicIp: 1.12.62.3
    

    Query eip instances by tags

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = tencentcloud.getEips({
        tags: {
            test: "test",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.get_eips(tags={
        "test": "test",
    })
    
    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.GetEips(ctx, &tencentcloud.GetEipsArgs{
    			Tags: map[string]interface{}{
    				"test": "test",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Tencentcloud.GetEips.Invoke(new()
        {
            Tags = 
            {
                { "test", "test" },
            },
        });
    
    });
    
    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.GetEipsArgs;
    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 = TencentcloudFunctions.getEips(GetEipsArgs.builder()
                .tags(Map.of("test", "test"))
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: tencentcloud:getEips
          arguments:
            tags:
              test: test
    

    Using getEips

    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 getEips(args: GetEipsArgs, opts?: InvokeOptions): Promise<GetEipsResult>
    function getEipsOutput(args: GetEipsOutputArgs, opts?: InvokeOptions): Output<GetEipsResult>
    def get_eips(eip_id: Optional[str] = None,
                 eip_name: Optional[str] = None,
                 id: Optional[str] = None,
                 public_ip: Optional[str] = None,
                 result_output_file: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetEipsResult
    def get_eips_output(eip_id: Optional[pulumi.Input[str]] = None,
                 eip_name: Optional[pulumi.Input[str]] = None,
                 id: Optional[pulumi.Input[str]] = None,
                 public_ip: Optional[pulumi.Input[str]] = None,
                 result_output_file: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetEipsResult]
    func GetEips(ctx *Context, args *GetEipsArgs, opts ...InvokeOption) (*GetEipsResult, error)
    func GetEipsOutput(ctx *Context, args *GetEipsOutputArgs, opts ...InvokeOption) GetEipsResultOutput

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

    public static class GetEips 
    {
        public static Task<GetEipsResult> InvokeAsync(GetEipsArgs args, InvokeOptions? opts = null)
        public static Output<GetEipsResult> Invoke(GetEipsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEipsResult> getEips(GetEipsArgs args, InvokeOptions options)
    public static Output<GetEipsResult> getEips(GetEipsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getEips:getEips
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EipId string
    ID of the EIP to be queried.
    EipName string
    Name of the EIP to be queried.
    Id string
    PublicIp string
    The elastic ip address.
    ResultOutputFile string
    Used to save results.
    Tags Dictionary<string, string>
    The tags of EIP.
    EipId string
    ID of the EIP to be queried.
    EipName string
    Name of the EIP to be queried.
    Id string
    PublicIp string
    The elastic ip address.
    ResultOutputFile string
    Used to save results.
    Tags map[string]string
    The tags of EIP.
    eipId String
    ID of the EIP to be queried.
    eipName String
    Name of the EIP to be queried.
    id String
    publicIp String
    The elastic ip address.
    resultOutputFile String
    Used to save results.
    tags Map<String,String>
    The tags of EIP.
    eipId string
    ID of the EIP to be queried.
    eipName string
    Name of the EIP to be queried.
    id string
    publicIp string
    The elastic ip address.
    resultOutputFile string
    Used to save results.
    tags {[key: string]: string}
    The tags of EIP.
    eip_id str
    ID of the EIP to be queried.
    eip_name str
    Name of the EIP to be queried.
    id str
    public_ip str
    The elastic ip address.
    result_output_file str
    Used to save results.
    tags Mapping[str, str]
    The tags of EIP.
    eipId String
    ID of the EIP to be queried.
    eipName String
    Name of the EIP to be queried.
    id String
    publicIp String
    The elastic ip address.
    resultOutputFile String
    Used to save results.
    tags Map<String>
    The tags of EIP.

    getEips Result

    The following output properties are available:

    EipLists List<GetEipsEipList>
    An information list of EIP. Each element contains the following attributes:
    Id string
    EipId string
    ID of the EIP.
    EipName string
    Name of the EIP.
    PublicIp string
    The elastic ip address.
    ResultOutputFile string
    Tags Dictionary<string, string>
    Tags of the EIP.
    EipLists []GetEipsEipList
    An information list of EIP. Each element contains the following attributes:
    Id string
    EipId string
    ID of the EIP.
    EipName string
    Name of the EIP.
    PublicIp string
    The elastic ip address.
    ResultOutputFile string
    Tags map[string]string
    Tags of the EIP.
    eipLists List<GetEipsEipList>
    An information list of EIP. Each element contains the following attributes:
    id String
    eipId String
    ID of the EIP.
    eipName String
    Name of the EIP.
    publicIp String
    The elastic ip address.
    resultOutputFile String
    tags Map<String,String>
    Tags of the EIP.
    eipLists GetEipsEipList[]
    An information list of EIP. Each element contains the following attributes:
    id string
    eipId string
    ID of the EIP.
    eipName string
    Name of the EIP.
    publicIp string
    The elastic ip address.
    resultOutputFile string
    tags {[key: string]: string}
    Tags of the EIP.
    eip_lists Sequence[GetEipsEipList]
    An information list of EIP. Each element contains the following attributes:
    id str
    eip_id str
    ID of the EIP.
    eip_name str
    Name of the EIP.
    public_ip str
    The elastic ip address.
    result_output_file str
    tags Mapping[str, str]
    Tags of the EIP.
    eipLists List<Property Map>
    An information list of EIP. Each element contains the following attributes:
    id String
    eipId String
    ID of the EIP.
    eipName String
    Name of the EIP.
    publicIp String
    The elastic ip address.
    resultOutputFile String
    tags Map<String>
    Tags of the EIP.

    Supporting Types

    GetEipsEipList

    CreateTime string
    Creation time of the EIP.
    EipId string
    ID of the EIP to be queried.
    EipName string
    Name of the EIP to be queried.
    EipType string
    Type of the EIP.
    EniId string
    The eni id to bind with the EIP.
    InstanceId string
    The instance id to bind with the EIP.
    PublicIp string
    The elastic ip address.
    Status string
    The EIP current status.
    Tags Dictionary<string, string>
    The tags of EIP.
    CreateTime string
    Creation time of the EIP.
    EipId string
    ID of the EIP to be queried.
    EipName string
    Name of the EIP to be queried.
    EipType string
    Type of the EIP.
    EniId string
    The eni id to bind with the EIP.
    InstanceId string
    The instance id to bind with the EIP.
    PublicIp string
    The elastic ip address.
    Status string
    The EIP current status.
    Tags map[string]string
    The tags of EIP.
    createTime String
    Creation time of the EIP.
    eipId String
    ID of the EIP to be queried.
    eipName String
    Name of the EIP to be queried.
    eipType String
    Type of the EIP.
    eniId String
    The eni id to bind with the EIP.
    instanceId String
    The instance id to bind with the EIP.
    publicIp String
    The elastic ip address.
    status String
    The EIP current status.
    tags Map<String,String>
    The tags of EIP.
    createTime string
    Creation time of the EIP.
    eipId string
    ID of the EIP to be queried.
    eipName string
    Name of the EIP to be queried.
    eipType string
    Type of the EIP.
    eniId string
    The eni id to bind with the EIP.
    instanceId string
    The instance id to bind with the EIP.
    publicIp string
    The elastic ip address.
    status string
    The EIP current status.
    tags {[key: string]: string}
    The tags of EIP.
    create_time str
    Creation time of the EIP.
    eip_id str
    ID of the EIP to be queried.
    eip_name str
    Name of the EIP to be queried.
    eip_type str
    Type of the EIP.
    eni_id str
    The eni id to bind with the EIP.
    instance_id str
    The instance id to bind with the EIP.
    public_ip str
    The elastic ip address.
    status str
    The EIP current status.
    tags Mapping[str, str]
    The tags of EIP.
    createTime String
    Creation time of the EIP.
    eipId String
    ID of the EIP to be queried.
    eipName String
    Name of the EIP to be queried.
    eipType String
    Type of the EIP.
    eniId String
    The eni id to bind with the EIP.
    instanceId String
    The instance id to bind with the EIP.
    publicIp String
    The elastic ip address.
    status String
    The EIP current status.
    tags Map<String>
    The tags of EIP.

    Package Details

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