InstanceArgs

data class InstanceArgs(val autoPay: Output<Boolean>? = null, val autoRenew: Output<Boolean>? = null, val description: Output<String>? = null, val eipBandwidth: Output<Int>? = null, val force: Output<Boolean>? = null, val imageId: Output<String>? = null, val instanceName: Output<String>? = null, val instanceType: Output<String>? = null, val keyPairName: Output<String>? = null, val paymentType: Output<String>? = null, val period: Output<String>? = null, val periodUnit: Output<String>? = null, val resolution: Output<String>? = null, val securityGroupId: Output<String>? = null, val status: Output<String>? = null, val vncPassword: Output<String>? = null, val vswitchId: Output<String>? = null) : ConvertibleToJava<InstanceArgs>

Provides a Elastic Cloud Phone (ECP) Instance resource. For information about Elastic Cloud Phone (ECP) Instance and how to use it, see What is Instance.

NOTE: Available since v1.158.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecp.EcpFunctions;
import com.pulumi.alicloud.ecp.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecp.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecp.KeyPair;
import com.pulumi.alicloud.ecp.KeyPairArgs;
import com.pulumi.alicloud.ecp.Instance;
import com.pulumi.alicloud.ecp.InstanceArgs;
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("tf-example");
final var defaultZones = EcpFunctions.getZones();
final var defaultInstanceTypes = EcpFunctions.getInstanceTypes();
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("10.0.0.0/8")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.cidrBlock("10.1.0.0/16")
.vpcId(defaultNetwork.id())
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].zoneId()))
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.vpcId(defaultNetwork.id())
.build());
var defaultKeyPair = new KeyPair("defaultKeyPair", KeyPairArgs.builder()
.keyPairName(name)
.publicKeyBody("ssh-rsa AAAAB3Nza12345678qwertyuudsfsg")
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.instanceName(name)
.description(name)
.keyPairName(defaultKeyPair.keyPairName())
.securityGroupId(defaultSecurityGroup.id())
.vswitchId(defaultSwitch.id())
.imageId("android_9_0_0_release_2851157_20211201.vhd")
.instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[1].instanceType()))
.vncPassword("Ecp123")
.paymentType("PayAsYouGo")
.build());
}
}

Import

Elastic Cloud Phone (ECP) Instance can be imported using the id, e.g.

$ pulumi import alicloud:ecp/instance:Instance example <id>

Constructors

Link copied to clipboard
fun InstanceArgs(autoPay: Output<Boolean>? = null, autoRenew: Output<Boolean>? = null, description: Output<String>? = null, eipBandwidth: Output<Int>? = null, force: Output<Boolean>? = null, imageId: Output<String>? = null, instanceName: Output<String>? = null, instanceType: Output<String>? = null, keyPairName: Output<String>? = null, paymentType: Output<String>? = null, period: Output<String>? = null, periodUnit: Output<String>? = null, resolution: Output<String>? = null, securityGroupId: Output<String>? = null, status: Output<String>? = null, vncPassword: Output<String>? = null, vswitchId: Output<String>? = null)

Functions

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

Properties

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

The auto pay.

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

The auto renew.

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

Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.

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

The eip bandwidth.

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

The force.

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

The ID Of The Image.

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

The name of the instance. It must be 2 to 128 characters in length and must start with an uppercase letter or Chinese. It cannot start with http:// or https. It can contain Chinese, English, numbers, half-width colons (:), underscores (_), half-width periods (.), or dashes (-). The default value is the InstanceId of the instance.

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

Instance Type.

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

The name of the key pair of the mobile phone instance.

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

The payment type.Valid values: PayAsYouGo,Subscription

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

The period. It is valid when period_unit is 'Year'. Valid value: 1, 2, 3, 4, 5. It is valid when period_unit is 'Month'. Valid value: 1, 2, 3, 5

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

The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.

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

The selected resolution for the cloud mobile phone instance.

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

The ID of the security group. The security group is the same as that of the ECS instance.

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

Instance status. Valid values: Running, Stopped.

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

Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.

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

The vswitch id.