opentelekomcloud.getVpcEipV1
Explore with Pulumi AI
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:
- Bandwidth
Id string - The bandwidth ID of specific elastic IP.
- Id string
- Specifies a resource ID in UUID format.
- Name
Regex string - A regex string to apply to the eip list. This allows more advanced filtering.
- Port
Id string The port ID.
private_ip_address
andport_id
are returned only when a port/private IP address is associated with the elastic IP.- Private
Ip stringAddress - The private IP address bound to the elastic IP.
- Public
Ip stringAddress - The public IP address of the elastic IP.
- Region string
- Status string
- The status of the specific elastic IP to retrieve.
- Dictionary<string, string>
- Tags key/value pairs to filter the elastic IPs.
- Bandwidth
Id string - The bandwidth ID of specific elastic IP.
- Id string
- Specifies a resource ID in UUID format.
- Name
Regex string - A regex string to apply to the eip list. This allows more advanced filtering.
- Port
Id string The port ID.
private_ip_address
andport_id
are returned only when a port/private IP address is associated with the elastic IP.- Private
Ip stringAddress - The private IP address bound to the elastic IP.
- Public
Ip stringAddress - The public IP address of the elastic IP.
- Region string
- Status string
- The status of the specific elastic IP to retrieve.
- map[string]string
- Tags key/value pairs to filter the elastic IPs.
- bandwidth
Id String - The bandwidth ID of specific elastic IP.
- id String
- Specifies a resource ID in UUID format.
- name
Regex String - A regex string to apply to the eip list. This allows more advanced filtering.
- port
Id String The port ID.
private_ip_address
andport_id
are returned only when a port/private IP address is associated with the elastic IP.- private
Ip StringAddress - The private IP address bound to the elastic IP.
- public
Ip StringAddress - The public IP address of the elastic IP.
- region String
- status String
- The status of the specific elastic IP to retrieve.
- Map<String,String>
- Tags key/value pairs to filter the elastic IPs.
- bandwidth
Id string - The bandwidth ID of specific elastic IP.
- id string
- Specifies a resource ID in UUID format.
- name
Regex string - A regex string to apply to the eip list. This allows more advanced filtering.
- port
Id string The port ID.
private_ip_address
andport_id
are returned only when a port/private IP address is associated with the elastic IP.- private
Ip stringAddress - The private IP address bound to the elastic IP.
- public
Ip stringAddress - The public IP address of the elastic IP.
- region string
- status string
- The status of the specific elastic IP to retrieve.
- {[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
andport_id
are returned only when a port/private IP address is associated with the elastic IP.- private_
ip_ straddress - The private IP address bound to the elastic IP.
- public_
ip_ straddress - The public IP address of the elastic IP.
- region str
- status str
- The status of the specific elastic IP to retrieve.
- Mapping[str, str]
- Tags key/value pairs to filter the elastic IPs.
- bandwidth
Id String - The bandwidth ID of specific elastic IP.
- id String
- Specifies a resource ID in UUID format.
- name
Regex String - A regex string to apply to the eip list. This allows more advanced filtering.
- port
Id String The port ID.
private_ip_address
andport_id
are returned only when a port/private IP address is associated with the elastic IP.- private
Ip StringAddress - The private IP address bound to the elastic IP.
- public
Ip StringAddress - The public IP address of the elastic IP.
- region String
- status String
- The status of the specific elastic IP to retrieve.
- Map<String>
- Tags key/value pairs to filter the elastic IPs.
getVpcEipV1 Result
The following output properties are available:
- string
- Specifies the EIP bandwidth type.
- Bandwidth
Size double - Specifies the bandwidth (Mbit/s).
- Create
Time string - Specifies the time (UTC) when the elastic IP is assigned.
- Ip
Version double - The IP version of elastic IP.
- Name string
- Specifies the elastic IP Name.
- Region string
- Tenant
Id string - Specifies the project ID.
- Type string
- Specifies the elastic IP type.
- Bandwidth
Id string - Id string
- Name
Regex string - Port
Id string - Private
Ip stringAddress - Public
Ip stringAddress - Status string
- Dictionary<string, string>
- string
- Specifies the EIP bandwidth type.
- Bandwidth
Size float64 - Specifies the bandwidth (Mbit/s).
- Create
Time string - Specifies the time (UTC) when the elastic IP is assigned.
- Ip
Version float64 - The IP version of elastic IP.
- Name string
- Specifies the elastic IP Name.
- Region string
- Tenant
Id string - Specifies the project ID.
- Type string
- Specifies the elastic IP type.
- Bandwidth
Id string - Id string
- Name
Regex string - Port
Id string - Private
Ip stringAddress - Public
Ip stringAddress - Status string
- map[string]string
- String
- Specifies the EIP bandwidth type.
- bandwidth
Size Double - Specifies the bandwidth (Mbit/s).
- create
Time String - Specifies the time (UTC) when the elastic IP is assigned.
- ip
Version Double - The IP version of elastic IP.
- name String
- Specifies the elastic IP Name.
- region String
- tenant
Id String - Specifies the project ID.
- type String
- Specifies the elastic IP type.
- bandwidth
Id String - id String
- name
Regex String - port
Id String - private
Ip StringAddress - public
Ip StringAddress - status String
- Map<String,String>
- string
- Specifies the EIP bandwidth type.
- bandwidth
Size number - Specifies the bandwidth (Mbit/s).
- create
Time string - Specifies the time (UTC) when the elastic IP is assigned.
- ip
Version number - The IP version of elastic IP.
- name string
- Specifies the elastic IP Name.
- region string
- tenant
Id string - Specifies the project ID.
- type string
- Specifies the elastic IP type.
- bandwidth
Id string - id string
- name
Regex string - port
Id string - private
Ip stringAddress - public
Ip stringAddress - status string
- {[key: string]: string}
- 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_ straddress - public_
ip_ straddress - status str
- Mapping[str, str]
- String
- Specifies the EIP bandwidth type.
- bandwidth
Size Number - Specifies the bandwidth (Mbit/s).
- create
Time String - Specifies the time (UTC) when the elastic IP is assigned.
- ip
Version Number - The IP version of elastic IP.
- name String
- Specifies the elastic IP Name.
- region String
- tenant
Id String - Specifies the project ID.
- type String
- Specifies the elastic IP type.
- bandwidth
Id String - id String
- name
Regex String - port
Id String - private
Ip StringAddress - public
Ip StringAddress - status String
- Map<String>
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.