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

com.pulumi.alicloud.ecs.Instance 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.InstanceArgs;
import com.pulumi.alicloud.ecs.inputs.InstanceState;
import com.pulumi.alicloud.ecs.outputs.InstanceDataDisk;
import com.pulumi.alicloud.ecs.outputs.InstanceMaintenanceTime;
import com.pulumi.alicloud.ecs.outputs.InstanceNetworkInterfaces;
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.Double;
import java.lang.Integer;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides a ECS instance resource.
 * 
 * > **NOTE:** Available since v1.0.0
 * 
 * > **NOTE:** From version v1.213.0, you can specify `launch_template_id` and `launch_template_version` to use a launch template. This eliminates the need to configure a large number of parameters every time you create instances.
 * 
 * ## 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.vpc.Network;
 * import com.pulumi.alicloud.vpc.NetworkArgs;
 * import com.pulumi.alicloud.ecs.SecurityGroup;
 * import com.pulumi.alicloud.ecs.SecurityGroupArgs;
 * import com.pulumi.alicloud.kms.Key;
 * import com.pulumi.alicloud.kms.KeyArgs;
 * import com.pulumi.alicloud.AlicloudFunctions;
 * import com.pulumi.alicloud.inputs.GetZonesArgs;
 * import com.pulumi.alicloud.vpc.Switch;
 * import com.pulumi.alicloud.vpc.SwitchArgs;
 * import com.pulumi.alicloud.ecs.Instance;
 * import com.pulumi.alicloud.ecs.InstanceArgs;
 * import com.pulumi.alicloud.ecs.inputs.InstanceDataDiskArgs;
 * 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");
 *         // Create a new ECS instance for VPC
 *         var vpc = new Network("vpc", NetworkArgs.builder()
 *             .vpcName(name)
 *             .cidrBlock("172.16.0.0/16")
 *             .build());
 * 
 *         // Create a new ECS instance for a VPC
 *         var group = new SecurityGroup("group", SecurityGroupArgs.builder()
 *             .name(name)
 *             .description("foo")
 *             .vpcId(vpc.id())
 *             .build());
 * 
 *         var key = new Key("key", KeyArgs.builder()
 *             .description("Hello KMS")
 *             .pendingWindowInDays("7")
 *             .status("Enabled")
 *             .build());
 * 
 *         final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
 *             .availableDiskCategory("cloud_efficiency")
 *             .availableResourceCreation("VSwitch")
 *             .build());
 * 
 *         var vswitch = new Switch("vswitch", SwitchArgs.builder()
 *             .vpcId(vpc.id())
 *             .cidrBlock("172.16.0.0/24")
 *             .zoneId(default_.zones()[0].id())
 *             .vswitchName(name)
 *             .build());
 * 
 *         var instance = new Instance("instance", InstanceArgs.builder()
 *             .availabilityZone(default_.zones()[0].id())
 *             .securityGroups(group.stream().map(element -> element.id()).collect(toList()))
 *             .instanceType("ecs.n4.large")
 *             .systemDiskCategory("cloud_efficiency")
 *             .systemDiskName(name)
 *             .systemDiskDescription("test_foo_system_disk_description")
 *             .imageId("ubuntu_18_04_64_20G_alibase_20190624.vhd")
 *             .instanceName(name)
 *             .vswitchId(vswitch.id())
 *             .internetMaxBandwidthOut(10)
 *             .dataDisks(InstanceDataDiskArgs.builder()
 *                 .name("disk2")
 *                 .size(20)
 *                 .category("cloud_efficiency")
 *                 .description("disk2")
 *                 .encrypted(true)
 *                 .kmsKeyId(key.id())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Module Support * * You can use the existing ecs-instance module * to create several ECS instances one-click. * * ## Import * * Instance can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:ecs/instance:Instance example i-abc12345678 * ``` * */ @ResourceType(type="alicloud:ecs/instance:Instance") public class Instance extends com.pulumi.resources.CustomResource { /** * It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance. * * @deprecated * Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance. * */ @Deprecated /* Field 'allocate_public_ip' has been deprecated from provider version 1.6.1. Setting 'internet_max_bandwidth_out' larger than 0 will allocate public ip for instance. */ @Export(name="allocatePublicIp", refs={Boolean.class}, tree="[0]") private Output allocatePublicIp; /** * @return It has been deprecated from version "1.7.0". Setting "internet_max_bandwidth_out" larger than 0 can allocate a public ip address for an instance. * */ public Output> allocatePublicIp() { return Codegen.optional(this.allocatePublicIp); } /** * The automatic release time of the `PostPaid` instance. * The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. * Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. * */ @Export(name="autoReleaseTime", refs={String.class}, tree="[0]") private Output autoReleaseTime; /** * @return The automatic release time of the `PostPaid` instance. * The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. * Setting it to null can cancel automatic release feature, and the ECS instance will not be released automatically. * */ public Output> autoReleaseTime() { return Codegen.optional(this.autoReleaseTime); } /** * Auto renewal period of an instance, in the unit of month. It is valid when `instance_charge_type` is `PrePaid`. Default to 1. Valid value: * - [1, 2, 3, 6, 12] when `period_unit` in "Month" * - [1, 2, 3] when `period_unit` in "Week" * */ @Export(name="autoRenewPeriod", refs={Integer.class}, tree="[0]") private Output autoRenewPeriod; /** * @return Auto renewal period of an instance, in the unit of month. It is valid when `instance_charge_type` is `PrePaid`. Default to 1. Valid value: * - [1, 2, 3, 6, 12] when `period_unit` in "Month" * - [1, 2, 3] when `period_unit` in "Week" * */ public Output> autoRenewPeriod() { return Codegen.optional(this.autoRenewPeriod); } /** * The Zone to start the instance in. It is ignored and will be computed when set `vswitch_id`. * */ @Export(name="availabilityZone", refs={String.class}, tree="[0]") private Output availabilityZone; /** * @return The Zone to start the instance in. It is ignored and will be computed when set `vswitch_id`. * */ public Output availabilityZone() { return this.availabilityZone; } /** * The number of vCPUs. * */ @Export(name="cpu", refs={Integer.class}, tree="[0]") private Output cpu; /** * @return The number of vCPUs. * */ public Output cpu() { return this.cpu; } /** * Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'. * */ @Export(name="creditSpecification", refs={String.class}, tree="[0]") private Output creditSpecification; /** * @return Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'. * */ public Output creditSpecification() { return this.creditSpecification; } /** * The list of data disks created with instance. See `data_disks` below. * */ @Export(name="dataDisks", refs={List.class,InstanceDataDisk.class}, tree="[0,1]") private Output> dataDisks; /** * @return The list of data disks created with instance. See `data_disks` below. * */ public Output>> dataDisks() { return Codegen.optional(this.dataDisks); } /** * The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the `spot_strategy` and `spot_price_limit` parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. * */ @Export(name="dedicatedHostId", refs={String.class}, tree="[0]") private Output dedicatedHostId; /** * @return The ID of the dedicated host on which to create the instance. If you set the DedicatedHostId parameter, the `spot_strategy` and `spot_price_limit` parameters cannot be set. This is because preemptible instances cannot be created on dedicated hosts. * */ public Output> dedicatedHostId() { return Codegen.optional(this.dedicatedHostId); } /** * Whether enable the deletion protection or not. It does not work when the instance is spot. 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. It does not work when the instance is spot. Default value: `false`. * - true: Enable deletion protection. * - false: Disable deletion protection. * */ public Output> deletionProtection() { return Codegen.optional(this.deletionProtection); } /** * The group number of the instance in a deployment set when the deployment set is use. * */ @Export(name="deploymentSetGroupNo", refs={String.class}, tree="[0]") private Output deploymentSetGroupNo; /** * @return The group number of the instance in a deployment set when the deployment set is use. * */ public Output deploymentSetGroupNo() { return this.deploymentSetGroupNo; } /** * The ID of the deployment set to which to deploy the instance. **NOTE:** From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "". * */ @Export(name="deploymentSetId", refs={String.class}, tree="[0]") private Output deploymentSetId; /** * @return The ID of the deployment set to which to deploy the instance. **NOTE:** From version 1.176.0, instance's deploymentSetId can be removed when 'deployment_set_id' = "". * */ public Output> deploymentSetId() { return Codegen.optional(this.deploymentSetId); } /** * Description of the 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 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 this.description; } /** * Specifies whether to send a dry-run request. Default to false. * - true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the `DryRunOperation` error code is returned. * - false: A request is sent. If the validation succeeds, the instance is created. * */ @Export(name="dryRun", refs={Boolean.class}, tree="[0]") private Output dryRun; /** * @return Specifies whether to send a dry-run request. Default to false. * - true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the `DryRunOperation` error code is returned. * - false: A request is sent. If the validation succeeds, the instance is created. * */ public Output> dryRun() { return Codegen.optional(this.dryRun); } /** * Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: `true`, `false`. * * > **NOTE:** System disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk. * * > **NOTE:** From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying `period` and `period_unit`, but it is irreversible. * * > **NOTE:** From version 1.5.0, instance's private IP address can be specified when creating VPC network instance. * * > **NOTE:** From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect. * * > **NOTE:** From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. * Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). * However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth". * * > **NOTE:** From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect. * */ @Export(name="enableJumboFrame", refs={Boolean.class}, tree="[0]") private Output enableJumboFrame; /** * @return Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: `true`, `false`. * * > **NOTE:** System disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk. * * > **NOTE:** From version 1.5.0, instance's charge type can be changed to "PrePaid" by specifying `period` and `period_unit`, but it is irreversible. * * > **NOTE:** From version 1.5.0, instance's private IP address can be specified when creating VPC network instance. * * > **NOTE:** From version 1.5.0, instance's vswitch and private IP can be changed in the same availability zone. When they are changed, the instance will reboot to make the change take effect. * * > **NOTE:** From version 1.7.0, setting "internet_max_bandwidth_out" larger than 0 can allocate a public IP for an instance. * Setting "internet_max_bandwidth_out" to 0 can release allocated public IP for VPC instance(For Classic instnace, its public IP cannot be release once it allocated, even thougth its bandwidth out is 0). * However, at present, 'PrePaid' instance cannot narrow its max bandwidth out when its 'internet_charge_type' is "PayByBandwidth". * * > **NOTE:** From version 1.7.0, instance's type can be changed. When it is changed, the instance will reboot to make the change take effect. * */ public Output enableJumboFrame() { return this.enableJumboFrame; } /** * If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. * However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month". * */ @Export(name="forceDelete", refs={Boolean.class}, tree="[0]") private Output forceDelete; /** * @return If it is true, the "PrePaid" instance will be change to "PostPaid" and then deleted forcibly. * However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that "Don't modify instance charge type frequentlly in one month". * */ public Output> forceDelete() { return Codegen.optional(this.forceDelete); } /** * Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. * On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect. * */ @Export(name="hostName", refs={String.class}, tree="[0]") private Output hostName; /** * @return Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. * On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect. * */ public Output hostName() { return this.hostName; } /** * The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance. * */ @Export(name="hpcClusterId", refs={String.class}, tree="[0]") private Output hpcClusterId; /** * @return The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance. * */ public Output> hpcClusterId() { return Codegen.optional(this.hpcClusterId); } /** * Specifies whether to enable the access channel for instance metadata. Valid values: `enabled`, `disabled`. Default value: `enabled`. * */ @Export(name="httpEndpoint", refs={String.class}, tree="[0]") private Output httpEndpoint; /** * @return Specifies whether to enable the access channel for instance metadata. Valid values: `enabled`, `disabled`. Default value: `enabled`. * */ public Output httpEndpoint() { return this.httpEndpoint; } /** * The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1. * */ @Export(name="httpPutResponseHopLimit", refs={Integer.class}, tree="[0]") private Output httpPutResponseHopLimit; /** * @return The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1. * */ public Output httpPutResponseHopLimit() { return this.httpPutResponseHopLimit; } /** * Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values: * - optional: does not forcefully use the security-enhanced mode (IMDSv2). * - required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode. * */ @Export(name="httpTokens", refs={String.class}, tree="[0]") private Output httpTokens; /** * @return Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Default value: optional. Valid values: * - optional: does not forcefully use the security-enhanced mode (IMDSv2). * - required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode. * */ public Output httpTokens() { return this.httpTokens; } /** * The Image to use for the instance. ECS instance's image can be replaced via changing `image_id`. When it is changed, the instance will reboot to make the change take effect. If you do not use `launch_template_id` or `launch_template_name` to specify a launch template, you must specify `image_id`. * */ @Export(name="imageId", refs={String.class}, tree="[0]") private Output imageId; /** * @return The Image to use for the instance. ECS instance's image can be replaced via changing `image_id`. When it is changed, the instance will reboot to make the change take effect. If you do not use `launch_template_id` or `launch_template_name` to specify a launch template, you must specify `image_id`. * */ public Output imageId() { return this.imageId; } /** * Whether to change instance disks charge type when changing instance charge type. * */ @Export(name="includeDataDisks", refs={Boolean.class}, tree="[0]") private Output includeDataDisks; /** * @return Whether to change instance disks charge type when changing instance charge type. * */ public Output> includeDataDisks() { return Codegen.optional(this.includeDataDisks); } /** * Valid values are `PrePaid`, `PostPaid`, The default is `PostPaid`. * **NOTE:** Since 1.9.6, it can be changed each other between `PostPaid` and `PrePaid`. * However, since [some limitation about CPU core count in one month](https://www.alibabacloud.com/help/en/elastic-compute-service/latest/modifyinstancechargetype), * there strongly recommends that `Don't change instance_charge_type frequentlly in one month`. * */ @Export(name="instanceChargeType", refs={String.class}, tree="[0]") private Output instanceChargeType; /** * @return Valid values are `PrePaid`, `PostPaid`, The default is `PostPaid`. * **NOTE:** Since 1.9.6, it can be changed each other between `PostPaid` and `PrePaid`. * However, since [some limitation about CPU core count in one month](https://www.alibabacloud.com/help/en/elastic-compute-service/latest/modifyinstancechargetype), * there strongly recommends that `Don't change instance_charge_type frequentlly in one month`. * */ public Output instanceChargeType() { return this.instanceChargeType; } @Export(name="instanceName", refs={String.class}, tree="[0]") private Output instanceName; public Output instanceName() { return this.instanceName; } /** * The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use `launch_template_id` or `launch_template_name` to specify a launch template, you must specify `instance_type`. * */ @Export(name="instanceType", refs={String.class}, tree="[0]") private Output instanceType; /** * @return The type of instance to start. When it is changed, the instance will reboot to make the change take effect. If you do not use `launch_template_id` or `launch_template_name` to specify a launch template, you must specify `instance_type`. * */ public Output instanceType() { return this.instanceType; } /** * Internet charge type of the instance, Valid values are `PayByBandwidth`, `PayByTraffic`. Default is `PayByTraffic`. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". * */ @Export(name="internetChargeType", refs={String.class}, tree="[0]") private Output internetChargeType; /** * @return Internet charge type of the instance, Valid values are `PayByBandwidth`, `PayByTraffic`. Default is `PayByTraffic`. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic". * */ public Output internetChargeType() { return this.internetChargeType; } /** * Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps. * * @deprecated * The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2. * */ @Deprecated /* The attribute is invalid and no any affect for the instance. So it has been deprecated since version v1.121.2. */ @Export(name="internetMaxBandwidthIn", refs={Integer.class}, tree="[0]") private Output internetMaxBandwidthIn; /** * @return Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps. * */ public Output internetMaxBandwidthIn() { return this.internetMaxBandwidthIn; } /** * Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps. * */ @Export(name="internetMaxBandwidthOut", refs={Integer.class}, tree="[0]") private Output internetMaxBandwidthOut; /** * @return Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps. * */ public Output internetMaxBandwidthOut() { return this.internetMaxBandwidthOut; } /** * The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. **NOTE:** You cannot specify both the `ipv6_addresses` and `ipv6_address_count` parameters. * */ @Export(name="ipv6AddressCount", refs={Integer.class}, tree="[0]") private Output ipv6AddressCount; /** * @return The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10. **NOTE:** You cannot specify both the `ipv6_addresses` and `ipv6_address_count` parameters. * */ public Output ipv6AddressCount() { return this.ipv6AddressCount; } /** * A list of IPv6 address to be assigned to the primary ENI. Support up to 10. * */ @Export(name="ipv6Addresses", refs={List.class,String.class}, tree="[0,1]") private Output> ipv6Addresses; /** * @return A list of IPv6 address to be assigned to the primary ENI. Support up to 10. * */ public Output> ipv6Addresses() { return this.ipv6Addresses; } /** * Whether to use outdated instance type. Default to false. * */ @Export(name="isOutdated", refs={Boolean.class}, tree="[0]") private Output isOutdated; /** * @return Whether to use outdated instance type. Default to false. * */ public Output> isOutdated() { return Codegen.optional(this.isOutdated); } /** * The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid. * */ @Export(name="keyName", refs={String.class}, tree="[0]") private Output keyName; /** * @return The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid. * */ public Output keyName() { return this.keyName; } /** * An KMS encrypts password used to an instance. If the `password` is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. * */ @Export(name="kmsEncryptedPassword", refs={String.class}, tree="[0]") private Output kmsEncryptedPassword; /** * @return An KMS encrypts password used to an instance. If the `password` is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect. * */ public Output> kmsEncryptedPassword() { return Codegen.optional(this.kmsEncryptedPassword); } /** * An KMS encryption context used to decrypt `kms_encrypted_password` before creating or updating an instance with `kms_encrypted_password`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kms_encrypted_password` is set. When it is changed, the instance will reboot to make the change take effect. * */ @Export(name="kmsEncryptionContext", refs={Map.class,String.class,Object.class}, tree="[0,1,2]") private Output> kmsEncryptionContext; /** * @return An KMS encryption context used to decrypt `kms_encrypted_password` before creating or updating an instance with `kms_encrypted_password`. See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/42975.htm). It is valid when `kms_encrypted_password` is set. When it is changed, the instance will reboot to make the change take effect. * */ public Output>> kmsEncryptionContext() { return Codegen.optional(this.kmsEncryptionContext); } /** * The ID of the launch template. For more information, see [DescribeLaunchTemplates](https://www.alibabacloud.com/help/en/ecs/developer-reference/api-describelaunchtemplates).To use a launch template to create an instance, you must use the `launch_template_id` or `launch_template_name` parameter to specify the launch template. * */ @Export(name="launchTemplateId", refs={String.class}, tree="[0]") private Output launchTemplateId; /** * @return The ID of the launch template. For more information, see [DescribeLaunchTemplates](https://www.alibabacloud.com/help/en/ecs/developer-reference/api-describelaunchtemplates).To use a launch template to create an instance, you must use the `launch_template_id` or `launch_template_name` parameter to specify the launch template. * */ public Output> launchTemplateId() { return Codegen.optional(this.launchTemplateId); } /** * The name of the launch template. * */ @Export(name="launchTemplateName", refs={String.class}, tree="[0]") private Output launchTemplateName; /** * @return The name of the launch template. * */ public Output> launchTemplateName() { return Codegen.optional(this.launchTemplateName); } /** * The version of the launch template. If you set `launch_template_id` or `launch_template_name` parameter but do not set the version number of the launch template, the default template version is used. * */ @Export(name="launchTemplateVersion", refs={String.class}, tree="[0]") private Output launchTemplateVersion; /** * @return The version of the launch template. If you set `launch_template_id` or `launch_template_name` parameter but do not set the version number of the launch template, the default template version is used. * */ public Output> launchTemplateVersion() { return Codegen.optional(this.launchTemplateVersion); } /** * The maintenance action. Valid values: `Stop`, `AutoRecover` and `AutoRedeploy`. * * `Stop` : stops the instance. * * `AutoRecover` : automatically recovers the instance. * * `AutoRedeploy` : fails the instance over, which may cause damage to the data disks attached to the instance. * */ @Export(name="maintenanceAction", refs={String.class}, tree="[0]") private Output maintenanceAction; /** * @return The maintenance action. Valid values: `Stop`, `AutoRecover` and `AutoRedeploy`. * * `Stop` : stops the instance. * * `AutoRecover` : automatically recovers the instance. * * `AutoRedeploy` : fails the instance over, which may cause damage to the data disks attached to the instance. * */ public Output maintenanceAction() { return this.maintenanceAction; } /** * Specifies whether to send an event notification before instance shutdown. Valid values: `true`, `false`. Default value: `false`. * */ @Export(name="maintenanceNotify", refs={Boolean.class}, tree="[0]") private Output maintenanceNotify; /** * @return Specifies whether to send an event notification before instance shutdown. Valid values: `true`, `false`. Default value: `false`. * */ public Output> maintenanceNotify() { return Codegen.optional(this.maintenanceNotify); } /** * The time of maintenance. See `maintenance_time` below. * */ @Export(name="maintenanceTime", refs={InstanceMaintenanceTime.class}, tree="[0]") private Output maintenanceTime; /** * @return The time of maintenance. See `maintenance_time` below. * */ public Output> maintenanceTime() { return Codegen.optional(this.maintenanceTime); } /** * The memory size of the instance. Unit: MiB. * */ @Export(name="memory", refs={Integer.class}, tree="[0]") private Output memory; /** * @return The memory size of the instance. Unit: MiB. * */ public Output memory() { return this.memory; } /** * The ID of the ENI. * */ @Export(name="networkInterfaceId", refs={String.class}, tree="[0]") private Output networkInterfaceId; /** * @return The ID of the ENI. * */ public Output networkInterfaceId() { return this.networkInterfaceId; } /** * The list of network interfaces created with instance. See `network_interfaces` below. * */ @Export(name="networkInterfaces", refs={InstanceNetworkInterfaces.class}, tree="[0]") private Output networkInterfaces; /** * @return The list of network interfaces created with instance. See `network_interfaces` below. * */ public Output networkInterfaces() { return this.networkInterfaces; } /** * The operation type. It is valid when `instance_charge_type` is `PrePaid`. Default value: `upgrade`. Valid values: `upgrade`, `downgrade`. **NOTE:** When the new instance type specified by the `instance_type` parameter has lower specifications than the current instance type, you must set `operator_type` to `downgrade`. * */ @Export(name="operatorType", refs={String.class}, tree="[0]") private Output operatorType; /** * @return The operation type. It is valid when `instance_charge_type` is `PrePaid`. Default value: `upgrade`. Valid values: `upgrade`, `downgrade`. **NOTE:** When the new instance type specified by the `instance_type` parameter has lower specifications than the current instance type, you must set `operator_type` to `downgrade`. * */ public Output> operatorType() { return Codegen.optional(this.operatorType); } /** * The name of the operating system of the instance. * */ @Export(name="osName", refs={String.class}, tree="[0]") private Output osName; /** * @return The name of the operating system of the instance. * */ public Output osName() { return this.osName; } /** * The type of the operating system of the instance. * */ @Export(name="osType", refs={String.class}, tree="[0]") private Output osType; /** * @return The type of the operating system of the instance. * */ public Output osType() { return this.osType; } /** * Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect. * */ @Export(name="password", refs={String.class}, tree="[0]") private Output password; /** * @return Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect. * */ public Output> password() { return Codegen.optional(this.password); } /** * The duration that you will buy the resource, in month. It is valid and required when `instance_charge_type` is `PrePaid`. Valid values: * - [1-9, 12, 24, 36, 48, 60] when `period_unit` in "Month" * - [1-3] when `period_unit` in "Week" * * > **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 and required when `instance_charge_type` is `PrePaid`. Valid values: * - [1-9, 12, 24, 36, 48, 60] when `period_unit` in "Month" * - [1-3] when `period_unit` in "Week" * * > **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 this.period; } /** * The duration unit that you will buy the resource. It is valid when `instance_charge_type` is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". * */ @Export(name="periodUnit", refs={String.class}, tree="[0]") private Output periodUnit; /** * @return The duration unit that you will buy the resource. It is valid when `instance_charge_type` is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month". * */ public Output> periodUnit() { return Codegen.optional(this.periodUnit); } /** * The primary private IP address of the ENI. * */ @Export(name="primaryIpAddress", refs={String.class}, tree="[0]") private Output primaryIpAddress; /** * @return The primary private IP address of the ENI. * */ public Output primaryIpAddress() { return this.primaryIpAddress; } /** * Instance private IP address can be specified when you creating new instance. It is valid when `vswitch_id` is specified. When it is changed, the instance will reboot to make the change take effect. * */ @Export(name="privateIp", refs={String.class}, tree="[0]") private Output privateIp; /** * @return Instance private IP address can be specified when you creating new instance. It is valid when `vswitch_id` is specified. When it is changed, the instance will reboot to make the change take effect. * */ public Output privateIp() { return this.privateIp; } /** * The instance public ip. * */ @Export(name="publicIp", refs={String.class}, tree="[0]") private Output publicIp; /** * @return The instance public ip. * */ public Output publicIp() { return this.publicIp; } /** * Whether to renew an ECS instance automatically or not. It is valid when `instance_charge_type` is `PrePaid`. Default to "Normal". Valid values: * - `AutoRenewal`: Enable auto renewal. * - `Normal`: Disable auto renewal. * - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry. * */ @Export(name="renewalStatus", refs={String.class}, tree="[0]") private Output renewalStatus; /** * @return Whether to renew an ECS instance automatically or not. It is valid when `instance_charge_type` is `PrePaid`. Default to "Normal". Valid values: * - `AutoRenewal`: Enable auto renewal. * - `Normal`: Disable auto renewal. * - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry. * */ public Output> renewalStatus() { return Codegen.optional(this.renewalStatus); } /** * The Id of resource group which the instance belongs. * */ @Export(name="resourceGroupId", refs={String.class}, tree="[0]") private Output resourceGroupId; /** * @return The Id of resource group which the instance belongs. * */ public Output resourceGroupId() { return this.resourceGroupId; } /** * Instance RAM role name. The name is provided and maintained by RAM. You can use `alicloud.ram.Role` to create a new one. * */ @Export(name="roleName", refs={String.class}, tree="[0]") private Output roleName; /** * @return Instance RAM role name. The name is provided and maintained by RAM. You can use `alicloud.ram.Role` to create a new one. * */ public Output roleName() { return this.roleName; } /** * The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. **NOTE:** To assign secondary private IP addresses, you must specify `secondary_private_ips` or `secondary_private_ip_address_count` but not both. * */ @Export(name="secondaryPrivateIpAddressCount", refs={Integer.class}, tree="[0]") private Output secondaryPrivateIpAddressCount; /** * @return The number of private IP addresses to be automatically assigned from within the CIDR block of the vswitch. **NOTE:** To assign secondary private IP addresses, you must specify `secondary_private_ips` or `secondary_private_ip_address_count` but not both. * */ public Output secondaryPrivateIpAddressCount() { return this.secondaryPrivateIpAddressCount; } /** * A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch. * */ @Export(name="secondaryPrivateIps", refs={List.class,String.class}, tree="[0,1]") private Output> secondaryPrivateIps; /** * @return A list of Secondary private IP addresses which is selected from within the CIDR block of the VSwitch. * */ public Output> secondaryPrivateIps() { return this.secondaryPrivateIps; } /** * The security enhancement strategy. * - Active: Enable security enhancement strategy, it only works on system images. * - Deactive: Disable security enhancement strategy, it works on all images. * */ @Export(name="securityEnhancementStrategy", refs={String.class}, tree="[0]") private Output securityEnhancementStrategy; /** * @return The security enhancement strategy. * - Active: Enable security enhancement strategy, it only works on system images. * - Deactive: Disable security enhancement strategy, it works on all images. * */ public Output securityEnhancementStrategy() { return this.securityEnhancementStrategy; } /** * A list of security group ids to associate with. If you do not use `launch_template_id` or `launch_template_name` to specify a launch template, you must specify `security_groups`. * */ @Export(name="securityGroups", refs={List.class,String.class}, tree="[0,1]") private Output> securityGroups; /** * @return A list of security group ids to associate with. If you do not use `launch_template_id` or `launch_template_name` to specify a launch template, you must specify `security_groups`. * */ public Output> securityGroups() { return this.securityGroups; } /** * The retention time of the preemptive instance in hours. Valid values: `0`, `1`, `2`, `3`, `4`, `5`, `6`. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is `0`, the mode is no protection period. Default value is `1`. * */ @Export(name="spotDuration", refs={Integer.class}, tree="[0]") private Output spotDuration; /** * @return The retention time of the preemptive instance in hours. Valid values: `0`, `1`, `2`, `3`, `4`, `5`, `6`. Retention duration 2~6 is under invitation test, please submit a work order if you need to open. If the value is `0`, the mode is no protection period. Default value is `1`. * */ public Output spotDuration() { return this.spotDuration; } /** * The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most. * */ @Export(name="spotPriceLimit", refs={Double.class}, tree="[0]") private Output spotPriceLimit; /** * @return The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most. * */ public Output spotPriceLimit() { return this.spotPriceLimit; } /** * The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter `instance_charge_type` is 'PostPaid'. Value range: * - NoSpot: A regular Pay-As-You-Go instance. * - SpotWithPriceLimit: A price threshold for a spot instance * - SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance * * Default to NoSpot. Note: Currently, the spot instance only supports domestic site account. * */ @Export(name="spotStrategy", refs={String.class}, tree="[0]") private Output spotStrategy; /** * @return The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter `instance_charge_type` is 'PostPaid'. Value range: * - NoSpot: A regular Pay-As-You-Go instance. * - SpotWithPriceLimit: A price threshold for a spot instance * - SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance * * Default to NoSpot. Note: Currently, the spot instance only supports domestic site account. * */ public Output spotStrategy() { return this.spotStrategy; } /** * The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to `Running`. * */ @Export(name="status", refs={String.class}, tree="[0]") private Output status; /** * @return The instance status. Valid values: ["Running", "Stopped"]. You can control the instance start and stop through this parameter. Default to `Running`. * */ public Output status() { return this.status; } /** * The stop mode of the pay-as-you-go instance. Valid values: `StopCharging`,`KeepCharging`, `Not-applicable`. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is `StopCharging`. For more information, see "Enable the economical mode" in [Economical mode](https://www.alibabacloud.com/help/en/elastic-compute-service/latest/economical-mode). Otherwise, the default value is `KeepCharging`. **Note:** `Not-applicable`: Economical mode is not applicable to the instance.` * * `KeepCharging`: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance. * * `StopCharging`: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region. * */ @Export(name="stoppedMode", refs={String.class}, tree="[0]") private Output stoppedMode; /** * @return The stop mode of the pay-as-you-go instance. Valid values: `StopCharging`,`KeepCharging`, `Not-applicable`. Default value: If the prerequisites required for enabling the economical mode are met, and you have enabled this mode in the ECS console, the default value is `StopCharging`. For more information, see "Enable the economical mode" in [Economical mode](https://www.alibabacloud.com/help/en/elastic-compute-service/latest/economical-mode). Otherwise, the default value is `KeepCharging`. **Note:** `Not-applicable`: Economical mode is not applicable to the instance.` * * `KeepCharging`: standard mode. Billing of the instance continues after the instance is stopped, and resources are retained for the instance. * * `StopCharging`: economical mode. Billing of some resources of the instance stops after the instance is stopped. When the instance is stopped, its resources such as vCPUs, memory, and public IP address are released. You may be unable to restart the instance if some types of resources are out of stock in the current region. * */ public Output stoppedMode() { return this.stoppedMode; } /** * The ID of the automatic snapshot policy applied to the system disk. * */ @Export(name="systemDiskAutoSnapshotPolicyId", refs={String.class}, tree="[0]") private Output systemDiskAutoSnapshotPolicyId; /** * @return The ID of the automatic snapshot policy applied to the system disk. * */ public Output> systemDiskAutoSnapshotPolicyId() { return Codegen.optional(this.systemDiskAutoSnapshotPolicyId); } /** * Valid values are `ephemeral_ssd`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`, `cloud`, `cloud_auto`, `cloud_essd_entry`. only is used to some none I/O optimized instance. Valid values `cloud_auto` Available since v1.184.0. * */ @Export(name="systemDiskCategory", refs={String.class}, tree="[0]") private Output systemDiskCategory; /** * @return Valid values are `ephemeral_ssd`, `cloud_efficiency`, `cloud_ssd`, `cloud_essd`, `cloud`, `cloud_auto`, `cloud_essd_entry`. only is used to some none I/O optimized instance. Valid values `cloud_auto` Available since v1.184.0. * */ public Output systemDiskCategory() { return this.systemDiskCategory; } /** * The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://. * */ @Export(name="systemDiskDescription", refs={String.class}, tree="[0]") private Output systemDiskDescription; /** * @return The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://. * */ public Output systemDiskDescription() { return this.systemDiskDescription; } /** * The algorithm to be used to encrypt the system disk. Valid values are `aes-256`, `sm4-128`. Default value is `aes-256`. * */ @Export(name="systemDiskEncryptAlgorithm", refs={String.class}, tree="[0]") private Output systemDiskEncryptAlgorithm; /** * @return The algorithm to be used to encrypt the system disk. Valid values are `aes-256`, `sm4-128`. Default value is `aes-256`. * */ public Output> systemDiskEncryptAlgorithm() { return Codegen.optional(this.systemDiskEncryptAlgorithm); } /** * Specifies whether to encrypt the system disk. Valid values: `true`,`false`. Default value: `false`. * */ @Export(name="systemDiskEncrypted", refs={Boolean.class}, tree="[0]") private Output systemDiskEncrypted; /** * @return Specifies whether to encrypt the system disk. Valid values: `true`,`false`. Default value: `false`. * */ public Output systemDiskEncrypted() { return this.systemDiskEncrypted; } /** * (Available since v1.210.0) The ID of system disk. * */ @Export(name="systemDiskId", refs={String.class}, tree="[0]") private Output systemDiskId; /** * @return (Available since v1.210.0) The ID of system disk. * */ public Output systemDiskId() { return this.systemDiskId; } /** * The ID of the Key Management Service (KMS) key to be used for the system disk. * */ @Export(name="systemDiskKmsKeyId", refs={String.class}, tree="[0]") private Output systemDiskKmsKeyId; /** * @return The ID of the Key Management Service (KMS) key to be used for the system disk. * */ public Output> systemDiskKmsKeyId() { return Codegen.optional(this.systemDiskKmsKeyId); } /** * The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://. * */ @Export(name="systemDiskName", refs={String.class}, tree="[0]") private Output systemDiskName; /** * @return The name of the system disk. The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://. * */ public Output systemDiskName() { return this.systemDiskName; } /** * The performance level of the ESSD used as the system disk, Valid values: `PL0`, `PL1`, `PL2`, `PL3`, Default to `PL1`;For more information about ESSD, See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/122389.htm). * */ @Export(name="systemDiskPerformanceLevel", refs={String.class}, tree="[0]") private Output systemDiskPerformanceLevel; /** * @return The performance level of the ESSD used as the system disk, Valid values: `PL0`, `PL1`, `PL2`, `PL3`, Default to `PL1`;For more information about ESSD, See [Encryption Context](https://www.alibabacloud.com/help/doc-detail/122389.htm). * */ public Output systemDiskPerformanceLevel() { return this.systemDiskPerformanceLevel; } /** * Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}. * */ @Export(name="systemDiskSize", refs={Integer.class}, tree="[0]") private Output systemDiskSize; /** * @return Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}. * */ public Output systemDiskSize() { return this.systemDiskSize; } /** * The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters. * */ @Export(name="systemDiskStorageClusterId", refs={String.class}, tree="[0]") private Output systemDiskStorageClusterId; /** * @return The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you must specify this parameter. For more information about dedicated block storage clusters. * */ public Output> systemDiskStorageClusterId() { return Codegen.optional(this.systemDiskStorageClusterId); } /** * A mapping of tags to assign to the resource. * - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. * - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string. * */ @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. * - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. * - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. * It supports to setting a base64-encoded value, and it is the recommended usage. * From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. * Note: Not all changes will take effect, and it depends on [cloud-init module type](https://cloudinit.readthedocs.io/en/latest/topics/modules.html). * */ @Export(name="userData", refs={String.class}, tree="[0]") private Output userData; /** * @return User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. * It supports to setting a base64-encoded value, and it is the recommended usage. * From version 1.60.0, it can be updated in-place. If updated, the instance will reboot to make the change take effect. * Note: Not all changes will take effect, and it depends on [cloud-init module type](https://cloudinit.readthedocs.io/en/latest/topics/modules.html). * */ public Output> userData() { return Codegen.optional(this.userData); } /** * A mapping of tags to assign to the devices created by the instance at launch time. * - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. * - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string. * */ @Export(name="volumeTags", refs={Map.class,String.class,Object.class}, tree="[0,1,2]") private Output> volumeTags; /** * @return A mapping of tags to assign to the devices created by the instance at launch time. * - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. * - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string. * */ public Output> volumeTags() { return this.volumeTags; } /** * The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect. * */ @Export(name="vswitchId", refs={String.class}, tree="[0]") private Output vswitchId; /** * @return The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect. * */ public Output vswitchId() { return this.vswitchId; } /** * * @param name The _unique_ name of the resulting resource. */ public Instance(String name) { this(name, InstanceArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Instance(String name, @Nullable InstanceArgs 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 Instance(String name, @Nullable InstanceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ecs/instance:Instance", name, args == null ? InstanceArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); } private Instance(String name, Output id, @Nullable InstanceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:ecs/instance:Instance", name, state, makeResourceOptions(options, id)); } 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()) .additionalSecretOutputs(List.of( "password" )) .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 Instance get(String name, Output id, @Nullable InstanceState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Instance(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy