1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ens
  5. Eip
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.ens.Eip

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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)
    public Eip(String name, EipArgs args)
    public Eip(String name, EipArgs args, CustomResourceOptions options)
    
    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:

    EnsRegionId string
    Ens node ID.
    InternetChargeType string
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    PaymentType string
    The billing type of the EIP instanceValue: PayAsYouGo.
    Bandwidth int
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    Description string
    The description of the EIP.
    EipName string
    Name of the EIP instance.
    Isp string
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    EnsRegionId string
    Ens node ID.
    InternetChargeType string
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    PaymentType string
    The billing type of the EIP instanceValue: PayAsYouGo.
    Bandwidth int
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    Description string
    The description of the EIP.
    EipName string
    Name of the EIP instance.
    Isp string
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    ensRegionId String
    Ens node ID.
    internetChargeType String
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    paymentType String
    The billing type of the EIP instanceValue: PayAsYouGo.
    bandwidth Integer
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    description String
    The description of the EIP.
    eipName String
    Name of the EIP instance.
    isp String
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    ensRegionId string
    Ens node ID.
    internetChargeType string
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    paymentType string
    The billing type of the EIP instanceValue: PayAsYouGo.
    bandwidth number
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    description string
    The description of the EIP.
    eipName string
    Name of the EIP instance.
    isp string
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    ens_region_id str
    Ens node ID.
    internet_charge_type str
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    payment_type str
    The billing type of the EIP instanceValue: PayAsYouGo.
    bandwidth int
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    description str
    The description of the EIP.
    eip_name str
    Name of the EIP instance.
    isp str
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    ensRegionId String
    Ens node ID.
    internetChargeType String
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    paymentType String
    The billing type of the EIP instanceValue: PayAsYouGo.
    bandwidth Number
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    description String
    The description of the EIP.
    eipName String
    Name of the EIP instance.
    isp String
    Internet service provider, if not filled in, it will be assigned according to the default rules.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Eip resource produces the following output properties:

    CreateTime 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 instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    CreateTime 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 instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    createTime 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 instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    createTime 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 instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    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 instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    createTime 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 instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.

    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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Bandwidth int
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    CreateTime string
    The creation time of the EIP instance.
    Description string
    The description of the EIP.
    EipName string
    Name of the EIP instance.
    EnsRegionId string
    Ens node ID.
    InternetChargeType string
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    Isp string
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    PaymentType string
    The billing type of the EIP instanceValue: PayAsYouGo.
    Status string
    The status of the EIP instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    Bandwidth int
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    CreateTime string
    The creation time of the EIP instance.
    Description string
    The description of the EIP.
    EipName string
    Name of the EIP instance.
    EnsRegionId string
    Ens node ID.
    InternetChargeType string
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    Isp string
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    PaymentType string
    The billing type of the EIP instanceValue: PayAsYouGo.
    Status string
    The status of the EIP instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    bandwidth Integer
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    createTime String
    The creation time of the EIP instance.
    description String
    The description of the EIP.
    eipName String
    Name of the EIP instance.
    ensRegionId String
    Ens node ID.
    internetChargeType String
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    isp String
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    paymentType String
    The billing type of the EIP instanceValue: PayAsYouGo.
    status String
    The status of the EIP instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    bandwidth number
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    createTime string
    The creation time of the EIP instance.
    description string
    The description of the EIP.
    eipName string
    Name of the EIP instance.
    ensRegionId string
    Ens node ID.
    internetChargeType string
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    isp string
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    paymentType string
    The billing type of the EIP instanceValue: PayAsYouGo.
    status string
    The status of the EIP instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    bandwidth int
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    create_time str
    The creation time of the EIP instance.
    description str
    The description of the EIP.
    eip_name str
    Name of the EIP instance.
    ens_region_id str
    Ens node ID.
    internet_charge_type str
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    isp str
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    payment_type str
    The billing type of the EIP instanceValue: PayAsYouGo.
    status str
    The status of the EIP instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.
    bandwidth Number
    The peak bandwidth of the EIP to be specified.Rules:Default value: 5, value range: 5~10000, unit: Mbps. Example value: 5.
    createTime String
    The creation time of the EIP instance.
    description String
    The description of the EIP.
    eipName String
    Name of the EIP instance.
    ensRegionId String
    Ens node ID.
    internetChargeType String
    Billing type of the EIP instance. Valid value: 95bandwidthbymonth.
    isp String
    Internet service provider, if not filled in, it will be assigned according to the default rules.
    paymentType String
    The billing type of the EIP instanceValue: PayAsYouGo.
    status String
    The status of the EIP instance.Rules:Associating: bindingUnassociating: UnbindingInUse: AssignedAvailable: AvailableCreating: CreatingReleasing: Releasing.

    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi