1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getVpcEipV1
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.getVpcEipV1

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for VPC EIP you can get at documentation portal

    Use this data source to get details about a specific VPC elastic IP.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const eipV1 = opentelekomcloud.getVpcEipV1({
        id: _var.elastic_ip,
    });
    export const eipVpcId = eipV1.then(eipV1 => eipV1.id);
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    eip_v1 = opentelekomcloud.get_vpc_eip_v1(id=var["elastic_ip"])
    pulumi.export("eipVpcId", eip_v1.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		eipV1, err := opentelekomcloud.LookupVpcEipV1(ctx, &opentelekomcloud.LookupVpcEipV1Args{
    			Id: pulumi.StringRef(_var.Elastic_ip),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("eipVpcId", eipV1.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var eipV1 = Opentelekomcloud.GetVpcEipV1.Invoke(new()
        {
            Id = @var.Elastic_ip,
        });
    
        return new Dictionary<string, object?>
        {
            ["eipVpcId"] = eipV1.Apply(getVpcEipV1Result => getVpcEipV1Result.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetVpcEipV1Args;
    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 eipV1 = OpentelekomcloudFunctions.getVpcEipV1(GetVpcEipV1Args.builder()
                .id(var_.elastic_ip())
                .build());
    
            ctx.export("eipVpcId", eipV1.applyValue(getVpcEipV1Result -> getVpcEipV1Result.id()));
        }
    }
    
    variables:
      eipV1:
        fn::invoke:
          function: opentelekomcloud:getVpcEipV1
          arguments:
            id: ${var.elastic_ip}
    outputs:
      eipVpcId: ${eipV1.id}
    

    Search by name regex

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const eip = new opentelekomcloud.VpcEipV1("eip", {
        publicip: {
            type: "5_bgp",
            name: "my_eip",
        },
        bandwidth: {
            name: "acc-band",
            size: 8,
            shareType: "PER",
            chargeMode: "traffic",
        },
    });
    const byRegex = opentelekomcloud.getVpcEipV1({
        nameRegex: "^my_.+",
    });
    export const eipVpcId = byRegex.then(byRegex => byRegex.name);
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    eip = opentelekomcloud.VpcEipV1("eip",
        publicip={
            "type": "5_bgp",
            "name": "my_eip",
        },
        bandwidth={
            "name": "acc-band",
            "size": 8,
            "share_type": "PER",
            "charge_mode": "traffic",
        })
    by_regex = opentelekomcloud.get_vpc_eip_v1(name_regex="^my_.+")
    pulumi.export("eipVpcId", by_regex.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opentelekomcloud.NewVpcEipV1(ctx, "eip", &opentelekomcloud.VpcEipV1Args{
    			Publicip: &opentelekomcloud.VpcEipV1PublicipArgs{
    				Type: pulumi.String("5_bgp"),
    				Name: pulumi.String("my_eip"),
    			},
    			Bandwidth: &opentelekomcloud.VpcEipV1BandwidthArgs{
    				Name:       pulumi.String("acc-band"),
    				Size:       pulumi.Float64(8),
    				ShareType:  pulumi.String("PER"),
    				ChargeMode: pulumi.String("traffic"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		byRegex, err := opentelekomcloud.LookupVpcEipV1(ctx, &opentelekomcloud.LookupVpcEipV1Args{
    			NameRegex: pulumi.StringRef("^my_.+"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("eipVpcId", byRegex.Name)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var eip = new Opentelekomcloud.VpcEipV1("eip", new()
        {
            Publicip = new Opentelekomcloud.Inputs.VpcEipV1PublicipArgs
            {
                Type = "5_bgp",
                Name = "my_eip",
            },
            Bandwidth = new Opentelekomcloud.Inputs.VpcEipV1BandwidthArgs
            {
                Name = "acc-band",
                Size = 8,
                ShareType = "PER",
                ChargeMode = "traffic",
            },
        });
    
        var byRegex = Opentelekomcloud.GetVpcEipV1.Invoke(new()
        {
            NameRegex = "^my_.+",
        });
    
        return new Dictionary<string, object?>
        {
            ["eipVpcId"] = byRegex.Apply(getVpcEipV1Result => getVpcEipV1Result.Name),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.VpcEipV1;
    import com.pulumi.opentelekomcloud.VpcEipV1Args;
    import com.pulumi.opentelekomcloud.inputs.VpcEipV1PublicipArgs;
    import com.pulumi.opentelekomcloud.inputs.VpcEipV1BandwidthArgs;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetVpcEipV1Args;
    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) {
            var eip = new VpcEipV1("eip", VpcEipV1Args.builder()
                .publicip(VpcEipV1PublicipArgs.builder()
                    .type("5_bgp")
                    .name("my_eip")
                    .build())
                .bandwidth(VpcEipV1BandwidthArgs.builder()
                    .name("acc-band")
                    .size(8)
                    .shareType("PER")
                    .chargeMode("traffic")
                    .build())
                .build());
    
            final var byRegex = OpentelekomcloudFunctions.getVpcEipV1(GetVpcEipV1Args.builder()
                .nameRegex("^my_.+")
                .build());
    
            ctx.export("eipVpcId", byRegex.applyValue(getVpcEipV1Result -> getVpcEipV1Result.name()));
        }
    }
    
    resources:
      eip:
        type: opentelekomcloud:VpcEipV1
        properties:
          publicip:
            type: 5_bgp
            name: my_eip
          bandwidth:
            name: acc-band
            size: 8
            shareType: PER
            chargeMode: traffic
    variables:
      byRegex:
        fn::invoke:
          function: opentelekomcloud:getVpcEipV1
          arguments:
            nameRegex: ^my_.+
    outputs:
      eipVpcId: ${byRegex.name}
    

    Using getVpcEipV1

    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 getVpcEipV1(args: GetVpcEipV1Args, opts?: InvokeOptions): Promise<GetVpcEipV1Result>
    function getVpcEipV1Output(args: GetVpcEipV1OutputArgs, opts?: InvokeOptions): Output<GetVpcEipV1Result>
    def get_vpc_eip_v1(bandwidth_id: Optional[str] = None,
                       id: Optional[str] = None,
                       name_regex: Optional[str] = None,
                       port_id: Optional[str] = None,
                       private_ip_address: Optional[str] = None,
                       public_ip_address: Optional[str] = None,
                       region: Optional[str] = None,
                       status: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetVpcEipV1Result
    def get_vpc_eip_v1_output(bandwidth_id: Optional[pulumi.Input[str]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       name_regex: Optional[pulumi.Input[str]] = None,
                       port_id: Optional[pulumi.Input[str]] = None,
                       private_ip_address: Optional[pulumi.Input[str]] = None,
                       public_ip_address: Optional[pulumi.Input[str]] = None,
                       region: Optional[pulumi.Input[str]] = None,
                       status: Optional[pulumi.Input[str]] = None,
                       tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetVpcEipV1Result]
    func LookupVpcEipV1(ctx *Context, args *LookupVpcEipV1Args, opts ...InvokeOption) (*LookupVpcEipV1Result, error)
    func LookupVpcEipV1Output(ctx *Context, args *LookupVpcEipV1OutputArgs, opts ...InvokeOption) LookupVpcEipV1ResultOutput

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

    public static class GetVpcEipV1 
    {
        public static Task<GetVpcEipV1Result> InvokeAsync(GetVpcEipV1Args args, InvokeOptions? opts = null)
        public static Output<GetVpcEipV1Result> Invoke(GetVpcEipV1InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpcEipV1Result> getVpcEipV1(GetVpcEipV1Args args, InvokeOptions options)
    public static Output<GetVpcEipV1Result> getVpcEipV1(GetVpcEipV1Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getVpcEipV1:getVpcEipV1
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BandwidthId string
    The bandwidth ID of specific elastic IP.
    Id string
    Specifies a resource ID in UUID format.
    NameRegex string
    A regex string to apply to the eip list. This allows more advanced filtering.
    PortId string

    The port ID.

    private_ip_address and port_id are returned only when a port/private IP address is associated with the elastic IP.

    PrivateIpAddress string
    The private IP address bound to the elastic IP.
    PublicIpAddress string
    The public IP address of the elastic IP.
    Region string
    Status string
    The status of the specific elastic IP to retrieve.
    Tags Dictionary<string, string>
    Tags key/value pairs to filter the elastic IPs.
    BandwidthId string
    The bandwidth ID of specific elastic IP.
    Id string
    Specifies a resource ID in UUID format.
    NameRegex string
    A regex string to apply to the eip list. This allows more advanced filtering.
    PortId string

    The port ID.

    private_ip_address and port_id are returned only when a port/private IP address is associated with the elastic IP.

    PrivateIpAddress string
    The private IP address bound to the elastic IP.
    PublicIpAddress string
    The public IP address of the elastic IP.
    Region string
    Status string
    The status of the specific elastic IP to retrieve.
    Tags map[string]string
    Tags key/value pairs to filter the elastic IPs.
    bandwidthId String
    The bandwidth ID of specific elastic IP.
    id String
    Specifies a resource ID in UUID format.
    nameRegex String
    A regex string to apply to the eip list. This allows more advanced filtering.
    portId String

    The port ID.

    private_ip_address and port_id are returned only when a port/private IP address is associated with the elastic IP.

    privateIpAddress String
    The private IP address bound to the elastic IP.
    publicIpAddress String
    The public IP address of the elastic IP.
    region String
    status String
    The status of the specific elastic IP to retrieve.
    tags Map<String,String>
    Tags key/value pairs to filter the elastic IPs.
    bandwidthId string
    The bandwidth ID of specific elastic IP.
    id string
    Specifies a resource ID in UUID format.
    nameRegex string
    A regex string to apply to the eip list. This allows more advanced filtering.
    portId string

    The port ID.

    private_ip_address and port_id are returned only when a port/private IP address is associated with the elastic IP.

    privateIpAddress string
    The private IP address bound to the elastic IP.
    publicIpAddress string
    The public IP address of the elastic IP.
    region string
    status string
    The status of the specific elastic IP to retrieve.
    tags {[key: string]: string}
    Tags key/value pairs to filter the elastic IPs.
    bandwidth_id str
    The bandwidth ID of specific elastic IP.
    id str
    Specifies a resource ID in UUID format.
    name_regex str
    A regex string to apply to the eip list. This allows more advanced filtering.
    port_id str

    The port ID.

    private_ip_address and port_id are returned only when a port/private IP address is associated with the elastic IP.

    private_ip_address str
    The private IP address bound to the elastic IP.
    public_ip_address str
    The public IP address of the elastic IP.
    region str
    status str
    The status of the specific elastic IP to retrieve.
    tags Mapping[str, str]
    Tags key/value pairs to filter the elastic IPs.
    bandwidthId String
    The bandwidth ID of specific elastic IP.
    id String
    Specifies a resource ID in UUID format.
    nameRegex String
    A regex string to apply to the eip list. This allows more advanced filtering.
    portId String

    The port ID.

    private_ip_address and port_id are returned only when a port/private IP address is associated with the elastic IP.

    privateIpAddress String
    The private IP address bound to the elastic IP.
    publicIpAddress String
    The public IP address of the elastic IP.
    region String
    status String
    The status of the specific elastic IP to retrieve.
    tags Map<String>
    Tags key/value pairs to filter the elastic IPs.

    getVpcEipV1 Result

    The following output properties are available:

    BandwidthShareType string
    Specifies the EIP bandwidth type.
    BandwidthSize double
    Specifies the bandwidth (Mbit/s).
    CreateTime string
    Specifies the time (UTC) when the elastic IP is assigned.
    IpVersion double
    The IP version of elastic IP.
    Name string
    Specifies the elastic IP Name.
    Region string
    TenantId string
    Specifies the project ID.
    Type string
    Specifies the elastic IP type.
    BandwidthId string
    Id string
    NameRegex string
    PortId string
    PrivateIpAddress string
    PublicIpAddress string
    Status string
    Tags Dictionary<string, string>
    BandwidthShareType string
    Specifies the EIP bandwidth type.
    BandwidthSize float64
    Specifies the bandwidth (Mbit/s).
    CreateTime string
    Specifies the time (UTC) when the elastic IP is assigned.
    IpVersion float64
    The IP version of elastic IP.
    Name string
    Specifies the elastic IP Name.
    Region string
    TenantId string
    Specifies the project ID.
    Type string
    Specifies the elastic IP type.
    BandwidthId string
    Id string
    NameRegex string
    PortId string
    PrivateIpAddress string
    PublicIpAddress string
    Status string
    Tags map[string]string
    bandwidthShareType String
    Specifies the EIP bandwidth type.
    bandwidthSize Double
    Specifies the bandwidth (Mbit/s).
    createTime String
    Specifies the time (UTC) when the elastic IP is assigned.
    ipVersion Double
    The IP version of elastic IP.
    name String
    Specifies the elastic IP Name.
    region String
    tenantId String
    Specifies the project ID.
    type String
    Specifies the elastic IP type.
    bandwidthId String
    id String
    nameRegex String
    portId String
    privateIpAddress String
    publicIpAddress String
    status String
    tags Map<String,String>
    bandwidthShareType string
    Specifies the EIP bandwidth type.
    bandwidthSize number
    Specifies the bandwidth (Mbit/s).
    createTime string
    Specifies the time (UTC) when the elastic IP is assigned.
    ipVersion number
    The IP version of elastic IP.
    name string
    Specifies the elastic IP Name.
    region string
    tenantId string
    Specifies the project ID.
    type string
    Specifies the elastic IP type.
    bandwidthId string
    id string
    nameRegex string
    portId string
    privateIpAddress string
    publicIpAddress string
    status string
    tags {[key: string]: string}
    bandwidth_share_type str
    Specifies the EIP bandwidth type.
    bandwidth_size float
    Specifies the bandwidth (Mbit/s).
    create_time str
    Specifies the time (UTC) when the elastic IP is assigned.
    ip_version float
    The IP version of elastic IP.
    name str
    Specifies the elastic IP Name.
    region str
    tenant_id str
    Specifies the project ID.
    type str
    Specifies the elastic IP type.
    bandwidth_id str
    id str
    name_regex str
    port_id str
    private_ip_address str
    public_ip_address str
    status str
    tags Mapping[str, str]
    bandwidthShareType String
    Specifies the EIP bandwidth type.
    bandwidthSize Number
    Specifies the bandwidth (Mbit/s).
    createTime String
    Specifies the time (UTC) when the elastic IP is assigned.
    ipVersion Number
    The IP version of elastic IP.
    name String
    Specifies the elastic IP Name.
    region String
    tenantId String
    Specifies the project ID.
    type String
    Specifies the elastic IP type.
    bandwidthId String
    id String
    nameRegex String
    portId String
    privateIpAddress String
    publicIpAddress String
    status String
    tags Map<String>

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud