alicloud.ens.Eip
Explore with Pulumi AI
Provides a ENS Eip resource.
Edge elastic public network IP. When you use it for the first time, please contact the product classmates to add a resource whitelist.
For information about ENS Eip and how to use it, see What is Eip.
NOTE: Available since v1.213.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.ens.Eip("default", {
description: "EipDescription_autotest",
bandwidth: 5,
isp: "cmcc",
paymentType: "PayAsYouGo",
ensRegionId: "cn-chenzhou-telecom_unicom_cmcc",
eipName: name,
internetChargeType: "95BandwidthByMonth",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.ens.Eip("default",
description="EipDescription_autotest",
bandwidth=5,
isp="cmcc",
payment_type="PayAsYouGo",
ens_region_id="cn-chenzhou-telecom_unicom_cmcc",
eip_name=name,
internet_charge_type="95BandwidthByMonth")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ens"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := ens.NewEip(ctx, "default", &ens.EipArgs{
Description: pulumi.String("EipDescription_autotest"),
Bandwidth: pulumi.Int(5),
Isp: pulumi.String("cmcc"),
PaymentType: pulumi.String("PayAsYouGo"),
EnsRegionId: pulumi.String("cn-chenzhou-telecom_unicom_cmcc"),
EipName: pulumi.String(name),
InternetChargeType: pulumi.String("95BandwidthByMonth"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.Ens.Eip("default", new()
{
Description = "EipDescription_autotest",
Bandwidth = 5,
Isp = "cmcc",
PaymentType = "PayAsYouGo",
EnsRegionId = "cn-chenzhou-telecom_unicom_cmcc",
EipName = name,
InternetChargeType = "95BandwidthByMonth",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ens.Eip;
import com.pulumi.alicloud.ens.EipArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new Eip("default", EipArgs.builder()
.description("EipDescription_autotest")
.bandwidth(5)
.isp("cmcc")
.paymentType("PayAsYouGo")
.ensRegionId("cn-chenzhou-telecom_unicom_cmcc")
.eipName(name)
.internetChargeType("95BandwidthByMonth")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:ens:Eip
properties:
description: EipDescription_autotest
bandwidth: '5'
isp: cmcc
paymentType: PayAsYouGo
ensRegionId: cn-chenzhou-telecom_unicom_cmcc
eipName: ${name}
internetChargeType: 95BandwidthByMonth
Create Eip Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Eip(name: string, args: EipArgs, opts?: CustomResourceOptions);
@overload
def Eip(resource_name: str,
args: EipArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Eip(resource_name: str,
opts: Optional[ResourceOptions] = None,
ens_region_id: Optional[str] = None,
internet_charge_type: Optional[str] = None,
payment_type: Optional[str] = None,
bandwidth: Optional[int] = None,
description: Optional[str] = None,
eip_name: Optional[str] = None,
isp: Optional[str] = None)
func NewEip(ctx *Context, name string, args EipArgs, opts ...ResourceOption) (*Eip, error)
public Eip(string name, EipArgs args, CustomResourceOptions? opts = null)
type: alicloud:ens:Eip
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 EipArgs
- 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 EipArgs
- 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 EipArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EipArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EipArgs
- 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 eipResource = new AliCloud.Ens.Eip("eipResource", new()
{
EnsRegionId = "string",
InternetChargeType = "string",
PaymentType = "string",
Bandwidth = 0,
Description = "string",
EipName = "string",
Isp = "string",
});
example, err := ens.NewEip(ctx, "eipResource", &ens.EipArgs{
EnsRegionId: pulumi.String("string"),
InternetChargeType: pulumi.String("string"),
PaymentType: pulumi.String("string"),
Bandwidth: pulumi.Int(0),
Description: pulumi.String("string"),
EipName: pulumi.String("string"),
Isp: pulumi.String("string"),
})
var eipResource = new Eip("eipResource", EipArgs.builder()
.ensRegionId("string")
.internetChargeType("string")
.paymentType("string")
.bandwidth(0)
.description("string")
.eipName("string")
.isp("string")
.build());
eip_resource = alicloud.ens.Eip("eipResource",
ens_region_id="string",
internet_charge_type="string",
payment_type="string",
bandwidth=0,
description="string",
eip_name="string",
isp="string")
const eipResource = new alicloud.ens.Eip("eipResource", {
ensRegionId: "string",
internetChargeType: "string",
paymentType: "string",
bandwidth: 0,
description: "string",
eipName: "string",
isp: "string",
});
type: alicloud:ens:Eip
properties:
bandwidth: 0
description: string
eipName: string
ensRegionId: string
internetChargeType: string
isp: string
paymentType: string
Eip 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 Eip resource accepts the following input properties:
- Ens
Region stringId - Ens node ID.
- Internet
Charge stringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - Payment
Type string - The billing method of the EIP. Valid value:
PayAsYouGo
. - Bandwidth int
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - Description string
- The description of the EIP.
- Eip
Name string - The name of the EIP.
- Isp string
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
.
- Ens
Region stringId - Ens node ID.
- Internet
Charge stringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - Payment
Type string - The billing method of the EIP. Valid value:
PayAsYouGo
. - Bandwidth int
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - Description string
- The description of the EIP.
- Eip
Name string - The name of the EIP.
- Isp string
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
.
- ens
Region StringId - Ens node ID.
- internet
Charge StringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - payment
Type String - The billing method of the EIP. Valid value:
PayAsYouGo
. - bandwidth Integer
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - description String
- The description of the EIP.
- eip
Name String - The name of the EIP.
- isp String
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
.
- ens
Region stringId - Ens node ID.
- internet
Charge stringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - payment
Type string - The billing method of the EIP. Valid value:
PayAsYouGo
. - bandwidth number
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - description string
- The description of the EIP.
- eip
Name string - The name of the EIP.
- isp string
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
.
- ens_
region_ strid - Ens node ID.
- internet_
charge_ strtype - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - payment_
type str - The billing method of the EIP. Valid value:
PayAsYouGo
. - bandwidth int
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - description str
- The description of the EIP.
- eip_
name str - The name of the EIP.
- isp str
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
.
- ens
Region StringId - Ens node ID.
- internet
Charge StringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - payment
Type String - The billing method of the EIP. Valid value:
PayAsYouGo
. - bandwidth Number
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - description String
- The description of the EIP.
- eip
Name String - The name of the EIP.
- isp String
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
.
Outputs
All input properties are implicitly available as output properties. Additionally, the Eip resource produces the following output properties:
- Create
Time string - The creation time of the EIP instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the EIP.
- Create
Time string - The creation time of the EIP instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the EIP.
- create
Time String - The creation time of the EIP instance.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the EIP.
- create
Time string - The creation time of the EIP instance.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of the EIP.
- create_
time str - The creation time of the EIP instance.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of the EIP.
- create
Time String - The creation time of the EIP instance.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the EIP.
Look up Existing Eip Resource
Get an existing Eip 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?: EipState, opts?: CustomResourceOptions): Eip
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bandwidth: Optional[int] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
eip_name: Optional[str] = None,
ens_region_id: Optional[str] = None,
internet_charge_type: Optional[str] = None,
isp: Optional[str] = None,
payment_type: Optional[str] = None,
status: Optional[str] = None) -> Eip
func GetEip(ctx *Context, name string, id IDInput, state *EipState, opts ...ResourceOption) (*Eip, error)
public static Eip Get(string name, Input<string> id, EipState? state, CustomResourceOptions? opts = null)
public static Eip get(String name, Output<String> id, EipState state, CustomResourceOptions options)
resources: _: type: alicloud:ens:Eip 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.
- Bandwidth int
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - Create
Time string - The creation time of the EIP instance.
- Description string
- The description of the EIP.
- Eip
Name string - The name of the EIP.
- Ens
Region stringId - Ens node ID.
- Internet
Charge stringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - Isp string
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
. - Payment
Type string - The billing method of the EIP. Valid value:
PayAsYouGo
. - Status string
- The status of the EIP.
- Bandwidth int
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - Create
Time string - The creation time of the EIP instance.
- Description string
- The description of the EIP.
- Eip
Name string - The name of the EIP.
- Ens
Region stringId - Ens node ID.
- Internet
Charge stringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - Isp string
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
. - Payment
Type string - The billing method of the EIP. Valid value:
PayAsYouGo
. - Status string
- The status of the EIP.
- bandwidth Integer
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - create
Time String - The creation time of the EIP instance.
- description String
- The description of the EIP.
- eip
Name String - The name of the EIP.
- ens
Region StringId - Ens node ID.
- internet
Charge StringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - isp String
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
. - payment
Type String - The billing method of the EIP. Valid value:
PayAsYouGo
. - status String
- The status of the EIP.
- bandwidth number
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - create
Time string - The creation time of the EIP instance.
- description string
- The description of the EIP.
- eip
Name string - The name of the EIP.
- ens
Region stringId - Ens node ID.
- internet
Charge stringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - isp string
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
. - payment
Type string - The billing method of the EIP. Valid value:
PayAsYouGo
. - status string
- The status of the EIP.
- bandwidth int
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - create_
time str - The creation time of the EIP instance.
- description str
- The description of the EIP.
- eip_
name str - The name of the EIP.
- ens_
region_ strid - Ens node ID.
- internet_
charge_ strtype - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - isp str
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
. - payment_
type str - The billing method of the EIP. Valid value:
PayAsYouGo
. - status str
- The status of the EIP.
- bandwidth Number
- The maximum bandwidth of the EIP. Default value:
5
. Valid values:5
to10000
. Unit: Mbit/s. - create
Time String - The creation time of the EIP instance.
- description String
- The description of the EIP.
- eip
Name String - The name of the EIP.
- ens
Region StringId - Ens node ID.
- internet
Charge StringType - The metering method of the EIP. Valid value:
95BandwidthByMonth
. - isp String
- The Internet service provider. Valid value:
cmcc
,unicom
,telecom
. - payment
Type String - The billing method of the EIP. Valid value:
PayAsYouGo
. - status String
- The status of the EIP.
Import
ENS Eip can be imported using the id, e.g.
$ pulumi import alicloud:ens/eip:Eip example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.