All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.alicloud.ecs.Eip Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.alicloud.ecs;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.ecs.EipArgs;
import com.pulumi.alicloud.ecs.inputs.EipState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * 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](https://account.alibabacloud.com/login/login.htm).
 * 
 * > **NOTE:** From version 1.10.1, this resource supports creating "PrePaid" EIP. In addition, it supports setting EIP name and description.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## 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. * * ```sh * $ pulumi import alicloud:ecs/eip:Eip example eip-abc12345678 * ``` * * @deprecated * This resource has been deprecated in favour of the EipAddress resource * */ @Deprecated /* This resource has been deprecated in favour of the EipAddress resource */ @ResourceType(type="alicloud:ecs/eip:Eip") public class Eip extends com.pulumi.resources.CustomResource { @Export(name="activityId", refs={String.class}, tree="[0]") private Output activityId; public Output> activityId() { return Codegen.optional(this.activityId); } /** * 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://. * */ @Export(name="addressName", refs={String.class}, tree="[0]") private Output addressName; /** * @return 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://. * */ public Output addressName() { return this.addressName; } @Export(name="allocationId", refs={String.class}, tree="[0]") private Output allocationId; public Output allocationId() { return this.allocationId; } @Export(name="autoPay", refs={Boolean.class}, tree="[0]") private Output autoPay; public Output> autoPay() { return Codegen.optional(this.autoPay); } /** * 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. * */ @Export(name="bandwidth", refs={String.class}, tree="[0]") private Output bandwidth; /** * @return 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. * */ public Output bandwidth() { return this.bandwidth; } @Export(name="createTime", refs={String.class}, tree="[0]") private Output createTime; public Output createTime() { return this.createTime; } /** * Whether enable the deletion protection or not. Default value: `false`. * - true: Enable deletion protection. * - false: Disable deletion protection. * */ @Export(name="deletionProtection", refs={Boolean.class}, tree="[0]") private Output deletionProtection; /** * @return Whether enable the deletion protection or not. Default value: `false`. * - true: Enable deletion protection. * - false: Disable deletion protection. * */ public Output deletionProtection() { return this.deletionProtection; } /** * 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. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return 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. * */ public Output> description() { return Codegen.optional(this.description); } @Export(name="highDefinitionMonitorLogStatus", refs={String.class}, tree="[0]") private Output highDefinitionMonitorLogStatus; public Output highDefinitionMonitorLogStatus() { return this.highDefinitionMonitorLogStatus; } /** * (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". * * @deprecated * Field 'instance_charge_type' has been deprecated since provider version 1.126.0. New field 'payment_type' instead. * */ @Deprecated /* Field 'instance_charge_type' has been deprecated since provider version 1.126.0. New field 'payment_type' instead. */ @Export(name="instanceChargeType", refs={String.class}, tree="[0]") private Output instanceChargeType; /** * @return (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". * */ public Output instanceChargeType() { return this.instanceChargeType; } /** * 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. * */ @Export(name="internetChargeType", refs={String.class}, tree="[0]") private Output internetChargeType; /** * @return 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. * */ public Output internetChargeType() { return this.internetChargeType; } /** * The elastic ip address * */ @Export(name="ipAddress", refs={String.class}, tree="[0]") private Output ipAddress; /** * @return The elastic ip address * */ public Output ipAddress() { return this.ipAddress; } /** * The line type of the Elastic IP instance. Default to `BGP`. Other type of the isp need to open a whitelist. * */ @Export(name="isp", refs={String.class}, tree="[0]") private Output isp; /** * @return The line type of the Elastic IP instance. Default to `BGP`. Other type of the isp need to open a whitelist. * */ public Output isp() { return this.isp; } @Export(name="logProject", refs={String.class}, tree="[0]") private Output logProject; public Output> logProject() { return Codegen.optional(this.logProject); } @Export(name="logStore", refs={String.class}, tree="[0]") private Output logStore; public Output> logStore() { return Codegen.optional(this.logStore); } @Export(name="mode", refs={String.class}, tree="[0]") private Output mode; public Output mode() { return this.mode; } /** * It has been deprecated from version 1.126.0 and using new attribute `address_name` instead. * * @deprecated * Field 'name' has been deprecated since provider version 1.126.0. New field 'address_name' instead. * */ @Deprecated /* Field 'name' has been deprecated since provider version 1.126.0. New field 'address_name' instead. */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return It has been deprecated from version 1.126.0 and using new attribute `address_name` instead. * */ public Output name() { return this.name; } @Export(name="netmode", refs={String.class}, tree="[0]") private Output netmode; public Output netmode() { return this.netmode; } /** * The billing method of the EIP. Valid values: `Subscription` and `PayAsYouGo`. Default value is `PayAsYouGo`. * */ @Export(name="paymentType", refs={String.class}, tree="[0]") private Output paymentType; /** * @return The billing method of the EIP. Valid values: `Subscription` and `PayAsYouGo`. Default value is `PayAsYouGo`. * */ public Output paymentType() { return this.paymentType; } /** * 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. * */ @Export(name="period", refs={Integer.class}, tree="[0]") private Output period; /** * @return 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. * */ public Output> period() { return Codegen.optional(this.period); } @Export(name="pricingCycle", refs={String.class}, tree="[0]") private Output pricingCycle; public Output> pricingCycle() { return Codegen.optional(this.pricingCycle); } @Export(name="publicIpAddressPoolId", refs={String.class}, tree="[0]") private Output publicIpAddressPoolId; public Output> publicIpAddressPoolId() { return Codegen.optional(this.publicIpAddressPoolId); } /** * The Id of resource group which the eip belongs. * */ @Export(name="resourceGroupId", refs={String.class}, tree="[0]") private Output resourceGroupId; /** * @return The Id of resource group which the eip belongs. * */ public Output resourceGroupId() { return this.resourceGroupId; } @Export(name="securityProtectionTypes", refs={List.class,String.class}, tree="[0,1]") private Output> securityProtectionTypes; public Output>> securityProtectionTypes() { return Codegen.optional(this.securityProtectionTypes); } /** * The EIP current status. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return The EIP current status. * */ public Output status() { return this.status; } /** * A mapping of tags to assign to the resource. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags to assign to the resource. * */ public Output>> tags() { return Codegen.optional(this.tags); } @Export(name="zone", refs={String.class}, tree="[0]") private Output zone; public Output zone() { return this.zone; } /** * * @param name The _unique_ name of the resulting resource. */ public Eip(java.lang.String name) { this(name, EipArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Eip(java.lang.String name, @Nullable EipArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Eip(java.lang.String name, @Nullable EipArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ecs/eip:Eip", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Eip(java.lang.String name, Output id, @Nullable EipState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ecs/eip:Eip", name, state, makeResourceOptions(options, id), false); } private static EipArgs makeArgs(@Nullable EipArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? EipArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static Eip get(java.lang.String name, Output id, @Nullable EipState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Eip(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy