published on Saturday, Mar 14, 2026 by Pulumi
published on Saturday, Mar 14, 2026 by Pulumi
Provides a EAIS Instance resource.
Instance resource definition.
For information about EAIS Instance and how to use it, see What is Instance.
NOTE: Available since v1.137.0.
Example Usage
Basic Usage
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 zoneId = "cn-hangzhou-h";
const _default = new alicloud.vpc.Network("default", {
vpcName: name,
cidrBlock: "192.168.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: name,
vpcId: _default.id,
cidrBlock: "192.168.192.0/24",
zoneId: zoneId,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
name: name,
vpcId: _default.id,
});
const defaultInstance = new alicloud.eais.Instance("default", {
instanceType: "eais.ei-a6.2xlarge",
vswitchId: defaultSwitch.id,
securityGroupId: defaultSecurityGroup.id,
instanceName: name,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
zone_id = "cn-hangzhou-h"
default = alicloud.vpc.Network("default",
vpc_name=name,
cidr_block="192.168.0.0/16")
default_switch = alicloud.vpc.Switch("default",
vswitch_name=name,
vpc_id=default.id,
cidr_block="192.168.192.0/24",
zone_id=zone_id)
default_security_group = alicloud.ecs.SecurityGroup("default",
name=name,
vpc_id=default.id)
default_instance = alicloud.eais.Instance("default",
instance_type="eais.ei-a6.2xlarge",
vswitch_id=default_switch.id,
security_group_id=default_security_group.id,
instance_name=name)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eais"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"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
}
zoneId := "cn-hangzhou-h"
_default, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.String(name),
VpcId: _default.ID(),
CidrBlock: pulumi.String("192.168.192.0/24"),
ZoneId: pulumi.String(zoneId),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
Name: pulumi.String(name),
VpcId: _default.ID(),
})
if err != nil {
return err
}
_, err = eais.NewInstance(ctx, "default", &eais.InstanceArgs{
InstanceType: pulumi.String("eais.ei-a6.2xlarge"),
VswitchId: defaultSwitch.ID(),
SecurityGroupId: defaultSecurityGroup.ID(),
InstanceName: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}
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 zoneId = "cn-hangzhou-h";
var @default = new AliCloud.Vpc.Network("default", new()
{
VpcName = name,
CidrBlock = "192.168.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = name,
VpcId = @default.Id,
CidrBlock = "192.168.192.0/24",
ZoneId = zoneId,
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = name,
VpcId = @default.Id,
});
var defaultInstance = new AliCloud.Eais.Instance("default", new()
{
InstanceType = "eais.ei-a6.2xlarge",
VswitchId = defaultSwitch.Id,
SecurityGroupId = defaultSecurityGroup.Id,
InstanceName = name,
});
});
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.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.eais.Instance;
import com.pulumi.alicloud.eais.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("terraform-example");
final var zoneId = "cn-hangzhou-h";
var default_ = new Network("default", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("192.168.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(name)
.vpcId(default_.id())
.cidrBlock("192.168.192.0/24")
.zoneId(zoneId)
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name(name)
.vpcId(default_.id())
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.instanceType("eais.ei-a6.2xlarge")
.vswitchId(defaultSwitch.id())
.securityGroupId(defaultSecurityGroup.id())
.instanceName(name)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:vpc:Network
properties:
vpcName: ${name}
cidrBlock: 192.168.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vswitchName: ${name}
vpcId: ${default.id}
cidrBlock: 192.168.192.0/24
zoneId: ${zoneId}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: default
properties:
name: ${name}
vpcId: ${default.id}
defaultInstance:
type: alicloud:eais:Instance
name: default
properties:
instanceType: eais.ei-a6.2xlarge
vswitchId: ${defaultSwitch.id}
securityGroupId: ${defaultSecurityGroup.id}
instanceName: ${name}
variables:
zoneId: cn-hangzhou-h
Deleting alicloud.eais.Instance or removing it from your configuration
The alicloud.eais.Instance resource allows you to manage category = "ei" instance, but Terraform cannot destroy it.
Deleting the subscription resource or removing it from your configuration will remove it from your state file and management, but will not destroy the Instance.
You can resume managing the subscription instance via the AlibabaCloud Console.
📚 Need more examples? VIEW MORE EXAMPLES
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,
instance_type: Optional[str] = None,
security_group_id: Optional[str] = None,
vswitch_id: Optional[str] = None,
category: Optional[str] = None,
environment_vars: Optional[Sequence[InstanceEnvironmentVarArgs]] = None,
force: Optional[bool] = None,
image: Optional[str] = None,
instance_name: Optional[str] = None,
resource_group_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = 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:eais: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 exampleinstanceResourceResourceFromEaisinstance = new AliCloud.Eais.Instance("exampleinstanceResourceResourceFromEaisinstance", new()
{
InstanceType = "string",
SecurityGroupId = "string",
VswitchId = "string",
Category = "string",
EnvironmentVars = new[]
{
new AliCloud.Eais.Inputs.InstanceEnvironmentVarArgs
{
Key = "string",
Value = "string",
},
},
Image = "string",
InstanceName = "string",
ResourceGroupId = "string",
Status = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := eais.NewInstance(ctx, "exampleinstanceResourceResourceFromEaisinstance", &eais.InstanceArgs{
InstanceType: pulumi.String("string"),
SecurityGroupId: pulumi.String("string"),
VswitchId: pulumi.String("string"),
Category: pulumi.String("string"),
EnvironmentVars: eais.InstanceEnvironmentVarArray{
&eais.InstanceEnvironmentVarArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Image: pulumi.String("string"),
InstanceName: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
Status: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var exampleinstanceResourceResourceFromEaisinstance = new com.pulumi.alicloud.eais.Instance("exampleinstanceResourceResourceFromEaisinstance", com.pulumi.alicloud.eais.InstanceArgs.builder()
.instanceType("string")
.securityGroupId("string")
.vswitchId("string")
.category("string")
.environmentVars(InstanceEnvironmentVarArgs.builder()
.key("string")
.value("string")
.build())
.image("string")
.instanceName("string")
.resourceGroupId("string")
.status("string")
.tags(Map.of("string", "string"))
.build());
exampleinstance_resource_resource_from_eaisinstance = alicloud.eais.Instance("exampleinstanceResourceResourceFromEaisinstance",
instance_type="string",
security_group_id="string",
vswitch_id="string",
category="string",
environment_vars=[{
"key": "string",
"value": "string",
}],
image="string",
instance_name="string",
resource_group_id="string",
status="string",
tags={
"string": "string",
})
const exampleinstanceResourceResourceFromEaisinstance = new alicloud.eais.Instance("exampleinstanceResourceResourceFromEaisinstance", {
instanceType: "string",
securityGroupId: "string",
vswitchId: "string",
category: "string",
environmentVars: [{
key: "string",
value: "string",
}],
image: "string",
instanceName: "string",
resourceGroupId: "string",
status: "string",
tags: {
string: "string",
},
});
type: alicloud:eais:Instance
properties:
category: string
environmentVars:
- key: string
value: string
image: string
instanceName: string
instanceType: string
resourceGroupId: string
securityGroupId: string
status: string
tags:
string: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Instance resource accepts the following input properties:
- Instance
Type string - EAIS instance type
- Security
Group stringId - Security group ID
- Vswitch
Id string - Switch ID.
- Category string
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - Environment
Vars List<Pulumi.Ali Cloud. Eais. Inputs. Instance Environment Var> - Setting environment variables in eais instance on Initialization See
environment_varbelow. - Force bool
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- Image string
- EAIS instance image.
- Instance
Name string - Name of the instance
- Resource
Group stringId - The ID of the resource group
- Status string
- The status of the resource
- Dictionary<string, string>
- The tags.
- Instance
Type string - EAIS instance type
- Security
Group stringId - Security group ID
- Vswitch
Id string - Switch ID.
- Category string
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - Environment
Vars []InstanceEnvironment Var Args - Setting environment variables in eais instance on Initialization See
environment_varbelow. - Force bool
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- Image string
- EAIS instance image.
- Instance
Name string - Name of the instance
- Resource
Group stringId - The ID of the resource group
- Status string
- The status of the resource
- map[string]string
- The tags.
- instance
Type String - EAIS instance type
- security
Group StringId - Security group ID
- vswitch
Id String - Switch ID.
- category String
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - environment
Vars List<InstanceEnvironment Var> - Setting environment variables in eais instance on Initialization See
environment_varbelow. - force Boolean
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- image String
- EAIS instance image.
- instance
Name String - Name of the instance
- resource
Group StringId - The ID of the resource group
- status String
- The status of the resource
- Map<String,String>
- The tags.
- instance
Type string - EAIS instance type
- security
Group stringId - Security group ID
- vswitch
Id string - Switch ID.
- category string
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - environment
Vars InstanceEnvironment Var[] - Setting environment variables in eais instance on Initialization See
environment_varbelow. - force boolean
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- image string
- EAIS instance image.
- instance
Name string - Name of the instance
- resource
Group stringId - The ID of the resource group
- status string
- The status of the resource
- {[key: string]: string}
- The tags.
- instance_
type str - EAIS instance type
- security_
group_ strid - Security group ID
- vswitch_
id str - Switch ID.
- category str
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - environment_
vars Sequence[InstanceEnvironment Var Args] - Setting environment variables in eais instance on Initialization See
environment_varbelow. - force bool
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- image str
- EAIS instance image.
- instance_
name str - Name of the instance
- resource_
group_ strid - The ID of the resource group
- status str
- The status of the resource
- Mapping[str, str]
- The tags.
- instance
Type String - EAIS instance type
- security
Group StringId - Security group ID
- vswitch
Id String - Switch ID.
- category String
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - environment
Vars List<Property Map> - Setting environment variables in eais instance on Initialization See
environment_varbelow. - force Boolean
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- image String
- EAIS instance image.
- instance
Name String - Name of the instance
- resource
Group StringId - The ID of the resource group
- status String
- The status of the resource
- Map<String>
- The tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - Region ID
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - Region ID
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - Region ID
- create
Time string - The creation time of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- region
Id string - Region ID
- create_
time str - The creation time of the resource
- id str
- The provider-assigned unique ID for this managed resource.
- region_
id str - Region ID
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - Region ID
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,
category: Optional[str] = None,
create_time: Optional[str] = None,
environment_vars: Optional[Sequence[InstanceEnvironmentVarArgs]] = None,
force: Optional[bool] = None,
image: Optional[str] = None,
instance_name: Optional[str] = None,
instance_type: Optional[str] = None,
region_id: Optional[str] = None,
resource_group_id: Optional[str] = None,
security_group_id: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
vswitch_id: Optional[str] = None) -> Instancefunc 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)resources: _: type: alicloud:eais:Instance get: id: ${id}- 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.
- Category string
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - Create
Time string - The creation time of the resource
- Environment
Vars List<Pulumi.Ali Cloud. Eais. Inputs. Instance Environment Var> - Setting environment variables in eais instance on Initialization See
environment_varbelow. - Force bool
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- Image string
- EAIS instance image.
- Instance
Name string - Name of the instance
- Instance
Type string - EAIS instance type
- Region
Id string - Region ID
- Resource
Group stringId - The ID of the resource group
- Security
Group stringId - Security group ID
- Status string
- The status of the resource
- Dictionary<string, string>
- The tags.
- Vswitch
Id string - Switch ID.
- Category string
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - Create
Time string - The creation time of the resource
- Environment
Vars []InstanceEnvironment Var Args - Setting environment variables in eais instance on Initialization See
environment_varbelow. - Force bool
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- Image string
- EAIS instance image.
- Instance
Name string - Name of the instance
- Instance
Type string - EAIS instance type
- Region
Id string - Region ID
- Resource
Group stringId - The ID of the resource group
- Security
Group stringId - Security group ID
- Status string
- The status of the resource
- map[string]string
- The tags.
- Vswitch
Id string - Switch ID.
- category String
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - create
Time String - The creation time of the resource
- environment
Vars List<InstanceEnvironment Var> - Setting environment variables in eais instance on Initialization See
environment_varbelow. - force Boolean
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- image String
- EAIS instance image.
- instance
Name String - Name of the instance
- instance
Type String - EAIS instance type
- region
Id String - Region ID
- resource
Group StringId - The ID of the resource group
- security
Group StringId - Security group ID
- status String
- The status of the resource
- Map<String,String>
- The tags.
- vswitch
Id String - Switch ID.
- category string
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - create
Time string - The creation time of the resource
- environment
Vars InstanceEnvironment Var[] - Setting environment variables in eais instance on Initialization See
environment_varbelow. - force boolean
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- image string
- EAIS instance image.
- instance
Name string - Name of the instance
- instance
Type string - EAIS instance type
- region
Id string - Region ID
- resource
Group stringId - The ID of the resource group
- security
Group stringId - Security group ID
- status string
- The status of the resource
- {[key: string]: string}
- The tags.
- vswitch
Id string - Switch ID.
- category str
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - create_
time str - The creation time of the resource
- environment_
vars Sequence[InstanceEnvironment Var Args] - Setting environment variables in eais instance on Initialization See
environment_varbelow. - force bool
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- image str
- EAIS instance image.
- instance_
name str - Name of the instance
- instance_
type str - EAIS instance type
- region_
id str - Region ID
- resource_
group_ strid - The ID of the resource group
- security_
group_ strid - Security group ID
- status str
- The status of the resource
- Mapping[str, str]
- The tags.
- vswitch_
id str - Switch ID.
- category String
- EAIS instance category, valid values:
eais,jupyter,ei, default iseais. - create
Time String - The creation time of the resource
- environment
Vars List<Property Map> - Setting environment variables in eais instance on Initialization See
environment_varbelow. - force Boolean
- Whether to force the deletion when the instance status does not meet the deletion conditions.
- image String
- EAIS instance image.
- instance
Name String - Name of the instance
- instance
Type String - EAIS instance type
- region
Id String - Region ID
- resource
Group StringId - The ID of the resource group
- security
Group StringId - Security group ID
- status String
- The status of the resource
- Map<String>
- The tags.
- vswitch
Id String - Switch ID.
Supporting Types
InstanceEnvironmentVar, InstanceEnvironmentVarArgs
Import
EAIS Instance can be imported using the id, e.g.
$ pulumi import alicloud:eais/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
alicloudTerraform Provider.
published on Saturday, Mar 14, 2026 by Pulumi
