EipArgs

data class EipArgs constructor(val activityId: Output<String>? = null, val addressName: Output<String>? = null, val allocationId: Output<String>? = null, val autoPay: Output<Boolean>? = null, val bandwidth: Output<String>? = null, val deletionProtection: Output<Boolean>? = null, val description: Output<String>? = null, val highDefinitionMonitorLogStatus: Output<String>? = null, val instanceChargeType: Output<String>? = null, val internetChargeType: Output<String>? = null, val ipAddress: Output<String>? = null, val isp: Output<String>? = null, val logProject: Output<String>? = null, val logStore: Output<String>? = null, val mode: Output<String>? = null, val name: Output<String>? = null, val netmode: Output<String>? = null, val paymentType: Output<String>? = null, val period: Output<Int>? = null, val pricingCycle: Output<String>? = null, val publicIpAddressPoolId: Output<String>? = null, val resourceGroupId: Output<String>? = null, val securityProtectionTypes: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null, val zone: Output<String>? = null) : ConvertibleToJava<EipArgs>

Provides an elastic IP resource.

DEPRECATED: This resource has been deprecated from version 1.126.0. Please use new resource alicloud_eip_address. NOTE: The resource only supports to create PostPaid PayByTraffic or PrePaid PayByBandwidth elastic IP for international account. Otherwise, you will happened error COMMODITY.INVALID_COMPONENT. Your account is international if you can use it to login in International Web Console. NOTE: From version 1.10.1, this resource supports creating "PrePaid" EIP. In addition, it supports setting EIP name and description.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Create a new EIP.
const example = new alicloud.ecs.Eip("example", {
bandwidth: "10",
internetChargeType: "PayByBandwidth",
});
import pulumi
import pulumi_alicloud as alicloud
# Create a new EIP.
example = alicloud.ecs.Eip("example",
bandwidth="10",
internet_charge_type="PayByBandwidth")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Create a new EIP.
var example = new AliCloud.Ecs.Eip("example", new()
{
Bandwidth = "10",
InternetChargeType = "PayByBandwidth",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new EIP.
_, err := ecs.NewEip(ctx, "example", &ecs.EipArgs{
Bandwidth: pulumi.String("10"),
InternetChargeType: pulumi.String("PayByBandwidth"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.Eip;
import com.pulumi.alicloud.ecs.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) {
// Create a new EIP.
var example = new Eip("example", EipArgs.builder()
.bandwidth("10")
.internetChargeType("PayByBandwidth")
.build());
}
}
resources:
# Create a new EIP.
example:
type: alicloud:ecs:Eip
properties:
bandwidth: '10'
internetChargeType: PayByBandwidth

Module Support

You can use the existing eip module to create several EIP instances and associate them with other resources one-click, like ECS instances, SLB, Nat Gateway and so on.

Import

Elastic IP address can be imported using the id, e.g.

$ pulumi import alicloud:ecs/eip:Eip example eip-abc12345678

Constructors

Link copied to clipboard
constructor(activityId: Output<String>? = null, addressName: Output<String>? = null, allocationId: Output<String>? = null, autoPay: Output<Boolean>? = null, bandwidth: Output<String>? = null, deletionProtection: Output<Boolean>? = null, description: Output<String>? = null, highDefinitionMonitorLogStatus: Output<String>? = null, instanceChargeType: Output<String>? = null, internetChargeType: Output<String>? = null, ipAddress: Output<String>? = null, isp: Output<String>? = null, logProject: Output<String>? = null, logStore: Output<String>? = null, mode: Output<String>? = null, name: Output<String>? = null, netmode: Output<String>? = null, paymentType: Output<String>? = null, period: Output<Int>? = null, pricingCycle: Output<String>? = null, publicIpAddressPoolId: Output<String>? = null, resourceGroupId: Output<String>? = null, securityProtectionTypes: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null, zone: Output<String>? = null)

Properties

Link copied to clipboard
val activityId: Output<String>? = null
Link copied to clipboard
val addressName: Output<String>? = null

The name of the EIP instance. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","_", and must not begin or end with a hyphen, and must not begin with http:// or https://.

Link copied to clipboard
val allocationId: Output<String>? = null
Link copied to clipboard
val autoPay: Output<Boolean>? = null
Link copied to clipboard
val bandwidth: Output<String>? = null

Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). If this value is not specified, then automatically sets it to 5 Mbps.

Link copied to clipboard
val deletionProtection: Output<Boolean>? = null

Whether enable the deletion protection or not. Default value: false.

Link copied to clipboard
val description: Output<String>? = null

Description of the EIP instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.

Link copied to clipboard
Link copied to clipboard
val instanceChargeType: Output<String>? = null

(It has been deprecated from version 1.126.0 and using new attribute payment_type instead) Elastic IP instance charge type. Valid values are "PrePaid" and "PostPaid". Default to "PostPaid".

Link copied to clipboard
val internetChargeType: Output<String>? = null

Internet charge type of the EIP, Valid values are PayByBandwidth, PayByTraffic. Default to PayByBandwidth. NOTE: From version 1.7.1 to 1.125.0, it defaults to PayByTraffic. It is only "PayByBandwidth" when instance_charge_type is PrePaid.

Link copied to clipboard
val ipAddress: Output<String>? = null

The elastic ip address

Link copied to clipboard
val isp: Output<String>? = null

The line type of the Elastic IP instance. Default to BGP. Other type of the isp need to open a whitelist.

Link copied to clipboard
val logProject: Output<String>? = null
Link copied to clipboard
val logStore: Output<String>? = null
Link copied to clipboard
val mode: Output<String>? = null
Link copied to clipboard
val name: Output<String>? = null

It has been deprecated from version 1.126.0 and using new attribute address_name instead.

Link copied to clipboard
val netmode: Output<String>? = null
Link copied to clipboard
val paymentType: Output<String>? = null

The billing method of the EIP. Valid values: Subscription and PayAsYouGo. Default value is PayAsYouGo.

Link copied to clipboard
val period: Output<Int>? = null

The duration that you will buy the resource, in month. It is valid when instance_charge_type is PrePaid. Valid values: 1-9, 12, 24, 36. At present, the provider does not support modify "period" and you can do that via web console. NOTE: The attribute period is only used to create Subscription instance or modify the PayAsYouGo instance to Subscription. Once effect, it will not be modified that means running pulumi up will not effect the resource.

Link copied to clipboard
val pricingCycle: Output<String>? = null
Link copied to clipboard
val publicIpAddressPoolId: Output<String>? = null
Link copied to clipboard
val resourceGroupId: Output<String>? = null

The Id of resource group which the eip belongs.

Link copied to clipboard
val securityProtectionTypes: Output<List<String>>? = null
Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val zone: Output<String>? = null

Functions

Link copied to clipboard
open override fun toJava(): EipArgs