published on Thursday, Apr 23, 2026 by Volcengine
published on Thursday, Apr 23, 2026 by Volcengine
Represents an Elastic Compute Service (ECS) instance resource.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
ecsInstanceDemo:
type: volcenginecc:ecs:Instance
name: EcsInstanceDemo
properties:
password: '**********'
instanceChargeType: PostPaid
instanceName: EcsInstanceDemo
spotStrategy: NoSpot
hostname: EcsInstanceDemo
description: EcsInstanceDemo Description
projectName: default
instanceType: ecs.g4i.large
deletionProtection: false
zoneId: cn-beijing-a
deploymentSetId: dps-ydzccfzqjoaa98kxxxxx
deploymentSetGroupNumber: 1
image:
image_id: image-aagd56zrw2jtdroxxxxx
vpcId: vpc-rrco37ovjq4gv0x58zxxxxx
eipAddress:
charge_type: PayByTraffic
bandwidth_mbps: 5
isp: BGP
release_with_instance: false
bandwidth_package_id: ""
primaryNetworkInterface:
security_group_ids:
- sg-1v9zvjkmx14w51j8e73xxxxx
subnet_id: subnet-rrwqhg3qzxfkv0x57gxxxxx
ipv_6_address_count: 1
secondaryNetworkInterfaces:
- security_group_ids:
- sg-1v9zvjkmx14w51j8e73xxxxx
subnet_id: subnet-rrwqhg3qzxfkv0x57gxxxxx
placement:
affinity: Default
dedicated_host_cluster_id: ""
tenancy: Default
dedicated_host_id: ""
systemVolume:
size: 50
delete_with_instance: true
volume_type: ESSD_FlexPL
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: Optional[InstanceImageArgs] = None,
zone_id: Optional[str] = None,
system_volume: Optional[InstanceSystemVolumeArgs] = None,
primary_network_interface: Optional[InstancePrimaryNetworkInterfaceArgs] = None,
instance_type: Optional[str] = None,
instance_name: Optional[str] = None,
description: Optional[str] = None,
password: Optional[str] = None,
deployment_set_id: Optional[str] = None,
affinity_group_size: Optional[int] = None,
eip_address: Optional[InstanceEipAddressArgs] = None,
enable_jumbo_frame: Optional[bool] = None,
hostname: Optional[str] = None,
hpc_cluster_id: Optional[str] = None,
deletion_protection: Optional[bool] = None,
include_data_volumes: Optional[bool] = None,
install_run_command_agent: Optional[bool] = None,
instance_charge_type: Optional[str] = None,
credit_specification: Optional[str] = None,
cpu_max_frequency: Optional[float] = None,
key_pair: Optional[InstanceKeyPairArgs] = None,
deployment_set_group_number: Optional[int] = None,
period: Optional[int] = None,
period_unit: Optional[str] = None,
placement: Optional[InstancePlacementArgs] = None,
auto_renew_period: Optional[int] = None,
project_name: Optional[str] = None,
renew_info: Optional[InstanceRenewInfoArgs] = None,
role_names: Optional[Sequence[str]] = None,
secondary_network_interfaces: Optional[Sequence[InstanceSecondaryNetworkInterfaceArgs]] = None,
spot_price_limit: Optional[float] = None,
spot_strategy: Optional[str] = None,
status: Optional[str] = None,
stopped_mode: Optional[str] = None,
auto_renew: Optional[bool] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None,
user_data: Optional[str] = None,
auto_pay: 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: volcenginecc:ecs: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.
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:
- Image
Volcengine.
Instance Image - The image of the instance.
- Instance
Name string - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- Instance
Type string - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- Primary
Network Volcengine.Interface Instance Primary Network Interface - Primary network interface card of the instance.
- System
Volume Volcengine.Instance System Volume - The system volume of the instance.
- Zone
Id string - The availability zone ID where the instance is located.
- Affinity
Group intSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- Auto
Pay bool - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- Auto
Renew bool - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - Auto
Renew intPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - Cpu
Max doubleFrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- Credit
Specification string - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - Deletion
Protection bool - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- Deployment
Set intGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- Deployment
Set stringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- Description string
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- Eip
Address Volcengine.Instance Eip Address - The EIP address of the instance.
- Enable
Jumbo boolFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- Hostname string
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- Hpc
Cluster stringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- Include
Data boolVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- Install
Run boolCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- Instance
Charge stringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- Key
Pair Volcengine.Instance Key Pair - Instance key pair name
- Password string
- The password of the instance.
- Period int
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - Period
Unit string - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - Placement
Volcengine.
Instance Placement - The deployment information of the instance.
- Project
Name string - Project name to which the instance belongs.
- Renew
Info Volcengine.Instance Renew Info - Renewal information.
- Role
Names List<string> - IAM role name bound to the instance
- Secondary
Network List<Volcengine.Interfaces Instance Secondary Network Interface> - Spot
Price doubleLimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - Spot
Strategy string - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- Status string
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- Stopped
Mode string - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
-
List<Volcengine.
Instance Tag> - User
Data string - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- Image
Instance
Image Args - The image of the instance.
- Instance
Name string - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- Instance
Type string - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- Primary
Network InstanceInterface Primary Network Interface Args - Primary network interface card of the instance.
- System
Volume InstanceSystem Volume Args - The system volume of the instance.
- Zone
Id string - The availability zone ID where the instance is located.
- Affinity
Group intSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- Auto
Pay bool - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- Auto
Renew bool - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - Auto
Renew intPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - Cpu
Max float64Frequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- Credit
Specification string - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - Deletion
Protection bool - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- Deployment
Set intGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- Deployment
Set stringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- Description string
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- Eip
Address InstanceEip Address Args - The EIP address of the instance.
- Enable
Jumbo boolFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- Hostname string
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- Hpc
Cluster stringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- Include
Data boolVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- Install
Run boolCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- Instance
Charge stringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- Key
Pair InstanceKey Pair Args - Instance key pair name
- Password string
- The password of the instance.
- Period int
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - Period
Unit string - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - Placement
Instance
Placement Args - The deployment information of the instance.
- Project
Name string - Project name to which the instance belongs.
- Renew
Info InstanceRenew Info Args - Renewal information.
- Role
Names []string - IAM role name bound to the instance
- Secondary
Network []InstanceInterfaces Secondary Network Interface Args - Spot
Price float64Limit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - Spot
Strategy string - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- Status string
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- Stopped
Mode string - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
-
[]Instance
Tag Args - User
Data string - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- image
Instance
Image - The image of the instance.
- instance
Name String - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- instance
Type String - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- primary
Network InstanceInterface Primary Network Interface - Primary network interface card of the instance.
- system
Volume InstanceSystem Volume - The system volume of the instance.
- zone
Id String - The availability zone ID where the instance is located.
- affinity
Group IntegerSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- auto
Pay Boolean - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- auto
Renew Boolean - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - auto
Renew IntegerPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - cpu
Max DoubleFrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- credit
Specification String - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - deletion
Protection Boolean - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- deployment
Set IntegerGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- deployment
Set StringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- description String
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- eip
Address InstanceEip Address - The EIP address of the instance.
- enable
Jumbo BooleanFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- hostname String
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- hpc
Cluster StringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- include
Data BooleanVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- install
Run BooleanCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- instance
Charge StringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- key
Pair InstanceKey Pair - Instance key pair name
- password String
- The password of the instance.
- period Integer
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - period
Unit String - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - placement
Instance
Placement - The deployment information of the instance.
- project
Name String - Project name to which the instance belongs.
- renew
Info InstanceRenew Info - Renewal information.
- role
Names List<String> - IAM role name bound to the instance
- secondary
Network List<InstanceInterfaces Secondary Network Interface> - spot
Price DoubleLimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - spot
Strategy String - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- status String
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- stopped
Mode String - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
-
List<Instance
Tag> - user
Data String - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- image
Instance
Image - The image of the instance.
- instance
Name string - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- instance
Type string - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- primary
Network InstanceInterface Primary Network Interface - Primary network interface card of the instance.
- system
Volume InstanceSystem Volume - The system volume of the instance.
- zone
Id string - The availability zone ID where the instance is located.
- affinity
Group numberSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- auto
Pay boolean - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- auto
Renew boolean - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - auto
Renew numberPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - cpu
Max numberFrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- credit
Specification string - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - deletion
Protection boolean - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- deployment
Set numberGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- deployment
Set stringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- description string
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- eip
Address InstanceEip Address - The EIP address of the instance.
- enable
Jumbo booleanFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- hostname string
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- hpc
Cluster stringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- include
Data booleanVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- install
Run booleanCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- instance
Charge stringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- key
Pair InstanceKey Pair - Instance key pair name
- password string
- The password of the instance.
- period number
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - period
Unit string - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - placement
Instance
Placement - The deployment information of the instance.
- project
Name string - Project name to which the instance belongs.
- renew
Info InstanceRenew Info - Renewal information.
- role
Names string[] - IAM role name bound to the instance
- secondary
Network InstanceInterfaces Secondary Network Interface[] - spot
Price numberLimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - spot
Strategy string - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- status string
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- stopped
Mode string - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
-
Instance
Tag[] - user
Data string - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- image
Instance
Image Args - The image of the instance.
- instance_
name str - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- instance_
type str - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- primary_
network_ Instanceinterface Primary Network Interface Args - Primary network interface card of the instance.
- system_
volume InstanceSystem Volume Args - The system volume of the instance.
- zone_
id str - The availability zone ID where the instance is located.
- affinity_
group_ intsize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- auto_
pay bool - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- auto_
renew bool - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - auto_
renew_ intperiod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - cpu_
max_ floatfrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- credit_
specification str - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - deletion_
protection bool - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- deployment_
set_ intgroup_ number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- deployment_
set_ strid - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- description str
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- eip_
address InstanceEip Address Args - The EIP address of the instance.
- enable_
jumbo_ boolframe - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- hostname str
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- hpc_
cluster_ strid - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- include_
data_ boolvolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- install_
run_ boolcommand_ agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- instance_
charge_ strtype - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- key_
pair InstanceKey Pair Args - Instance key pair name
- password str
- The password of the instance.
- period int
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - period_
unit str - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - placement
Instance
Placement Args - The deployment information of the instance.
- project_
name str - Project name to which the instance belongs.
- renew_
info InstanceRenew Info Args - Renewal information.
- role_
names Sequence[str] - IAM role name bound to the instance
- secondary_
network_ Sequence[Instanceinterfaces Secondary Network Interface Args] - spot_
price_ floatlimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - spot_
strategy str - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- status str
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- stopped_
mode str - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
-
Sequence[Instance
Tag Args] - user_
data str - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- image Property Map
- The image of the instance.
- instance
Name String - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- instance
Type String - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- primary
Network Property MapInterface - Primary network interface card of the instance.
- system
Volume Property Map - The system volume of the instance.
- zone
Id String - The availability zone ID where the instance is located.
- affinity
Group NumberSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- auto
Pay Boolean - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- auto
Renew Boolean - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - auto
Renew NumberPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - cpu
Max NumberFrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- credit
Specification String - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - deletion
Protection Boolean - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- deployment
Set NumberGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- deployment
Set StringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- description String
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- eip
Address Property Map - The EIP address of the instance.
- enable
Jumbo BooleanFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- hostname String
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- hpc
Cluster StringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- include
Data BooleanVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- install
Run BooleanCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- instance
Charge StringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- key
Pair Property Map - Instance key pair name
- password String
- The password of the instance.
- period Number
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - period
Unit String - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - placement Property Map
- The deployment information of the instance.
- project
Name String - Project name to which the instance belongs.
- renew
Info Property Map - Renewal information.
- role
Names List<String> - IAM role name bound to the instance
- secondary
Network List<Property Map>Interfaces - spot
Price NumberLimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - spot
Strategy String - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- status String
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- stopped
Mode String - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
- List<Property Map>
- user
Data String - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
Outputs
All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:
- Affinity
Group stringId - Affinity group ID.
- Cpu
Memory Volcengine.Instance Cpu Memory - The CPU options for the instance.
- Created
At string - Instance creation time.
- Elastic
Scheduled stringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- Expired
At string - The expiration time of the instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The ECS instance ID.
- Local
Volumes List<Volcengine.Instance Local Volume> - Operation
System Volcengine.Instance Operation System - The operating system type of the instance.
- Rdma
Ip List<string>Addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- Rdma
Network List<Volcengine.Interface Details Instance Rdma Network Interface Detail> - Updated
At string - The update time of the instance.
- Vpc
Id string - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- Affinity
Group stringId - Affinity group ID.
- Cpu
Memory InstanceCpu Memory - The CPU options for the instance.
- Created
At string - Instance creation time.
- Elastic
Scheduled stringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- Expired
At string - The expiration time of the instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id string - The ECS instance ID.
- Local
Volumes []InstanceLocal Volume - Operation
System InstanceOperation System - The operating system type of the instance.
- Rdma
Ip []stringAddresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- Rdma
Network []InstanceInterface Details Rdma Network Interface Detail - Updated
At string - The update time of the instance.
- Vpc
Id string - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- affinity
Group StringId - Affinity group ID.
- cpu
Memory InstanceCpu Memory - The CPU options for the instance.
- created
At String - Instance creation time.
- elastic
Scheduled StringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- expired
At String - The expiration time of the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ECS instance ID.
- local
Volumes List<InstanceLocal Volume> - operation
System InstanceOperation System - The operating system type of the instance.
- rdma
Ip List<String>Addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- rdma
Network List<InstanceInterface Details Rdma Network Interface Detail> - updated
At String - The update time of the instance.
- vpc
Id String - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- affinity
Group stringId - Affinity group ID.
- cpu
Memory InstanceCpu Memory - The CPU options for the instance.
- created
At string - Instance creation time.
- elastic
Scheduled stringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- expired
At string - The expiration time of the instance.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id string - The ECS instance ID.
- local
Volumes InstanceLocal Volume[] - operation
System InstanceOperation System - The operating system type of the instance.
- rdma
Ip string[]Addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- rdma
Network InstanceInterface Details Rdma Network Interface Detail[] - updated
At string - The update time of the instance.
- vpc
Id string - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- affinity_
group_ strid - Affinity group ID.
- cpu_
memory InstanceCpu Memory - The CPU options for the instance.
- created_
at str - Instance creation time.
- elastic_
scheduled_ strinstance_ type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- expired_
at str - The expiration time of the instance.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id str - The ECS instance ID.
- local_
volumes Sequence[InstanceLocal Volume] - operation_
system InstanceOperation System - The operating system type of the instance.
- rdma_
ip_ Sequence[str]addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- rdma_
network_ Sequence[Instanceinterface_ details Rdma Network Interface Detail] - updated_
at str - The update time of the instance.
- vpc_
id str - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- affinity
Group StringId - Affinity group ID.
- cpu
Memory Property Map - The CPU options for the instance.
- created
At String - Instance creation time.
- elastic
Scheduled StringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- expired
At String - The expiration time of the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id String - The ECS instance ID.
- local
Volumes List<Property Map> - operation
System Property Map - The operating system type of the instance.
- rdma
Ip List<String>Addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- rdma
Network List<Property Map>Interface Details - updated
At String - The update time of the instance.
- vpc
Id String - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
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,
affinity_group_id: Optional[str] = None,
affinity_group_size: Optional[int] = None,
auto_pay: Optional[bool] = None,
auto_renew: Optional[bool] = None,
auto_renew_period: Optional[int] = None,
cpu_max_frequency: Optional[float] = None,
cpu_memory: Optional[InstanceCpuMemoryArgs] = None,
created_at: Optional[str] = None,
credit_specification: Optional[str] = None,
deletion_protection: Optional[bool] = None,
deployment_set_group_number: Optional[int] = None,
deployment_set_id: Optional[str] = None,
description: Optional[str] = None,
eip_address: Optional[InstanceEipAddressArgs] = None,
elastic_scheduled_instance_type: Optional[str] = None,
enable_jumbo_frame: Optional[bool] = None,
expired_at: Optional[str] = None,
hostname: Optional[str] = None,
hpc_cluster_id: Optional[str] = None,
image: Optional[InstanceImageArgs] = None,
include_data_volumes: Optional[bool] = None,
install_run_command_agent: Optional[bool] = None,
instance_charge_type: Optional[str] = None,
instance_id: Optional[str] = None,
instance_name: Optional[str] = None,
instance_type: Optional[str] = None,
key_pair: Optional[InstanceKeyPairArgs] = None,
local_volumes: Optional[Sequence[InstanceLocalVolumeArgs]] = None,
operation_system: Optional[InstanceOperationSystemArgs] = None,
password: Optional[str] = None,
period: Optional[int] = None,
period_unit: Optional[str] = None,
placement: Optional[InstancePlacementArgs] = None,
primary_network_interface: Optional[InstancePrimaryNetworkInterfaceArgs] = None,
project_name: Optional[str] = None,
rdma_ip_addresses: Optional[Sequence[str]] = None,
rdma_network_interface_details: Optional[Sequence[InstanceRdmaNetworkInterfaceDetailArgs]] = None,
renew_info: Optional[InstanceRenewInfoArgs] = None,
role_names: Optional[Sequence[str]] = None,
secondary_network_interfaces: Optional[Sequence[InstanceSecondaryNetworkInterfaceArgs]] = None,
spot_price_limit: Optional[float] = None,
spot_strategy: Optional[str] = None,
status: Optional[str] = None,
stopped_mode: Optional[str] = None,
system_volume: Optional[InstanceSystemVolumeArgs] = None,
tags: Optional[Sequence[InstanceTagArgs]] = None,
updated_at: Optional[str] = None,
user_data: Optional[str] = None,
vpc_id: Optional[str] = None,
zone_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: volcenginecc:ecs: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.
- Affinity
Group stringId - Affinity group ID.
- Affinity
Group intSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- Auto
Pay bool - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- Auto
Renew bool - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - Auto
Renew intPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - Cpu
Max doubleFrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- Cpu
Memory Volcengine.Instance Cpu Memory - The CPU options for the instance.
- Created
At string - Instance creation time.
- Credit
Specification string - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - Deletion
Protection bool - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- Deployment
Set intGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- Deployment
Set stringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- Description string
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- Eip
Address Volcengine.Instance Eip Address - The EIP address of the instance.
- Elastic
Scheduled stringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- Enable
Jumbo boolFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- Expired
At string - The expiration time of the instance.
- Hostname string
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- Hpc
Cluster stringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- Image
Volcengine.
Instance Image - The image of the instance.
- Include
Data boolVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- Install
Run boolCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- Instance
Charge stringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- Instance
Id string - The ECS instance ID.
- Instance
Name string - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- Instance
Type string - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- Key
Pair Volcengine.Instance Key Pair - Instance key pair name
- Local
Volumes List<Volcengine.Instance Local Volume> - Operation
System Volcengine.Instance Operation System - The operating system type of the instance.
- Password string
- The password of the instance.
- Period int
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - Period
Unit string - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - Placement
Volcengine.
Instance Placement - The deployment information of the instance.
- Primary
Network Volcengine.Interface Instance Primary Network Interface - Primary network interface card of the instance.
- Project
Name string - Project name to which the instance belongs.
- Rdma
Ip List<string>Addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- Rdma
Network List<Volcengine.Interface Details Instance Rdma Network Interface Detail> - Renew
Info Volcengine.Instance Renew Info - Renewal information.
- Role
Names List<string> - IAM role name bound to the instance
- Secondary
Network List<Volcengine.Interfaces Instance Secondary Network Interface> - Spot
Price doubleLimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - Spot
Strategy string - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- Status string
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- Stopped
Mode string - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
- System
Volume Volcengine.Instance System Volume - The system volume of the instance.
-
List<Volcengine.
Instance Tag> - Updated
At string - The update time of the instance.
- User
Data string - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- Vpc
Id string - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- Zone
Id string - The availability zone ID where the instance is located.
- Affinity
Group stringId - Affinity group ID.
- Affinity
Group intSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- Auto
Pay bool - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- Auto
Renew bool - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - Auto
Renew intPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - Cpu
Max float64Frequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- Cpu
Memory InstanceCpu Memory Args - The CPU options for the instance.
- Created
At string - Instance creation time.
- Credit
Specification string - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - Deletion
Protection bool - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- Deployment
Set intGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- Deployment
Set stringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- Description string
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- Eip
Address InstanceEip Address Args - The EIP address of the instance.
- Elastic
Scheduled stringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- Enable
Jumbo boolFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- Expired
At string - The expiration time of the instance.
- Hostname string
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- Hpc
Cluster stringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- Image
Instance
Image Args - The image of the instance.
- Include
Data boolVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- Install
Run boolCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- Instance
Charge stringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- Instance
Id string - The ECS instance ID.
- Instance
Name string - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- Instance
Type string - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- Key
Pair InstanceKey Pair Args - Instance key pair name
- Local
Volumes []InstanceLocal Volume Args - Operation
System InstanceOperation System Args - The operating system type of the instance.
- Password string
- The password of the instance.
- Period int
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - Period
Unit string - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - Placement
Instance
Placement Args - The deployment information of the instance.
- Primary
Network InstanceInterface Primary Network Interface Args - Primary network interface card of the instance.
- Project
Name string - Project name to which the instance belongs.
- Rdma
Ip []stringAddresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- Rdma
Network []InstanceInterface Details Rdma Network Interface Detail Args - Renew
Info InstanceRenew Info Args - Renewal information.
- Role
Names []string - IAM role name bound to the instance
- Secondary
Network []InstanceInterfaces Secondary Network Interface Args - Spot
Price float64Limit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - Spot
Strategy string - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- Status string
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- Stopped
Mode string - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
- System
Volume InstanceSystem Volume Args - The system volume of the instance.
-
[]Instance
Tag Args - Updated
At string - The update time of the instance.
- User
Data string - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- Vpc
Id string - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- Zone
Id string - The availability zone ID where the instance is located.
- affinity
Group StringId - Affinity group ID.
- affinity
Group IntegerSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- auto
Pay Boolean - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- auto
Renew Boolean - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - auto
Renew IntegerPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - cpu
Max DoubleFrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- cpu
Memory InstanceCpu Memory - The CPU options for the instance.
- created
At String - Instance creation time.
- credit
Specification String - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - deletion
Protection Boolean - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- deployment
Set IntegerGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- deployment
Set StringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- description String
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- eip
Address InstanceEip Address - The EIP address of the instance.
- elastic
Scheduled StringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- enable
Jumbo BooleanFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- expired
At String - The expiration time of the instance.
- hostname String
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- hpc
Cluster StringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- image
Instance
Image - The image of the instance.
- include
Data BooleanVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- install
Run BooleanCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- instance
Charge StringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- instance
Id String - The ECS instance ID.
- instance
Name String - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- instance
Type String - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- key
Pair InstanceKey Pair - Instance key pair name
- local
Volumes List<InstanceLocal Volume> - operation
System InstanceOperation System - The operating system type of the instance.
- password String
- The password of the instance.
- period Integer
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - period
Unit String - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - placement
Instance
Placement - The deployment information of the instance.
- primary
Network InstanceInterface Primary Network Interface - Primary network interface card of the instance.
- project
Name String - Project name to which the instance belongs.
- rdma
Ip List<String>Addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- rdma
Network List<InstanceInterface Details Rdma Network Interface Detail> - renew
Info InstanceRenew Info - Renewal information.
- role
Names List<String> - IAM role name bound to the instance
- secondary
Network List<InstanceInterfaces Secondary Network Interface> - spot
Price DoubleLimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - spot
Strategy String - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- status String
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- stopped
Mode String - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
- system
Volume InstanceSystem Volume - The system volume of the instance.
-
List<Instance
Tag> - updated
At String - The update time of the instance.
- user
Data String - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- vpc
Id String - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- zone
Id String - The availability zone ID where the instance is located.
- affinity
Group stringId - Affinity group ID.
- affinity
Group numberSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- auto
Pay boolean - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- auto
Renew boolean - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - auto
Renew numberPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - cpu
Max numberFrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- cpu
Memory InstanceCpu Memory - The CPU options for the instance.
- created
At string - Instance creation time.
- credit
Specification string - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - deletion
Protection boolean - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- deployment
Set numberGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- deployment
Set stringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- description string
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- eip
Address InstanceEip Address - The EIP address of the instance.
- elastic
Scheduled stringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- enable
Jumbo booleanFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- expired
At string - The expiration time of the instance.
- hostname string
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- hpc
Cluster stringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- image
Instance
Image - The image of the instance.
- include
Data booleanVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- install
Run booleanCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- instance
Charge stringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- instance
Id string - The ECS instance ID.
- instance
Name string - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- instance
Type string - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- key
Pair InstanceKey Pair - Instance key pair name
- local
Volumes InstanceLocal Volume[] - operation
System InstanceOperation System - The operating system type of the instance.
- password string
- The password of the instance.
- period number
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - period
Unit string - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - placement
Instance
Placement - The deployment information of the instance.
- primary
Network InstanceInterface Primary Network Interface - Primary network interface card of the instance.
- project
Name string - Project name to which the instance belongs.
- rdma
Ip string[]Addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- rdma
Network InstanceInterface Details Rdma Network Interface Detail[] - renew
Info InstanceRenew Info - Renewal information.
- role
Names string[] - IAM role name bound to the instance
- secondary
Network InstanceInterfaces Secondary Network Interface[] - spot
Price numberLimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - spot
Strategy string - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- status string
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- stopped
Mode string - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
- system
Volume InstanceSystem Volume - The system volume of the instance.
-
Instance
Tag[] - updated
At string - The update time of the instance.
- user
Data string - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- vpc
Id string - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- zone
Id string - The availability zone ID where the instance is located.
- affinity_
group_ strid - Affinity group ID.
- affinity_
group_ intsize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- auto_
pay bool - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- auto_
renew bool - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - auto_
renew_ intperiod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - cpu_
max_ floatfrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- cpu_
memory InstanceCpu Memory Args - The CPU options for the instance.
- created_
at str - Instance creation time.
- credit_
specification str - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - deletion_
protection bool - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- deployment_
set_ intgroup_ number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- deployment_
set_ strid - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- description str
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- eip_
address InstanceEip Address Args - The EIP address of the instance.
- elastic_
scheduled_ strinstance_ type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- enable_
jumbo_ boolframe - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- expired_
at str - The expiration time of the instance.
- hostname str
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- hpc_
cluster_ strid - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- image
Instance
Image Args - The image of the instance.
- include_
data_ boolvolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- install_
run_ boolcommand_ agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- instance_
charge_ strtype - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- instance_
id str - The ECS instance ID.
- instance_
name str - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- instance_
type str - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- key_
pair InstanceKey Pair Args - Instance key pair name
- local_
volumes Sequence[InstanceLocal Volume Args] - operation_
system InstanceOperation System Args - The operating system type of the instance.
- password str
- The password of the instance.
- period int
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - period_
unit str - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - placement
Instance
Placement Args - The deployment information of the instance.
- primary_
network_ Instanceinterface Primary Network Interface Args - Primary network interface card of the instance.
- project_
name str - Project name to which the instance belongs.
- rdma_
ip_ Sequence[str]addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- rdma_
network_ Sequence[Instanceinterface_ details Rdma Network Interface Detail Args] - renew_
info InstanceRenew Info Args - Renewal information.
- role_
names Sequence[str] - IAM role name bound to the instance
- secondary_
network_ Sequence[Instanceinterfaces Secondary Network Interface Args] - spot_
price_ floatlimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - spot_
strategy str - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- status str
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- stopped_
mode str - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
- system_
volume InstanceSystem Volume Args - The system volume of the instance.
-
Sequence[Instance
Tag Args] - updated_
at str - The update time of the instance.
- user_
data str - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- vpc_
id str - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- zone_
id str - The availability zone ID where the instance is located.
- affinity
Group StringId - Affinity group ID.
- affinity
Group NumberSize - Affinity group specification. Value: 2. Note: - Currently, only high performance computing NPU-type hpcpci3 instances (by invitation) support affinity groups. - This feature is in invitation testing. To try it, please contact your account manager.
- auto
Pay Boolean - Auto payment option. Valid values: true: Auto payment. Ensure your account balance is sufficient; if the balance is insufficient, an exception order will be generated and the billing mode conversion will fail. false (default): Only generates the order without charging. You can log in to the order management page to complete payment after the order is generated.
- auto
Renew Boolean - Whether the instance will be automatically renewed upon expiration. Values: - true: Auto renewal - false (default): No
auto renewal Note: This parameter is effective only when
InstanceChargeTypeis set toPrePaid. - auto
Renew NumberPeriod - Duration for each automatic renewal. - This parameter takes effect only when
AutoRenewis set toTrue. Default value is 1. - WhenPeriodUnitisMonth, valid values are 1, 2, 3, 6, 12. - cpu
Max NumberFrequency - Specify the maximum CPU frequency, in GHz. Value range: between the CPU's base frequency and turbo frequency. Note:
- Currently, only g3al, c3al, r3al, g4i, c4i, r4i, g4ie, c4ie, r4ie instances support this parameter. For base/turbo frequencies and more information, see Instance Specifications Introduction. - This feature is in invitation-only testing. To use it, please contact your account manager.
- cpu
Memory Property Map - The CPU options for the instance.
- created
At String - Instance creation time.
- credit
Specification String - Burstable instance operating mode. Values: - Standard: Standard mode. - Unlimited: Unlimited performance mode (not
supported yet). Note: - This parameter is only effective when
InstanceTypeIdis set to ecs.t2 series, i.e., burstable instances. - If not specified or left empty, burstable instances default toStandardmode. - deletion
Protection Boolean - Instance deletion protection attribute, specifies whether the instance can be deleted via the console or API. Values: - true: Enable instance deletion protection - false (default): Disable instance deletion protection When deletion protection is enabled, attempts to delete the instance via the console or API will return a deletion failure error code. To delete the instance, disable deletion protection first
- deployment
Set NumberGroup Number - When the deployment set policy for an ECS instance is set to Availability Group, you can use this parameter to specify the group number of the instance within the deployment set. Value range: 1–7.
- deployment
Set StringId - The deployment set ID the instance needs to join. - You can call the DescribeDeploymentSets API to query existing deployment sets. - For more information about deployment sets, see Deployment Set.
- description String
- The description of the instance. Default is an empty string. - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, period '.', space, underscore '_', hyphen '-', equals '=', English comma ',', Chinese comma ',', and Chinese period '。' - Maximum length is 255 characters
- eip
Address Property Map - The EIP address of the instance.
- elastic
Scheduled StringInstance Type - Elastic reservation instance type. Values: NoEsi: Non-elastic reservation instance. Esi: Elastic reservation instance. Segmented: Elastic reservation instance - time segment type.
- enable
Jumbo BooleanFrame - Whether jumbo frames are enabled for the instance. Values: - false: Jumbo frames are disabled. All network interfaces have an MTU of 1500. - true: Jumbo frames are enabled. All network interfaces have an MTU of 8500
- expired
At String - The expiration time of the instance.
- hostname String
- Instance hostname, which is the computer name inside the instance operating system. - Linux instances: - Letters, numbers, periods ('.'), and hyphens ('-') are allowed. - Cannot start or end with a hyphen or period, and cannot use consecutive hyphens and periods. - Linux system hostname length must be between 2 and 63 characters. - Windows instances: - Letters, numbers, and hyphens ('-') are allowed, but the hostname cannot be all numbers. - Cannot start or end with a hyphen, and cannot use consecutive hyphens. - Windows system hostname length must be between 2 and 15 characters.
- hpc
Cluster StringId - ID of the high performance computing cluster to which the instance belongs. Note: This parameter is only effective and required when creating high performance computing GPU instances.
- image Property Map
- The image of the instance.
- include
Data BooleanVolumes - Whether to convert all pay-as-you-go data disks attached to the instance to subscription data disks. true: Convert. false (default): Do not convert.
- install
Run BooleanCommand Agent - Whether to install Cloud Assistant Agent when creating the instance. Values: true: Install during creation. false (default): Do not install during creation.
- instance
Charge StringType - The billing type for the instance and cloud disk. Values: - PostPaid: Pay-as-you-go - PrePaid: Subscription. Please ensure your account supports balance payment or credit payment, otherwise an InvalidInstanceChargeType error will be returned.
- instance
Id String - The ECS instance ID.
- instance
Name String - Instance name - Must start with a letter or Chinese character - Can only contain Chinese characters, letters, numbers, underscores "_", hyphens "-", and periods "." - Length limit: 1–128 characters
- instance
Type String - Instance specification. - Product selection: You can refer to Instance Specifications Introduction or call DescribeInstanceTypes to view performance data, and refer to Instance Selection Best Practices to learn how to choose specifications. - Inventory query: You can call DescribeAvailableResource to check available compute resources in the zone.
- key
Pair Property Map - Instance key pair name
- local
Volumes List<Property Map> - operation
System Property Map - The operating system type of the instance.
- password String
- The password of the instance.
- period Number
- Resource purchase duration (N). - When
PeriodUnitisMonth(default), valid values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, 60. - WhenPeriodUnitisYear, valid values are 1, 2, 3, 4, 5. Note: This parameter is valid and required only whenInstanceChargeTypeis set toPrePaid. - period
Unit String - The unit for the duration of resource purchase. Values: - Month (default): Month - Year: Year Note: This parameter
is effective only when
InstanceChargeTypeis set toPrePaid. - placement Property Map
- The deployment information of the instance.
- primary
Network Property MapInterface - Primary network interface card of the instance.
- project
Name String - Project name to which the instance belongs.
- rdma
Ip List<String>Addresses - When querying high performance computing GPU instances, returns the RDMA IP addresses of each network interface card in a list.
- rdma
Network List<Property Map>Interface Details - renew
Info Property Map - Renewal information.
- role
Names List<String> - IAM role name bound to the instance
- secondary
Network List<Property Map>Interfaces - spot
Price NumberLimit - Maximum hourly price for spot instances. - Supports up to three decimal places. - Only effective when
SpotStrategyis set toSpotWithPriceLimit. - WhenSpotStrategyis set toSpotWithPriceLimit, you can set a custom price limit for the spot instance. If the market price exceeds your bid, the instance will be released. WhenSpotStrategyis set toSpotAsPriceGo, you accept the system's automatic bidding, following the current market price, and this parameter does not need to be filled in. - spot
Strategy String - Spot strategy. Values: - NoSpot (default): Non-spot instance. - SpotWithPriceLimit: Spot instance with price limit. - SpotAsPriceGo: System bids automatically, following the current market price for spot instances.
- status String
- Instance status. Values: CREATING: Creating RUNNING: Running STOPPING: Stopping STOPPED: Stopped REBOOTING: Rebooting STARTING: Starting REBUILDING: Rebuilding RESIZING: Resizing ERROR: Error DELETING: Deleting
- stopped
Mode String - StoppedMode string Optional Example value: KeepCharging Stopped mode. Valid values: KeepCharging: Standard stopped mode. After stopping, the instance and its associated resources are retained and continue to be billed. Charges remain the same as before stopping. StopCharging: Cost-saving stopped mode. After stopping, the instance's computing resources (vCPU, GPU, and memory) are reclaimed and billing stops. Attached cloud disks, images, and public IPs are retained and continue to be billed. For conditions to enable cost-saving stopped mode, see the description of cost-saving stopped mode for pay-as-you-go billing. Default value: If you have enabled the default cost-saving stopped mode in the cloud server console and meet the conditions, the default value is StopCharging. Otherwise, the default value is KeepCharging. NotApplicable: Indicates that this instance does not support cost-saving stopped mode.
- system
Volume Property Map - The system volume of the instance.
- List<Property Map>
- updated
At String - The update time of the instance.
- user
Data String - Custom data for the instance. Default is empty. The final UserData passed will be Base64 encoded. - Linux instances: Script content must not exceed 16 KB and must be Base64 encoded. - Windows instances: Script content must not exceed 8 KB and does not require Base64 encoding
- vpc
Id String - The private network ID to which the instance belongs. You can call the DescribeVpcs API to obtain VPC information for the target region.
- zone
Id String - The availability zone ID where the instance is located.
Supporting Types
InstanceCpuMemory, InstanceCpuMemoryArgs
- Core
Count int - Number of instance cores.
- Cpu
Number int - Number of vCPUs for the instance.
- Memory
Size int - Instance memory size (MB).
- Threads
Per intCore - Threads per core for the instance.
- Core
Count int - Number of instance cores.
- Cpu
Number int - Number of vCPUs for the instance.
- Memory
Size int - Instance memory size (MB).
- Threads
Per intCore - Threads per core for the instance.
- core
Count Integer - Number of instance cores.
- cpu
Number Integer - Number of vCPUs for the instance.
- memory
Size Integer - Instance memory size (MB).
- threads
Per IntegerCore - Threads per core for the instance.
- core
Count number - Number of instance cores.
- cpu
Number number - Number of vCPUs for the instance.
- memory
Size number - Instance memory size (MB).
- threads
Per numberCore - Threads per core for the instance.
- core_
count int - Number of instance cores.
- cpu_
number int - Number of vCPUs for the instance.
- memory_
size int - Instance memory size (MB).
- threads_
per_ intcore - Threads per core for the instance.
- core
Count Number - Number of instance cores.
- cpu
Number Number - Number of vCPUs for the instance.
- memory
Size Number - Instance memory size (MB).
- threads
Per NumberCore - Threads per core for the instance.
InstanceEipAddress, InstanceEipAddressArgs
- Allocation
Id string - Instance allocation ID
- Bandwidth
Mbps int - Maximum bandwidth for public IP. Default value is 1, unit: Mbps.
- If
ChargeTypeisPayByBandwidth: value range is 1–500. - IfChargeTypeisPayByTraffic: value range is 1–200. - Bandwidth
Package stringId - Shared bandwidth package ID, used to add a public IP to the shared bandwidth package. - You can call the DescribeBandwidthPackages API to query the shared bandwidth package ID. - To add a public IP to a shared bandwidth package, all of the following conditions must be met: - Both must have the same security protection type. - Both must be in the same region. - The public IP must use pay-as-you-go billing. - The shared bandwidth package must be IPv4 type.
- Charge
Type string Public IP billing method. Values: - PayByBandwidth (default): Pay-as-you-go—billed by bandwidth cap. - PayByTraffic: Pay-as-you-go—billed by actual traffic. - PrePaid: Subscription.
Note: When
InstanceChargeTypeis set toPostPaid, this parameter cannot be set toPrePaid.- Ip
Address string - Instance IP address.
- Isp string
- Line type for the public IP. Default is BGP. Values: - BGP: BGP (multi-line) - If your account has applied for and enabled static single-line permissions, you can use the following values: - ChinaMobile: China Mobile static single-line - ChinaTelecom: China Telecom static single-line - ChinaUnicom: China Unicom static single-line - If your account has applied for and enabled BGP single-line permissions, you can use SingleLine_BGP. - If your account has applied for and enabled static BGP permissions, you can use Static_BGP
- Release
With boolInstance - Whether this resource is released when the instance is released.
- Security
Protection intInstance Id - DDoS Native Protection (Enterprise Edition) ID.
- Security
Protection List<string>Types - Public IP security protection type.
- Allocation
Id string - Instance allocation ID
- Bandwidth
Mbps int - Maximum bandwidth for public IP. Default value is 1, unit: Mbps.
- If
ChargeTypeisPayByBandwidth: value range is 1–500. - IfChargeTypeisPayByTraffic: value range is 1–200. - Bandwidth
Package stringId - Shared bandwidth package ID, used to add a public IP to the shared bandwidth package. - You can call the DescribeBandwidthPackages API to query the shared bandwidth package ID. - To add a public IP to a shared bandwidth package, all of the following conditions must be met: - Both must have the same security protection type. - Both must be in the same region. - The public IP must use pay-as-you-go billing. - The shared bandwidth package must be IPv4 type.
- Charge
Type string Public IP billing method. Values: - PayByBandwidth (default): Pay-as-you-go—billed by bandwidth cap. - PayByTraffic: Pay-as-you-go—billed by actual traffic. - PrePaid: Subscription.
Note: When
InstanceChargeTypeis set toPostPaid, this parameter cannot be set toPrePaid.- Ip
Address string - Instance IP address.
- Isp string
- Line type for the public IP. Default is BGP. Values: - BGP: BGP (multi-line) - If your account has applied for and enabled static single-line permissions, you can use the following values: - ChinaMobile: China Mobile static single-line - ChinaTelecom: China Telecom static single-line - ChinaUnicom: China Unicom static single-line - If your account has applied for and enabled BGP single-line permissions, you can use SingleLine_BGP. - If your account has applied for and enabled static BGP permissions, you can use Static_BGP
- Release
With boolInstance - Whether this resource is released when the instance is released.
- Security
Protection intInstance Id - DDoS Native Protection (Enterprise Edition) ID.
- Security
Protection []stringTypes - Public IP security protection type.
- allocation
Id String - Instance allocation ID
- bandwidth
Mbps Integer - Maximum bandwidth for public IP. Default value is 1, unit: Mbps.
- If
ChargeTypeisPayByBandwidth: value range is 1–500. - IfChargeTypeisPayByTraffic: value range is 1–200. - bandwidth
Package StringId - Shared bandwidth package ID, used to add a public IP to the shared bandwidth package. - You can call the DescribeBandwidthPackages API to query the shared bandwidth package ID. - To add a public IP to a shared bandwidth package, all of the following conditions must be met: - Both must have the same security protection type. - Both must be in the same region. - The public IP must use pay-as-you-go billing. - The shared bandwidth package must be IPv4 type.
- charge
Type String Public IP billing method. Values: - PayByBandwidth (default): Pay-as-you-go—billed by bandwidth cap. - PayByTraffic: Pay-as-you-go—billed by actual traffic. - PrePaid: Subscription.
Note: When
InstanceChargeTypeis set toPostPaid, this parameter cannot be set toPrePaid.- ip
Address String - Instance IP address.
- isp String
- Line type for the public IP. Default is BGP. Values: - BGP: BGP (multi-line) - If your account has applied for and enabled static single-line permissions, you can use the following values: - ChinaMobile: China Mobile static single-line - ChinaTelecom: China Telecom static single-line - ChinaUnicom: China Unicom static single-line - If your account has applied for and enabled BGP single-line permissions, you can use SingleLine_BGP. - If your account has applied for and enabled static BGP permissions, you can use Static_BGP
- release
With BooleanInstance - Whether this resource is released when the instance is released.
- security
Protection IntegerInstance Id - DDoS Native Protection (Enterprise Edition) ID.
- security
Protection List<String>Types - Public IP security protection type.
- allocation
Id string - Instance allocation ID
- bandwidth
Mbps number - Maximum bandwidth for public IP. Default value is 1, unit: Mbps.
- If
ChargeTypeisPayByBandwidth: value range is 1–500. - IfChargeTypeisPayByTraffic: value range is 1–200. - bandwidth
Package stringId - Shared bandwidth package ID, used to add a public IP to the shared bandwidth package. - You can call the DescribeBandwidthPackages API to query the shared bandwidth package ID. - To add a public IP to a shared bandwidth package, all of the following conditions must be met: - Both must have the same security protection type. - Both must be in the same region. - The public IP must use pay-as-you-go billing. - The shared bandwidth package must be IPv4 type.
- charge
Type string Public IP billing method. Values: - PayByBandwidth (default): Pay-as-you-go—billed by bandwidth cap. - PayByTraffic: Pay-as-you-go—billed by actual traffic. - PrePaid: Subscription.
Note: When
InstanceChargeTypeis set toPostPaid, this parameter cannot be set toPrePaid.- ip
Address string - Instance IP address.
- isp string
- Line type for the public IP. Default is BGP. Values: - BGP: BGP (multi-line) - If your account has applied for and enabled static single-line permissions, you can use the following values: - ChinaMobile: China Mobile static single-line - ChinaTelecom: China Telecom static single-line - ChinaUnicom: China Unicom static single-line - If your account has applied for and enabled BGP single-line permissions, you can use SingleLine_BGP. - If your account has applied for and enabled static BGP permissions, you can use Static_BGP
- release
With booleanInstance - Whether this resource is released when the instance is released.
- security
Protection numberInstance Id - DDoS Native Protection (Enterprise Edition) ID.
- security
Protection string[]Types - Public IP security protection type.
- allocation_
id str - Instance allocation ID
- bandwidth_
mbps int - Maximum bandwidth for public IP. Default value is 1, unit: Mbps.
- If
ChargeTypeisPayByBandwidth: value range is 1–500. - IfChargeTypeisPayByTraffic: value range is 1–200. - bandwidth_
package_ strid - Shared bandwidth package ID, used to add a public IP to the shared bandwidth package. - You can call the DescribeBandwidthPackages API to query the shared bandwidth package ID. - To add a public IP to a shared bandwidth package, all of the following conditions must be met: - Both must have the same security protection type. - Both must be in the same region. - The public IP must use pay-as-you-go billing. - The shared bandwidth package must be IPv4 type.
- charge_
type str Public IP billing method. Values: - PayByBandwidth (default): Pay-as-you-go—billed by bandwidth cap. - PayByTraffic: Pay-as-you-go—billed by actual traffic. - PrePaid: Subscription.
Note: When
InstanceChargeTypeis set toPostPaid, this parameter cannot be set toPrePaid.- ip_
address str - Instance IP address.
- isp str
- Line type for the public IP. Default is BGP. Values: - BGP: BGP (multi-line) - If your account has applied for and enabled static single-line permissions, you can use the following values: - ChinaMobile: China Mobile static single-line - ChinaTelecom: China Telecom static single-line - ChinaUnicom: China Unicom static single-line - If your account has applied for and enabled BGP single-line permissions, you can use SingleLine_BGP. - If your account has applied for and enabled static BGP permissions, you can use Static_BGP
- release_
with_ boolinstance - Whether this resource is released when the instance is released.
- security_
protection_ intinstance_ id - DDoS Native Protection (Enterprise Edition) ID.
- security_
protection_ Sequence[str]types - Public IP security protection type.
- allocation
Id String - Instance allocation ID
- bandwidth
Mbps Number - Maximum bandwidth for public IP. Default value is 1, unit: Mbps.
- If
ChargeTypeisPayByBandwidth: value range is 1–500. - IfChargeTypeisPayByTraffic: value range is 1–200. - bandwidth
Package StringId - Shared bandwidth package ID, used to add a public IP to the shared bandwidth package. - You can call the DescribeBandwidthPackages API to query the shared bandwidth package ID. - To add a public IP to a shared bandwidth package, all of the following conditions must be met: - Both must have the same security protection type. - Both must be in the same region. - The public IP must use pay-as-you-go billing. - The shared bandwidth package must be IPv4 type.
- charge
Type String Public IP billing method. Values: - PayByBandwidth (default): Pay-as-you-go—billed by bandwidth cap. - PayByTraffic: Pay-as-you-go—billed by actual traffic. - PrePaid: Subscription.
Note: When
InstanceChargeTypeis set toPostPaid, this parameter cannot be set toPrePaid.- ip
Address String - Instance IP address.
- isp String
- Line type for the public IP. Default is BGP. Values: - BGP: BGP (multi-line) - If your account has applied for and enabled static single-line permissions, you can use the following values: - ChinaMobile: China Mobile static single-line - ChinaTelecom: China Telecom static single-line - ChinaUnicom: China Unicom static single-line - If your account has applied for and enabled BGP single-line permissions, you can use SingleLine_BGP. - If your account has applied for and enabled static BGP permissions, you can use Static_BGP
- release
With BooleanInstance - Whether this resource is released when the instance is released.
- security
Protection NumberInstance Id - DDoS Native Protection (Enterprise Edition) ID.
- security
Protection List<String>Types - Public IP security protection type.
InstanceImage, InstanceImageArgs
- Image
Id string - Instance image ID.
- Image
Release stringVersion - The image release version of the instance.
- Keep
Image boolCredential - Whether the instance retains image credentials
- Security
Enhancement stringStrategy - Instance security enhancement policy. Active: Enable security hardening, applies only to public images. InActive: Disable security hardening, applies to all images
- Image
Id string - Instance image ID.
- Image
Release stringVersion - The image release version of the instance.
- Keep
Image boolCredential - Whether the instance retains image credentials
- Security
Enhancement stringStrategy - Instance security enhancement policy. Active: Enable security hardening, applies only to public images. InActive: Disable security hardening, applies to all images
- image
Id String - Instance image ID.
- image
Release StringVersion - The image release version of the instance.
- keep
Image BooleanCredential - Whether the instance retains image credentials
- security
Enhancement StringStrategy - Instance security enhancement policy. Active: Enable security hardening, applies only to public images. InActive: Disable security hardening, applies to all images
- image
Id string - Instance image ID.
- image
Release stringVersion - The image release version of the instance.
- keep
Image booleanCredential - Whether the instance retains image credentials
- security
Enhancement stringStrategy - Instance security enhancement policy. Active: Enable security hardening, applies only to public images. InActive: Disable security hardening, applies to all images
- image_
id str - Instance image ID.
- image_
release_ strversion - The image release version of the instance.
- keep_
image_ boolcredential - Whether the instance retains image credentials
- security_
enhancement_ strstrategy - Instance security enhancement policy. Active: Enable security hardening, applies only to public images. InActive: Disable security hardening, applies to all images
- image
Id String - Instance image ID.
- image
Release StringVersion - The image release version of the instance.
- keep
Image BooleanCredential - Whether the instance retains image credentials
- security
Enhancement StringStrategy - Instance security enhancement policy. Active: Enable security hardening, applies only to public images. InActive: Disable security hardening, applies to all images
InstanceKeyPair, InstanceKeyPairArgs
- Key
Pair stringId - Instance public key
- Key
Pair stringName - Instance key pair name
- Key
Pair stringId - Instance public key
- Key
Pair stringName - Instance key pair name
- key
Pair StringId - Instance public key
- key
Pair StringName - Instance key pair name
- key
Pair stringId - Instance public key
- key
Pair stringName - Instance key pair name
- key_
pair_ strid - Instance public key
- key_
pair_ strname - Instance key pair name
- key
Pair StringId - Instance public key
- key
Pair StringName - Instance key pair name
InstanceLocalVolume, InstanceLocalVolumeArgs
- Count int
- The number of local disks attached to the instance.
- Size int
- Capacity of each local disk mounted to the instance (GiB).
- Volume
Type string - Local disk type. Values: LOCAL_SSD: SSD local disk. LOCAL_HDD: HDD local disk.
- Count int
- The number of local disks attached to the instance.
- Size int
- Capacity of each local disk mounted to the instance (GiB).
- Volume
Type string - Local disk type. Values: LOCAL_SSD: SSD local disk. LOCAL_HDD: HDD local disk.
- count Integer
- The number of local disks attached to the instance.
- size Integer
- Capacity of each local disk mounted to the instance (GiB).
- volume
Type String - Local disk type. Values: LOCAL_SSD: SSD local disk. LOCAL_HDD: HDD local disk.
- count number
- The number of local disks attached to the instance.
- size number
- Capacity of each local disk mounted to the instance (GiB).
- volume
Type string - Local disk type. Values: LOCAL_SSD: SSD local disk. LOCAL_HDD: HDD local disk.
- count int
- The number of local disks attached to the instance.
- size int
- Capacity of each local disk mounted to the instance (GiB).
- volume_
type str - Local disk type. Values: LOCAL_SSD: SSD local disk. LOCAL_HDD: HDD local disk.
- count Number
- The number of local disks attached to the instance.
- size Number
- Capacity of each local disk mounted to the instance (GiB).
- volume
Type String - Local disk type. Values: LOCAL_SSD: SSD local disk. LOCAL_HDD: HDD local disk.
InstanceOperationSystem, InstanceOperationSystemArgs
InstancePlacement, InstancePlacementArgs
- Affinity string
- For ECS instances in economy stop mode, some resources are released after stopping. This parameter indicates whether the ECS instance will remain deployed on the original host when restarted. Values: Host: When restarting an instance in economy stop mode, it will remain on the original host. Default: When restarting an instance in economy stop mode, it will preferentially migrate to a host that supports automatic deployment; if resources are insufficient, it will start on the original host.
- Dedicated
Host stringCluster Id - Instance dedicated host cluster ID.
- Dedicated
Host stringId - Dedicated host ID for the instance.
- Tenancy string
- Whether to create the instance on a dedicated host. Values: Default: Create a regular cloud server instance. Host: Create a dedicated host instance. If you do not specify DedicatedHostId, the system automatically selects a dedicated host to place the instance.
- Affinity string
- For ECS instances in economy stop mode, some resources are released after stopping. This parameter indicates whether the ECS instance will remain deployed on the original host when restarted. Values: Host: When restarting an instance in economy stop mode, it will remain on the original host. Default: When restarting an instance in economy stop mode, it will preferentially migrate to a host that supports automatic deployment; if resources are insufficient, it will start on the original host.
- Dedicated
Host stringCluster Id - Instance dedicated host cluster ID.
- Dedicated
Host stringId - Dedicated host ID for the instance.
- Tenancy string
- Whether to create the instance on a dedicated host. Values: Default: Create a regular cloud server instance. Host: Create a dedicated host instance. If you do not specify DedicatedHostId, the system automatically selects a dedicated host to place the instance.
- affinity String
- For ECS instances in economy stop mode, some resources are released after stopping. This parameter indicates whether the ECS instance will remain deployed on the original host when restarted. Values: Host: When restarting an instance in economy stop mode, it will remain on the original host. Default: When restarting an instance in economy stop mode, it will preferentially migrate to a host that supports automatic deployment; if resources are insufficient, it will start on the original host.
- dedicated
Host StringCluster Id - Instance dedicated host cluster ID.
- dedicated
Host StringId - Dedicated host ID for the instance.
- tenancy String
- Whether to create the instance on a dedicated host. Values: Default: Create a regular cloud server instance. Host: Create a dedicated host instance. If you do not specify DedicatedHostId, the system automatically selects a dedicated host to place the instance.
- affinity string
- For ECS instances in economy stop mode, some resources are released after stopping. This parameter indicates whether the ECS instance will remain deployed on the original host when restarted. Values: Host: When restarting an instance in economy stop mode, it will remain on the original host. Default: When restarting an instance in economy stop mode, it will preferentially migrate to a host that supports automatic deployment; if resources are insufficient, it will start on the original host.
- dedicated
Host stringCluster Id - Instance dedicated host cluster ID.
- dedicated
Host stringId - Dedicated host ID for the instance.
- tenancy string
- Whether to create the instance on a dedicated host. Values: Default: Create a regular cloud server instance. Host: Create a dedicated host instance. If you do not specify DedicatedHostId, the system automatically selects a dedicated host to place the instance.
- affinity str
- For ECS instances in economy stop mode, some resources are released after stopping. This parameter indicates whether the ECS instance will remain deployed on the original host when restarted. Values: Host: When restarting an instance in economy stop mode, it will remain on the original host. Default: When restarting an instance in economy stop mode, it will preferentially migrate to a host that supports automatic deployment; if resources are insufficient, it will start on the original host.
- dedicated_
host_ strcluster_ id - Instance dedicated host cluster ID.
- dedicated_
host_ strid - Dedicated host ID for the instance.
- tenancy str
- Whether to create the instance on a dedicated host. Values: Default: Create a regular cloud server instance. Host: Create a dedicated host instance. If you do not specify DedicatedHostId, the system automatically selects a dedicated host to place the instance.
- affinity String
- For ECS instances in economy stop mode, some resources are released after stopping. This parameter indicates whether the ECS instance will remain deployed on the original host when restarted. Values: Host: When restarting an instance in economy stop mode, it will remain on the original host. Default: When restarting an instance in economy stop mode, it will preferentially migrate to a host that supports automatic deployment; if resources are insufficient, it will start on the original host.
- dedicated
Host StringCluster Id - Instance dedicated host cluster ID.
- dedicated
Host StringId - Dedicated host ID for the instance.
- tenancy String
- Whether to create the instance on a dedicated host. Values: Default: Create a regular cloud server instance. Host: Create a dedicated host instance. If you do not specify DedicatedHostId, the system automatically selects a dedicated host to place the instance.
InstancePrimaryNetworkInterface, InstancePrimaryNetworkInterfaceArgs
- Ipv6Address
Count int - The number of IPv6 addresses for the instance.
- Ipv6Addresses List<string>
- IPv6 address of the instance.
- Mac
Address string - Instance MAC address.
- Network
Interface stringId - The network interface ID of the instance.
- Primary
Ip stringAddress - Instance primary IP address
- Private
Ip List<string>Addresses - Instance private IP address.
- Security
Group List<string>Ids - Instance security group ID
- Subnet
Id string - Instance subnet ID.
- Vpc
Id string - VPC ID of the instance.
- Ipv6Address
Count int - The number of IPv6 addresses for the instance.
- Ipv6Addresses []string
- IPv6 address of the instance.
- Mac
Address string - Instance MAC address.
- Network
Interface stringId - The network interface ID of the instance.
- Primary
Ip stringAddress - Instance primary IP address
- Private
Ip []stringAddresses - Instance private IP address.
- Security
Group []stringIds - Instance security group ID
- Subnet
Id string - Instance subnet ID.
- Vpc
Id string - VPC ID of the instance.
- ipv6Address
Count Integer - The number of IPv6 addresses for the instance.
- ipv6Addresses List<String>
- IPv6 address of the instance.
- mac
Address String - Instance MAC address.
- network
Interface StringId - The network interface ID of the instance.
- primary
Ip StringAddress - Instance primary IP address
- private
Ip List<String>Addresses - Instance private IP address.
- security
Group List<String>Ids - Instance security group ID
- subnet
Id String - Instance subnet ID.
- vpc
Id String - VPC ID of the instance.
- ipv6Address
Count number - The number of IPv6 addresses for the instance.
- ipv6Addresses string[]
- IPv6 address of the instance.
- mac
Address string - Instance MAC address.
- network
Interface stringId - The network interface ID of the instance.
- primary
Ip stringAddress - Instance primary IP address
- private
Ip string[]Addresses - Instance private IP address.
- security
Group string[]Ids - Instance security group ID
- subnet
Id string - Instance subnet ID.
- vpc
Id string - VPC ID of the instance.
- ipv6_
address_ intcount - The number of IPv6 addresses for the instance.
- ipv6_
addresses Sequence[str] - IPv6 address of the instance.
- mac_
address str - Instance MAC address.
- network_
interface_ strid - The network interface ID of the instance.
- primary_
ip_ straddress - Instance primary IP address
- private_
ip_ Sequence[str]addresses - Instance private IP address.
- security_
group_ Sequence[str]ids - Instance security group ID
- subnet_
id str - Instance subnet ID.
- vpc_
id str - VPC ID of the instance.
- ipv6Address
Count Number - The number of IPv6 addresses for the instance.
- ipv6Addresses List<String>
- IPv6 address of the instance.
- mac
Address String - Instance MAC address.
- network
Interface StringId - The network interface ID of the instance.
- primary
Ip StringAddress - Instance primary IP address
- private
Ip List<String>Addresses - Instance private IP address.
- security
Group List<String>Ids - Instance security group ID
- subnet
Id String - Instance subnet ID.
- vpc
Id String - VPC ID of the instance.
InstanceRdmaNetworkInterfaceDetail, InstanceRdmaNetworkInterfaceDetailArgs
- Gateway string
- Gateway address.
- Ip string
- IP address
- Mask string
- Subnet mask.
- Switch
Name string - Switch name.
- Switch
Port string - Switch port.
- Gateway string
- Gateway address.
- Ip string
- IP address
- Mask string
- Subnet mask.
- Switch
Name string - Switch name.
- Switch
Port string - Switch port.
- gateway String
- Gateway address.
- ip String
- IP address
- mask String
- Subnet mask.
- switch
Name String - Switch name.
- switch
Port String - Switch port.
- gateway string
- Gateway address.
- ip string
- IP address
- mask string
- Subnet mask.
- switch
Name string - Switch name.
- switch
Port string - Switch port.
- gateway str
- Gateway address.
- ip str
- IP address
- mask str
- Subnet mask.
- switch_
name str - Switch name.
- switch_
port str - Switch port.
- gateway String
- Gateway address.
- ip String
- IP address
- mask String
- Subnet mask.
- switch
Name String - Switch name.
- switch
Port String - Switch port.
InstanceRenewInfo, InstanceRenewInfoArgs
- Period int
- Number of months for renewal. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36.
- Period
Unit string - Time unit for renewal duration, i.e., the unit for the Period parameter. Value: Month (default)
- Period int
- Number of months for renewal. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36.
- Period
Unit string - Time unit for renewal duration, i.e., the unit for the Period parameter. Value: Month (default)
- period Integer
- Number of months for renewal. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36.
- period
Unit String - Time unit for renewal duration, i.e., the unit for the Period parameter. Value: Month (default)
- period number
- Number of months for renewal. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36.
- period
Unit string - Time unit for renewal duration, i.e., the unit for the Period parameter. Value: Month (default)
- period int
- Number of months for renewal. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36.
- period_
unit str - Time unit for renewal duration, i.e., the unit for the Period parameter. Value: Month (default)
- period Number
- Number of months for renewal. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36.
- period
Unit String - Time unit for renewal duration, i.e., the unit for the Period parameter. Value: Month (default)
InstanceSecondaryNetworkInterface, InstanceSecondaryNetworkInterfaceArgs
- Ipv6Address
Count int - The number of IPv6 addresses for the instance.
- Ipv6Addresses List<string>
- IPv6 address of the instance.
- Mac
Address string - Instance MAC address.
- Network
Interface stringId - The network interface ID of the instance.
- Primary
Ip stringAddress - Instance primary IP address
- Private
Ip List<string>Addresses - Instance private IP address.
- Security
Group List<string>Ids - Instance security group ID
- Subnet
Id string - Instance subnet ID.
- Vpc
Id string - VPC ID of the instance.
- Ipv6Address
Count int - The number of IPv6 addresses for the instance.
- Ipv6Addresses []string
- IPv6 address of the instance.
- Mac
Address string - Instance MAC address.
- Network
Interface stringId - The network interface ID of the instance.
- Primary
Ip stringAddress - Instance primary IP address
- Private
Ip []stringAddresses - Instance private IP address.
- Security
Group []stringIds - Instance security group ID
- Subnet
Id string - Instance subnet ID.
- Vpc
Id string - VPC ID of the instance.
- ipv6Address
Count Integer - The number of IPv6 addresses for the instance.
- ipv6Addresses List<String>
- IPv6 address of the instance.
- mac
Address String - Instance MAC address.
- network
Interface StringId - The network interface ID of the instance.
- primary
Ip StringAddress - Instance primary IP address
- private
Ip List<String>Addresses - Instance private IP address.
- security
Group List<String>Ids - Instance security group ID
- subnet
Id String - Instance subnet ID.
- vpc
Id String - VPC ID of the instance.
- ipv6Address
Count number - The number of IPv6 addresses for the instance.
- ipv6Addresses string[]
- IPv6 address of the instance.
- mac
Address string - Instance MAC address.
- network
Interface stringId - The network interface ID of the instance.
- primary
Ip stringAddress - Instance primary IP address
- private
Ip string[]Addresses - Instance private IP address.
- security
Group string[]Ids - Instance security group ID
- subnet
Id string - Instance subnet ID.
- vpc
Id string - VPC ID of the instance.
- ipv6_
address_ intcount - The number of IPv6 addresses for the instance.
- ipv6_
addresses Sequence[str] - IPv6 address of the instance.
- mac_
address str - Instance MAC address.
- network_
interface_ strid - The network interface ID of the instance.
- primary_
ip_ straddress - Instance primary IP address
- private_
ip_ Sequence[str]addresses - Instance private IP address.
- security_
group_ Sequence[str]ids - Instance security group ID
- subnet_
id str - Instance subnet ID.
- vpc_
id str - VPC ID of the instance.
- ipv6Address
Count Number - The number of IPv6 addresses for the instance.
- ipv6Addresses List<String>
- IPv6 address of the instance.
- mac
Address String - Instance MAC address.
- network
Interface StringId - The network interface ID of the instance.
- primary
Ip StringAddress - Instance primary IP address
- private
Ip List<String>Addresses - Instance private IP address.
- security
Group List<String>Ids - Instance security group ID
- subnet
Id String - Instance subnet ID.
- vpc
Id String - VPC ID of the instance.
InstanceSystemVolume, InstanceSystemVolumeArgs
- Delete
With boolInstance - Whether the attached resources are deleted along with the instance.
- Extra
Performance intIops - Additional performance IOPS for the instance
- Extra
Performance intThroughput Mb - The additional performance throughput of the instance, in MB.
- Extra
Performance stringType Id - Type of additional performance. Values: Balance: Balanced additional performance IOPS: IOPS additional performance Throughput: Throughput additional performance
- Size int
- Instance size, in GiB
- Snapshot
Id string - Instance snapshot ID
- Volume
Id string - Instance volume ID.
- Volume
Type string - Cloud disk type. Values: PTSSD: Performance SSD. ESSD_PL0: Ultra SSD disk, PL0 specification. ESSD_FlexPL: Ultra SSD disk, FlexPL specification. TSSD_TL0: Throughput SSD disk.
- Delete
With boolInstance - Whether the attached resources are deleted along with the instance.
- Extra
Performance intIops - Additional performance IOPS for the instance
- Extra
Performance intThroughput Mb - The additional performance throughput of the instance, in MB.
- Extra
Performance stringType Id - Type of additional performance. Values: Balance: Balanced additional performance IOPS: IOPS additional performance Throughput: Throughput additional performance
- Size int
- Instance size, in GiB
- Snapshot
Id string - Instance snapshot ID
- Volume
Id string - Instance volume ID.
- Volume
Type string - Cloud disk type. Values: PTSSD: Performance SSD. ESSD_PL0: Ultra SSD disk, PL0 specification. ESSD_FlexPL: Ultra SSD disk, FlexPL specification. TSSD_TL0: Throughput SSD disk.
- delete
With BooleanInstance - Whether the attached resources are deleted along with the instance.
- extra
Performance IntegerIops - Additional performance IOPS for the instance
- extra
Performance IntegerThroughput Mb - The additional performance throughput of the instance, in MB.
- extra
Performance StringType Id - Type of additional performance. Values: Balance: Balanced additional performance IOPS: IOPS additional performance Throughput: Throughput additional performance
- size Integer
- Instance size, in GiB
- snapshot
Id String - Instance snapshot ID
- volume
Id String - Instance volume ID.
- volume
Type String - Cloud disk type. Values: PTSSD: Performance SSD. ESSD_PL0: Ultra SSD disk, PL0 specification. ESSD_FlexPL: Ultra SSD disk, FlexPL specification. TSSD_TL0: Throughput SSD disk.
- delete
With booleanInstance - Whether the attached resources are deleted along with the instance.
- extra
Performance numberIops - Additional performance IOPS for the instance
- extra
Performance numberThroughput Mb - The additional performance throughput of the instance, in MB.
- extra
Performance stringType Id - Type of additional performance. Values: Balance: Balanced additional performance IOPS: IOPS additional performance Throughput: Throughput additional performance
- size number
- Instance size, in GiB
- snapshot
Id string - Instance snapshot ID
- volume
Id string - Instance volume ID.
- volume
Type string - Cloud disk type. Values: PTSSD: Performance SSD. ESSD_PL0: Ultra SSD disk, PL0 specification. ESSD_FlexPL: Ultra SSD disk, FlexPL specification. TSSD_TL0: Throughput SSD disk.
- delete_
with_ boolinstance - Whether the attached resources are deleted along with the instance.
- extra_
performance_ intiops - Additional performance IOPS for the instance
- extra_
performance_ intthroughput_ mb - The additional performance throughput of the instance, in MB.
- extra_
performance_ strtype_ id - Type of additional performance. Values: Balance: Balanced additional performance IOPS: IOPS additional performance Throughput: Throughput additional performance
- size int
- Instance size, in GiB
- snapshot_
id str - Instance snapshot ID
- volume_
id str - Instance volume ID.
- volume_
type str - Cloud disk type. Values: PTSSD: Performance SSD. ESSD_PL0: Ultra SSD disk, PL0 specification. ESSD_FlexPL: Ultra SSD disk, FlexPL specification. TSSD_TL0: Throughput SSD disk.
- delete
With BooleanInstance - Whether the attached resources are deleted along with the instance.
- extra
Performance NumberIops - Additional performance IOPS for the instance
- extra
Performance NumberThroughput Mb - The additional performance throughput of the instance, in MB.
- extra
Performance StringType Id - Type of additional performance. Values: Balance: Balanced additional performance IOPS: IOPS additional performance Throughput: Throughput additional performance
- size Number
- Instance size, in GiB
- snapshot
Id String - Instance snapshot ID
- volume
Id String - Instance volume ID.
- volume
Type String - Cloud disk type. Values: PTSSD: Performance SSD. ESSD_PL0: Ultra SSD disk, PL0 specification. ESSD_FlexPL: Ultra SSD disk, FlexPL specification. TSSD_TL0: Throughput SSD disk.
InstanceTag, InstanceTagArgs
Import
$ pulumi import volcenginecc:ecs/instance:Instance example "instance_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
published on Thursday, Apr 23, 2026 by Volcengine
