1. Packages
  2. Alicloud Provider
  3. API Docs
  4. ecp
  5. Instance
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.ecp.Instance

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const defaultInteger = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const default = alicloud.ecp.getZones({});
    const defaultGetInstanceTypes = alicloud.ecp.getInstanceTypes({});
    const countSize = _default.then(_default => _default.zones).length;
    const zoneId = Promise.all([_default, countSize]).then(([_default, countSize]) => _default.zones[countSize - 1].zoneId);
    const instanceTypeCountSize = defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes).length;
    const instanceType = Promise.all([defaultGetInstanceTypes, instanceTypeCountSize]).then(([defaultGetInstanceTypes, instanceTypeCountSize]) => defaultGetInstanceTypes.instanceTypes[instanceTypeCountSize - 1].instanceType);
    const defaultGetNetworks = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
    });
    const defaultGetSwitches = defaultGetNetworks.then(defaultGetNetworks => alicloud.vpc.getSwitches({
        vpcId: defaultGetNetworks.ids?.[0],
        zoneId: zoneId,
    }));
    const group = new alicloud.ecs.SecurityGroup("group", {
        name: name,
        vpcId: defaultGetNetworks.then(defaultGetNetworks => defaultGetNetworks.ids?.[0]),
    });
    const defaultKeyPair = new alicloud.ecp.KeyPair("default", {
        keyPairName: `${name}-${defaultInteger.result}`,
        publicKeyBody: "ssh-rsa AAAAB3Nza12345678qwertyuudsfsg",
    });
    const defaultInstance = new alicloud.ecp.Instance("default", {
        instanceName: name,
        description: name,
        keyPairName: defaultKeyPair.keyPairName,
        securityGroupId: group.id,
        vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
        imageId: "android_9_0_0_release_2851157_20211201.vhd",
        instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[1]?.instanceType),
        vncPassword: "Ecp123",
        paymentType: "PayAsYouGo",
        force: true,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default_integer = random.index.Integer("default",
        min=10000,
        max=99999)
    default = alicloud.ecp.get_zones()
    default_get_instance_types = alicloud.ecp.get_instance_types()
    count_size = len(default.zones)
    zone_id = default.zones[count_size - 1].zone_id
    instance_type_count_size = len(default_get_instance_types.instance_types)
    instance_type = default_get_instance_types.instance_types[instance_type_count_size - 1].instance_type
    default_get_networks = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
    default_get_switches = alicloud.vpc.get_switches(vpc_id=default_get_networks.ids[0],
        zone_id=zone_id)
    group = alicloud.ecs.SecurityGroup("group",
        name=name,
        vpc_id=default_get_networks.ids[0])
    default_key_pair = alicloud.ecp.KeyPair("default",
        key_pair_name=f"{name}-{default_integer['result']}",
        public_key_body="ssh-rsa AAAAB3Nza12345678qwertyuudsfsg")
    default_instance = alicloud.ecp.Instance("default",
        instance_name=name,
        description=name,
        key_pair_name=default_key_pair.key_pair_name,
        security_group_id=group.id,
        vswitch_id=default_get_switches.ids[0],
        image_id="android_9_0_0_release_2851157_20211201.vhd",
        instance_type=default_get_instance_types.instance_types[1].instance_type,
        vnc_password="Ecp123",
        payment_type="PayAsYouGo",
        force=True)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecp"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"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 := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		_default, err := ecp.GetZones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceTypes, err := ecp.GetInstanceTypes(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		countSize := len(_default.Zones)
    		zoneId := _default.Zones[countSize-1].ZoneId
    		instanceTypeCountSize := len(defaultGetInstanceTypes.InstanceTypes)
    		_ := defaultGetInstanceTypes.InstanceTypes[instanceTypeCountSize-1].InstanceType
    		defaultGetNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(defaultGetNetworks.Ids[0]),
    			ZoneId: pulumi.StringRef(zoneId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		group, err := ecs.NewSecurityGroup(ctx, "group", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: pulumi.String(defaultGetNetworks.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		defaultKeyPair, err := ecp.NewKeyPair(ctx, "default", &ecp.KeyPairArgs{
    			KeyPairName:   pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
    			PublicKeyBody: pulumi.String("ssh-rsa AAAAB3Nza12345678qwertyuudsfsg"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecp.NewInstance(ctx, "default", &ecp.InstanceArgs{
    			InstanceName:    pulumi.String(name),
    			Description:     pulumi.String(name),
    			KeyPairName:     defaultKeyPair.KeyPairName,
    			SecurityGroupId: group.ID(),
    			VswitchId:       pulumi.String(defaultGetSwitches.Ids[0]),
    			ImageId:         pulumi.String("android_9_0_0_release_2851157_20211201.vhd"),
    			InstanceType:    pulumi.String(defaultGetInstanceTypes.InstanceTypes[1].InstanceType),
    			VncPassword:     pulumi.String("Ecp123"),
    			PaymentType:     pulumi.String("PayAsYouGo"),
    			Force:           pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var defaultInteger = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var @default = AliCloud.Ecp.GetZones.Invoke();
    
        var defaultGetInstanceTypes = AliCloud.Ecp.GetInstanceTypes.Invoke();
    
        var countSize = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones)).Length;
    
        var zoneId = Output.Tuple(@default, countSize).Apply(values =>
        {
            var @default = values.Item1;
            var countSize = values.Item2;
            return @default.Apply(getZonesResult => getZonesResult.Zones)[countSize - 1].ZoneId;
        });
    
        var instanceTypeCountSize = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes).Length;
    
        var instanceType = Output.Tuple(defaultGetInstanceTypes, instanceTypeCountSize).Apply(values =>
        {
            var defaultGetInstanceTypes = values.Item1;
            var instanceTypeCountSize = values.Item2;
            return defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes)[instanceTypeCountSize - 1].InstanceType;
        });
    
        var defaultGetNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = zoneId,
        });
    
        var @group = new AliCloud.Ecs.SecurityGroup("group", new()
        {
            Name = name,
            VpcId = defaultGetNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
        });
    
        var defaultKeyPair = new AliCloud.Ecp.KeyPair("default", new()
        {
            KeyPairName = $"{name}-{defaultInteger.Result}",
            PublicKeyBody = "ssh-rsa AAAAB3Nza12345678qwertyuudsfsg",
        });
    
        var defaultInstance = new AliCloud.Ecp.Instance("default", new()
        {
            InstanceName = name,
            Description = name,
            KeyPairName = defaultKeyPair.KeyPairName,
            SecurityGroupId = @group.Id,
            VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            ImageId = "android_9_0_0_release_2851157_20211201.vhd",
            InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[1]?.InstanceType),
            VncPassword = "Ecp123",
            PaymentType = "PayAsYouGo",
            Force = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    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.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    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");
            var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            final var default = EcpFunctions.getZones();
    
            final var defaultGetInstanceTypes = EcpFunctions.getInstanceTypes();
    
            final var countSize = default_.zones().length();
    
            final var zoneId = default_.zones()[countSize - 1].zoneId();
    
            final var instanceTypeCountSize = defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()).length();
    
            final var instanceType = defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes())[instanceTypeCountSize - 1].instanceType();
    
            final var defaultGetNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .zoneId(zoneId)
                .build());
    
            var group = new SecurityGroup("group", SecurityGroupArgs.builder()
                .name(name)
                .vpcId(defaultGetNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
                .build());
    
            var defaultKeyPair = new KeyPair("defaultKeyPair", KeyPairArgs.builder()
                .keyPairName(String.format("%s-%s", name,defaultInteger.result()))
                .publicKeyBody("ssh-rsa AAAAB3Nza12345678qwertyuudsfsg")
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .instanceName(name)
                .description(name)
                .keyPairName(defaultKeyPair.keyPairName())
                .securityGroupId(group.id())
                .vswitchId(defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
                .imageId("android_9_0_0_release_2851157_20211201.vhd")
                .instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[1].instanceType()))
                .vncPassword("Ecp123")
                .paymentType("PayAsYouGo")
                .force("true")
                .build());
    
        }
    }
    
    Coming soon!
    

    Create Instance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);
    @overload
    def Instance(resource_name: str,
                 args: InstanceArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Instance(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 image_id: Optional[str] = None,
                 vswitch_id: Optional[str] = None,
                 security_group_id: Optional[str] = None,
                 instance_type: Optional[str] = None,
                 key_pair_name: Optional[str] = None,
                 force: Optional[bool] = None,
                 instance_name: Optional[str] = None,
                 eip_bandwidth: Optional[int] = None,
                 auto_pay: Optional[bool] = None,
                 payment_type: Optional[str] = None,
                 period: Optional[str] = None,
                 period_unit: Optional[str] = None,
                 resolution: Optional[str] = None,
                 description: Optional[str] = None,
                 status: Optional[str] = None,
                 vnc_password: Optional[str] = None,
                 auto_renew: Optional[bool] = None)
    func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
    public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
    public Instance(String name, InstanceArgs args)
    public Instance(String name, InstanceArgs args, CustomResourceOptions options)
    
    type: alicloud:ecp:Instance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var exampleinstanceResourceResourceFromEcpinstance = new AliCloud.Ecp.Instance("exampleinstanceResourceResourceFromEcpinstance", new()
    {
        ImageId = "string",
        VswitchId = "string",
        SecurityGroupId = "string",
        InstanceType = "string",
        KeyPairName = "string",
        Force = false,
        InstanceName = "string",
        EipBandwidth = 0,
        AutoPay = false,
        PaymentType = "string",
        Period = "string",
        PeriodUnit = "string",
        Resolution = "string",
        Description = "string",
        Status = "string",
        VncPassword = "string",
        AutoRenew = false,
    });
    
    example, err := ecp.NewInstance(ctx, "exampleinstanceResourceResourceFromEcpinstance", &ecp.InstanceArgs{
    	ImageId:         pulumi.String("string"),
    	VswitchId:       pulumi.String("string"),
    	SecurityGroupId: pulumi.String("string"),
    	InstanceType:    pulumi.String("string"),
    	KeyPairName:     pulumi.String("string"),
    	Force:           pulumi.Bool(false),
    	InstanceName:    pulumi.String("string"),
    	EipBandwidth:    pulumi.Int(0),
    	AutoPay:         pulumi.Bool(false),
    	PaymentType:     pulumi.String("string"),
    	Period:          pulumi.String("string"),
    	PeriodUnit:      pulumi.String("string"),
    	Resolution:      pulumi.String("string"),
    	Description:     pulumi.String("string"),
    	Status:          pulumi.String("string"),
    	VncPassword:     pulumi.String("string"),
    	AutoRenew:       pulumi.Bool(false),
    })
    
    var exampleinstanceResourceResourceFromEcpinstance = new Instance("exampleinstanceResourceResourceFromEcpinstance", InstanceArgs.builder()
        .imageId("string")
        .vswitchId("string")
        .securityGroupId("string")
        .instanceType("string")
        .keyPairName("string")
        .force(false)
        .instanceName("string")
        .eipBandwidth(0)
        .autoPay(false)
        .paymentType("string")
        .period("string")
        .periodUnit("string")
        .resolution("string")
        .description("string")
        .status("string")
        .vncPassword("string")
        .autoRenew(false)
        .build());
    
    exampleinstance_resource_resource_from_ecpinstance = alicloud.ecp.Instance("exampleinstanceResourceResourceFromEcpinstance",
        image_id="string",
        vswitch_id="string",
        security_group_id="string",
        instance_type="string",
        key_pair_name="string",
        force=False,
        instance_name="string",
        eip_bandwidth=0,
        auto_pay=False,
        payment_type="string",
        period="string",
        period_unit="string",
        resolution="string",
        description="string",
        status="string",
        vnc_password="string",
        auto_renew=False)
    
    const exampleinstanceResourceResourceFromEcpinstance = new alicloud.ecp.Instance("exampleinstanceResourceResourceFromEcpinstance", {
        imageId: "string",
        vswitchId: "string",
        securityGroupId: "string",
        instanceType: "string",
        keyPairName: "string",
        force: false,
        instanceName: "string",
        eipBandwidth: 0,
        autoPay: false,
        paymentType: "string",
        period: "string",
        periodUnit: "string",
        resolution: "string",
        description: "string",
        status: "string",
        vncPassword: "string",
        autoRenew: false,
    });
    
    type: alicloud:ecp:Instance
    properties:
        autoPay: false
        autoRenew: false
        description: string
        eipBandwidth: 0
        force: false
        imageId: string
        instanceName: string
        instanceType: string
        keyPairName: string
        paymentType: string
        period: string
        periodUnit: string
        resolution: string
        securityGroupId: string
        status: string
        vncPassword: string
        vswitchId: string
    

    Instance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Instance resource accepts the following input properties:

    ImageId string
    The ID Of The Image.
    InstanceType string
    Instance Type.
    SecurityGroupId string
    The ID of the security group. The security group is the same as that of the ECS instance.
    VswitchId string
    The vswitch id.
    AutoPay bool
    The auto pay.
    AutoRenew bool
    The auto renew.
    Description string
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    EipBandwidth int
    The eip bandwidth.
    Force bool
    The force.
    InstanceName string
    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.
    KeyPairName string
    The name of the key pair of the mobile phone instance.
    PaymentType string
    The payment type.Valid values: PayAsYouGo,Subscription
    Period string
    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
    PeriodUnit string
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    Resolution string
    The selected resolution for the cloud mobile phone instance.
    Status string
    Instance status. Valid values: Running, Stopped.
    VncPassword string
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    ImageId string
    The ID Of The Image.
    InstanceType string
    Instance Type.
    SecurityGroupId string
    The ID of the security group. The security group is the same as that of the ECS instance.
    VswitchId string
    The vswitch id.
    AutoPay bool
    The auto pay.
    AutoRenew bool
    The auto renew.
    Description string
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    EipBandwidth int
    The eip bandwidth.
    Force bool
    The force.
    InstanceName string
    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.
    KeyPairName string
    The name of the key pair of the mobile phone instance.
    PaymentType string
    The payment type.Valid values: PayAsYouGo,Subscription
    Period string
    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
    PeriodUnit string
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    Resolution string
    The selected resolution for the cloud mobile phone instance.
    Status string
    Instance status. Valid values: Running, Stopped.
    VncPassword string
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    imageId String
    The ID Of The Image.
    instanceType String
    Instance Type.
    securityGroupId String
    The ID of the security group. The security group is the same as that of the ECS instance.
    vswitchId String
    The vswitch id.
    autoPay Boolean
    The auto pay.
    autoRenew Boolean
    The auto renew.
    description String
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    eipBandwidth Integer
    The eip bandwidth.
    force Boolean
    The force.
    instanceName String
    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.
    keyPairName String
    The name of the key pair of the mobile phone instance.
    paymentType String
    The payment type.Valid values: PayAsYouGo,Subscription
    period String
    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
    periodUnit String
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    resolution String
    The selected resolution for the cloud mobile phone instance.
    status String
    Instance status. Valid values: Running, Stopped.
    vncPassword String
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    imageId string
    The ID Of The Image.
    instanceType string
    Instance Type.
    securityGroupId string
    The ID of the security group. The security group is the same as that of the ECS instance.
    vswitchId string
    The vswitch id.
    autoPay boolean
    The auto pay.
    autoRenew boolean
    The auto renew.
    description string
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    eipBandwidth number
    The eip bandwidth.
    force boolean
    The force.
    instanceName string
    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.
    keyPairName string
    The name of the key pair of the mobile phone instance.
    paymentType string
    The payment type.Valid values: PayAsYouGo,Subscription
    period string
    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
    periodUnit string
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    resolution string
    The selected resolution for the cloud mobile phone instance.
    status string
    Instance status. Valid values: Running, Stopped.
    vncPassword string
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    image_id str
    The ID Of The Image.
    instance_type str
    Instance Type.
    security_group_id str
    The ID of the security group. The security group is the same as that of the ECS instance.
    vswitch_id str
    The vswitch id.
    auto_pay bool
    The auto pay.
    auto_renew bool
    The auto renew.
    description str
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    eip_bandwidth int
    The eip bandwidth.
    force bool
    The force.
    instance_name str
    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.
    key_pair_name str
    The name of the key pair of the mobile phone instance.
    payment_type str
    The payment type.Valid values: PayAsYouGo,Subscription
    period str
    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
    period_unit str
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    resolution str
    The selected resolution for the cloud mobile phone instance.
    status str
    Instance status. Valid values: Running, Stopped.
    vnc_password str
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    imageId String
    The ID Of The Image.
    instanceType String
    Instance Type.
    securityGroupId String
    The ID of the security group. The security group is the same as that of the ECS instance.
    vswitchId String
    The vswitch id.
    autoPay Boolean
    The auto pay.
    autoRenew Boolean
    The auto renew.
    description String
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    eipBandwidth Number
    The eip bandwidth.
    force Boolean
    The force.
    instanceName String
    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.
    keyPairName String
    The name of the key pair of the mobile phone instance.
    paymentType String
    The payment type.Valid values: PayAsYouGo,Subscription
    period String
    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
    periodUnit String
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    resolution String
    The selected resolution for the cloud mobile phone instance.
    status String
    Instance status. Valid values: Running, Stopped.
    vncPassword String
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Instance Resource

    Get an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: InstanceState, opts?: CustomResourceOptions): Instance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auto_pay: Optional[bool] = None,
            auto_renew: Optional[bool] = None,
            description: Optional[str] = None,
            eip_bandwidth: Optional[int] = None,
            force: Optional[bool] = None,
            image_id: Optional[str] = None,
            instance_name: Optional[str] = None,
            instance_type: Optional[str] = None,
            key_pair_name: Optional[str] = None,
            payment_type: Optional[str] = None,
            period: Optional[str] = None,
            period_unit: Optional[str] = None,
            resolution: Optional[str] = None,
            security_group_id: Optional[str] = None,
            status: Optional[str] = None,
            vnc_password: Optional[str] = None,
            vswitch_id: Optional[str] = None) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutoPay bool
    The auto pay.
    AutoRenew bool
    The auto renew.
    Description string
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    EipBandwidth int
    The eip bandwidth.
    Force bool
    The force.
    ImageId string
    The ID Of The Image.
    InstanceName string
    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.
    InstanceType string
    Instance Type.
    KeyPairName string
    The name of the key pair of the mobile phone instance.
    PaymentType string
    The payment type.Valid values: PayAsYouGo,Subscription
    Period string
    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
    PeriodUnit string
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    Resolution string
    The selected resolution for the cloud mobile phone instance.
    SecurityGroupId string
    The ID of the security group. The security group is the same as that of the ECS instance.
    Status string
    Instance status. Valid values: Running, Stopped.
    VncPassword string
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    VswitchId string
    The vswitch id.
    AutoPay bool
    The auto pay.
    AutoRenew bool
    The auto renew.
    Description string
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    EipBandwidth int
    The eip bandwidth.
    Force bool
    The force.
    ImageId string
    The ID Of The Image.
    InstanceName string
    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.
    InstanceType string
    Instance Type.
    KeyPairName string
    The name of the key pair of the mobile phone instance.
    PaymentType string
    The payment type.Valid values: PayAsYouGo,Subscription
    Period string
    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
    PeriodUnit string
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    Resolution string
    The selected resolution for the cloud mobile phone instance.
    SecurityGroupId string
    The ID of the security group. The security group is the same as that of the ECS instance.
    Status string
    Instance status. Valid values: Running, Stopped.
    VncPassword string
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    VswitchId string
    The vswitch id.
    autoPay Boolean
    The auto pay.
    autoRenew Boolean
    The auto renew.
    description String
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    eipBandwidth Integer
    The eip bandwidth.
    force Boolean
    The force.
    imageId String
    The ID Of The Image.
    instanceName String
    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.
    instanceType String
    Instance Type.
    keyPairName String
    The name of the key pair of the mobile phone instance.
    paymentType String
    The payment type.Valid values: PayAsYouGo,Subscription
    period String
    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
    periodUnit String
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    resolution String
    The selected resolution for the cloud mobile phone instance.
    securityGroupId String
    The ID of the security group. The security group is the same as that of the ECS instance.
    status String
    Instance status. Valid values: Running, Stopped.
    vncPassword String
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    vswitchId String
    The vswitch id.
    autoPay boolean
    The auto pay.
    autoRenew boolean
    The auto renew.
    description string
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    eipBandwidth number
    The eip bandwidth.
    force boolean
    The force.
    imageId string
    The ID Of The Image.
    instanceName string
    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.
    instanceType string
    Instance Type.
    keyPairName string
    The name of the key pair of the mobile phone instance.
    paymentType string
    The payment type.Valid values: PayAsYouGo,Subscription
    period string
    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
    periodUnit string
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    resolution string
    The selected resolution for the cloud mobile phone instance.
    securityGroupId string
    The ID of the security group. The security group is the same as that of the ECS instance.
    status string
    Instance status. Valid values: Running, Stopped.
    vncPassword string
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    vswitchId string
    The vswitch id.
    auto_pay bool
    The auto pay.
    auto_renew bool
    The auto renew.
    description str
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    eip_bandwidth int
    The eip bandwidth.
    force bool
    The force.
    image_id str
    The ID Of The Image.
    instance_name str
    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.
    instance_type str
    Instance Type.
    key_pair_name str
    The name of the key pair of the mobile phone instance.
    payment_type str
    The payment type.Valid values: PayAsYouGo,Subscription
    period str
    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
    period_unit str
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    resolution str
    The selected resolution for the cloud mobile phone instance.
    security_group_id str
    The ID of the security group. The security group is the same as that of the ECS instance.
    status str
    Instance status. Valid values: Running, Stopped.
    vnc_password str
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    vswitch_id str
    The vswitch id.
    autoPay Boolean
    The auto pay.
    autoRenew Boolean
    The auto renew.
    description String
    Description of the instance. 2 to 256 English or Chinese characters in length and cannot start with http:// and https.
    eipBandwidth Number
    The eip bandwidth.
    force Boolean
    The force.
    imageId String
    The ID Of The Image.
    instanceName String
    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.
    instanceType String
    Instance Type.
    keyPairName String
    The name of the key pair of the mobile phone instance.
    paymentType String
    The payment type.Valid values: PayAsYouGo,Subscription
    period String
    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
    periodUnit String
    The duration unit that you will buy the resource. Valid value: Year,Month. Default to Month.
    resolution String
    The selected resolution for the cloud mobile phone instance.
    securityGroupId String
    The ID of the security group. The security group is the same as that of the ECS instance.
    status String
    Instance status. Valid values: Running, Stopped.
    vncPassword String
    Cloud mobile phone VNC password. The password must be six characters in length and must contain only uppercase, lowercase English letters and Arabic numerals.
    vswitchId String
    The vswitch id.

    Import

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

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi