com.pulumi.alicloud.ecs.kotlin.Instance.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-alicloud-kotlin Show documentation
Show all versions of pulumi-alicloud-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.alicloud.ecs.kotlin
import com.pulumi.alicloud.ecs.kotlin.outputs.InstanceDataDisk
import com.pulumi.alicloud.ecs.kotlin.outputs.InstanceMaintenanceTime
import com.pulumi.alicloud.ecs.kotlin.outputs.InstanceNetworkInterfaces
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.alicloud.ecs.kotlin.outputs.InstanceDataDisk.Companion.toKotlin as instanceDataDiskToKotlin
import com.pulumi.alicloud.ecs.kotlin.outputs.InstanceMaintenanceTime.Companion.toKotlin as instanceMaintenanceTimeToKotlin
import com.pulumi.alicloud.ecs.kotlin.outputs.InstanceNetworkInterfaces.Companion.toKotlin as instanceNetworkInterfacesToKotlin
/**
* Builder for [Instance].
*/
@PulumiTagMarker
public class InstanceResourceBuilder internal constructor() {
public var name: String? = null
public var args: InstanceArgs = InstanceArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend InstanceArgsBuilder.() -> Unit) {
val builder = InstanceArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Instance {
val builtJavaResource = com.pulumi.alicloud.ecs.Instance(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Instance(builtJavaResource)
}
}
/**
* 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
*
* ```typescript
* 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 instanceType = config.get("instanceType") || "ecs.n4.large";
* const imageId = config.get("imageId") || "ubuntu_18_04_64_20G_alibase_20190624.vhd";
* // Create a new ECS instance for VPC
* const vpc = new alicloud.vpc.Network("vpc", {
* vpcName: name,
* cidrBlock: "172.16.0.0/16",
* });
* // Create a new ECS instance for a VPC
* const group = new alicloud.ecs.SecurityGroup("group", {
* name: name,
* description: "foo",
* vpcId: vpc.id,
* });
* const key = new alicloud.kms.Key("key", {
* description: "Hello KMS",
* pendingWindowInDays: 7,
* status: "Enabled",
* });
* const default = alicloud.getZones({
* availableDiskCategory: "cloud_efficiency",
* availableResourceCreation: "VSwitch",
* availableInstanceType: instanceType,
* });
* const vswitch = new alicloud.vpc.Switch("vswitch", {
* vpcId: vpc.id,
* cidrBlock: "172.16.0.0/24",
* zoneId: _default.then(_default => _default.zones?.[0]?.id),
* vswitchName: name,
* });
* const instance = new alicloud.ecs.Instance("instance", {
* availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
* securityGroups: [group].map(__item => __item.id),
* instanceType: instanceType,
* systemDiskCategory: "cloud_efficiency",
* systemDiskName: name,
* systemDiskDescription: "test_foo_system_disk_description",
* imageId: imageId,
* instanceName: name,
* vswitchId: vswitch.id,
* internetMaxBandwidthOut: 10,
* dataDisks: [{
* name: "disk2",
* size: 20,
* category: "cloud_efficiency",
* description: "disk2",
* encrypted: true,
* kmsKeyId: key.id,
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_alicloud as alicloud
* config = pulumi.Config()
* name = config.get("name")
* if name is None:
* name = "terraform-example"
* instance_type = config.get("instanceType")
* if instance_type is None:
* instance_type = "ecs.n4.large"
* image_id = config.get("imageId")
* if image_id is None:
* image_id = "ubuntu_18_04_64_20G_alibase_20190624.vhd"
* # Create a new ECS instance for VPC
* vpc = alicloud.vpc.Network("vpc",
* vpc_name=name,
* cidr_block="172.16.0.0/16")
* # Create a new ECS instance for a VPC
* group = alicloud.ecs.SecurityGroup("group",
* name=name,
* description="foo",
* vpc_id=vpc.id)
* key = alicloud.kms.Key("key",
* description="Hello KMS",
* pending_window_in_days=7,
* status="Enabled")
* default = alicloud.get_zones(available_disk_category="cloud_efficiency",
* available_resource_creation="VSwitch",
* available_instance_type=instance_type)
* vswitch = alicloud.vpc.Switch("vswitch",
* vpc_id=vpc.id,
* cidr_block="172.16.0.0/24",
* zone_id=default.zones[0].id,
* vswitch_name=name)
* instance = alicloud.ecs.Instance("instance",
* availability_zone=default.zones[0].id,
* security_groups=[__item.id for __item in [group]],
* instance_type=instance_type,
* system_disk_category="cloud_efficiency",
* system_disk_name=name,
* system_disk_description="test_foo_system_disk_description",
* image_id=image_id,
* instance_name=name,
* vswitch_id=vswitch.id,
* internet_max_bandwidth_out=10,
* data_disks=[{
* "name": "disk2",
* "size": 20,
* "category": "cloud_efficiency",
* "description": "disk2",
* "encrypted": True,
* "kms_key_id": key.id,
* }])
* ```
* ```csharp
* 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 instanceType = config.Get("instanceType") ?? "ecs.n4.large";
* var imageId = config.Get("imageId") ?? "ubuntu_18_04_64_20G_alibase_20190624.vhd";
* // Create a new ECS instance for VPC
* var vpc = new AliCloud.Vpc.Network("vpc", new()
* {
* VpcName = name,
* CidrBlock = "172.16.0.0/16",
* });
* // Create a new ECS instance for a VPC
* var @group = new AliCloud.Ecs.SecurityGroup("group", new()
* {
* Name = name,
* Description = "foo",
* VpcId = vpc.Id,
* });
* var key = new AliCloud.Kms.Key("key", new()
* {
* Description = "Hello KMS",
* PendingWindowInDays = 7,
* Status = "Enabled",
* });
* var @default = AliCloud.GetZones.Invoke(new()
* {
* AvailableDiskCategory = "cloud_efficiency",
* AvailableResourceCreation = "VSwitch",
* AvailableInstanceType = instanceType,
* });
* var vswitch = new AliCloud.Vpc.Switch("vswitch", new()
* {
* VpcId = vpc.Id,
* CidrBlock = "172.16.0.0/24",
* ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
* VswitchName = name,
* });
* var instance = new AliCloud.Ecs.Instance("instance", new()
* {
* AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
* SecurityGroups = new[]
* {
* @group,
* }.Select(__item => __item.Id).ToList(),
* InstanceType = instanceType,
* SystemDiskCategory = "cloud_efficiency",
* SystemDiskName = name,
* SystemDiskDescription = "test_foo_system_disk_description",
* ImageId = imageId,
* InstanceName = name,
* VswitchId = vswitch.Id,
* InternetMaxBandwidthOut = 10,
* DataDisks = new[]
* {
* new AliCloud.Ecs.Inputs.InstanceDataDiskArgs
* {
* Name = "disk2",
* Size = 20,
* Category = "cloud_efficiency",
* Description = "disk2",
* Encrypted = true,
* KmsKeyId = key.Id,
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/kms"
* "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
* "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
* }
* instanceType := "ecs.n4.large";
* if param := cfg.Get("instanceType"); param != ""{
* instanceType = param
* }
* imageId := "ubuntu_18_04_64_20G_alibase_20190624.vhd";
* if param := cfg.Get("imageId"); param != ""{
* imageId = param
* }
* // Create a new ECS instance for VPC
* vpc, err := vpc.NewNetwork(ctx, "vpc", &vpc.NetworkArgs{
* VpcName: pulumi.String(name),
* CidrBlock: pulumi.String("172.16.0.0/16"),
* })
* if err != nil {
* return err
* }
* // Create a new ECS instance for a VPC
* group, err := ecs.NewSecurityGroup(ctx, "group", &ecs.SecurityGroupArgs{
* Name: pulumi.String(name),
* Description: pulumi.String("foo"),
* VpcId: vpc.ID(),
* })
* if err != nil {
* return err
* }
* key, err := kms.NewKey(ctx, "key", &kms.KeyArgs{
* Description: pulumi.String("Hello KMS"),
* PendingWindowInDays: pulumi.Int(7),
* Status: pulumi.String("Enabled"),
* })
* if err != nil {
* return err
* }
* _default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
* AvailableDiskCategory: pulumi.StringRef("cloud_efficiency"),
* AvailableResourceCreation: pulumi.StringRef("VSwitch"),
* AvailableInstanceType: pulumi.StringRef(instanceType),
* }, nil);
* if err != nil {
* return err
* }
* vswitch, err := vpc.NewSwitch(ctx, "vswitch", &vpc.SwitchArgs{
* VpcId: vpc.ID(),
* CidrBlock: pulumi.String("172.16.0.0/24"),
* ZoneId: pulumi.String(_default.Zones[0].Id),
* VswitchName: pulumi.String(name),
* })
* if err != nil {
* return err
* }
* var splat0 pulumi.StringArray
* for _, val0 := range %!v(PANIC=Format method: fatal: An assertion has failed: tok: ) {
* splat0 = append(splat0, val0.ID())
* }
* _, err = ecs.NewInstance(ctx, "instance", &ecs.InstanceArgs{
* AvailabilityZone: pulumi.String(_default.Zones[0].Id),
* SecurityGroups: splat0,
* InstanceType: pulumi.String(instanceType),
* SystemDiskCategory: pulumi.String("cloud_efficiency"),
* SystemDiskName: pulumi.String(name),
* SystemDiskDescription: pulumi.String("test_foo_system_disk_description"),
* ImageId: pulumi.String(imageId),
* InstanceName: pulumi.String(name),
* VswitchId: vswitch.ID(),
* InternetMaxBandwidthOut: pulumi.Int(10),
* DataDisks: ecs.InstanceDataDiskArray{
* &ecs.InstanceDataDiskArgs{
* Name: pulumi.String("disk2"),
* Size: pulumi.Int(20),
* Category: pulumi.String("cloud_efficiency"),
* Description: pulumi.String("disk2"),
* Encrypted: pulumi.Bool(true),
* KmsKeyId: key.ID(),
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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");
* final var instanceType = config.get("instanceType").orElse("ecs.n4.large");
* final var imageId = config.get("imageId").orElse("ubuntu_18_04_64_20G_alibase_20190624.vhd");
* // 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")
* .availableInstanceType(instanceType)
* .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(instanceType)
* .systemDiskCategory("cloud_efficiency")
* .systemDiskName(name)
* .systemDiskDescription("test_foo_system_disk_description")
* .imageId(imageId)
* .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());
* }
* }
* ```
*
* ## 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
* ```
*/
public class Instance internal constructor(
override val javaResource: com.pulumi.alicloud.ecs.Instance,
) : KotlinCustomResource(javaResource, InstanceMapper) {
/**
* 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(
message = """
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.
""",
)
public val allocatePublicIp: Output?
get() = javaResource.allocatePublicIp().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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 val autoReleaseTime: Output?
get() = javaResource.autoReleaseTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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 val autoRenewPeriod: Output?
get() = javaResource.autoRenewPeriod().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Zone to start the instance in. It is ignored and will be computed when set `vswitch_id`.
*/
public val availabilityZone: Output
get() = javaResource.availabilityZone().applyValue({ args0 -> args0 })
/**
* The number of vCPUs.
*/
public val cpu: Output
get() = javaResource.cpu().applyValue({ args0 -> args0 })
/**
* Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.
*/
public val creditSpecification: Output
get() = javaResource.creditSpecification().applyValue({ args0 -> args0 })
/**
* The list of data disks created with instance. See `data_disks` below.
*/
public val dataDisks: Output>?
get() = javaResource.dataDisks().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> instanceDataDiskToKotlin(args0) })
})
}).orElse(null)
})
/**
* 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 val dedicatedHostId: Output?
get() = javaResource.dedicatedHostId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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 val deletionProtection: Output?
get() = javaResource.deletionProtection().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The group number of the instance in a deployment set when the deployment set is use.
*/
public val deploymentSetGroupNo: Output
get() = javaResource.deploymentSetGroupNo().applyValue({ args0 -> args0 })
/**
* 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 val deploymentSetId: Output?
get() = javaResource.deploymentSetId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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 val description: Output
get() = javaResource.description().applyValue({ args0 -> args0 })
/**
* 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 val dryRun: Output?
get() = javaResource.dryRun().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Specifies whether to enable the Jumbo Frames feature for the instance. Valid values: `true`, `false`.
*/
public val enableJumboFrame: Output
get() = javaResource.enableJumboFrame().applyValue({ args0 -> args0 })
/**
* 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 val forceDelete: Output?
get() = javaResource.forceDelete().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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 val hostName: Output
get() = javaResource.hostName().applyValue({ args0 -> args0 })
/**
* The ID of the Elastic High Performance Computing (E-HPC) cluster to which to assign the instance.
*/
public val hpcClusterId: Output?
get() = javaResource.hpcClusterId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies whether to enable the access channel for instance metadata. Valid values: `enabled`, `disabled`. Default value: `enabled`.
*/
public val httpEndpoint: Output
get() = javaResource.httpEndpoint().applyValue({ args0 -> args0 })
/**
* The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64. Default value: 1.
*/
public val httpPutResponseHopLimit: Output
get() = javaResource.httpPutResponseHopLimit().applyValue({ args0 -> args0 })
/**
* 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 val httpTokens: Output
get() = javaResource.httpTokens().applyValue({ args0 -> args0 })
/**
* 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 val imageId: Output
get() = javaResource.imageId().applyValue({ args0 -> args0 })
/**
* Whether to change instance disks charge type when changing instance charge type.
*/
public val includeDataDisks: Output?
get() = javaResource.includeDataDisks().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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 val instanceChargeType: Output
get() = javaResource.instanceChargeType().applyValue({ args0 -> args0 })
public val instanceName: Output
get() = javaResource.instanceName().applyValue({ args0 -> args0 })
/**
* 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 val instanceType: Output
get() = javaResource.instanceType().applyValue({ args0 -> args0 })
/**
* 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 val internetChargeType: Output
get() = javaResource.internetChargeType().applyValue({ args0 -> args0 })
/**
* 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(
message = """
The attribute is invalid and no any affect for the instance. So it has been deprecated since
version v1.121.2.
""",
)
public val internetMaxBandwidthIn: Output
get() = javaResource.internetMaxBandwidthIn().applyValue({ args0 -> args0 })
/**
* Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
*/
public val internetMaxBandwidthOut: Output
get() = javaResource.internetMaxBandwidthOut().applyValue({ args0 -> args0 })
/**
* 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 val ipv6AddressCount: Output
get() = javaResource.ipv6AddressCount().applyValue({ args0 -> args0 })
/**
* A list of IPv6 address to be assigned to the primary ENI. Support up to 10.
*/
public val ipv6Addresses: Output>
get() = javaResource.ipv6Addresses().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Whether to use outdated instance type. Default to false.
*/
public val isOutdated: Output?
get() = javaResource.isOutdated().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
*/
public val keyName: Output
get() = javaResource.keyName().applyValue({ args0 -> args0 })
/**
* 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 val kmsEncryptedPassword: Output?
get() = javaResource.kmsEncryptedPassword().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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 val kmsEncryptionContext: Output