flexibleengine.VpcEip
Explore with Pulumi AI
Manages an EIP resource within FlexibleEngine VPC.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const eip1 = new flexibleengine.VpcEip("eip1", {
bandwidth: {
name: "test",
shareType: "PER",
size: 10,
},
publicip: {
type: "5_bgp",
},
});
const eipWithTags = new flexibleengine.VpcEip("eipWithTags", {
bandwidth: {
name: "mybandwidth",
shareType: "PER",
size: 10,
},
publicip: {
type: "5_bgp",
},
tags: {
foo: "bar",
key: "value",
},
});
import pulumi
import pulumi_flexibleengine as flexibleengine
eip1 = flexibleengine.VpcEip("eip1",
bandwidth={
"name": "test",
"share_type": "PER",
"size": 10,
},
publicip={
"type": "5_bgp",
})
eip_with_tags = flexibleengine.VpcEip("eipWithTags",
bandwidth={
"name": "mybandwidth",
"share_type": "PER",
"size": 10,
},
publicip={
"type": "5_bgp",
},
tags={
"foo": "bar",
"key": "value",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := flexibleengine.NewVpcEip(ctx, "eip1", &flexibleengine.VpcEipArgs{
Bandwidth: &flexibleengine.VpcEipBandwidthArgs{
Name: pulumi.String("test"),
ShareType: pulumi.String("PER"),
Size: pulumi.Float64(10),
},
Publicip: &flexibleengine.VpcEipPublicipArgs{
Type: pulumi.String("5_bgp"),
},
})
if err != nil {
return err
}
_, err = flexibleengine.NewVpcEip(ctx, "eipWithTags", &flexibleengine.VpcEipArgs{
Bandwidth: &flexibleengine.VpcEipBandwidthArgs{
Name: pulumi.String("mybandwidth"),
ShareType: pulumi.String("PER"),
Size: pulumi.Float64(10),
},
Publicip: &flexibleengine.VpcEipPublicipArgs{
Type: pulumi.String("5_bgp"),
},
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
"key": pulumi.String("value"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var eip1 = new Flexibleengine.VpcEip("eip1", new()
{
Bandwidth = new Flexibleengine.Inputs.VpcEipBandwidthArgs
{
Name = "test",
ShareType = "PER",
Size = 10,
},
Publicip = new Flexibleengine.Inputs.VpcEipPublicipArgs
{
Type = "5_bgp",
},
});
var eipWithTags = new Flexibleengine.VpcEip("eipWithTags", new()
{
Bandwidth = new Flexibleengine.Inputs.VpcEipBandwidthArgs
{
Name = "mybandwidth",
ShareType = "PER",
Size = 10,
},
Publicip = new Flexibleengine.Inputs.VpcEipPublicipArgs
{
Type = "5_bgp",
},
Tags =
{
{ "foo", "bar" },
{ "key", "value" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.VpcEip;
import com.pulumi.flexibleengine.VpcEipArgs;
import com.pulumi.flexibleengine.inputs.VpcEipBandwidthArgs;
import com.pulumi.flexibleengine.inputs.VpcEipPublicipArgs;
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 eip1 = new VpcEip("eip1", VpcEipArgs.builder()
.bandwidth(VpcEipBandwidthArgs.builder()
.name("test")
.shareType("PER")
.size(10)
.build())
.publicip(VpcEipPublicipArgs.builder()
.type("5_bgp")
.build())
.build());
var eipWithTags = new VpcEip("eipWithTags", VpcEipArgs.builder()
.bandwidth(VpcEipBandwidthArgs.builder()
.name("mybandwidth")
.shareType("PER")
.size(10)
.build())
.publicip(VpcEipPublicipArgs.builder()
.type("5_bgp")
.build())
.tags(Map.ofEntries(
Map.entry("foo", "bar"),
Map.entry("key", "value")
))
.build());
}
}
resources:
eip1:
type: flexibleengine:VpcEip
properties:
bandwidth:
name: test
shareType: PER
size: 10
publicip:
type: 5_bgp
eipWithTags:
type: flexibleengine:VpcEip
properties:
bandwidth:
name: mybandwidth
shareType: PER
size: 10
publicip:
type: 5_bgp
tags:
foo: bar
key: value
Create VpcEip Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcEip(name: string, args: VpcEipArgs, opts?: CustomResourceOptions);
@overload
def VpcEip(resource_name: str,
args: VpcEipArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpcEip(resource_name: str,
opts: Optional[ResourceOptions] = None,
bandwidth: Optional[VpcEipBandwidthArgs] = None,
publicip: Optional[VpcEipPublicipArgs] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[VpcEipTimeoutsArgs] = None,
vpc_eip_id: Optional[str] = None)
func NewVpcEip(ctx *Context, name string, args VpcEipArgs, opts ...ResourceOption) (*VpcEip, error)
public VpcEip(string name, VpcEipArgs args, CustomResourceOptions? opts = null)
public VpcEip(String name, VpcEipArgs args)
public VpcEip(String name, VpcEipArgs args, CustomResourceOptions options)
type: flexibleengine:VpcEip
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VpcEipArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VpcEipArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VpcEipArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcEipArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpcEipArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vpcEipResource = new Flexibleengine.VpcEip("vpcEipResource", new()
{
Bandwidth = new Flexibleengine.Inputs.VpcEipBandwidthArgs
{
Name = "string",
ShareType = "string",
Size = 0,
ChargeMode = "string",
},
Publicip = new Flexibleengine.Inputs.VpcEipPublicipArgs
{
Type = "string",
IpAddress = "string",
PortId = "string",
},
Region = "string",
Tags =
{
{ "string", "string" },
},
Timeouts = new Flexibleengine.Inputs.VpcEipTimeoutsArgs
{
Create = "string",
Delete = "string",
},
VpcEipId = "string",
});
example, err := flexibleengine.NewVpcEip(ctx, "vpcEipResource", &flexibleengine.VpcEipArgs{
Bandwidth: &flexibleengine.VpcEipBandwidthArgs{
Name: pulumi.String("string"),
ShareType: pulumi.String("string"),
Size: pulumi.Float64(0),
ChargeMode: pulumi.String("string"),
},
Publicip: &flexibleengine.VpcEipPublicipArgs{
Type: pulumi.String("string"),
IpAddress: pulumi.String("string"),
PortId: pulumi.String("string"),
},
Region: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeouts: &flexibleengine.VpcEipTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
VpcEipId: pulumi.String("string"),
})
var vpcEipResource = new VpcEip("vpcEipResource", VpcEipArgs.builder()
.bandwidth(VpcEipBandwidthArgs.builder()
.name("string")
.shareType("string")
.size(0)
.chargeMode("string")
.build())
.publicip(VpcEipPublicipArgs.builder()
.type("string")
.ipAddress("string")
.portId("string")
.build())
.region("string")
.tags(Map.of("string", "string"))
.timeouts(VpcEipTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.vpcEipId("string")
.build());
vpc_eip_resource = flexibleengine.VpcEip("vpcEipResource",
bandwidth={
"name": "string",
"share_type": "string",
"size": 0,
"charge_mode": "string",
},
publicip={
"type": "string",
"ip_address": "string",
"port_id": "string",
},
region="string",
tags={
"string": "string",
},
timeouts={
"create": "string",
"delete": "string",
},
vpc_eip_id="string")
const vpcEipResource = new flexibleengine.VpcEip("vpcEipResource", {
bandwidth: {
name: "string",
shareType: "string",
size: 0,
chargeMode: "string",
},
publicip: {
type: "string",
ipAddress: "string",
portId: "string",
},
region: "string",
tags: {
string: "string",
},
timeouts: {
create: "string",
"delete": "string",
},
vpcEipId: "string",
});
type: flexibleengine:VpcEip
properties:
bandwidth:
chargeMode: string
name: string
shareType: string
size: 0
publicip:
ipAddress: string
portId: string
type: string
region: string
tags:
string: string
timeouts:
create: string
delete: string
vpcEipId: string
VpcEip Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VpcEip resource accepts the following input properties:
- Bandwidth
Vpc
Eip Bandwidth - The bandwidth object.
- Publicip
Vpc
Eip Publicip - The elastic IP address object.
- Region string
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - Dictionary<string, string>
- The key/value pairs to associate with the EIP.
- Timeouts
Vpc
Eip Timeouts - Vpc
Eip stringId - The resource ID in UUID format.
- Bandwidth
Vpc
Eip Bandwidth Args - The bandwidth object.
- Publicip
Vpc
Eip Publicip Args - The elastic IP address object.
- Region string
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - map[string]string
- The key/value pairs to associate with the EIP.
- Timeouts
Vpc
Eip Timeouts Args - Vpc
Eip stringId - The resource ID in UUID format.
- bandwidth
Vpc
Eip Bandwidth - The bandwidth object.
- publicip
Vpc
Eip Publicip - The elastic IP address object.
- region String
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - Map<String,String>
- The key/value pairs to associate with the EIP.
- timeouts
Vpc
Eip Timeouts - vpc
Eip StringId - The resource ID in UUID format.
- bandwidth
Vpc
Eip Bandwidth - The bandwidth object.
- publicip
Vpc
Eip Publicip - The elastic IP address object.
- region string
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - {[key: string]: string}
- The key/value pairs to associate with the EIP.
- timeouts
Vpc
Eip Timeouts - vpc
Eip stringId - The resource ID in UUID format.
- bandwidth
Vpc
Eip Bandwidth Args - The bandwidth object.
- publicip
Vpc
Eip Publicip Args - The elastic IP address object.
- region str
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - Mapping[str, str]
- The key/value pairs to associate with the EIP.
- timeouts
Vpc
Eip Timeouts Args - vpc_
eip_ strid - The resource ID in UUID format.
- bandwidth Property Map
- The bandwidth object.
- publicip Property Map
- The elastic IP address object.
- region String
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - Map<String>
- The key/value pairs to associate with the EIP.
- timeouts Property Map
- vpc
Eip StringId - The resource ID in UUID format.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpcEip resource produces the following output properties:
Look up Existing VpcEip Resource
Get an existing VpcEip resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VpcEipState, opts?: CustomResourceOptions): VpcEip
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
bandwidth: Optional[VpcEipBandwidthArgs] = None,
publicip: Optional[VpcEipPublicipArgs] = None,
region: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[VpcEipTimeoutsArgs] = None,
vpc_eip_id: Optional[str] = None) -> VpcEip
func GetVpcEip(ctx *Context, name string, id IDInput, state *VpcEipState, opts ...ResourceOption) (*VpcEip, error)
public static VpcEip Get(string name, Input<string> id, VpcEipState? state, CustomResourceOptions? opts = null)
public static VpcEip get(String name, Output<String> id, VpcEipState state, CustomResourceOptions options)
resources: _: type: flexibleengine:VpcEip get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Address string
- The IP address of the EIP.
- Bandwidth
Vpc
Eip Bandwidth - The bandwidth object.
- Publicip
Vpc
Eip Publicip - The elastic IP address object.
- Region string
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - Status string
- The status of EIP.
- Dictionary<string, string>
- The key/value pairs to associate with the EIP.
- Timeouts
Vpc
Eip Timeouts - Vpc
Eip stringId - The resource ID in UUID format.
- Address string
- The IP address of the EIP.
- Bandwidth
Vpc
Eip Bandwidth Args - The bandwidth object.
- Publicip
Vpc
Eip Publicip Args - The elastic IP address object.
- Region string
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - Status string
- The status of EIP.
- map[string]string
- The key/value pairs to associate with the EIP.
- Timeouts
Vpc
Eip Timeouts Args - Vpc
Eip stringId - The resource ID in UUID format.
- address String
- The IP address of the EIP.
- bandwidth
Vpc
Eip Bandwidth - The bandwidth object.
- publicip
Vpc
Eip Publicip - The elastic IP address object.
- region String
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - status String
- The status of EIP.
- Map<String,String>
- The key/value pairs to associate with the EIP.
- timeouts
Vpc
Eip Timeouts - vpc
Eip StringId - The resource ID in UUID format.
- address string
- The IP address of the EIP.
- bandwidth
Vpc
Eip Bandwidth - The bandwidth object.
- publicip
Vpc
Eip Publicip - The elastic IP address object.
- region string
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - status string
- The status of EIP.
- {[key: string]: string}
- The key/value pairs to associate with the EIP.
- timeouts
Vpc
Eip Timeouts - vpc
Eip stringId - The resource ID in UUID format.
- address str
- The IP address of the EIP.
- bandwidth
Vpc
Eip Bandwidth Args - The bandwidth object.
- publicip
Vpc
Eip Publicip Args - The elastic IP address object.
- region str
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - status str
- The status of EIP.
- Mapping[str, str]
- The key/value pairs to associate with the EIP.
- timeouts
Vpc
Eip Timeouts Args - vpc_
eip_ strid - The resource ID in UUID format.
- address String
- The IP address of the EIP.
- bandwidth Property Map
- The bandwidth object.
- publicip Property Map
- The elastic IP address object.
- region String
- The region in which to create the EIP. If omitted,
the
region
argument of the provider is used. Changing this creates a new EIP. - status String
- The status of EIP.
- Map<String>
- The key/value pairs to associate with the EIP.
- timeouts Property Map
- vpc
Eip StringId - The resource ID in UUID format.
Supporting Types
VpcEipBandwidth, VpcEipBandwidthArgs
- Name string
- The bandwidth name, which is a string of 1 to 64 characters that contain letters, digits, underscores (_), and hyphens (-).
- string
- Specifies the bandwidth type. The value is PER, indicating that the bandwidth is dedicated. Changing this creates a new EIP.
- Size double
- The bandwidth size. The value ranges from 1 to 1000 Mbit/s.
- Charge
Mode string - Specifies whether the bandwidth is billed by traffic or by bandwidth size. Only traffic supported now. Changing this creates a new EIP.
- Name string
- The bandwidth name, which is a string of 1 to 64 characters that contain letters, digits, underscores (_), and hyphens (-).
- string
- Specifies the bandwidth type. The value is PER, indicating that the bandwidth is dedicated. Changing this creates a new EIP.
- Size float64
- The bandwidth size. The value ranges from 1 to 1000 Mbit/s.
- Charge
Mode string - Specifies whether the bandwidth is billed by traffic or by bandwidth size. Only traffic supported now. Changing this creates a new EIP.
- name String
- The bandwidth name, which is a string of 1 to 64 characters that contain letters, digits, underscores (_), and hyphens (-).
- String
- Specifies the bandwidth type. The value is PER, indicating that the bandwidth is dedicated. Changing this creates a new EIP.
- size Double
- The bandwidth size. The value ranges from 1 to 1000 Mbit/s.
- charge
Mode String - Specifies whether the bandwidth is billed by traffic or by bandwidth size. Only traffic supported now. Changing this creates a new EIP.
- name string
- The bandwidth name, which is a string of 1 to 64 characters that contain letters, digits, underscores (_), and hyphens (-).
- string
- Specifies the bandwidth type. The value is PER, indicating that the bandwidth is dedicated. Changing this creates a new EIP.
- size number
- The bandwidth size. The value ranges from 1 to 1000 Mbit/s.
- charge
Mode string - Specifies whether the bandwidth is billed by traffic or by bandwidth size. Only traffic supported now. Changing this creates a new EIP.
- name str
- The bandwidth name, which is a string of 1 to 64 characters that contain letters, digits, underscores (_), and hyphens (-).
- str
- Specifies the bandwidth type. The value is PER, indicating that the bandwidth is dedicated. Changing this creates a new EIP.
- size float
- The bandwidth size. The value ranges from 1 to 1000 Mbit/s.
- charge_
mode str - Specifies whether the bandwidth is billed by traffic or by bandwidth size. Only traffic supported now. Changing this creates a new EIP.
- name String
- The bandwidth name, which is a string of 1 to 64 characters that contain letters, digits, underscores (_), and hyphens (-).
- String
- Specifies the bandwidth type. The value is PER, indicating that the bandwidth is dedicated. Changing this creates a new EIP.
- size Number
- The bandwidth size. The value ranges from 1 to 1000 Mbit/s.
- charge
Mode String - Specifies whether the bandwidth is billed by traffic or by bandwidth size. Only traffic supported now. Changing this creates a new EIP.
VpcEipPublicip, VpcEipPublicipArgs
- Type string
- The value must be a type supported by the system. Only 5_bgp supported now. Changing this creates a new EIP.
- Ip
Address string - The value must be a valid IP address in the available IP address segment. Changing this creates a new EIP.
- Port
Id string - The port id which this EIP will associate with. If the value is not specified, the EIP will be in unbind state.
- Type string
- The value must be a type supported by the system. Only 5_bgp supported now. Changing this creates a new EIP.
- Ip
Address string - The value must be a valid IP address in the available IP address segment. Changing this creates a new EIP.
- Port
Id string - The port id which this EIP will associate with. If the value is not specified, the EIP will be in unbind state.
- type String
- The value must be a type supported by the system. Only 5_bgp supported now. Changing this creates a new EIP.
- ip
Address String - The value must be a valid IP address in the available IP address segment. Changing this creates a new EIP.
- port
Id String - The port id which this EIP will associate with. If the value is not specified, the EIP will be in unbind state.
- type string
- The value must be a type supported by the system. Only 5_bgp supported now. Changing this creates a new EIP.
- ip
Address string - The value must be a valid IP address in the available IP address segment. Changing this creates a new EIP.
- port
Id string - The port id which this EIP will associate with. If the value is not specified, the EIP will be in unbind state.
- type str
- The value must be a type supported by the system. Only 5_bgp supported now. Changing this creates a new EIP.
- ip_
address str - The value must be a valid IP address in the available IP address segment. Changing this creates a new EIP.
- port_
id str - The port id which this EIP will associate with. If the value is not specified, the EIP will be in unbind state.
- type String
- The value must be a type supported by the system. Only 5_bgp supported now. Changing this creates a new EIP.
- ip
Address String - The value must be a valid IP address in the available IP address segment. Changing this creates a new EIP.
- port
Id String - The port id which this EIP will associate with. If the value is not specified, the EIP will be in unbind state.
VpcEipTimeouts, VpcEipTimeoutsArgs
Import
EIPs can be imported using the id
, e.g.
$ pulumi import flexibleengine:index/vpcEip:VpcEip eip_1 2c7f39f3-702b-48d1-940c-b50384177ee1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.