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

tencentcloud.getEip

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 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"],
        }],
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    my_eip = tencentcloud.get_eip(filters=[{
        "name": "address-status",
        "values": ["UNBIND"],
    }])
    
    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
    	})
    }
    
    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",
                    },
                },
            },
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      myEip:
        fn::invoke:
          function: tencentcloud:getEip
          arguments:
            filters:
              - name: address-status
                values:
                  - UNBIND
    

    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>
    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]
    func LookupEip(ctx *Context, args *LookupEipArgs, opts ...InvokeOption) (*LookupEipResult, error)
    func LookupEipOutput(ctx *Context, args *LookupEipOutputArgs, opts ...InvokeOption) LookupEipResultOutput

    > 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)
    }
    public static CompletableFuture<GetEipResult> getEip(GetEipArgs args, InvokeOptions options)
    public static Output<GetEipResult> getEip(GetEipArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getEip:getEip
      arguments:
        # arguments dictionary

    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 string
    Key of the filter, valid keys: address-id,address-name,address-ip.
    Values List<string>
    Value of the filter.
    Name string
    Key of the filter, valid keys: address-id,address-name,address-ip.
    Values []string
    Value of the filter.
    name String
    Key of the filter, valid keys: address-id,address-name,address-ip.
    values List<String>
    Value of the filter.
    name string
    Key of the filter, valid keys: address-id,address-name,address-ip.
    values string[]
    Value of the filter.
    name str
    Key of the filter, valid keys: address-id,address-name,address-ip.
    values Sequence[str]
    Value of the filter.
    name String
    Key of the filter, valid keys: address-id,address-name,address-ip.
    values 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 logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack