InstanceProps
Properties for defining a Instance.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ecs-instance
Initializer
using AlibabaCloud.SDK.ROS.CDK.Ecs;
new InstanceProps {
object InstanceType,
object Affinity = null,
object AllocatePublicIp = null,
object AutoRenew = null,
object AutoRenewPeriod = null,
object CreditSpecification = null,
object DedicatedHostId = null,
object DeletionProtection = null,
object DeploymentSetGroupNo = null,
object DeploymentSetId = null,
object Description = null,
object DiskMappings = null,
object HostName = null,
object HpcClusterId = null,
object HttpEndpoint = null,
object HttpTokens = null,
object ImageFamily = null,
object ImageId = null,
object InstanceChargeType = null,
object InstanceName = null,
object InternetChargeType = null,
object InternetMaxBandwidthOut = null,
object IoOptimized = null,
object KeyPairName = null,
object Password = null,
object PasswordInherit = null,
object Period = null,
object PeriodUnit = null,
object PrivateIpAddress = null,
object PrivatePoolOptions = null,
object RamRoleName = null,
object ResourceGroupId = null,
object SecurityEnhancementStrategy = null,
object SecurityGroupId = null,
object SecurityGroupIds = null,
object SpotDuration = null,
object SpotInterruptionBehavior = null,
object SpotPriceLimit = null,
object SpotStrategy = null,
object StorageSetId = null,
object StorageSetPartitionNumber = null,
object SubscriptionDeletionForce = null,
object SystemDiskCategory = null,
object SystemDiskDescription = null,
object SystemDiskDiskName = null,
object SystemDiskPerformanceLevel = null,
object SystemDiskSize = null,
TagsProperty[] Tags = null,
object Tenancy = null,
object UseAdditionalService = null,
object UserData = null,
object VpcId = null,
object VSwitchId = null,
object ZoneId = null,
object ZoneIds = null
};
Properties
| Name | Type | Description |
|---|---|---|
InstanceType | object | Property instanceType: Ecs instance supported instance type, make sure it should be correct. |
Affinity | object | Property affinity: Specifies whether to associate the instance on a dedicated host with the dedicated host. |
AllocatePublicIp | object | Property allocatePublicIp: The public ip for ecs instance, if properties is true, will allocate public ip. |
AutoRenew | object | Property autoRenew: Whether renew the fee automatically? |
AutoRenewPeriod | object | Property autoRenewPeriod: The time period of auto renew. |
CreditSpecification | object | Property creditSpecification: The performance mode of the burstable instance. |
DedicatedHostId | object | Property dedicatedHostId: The ID of the dedicated host. |
DeletionProtection | object | Property deletionProtection: Whether an instance can be released manually through the console or API, deletion protection only support postPaid instance. |
DeploymentSetGroupNo | object | Property deploymentSetGroupNo: The number of the deployment set group to which to deploy the instance. |
DeploymentSetId | object | Property deploymentSetId: Deployment set ID. |
Description | object | Property description: Description of the instance, [2, 256] characters. |
DiskMappings | object | Property diskMappings: Disk mappings to attach to instance. |
HostName | object | Property hostName: Host name of created ecs instance. |
HpcClusterId | object | Property hpcClusterId: The ID of the high performance computing (HPC) cluster to which the instance belongs. |
HttpEndpoint | object | Property httpEndpoint: Specifies whether the access channel is enabled for instance metadata. |
HttpTokens | object | Property httpTokens: Specifies whether the security hardening mode (IMDSv2) is forcefully used to access instance metadata. |
ImageFamily | object | Property imageFamily: The name of the image family. |
ImageId | object | Property imageId: The image ID. |
InstanceChargeType | object | Property instanceChargeType: Instance Charge type, allowed value: Prepaid and Postpaid. |
InstanceName | object | Property instanceName: Display name of the instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'. |
InternetChargeType | object | Property internetChargeType: Instance internet access charge type.Support 'PayByBandwidth' and 'PayByTraffic' only. Default is PayByTraffic. |
InternetMaxBandwidthOut | object | Property internetMaxBandwidthOut: The maximum outbound public bandwidth. |
IoOptimized | object | Property ioOptimized: Specifies whether the instance is I\/O optimized. |
KeyPairName | object | Property keyPairName: SSH key pair name. |
Password | object | Property password: Password of created ecs instance. |
PasswordInherit | object | Property passwordInherit: Specifies whether to use the password preset in the image. |
Period | object | Property period: Prepaid time period. |
PeriodUnit | object | Property periodUnit: Unit of prepaid time period, it could be Week\/Month\/Year. |
PrivateIpAddress | object | Property privateIpAddress: Private IP for the instance created. |
PrivatePoolOptions | object | Property privatePoolOptions: The options of the private pool. |
RamRoleName | object | Property ramRoleName: Instance RAM role name. |
ResourceGroupId | object | Property resourceGroupId: Resource group id. |
SecurityEnhancementStrategy | object | Property securityEnhancementStrategy: Specifies whether to enable security hardening. |
SecurityGroupId | object | Property securityGroupId: Security group to create ecs instance. |
SecurityGroupIds | object | Property securityGroupIds: The ID list of security group to which to assign the instance. |
SpotDuration | object | Property spotDuration: The protection period of the spot instance. |
SpotInterruptionBehavior | object | Property spotInterruptionBehavior: The interruption mode of the spot instance. |
SpotPriceLimit | object | Property spotPriceLimit: The hourly price threshold of a instance, and it takes effect only when parameter InstanceChargeType is PostPaid. |
SpotStrategy | object | Property spotStrategy: The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter InstanceChargeType is PostPaid. |
StorageSetId | object | Property storageSetId: The storage set ID. |
StorageSetPartitionNumber | object | Property storageSetPartitionNumber: The maximum number of partitions in the storage set. |
SubscriptionDeletionForce | object | Property subscriptionDeletionForce: This option is only applicable to subscription instances. |
SystemDiskCategory | object | Property systemDiskCategory: Category of system disk. |
SystemDiskDescription | object | Property systemDiskDescription: Description of created system disk. |
SystemDiskDiskName | object | Property systemDiskDiskName: Name of created system disk. |
SystemDiskPerformanceLevel | object | Property systemDiskPerformanceLevel: The performance level of the enhanced SSD used as the system disk.Default value: PL1. Valid values:PL0: A single enhanced SSD delivers up to 10,000 random read\/write IOPS.PL1: A single enhanced SSD delivers up to 50,000 random read\/write IOPS.PL2: A single enhanced SSD delivers up to 100,000 random read\/write IOPS.PL3: A single enhanced SSD delivers up to 1,000,000 random read\/write IOPS. |
SystemDiskSize | object | Property systemDiskSize: Disk size of the system disk, range from 20 to 500 GB. |
Tags | TagsProperty[] | Property tags: Tags to attach to instance. |
Tenancy | object | Property tenancy: Specifies whether to create the instance on a dedicated host. |
UseAdditionalService | object | Property useAdditionalService: Specifies whether to use the system configurations for virtual machines provided by Alibaba Cloud. |
UserData | object | Property userData: The user data of the instance. |
VpcId | object | Property vpcId: The VPC id to create ecs instance. |
VSwitchId | object | Property vSwitchId: The ID of the vSwitch to which to connect to the instance. |
ZoneId | object | Property zoneId: The ID of the zone to which the instance belongs. |
ZoneIds | object | Property zoneIds: Zone ids for query parameters. |
InstanceTypeRequired
public object InstanceType { get; set; }
- Type: object
Property instanceType: Ecs instance supported instance type, make sure it should be correct.
AffinityOptional
public object Affinity { get; set; }
- Type: object
Property affinity: Specifies whether to associate the instance on a dedicated host with the dedicated host.
Valid values:
- default: does not associate the ECS instance with the dedicated host. When you start an instance that was stopped in economical mode, the instance is automatically deployed to another dedicated host in the automatic deployment resource pool if the available resources of the original dedicated host are insufficient.
- host: associates the ECS instance with the dedicated host. When you start an instance that was stopped in economical mode, the instance remains on the original dedicated host. If the available resources of the original dedicated host are insufficient, the instance cannot start. Default value: default.
AllocatePublicIpOptional
public object AllocatePublicIp { get; set; }
- Type: object
Property allocatePublicIp: The public ip for ecs instance, if properties is true, will allocate public ip.
If property InternetMaxBandwidthOut set to 0, it will not assign public ip.
AutoRenewOptional
public object AutoRenew { get; set; }
- Type: object
Property autoRenew: Whether renew the fee automatically?
When the parameter InstanceChargeType is PrePaid, it will take effect. Range of value:True: automatic renewal.False: no automatic renewal. Default value is False.
AutoRenewPeriodOptional
public object AutoRenewPeriod { get; set; }
- Type: object
Property autoRenewPeriod: The time period of auto renew.
When the parameter InstanceChargeType is PrePaid, it will take effect.It could be 1, 2, 3, 6, 12, 24, 36, 48, 60. Default value is 1.
CreditSpecificationOptional
public object CreditSpecification { get; set; }
- Type: object
Property creditSpecification: The performance mode of the burstable instance.
Valid values:
- Standard: the standard mode.
- Unlimited: the unlimited mode.
DedicatedHostIdOptional
public object DedicatedHostId { get; set; }
- Type: object
Property dedicatedHostId: The ID of the dedicated host.
You can call the DescribeDedicatedHosts operation to query the list of dedicated host IDs.
Spot instances cannot be created on dedicated hosts. If you specify DedicatedHostId, SpotStrategy and SpotPriceLimit are automatically ignored.
DeletionProtectionOptional
public object DeletionProtection { get; set; }
- Type: object
Property deletionProtection: Whether an instance can be released manually through the console or API, deletion protection only support postPaid instance.
DeploymentSetGroupNoOptional
public object DeploymentSetGroupNo { get; set; }
- Type: object
Property deploymentSetGroupNo: The number of the deployment set group to which to deploy the instance.
If the deployment set specified by DeploymentSetId uses the high availability group strategy (AvailabilityGroup), you can use DeploymentSetGroupNo to specify a deployment set group in the deployment set. Valid values: 1 to 7.
DeploymentSetIdOptional
public object DeploymentSetId { get; set; }
- Type: object
Property deploymentSetId: Deployment set ID.
DescriptionOptional
public object Description { get; set; }
- Type: object
Property description: Description of the instance, [2, 256] characters.
Do not fill or empty, the default is empty.
DiskMappingsOptional
public object DiskMappings { get; set; }
- Type: object
Property diskMappings: Disk mappings to attach to instance.
Max support 16 disks. If the image contains a data disk, you can specify other parameters of the data disk via the same value of parameter "Device". If parameter "Category" is not specified, it will be cloud_efficiency instead of "Category" of data disk in the image.
HostNameOptional
public object HostName { get; set; }
- Type: object
Property hostName: Host name of created ecs instance.
at least 2 characters, and '.' '-' Is not the first and last characters as hostname, not continuous use. Windows platform can be up to 15 characters, allowing letters (without limiting case), numbers and '-', and does not support the number of points, not all is digital ('.').Other (Linux, etc.) platform up to 64 characters, allowing support number multiple points for the period between the points, each permit letters (without limiting case), numbers and '-' components.
HpcClusterIdOptional
public object HpcClusterId { get; set; }
- Type: object
Property hpcClusterId: The ID of the high performance computing (HPC) cluster to which the instance belongs.
This parameter is required when you create instances of a Supper Computing Cluster (SCC) instance type. For information about how to create an HPC cluster, see CreateHpcCluster.
HttpEndpointOptional
public object HttpEndpoint { get; set; }
- Type: object
Property httpEndpoint: Specifies whether the access channel is enabled for instance metadata.
Valid values:
- enabled
- disabled Default value: enabled.
HttpTokensOptional
public object HttpTokens { get; set; }
- Type: object
Property httpTokens: Specifies whether the security hardening mode (IMDSv2) is forcefully used to access instance metadata.
Valid values:
- optional: does not forcefully use the security-enhanced mode (IMDSv2).
- required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode. Default value: optional.
ImageFamilyOptional
public object ImageFamily { get; set; }
- Type: object
Property imageFamily: The name of the image family.
You can set this parameter to obtain the latest available custom image from the specified image family to create the instance.
- ImageFamily must be empty if ImageId is specified.
- ImageFamily can be specified if ImageId is not specified.
ImageIdOptional
public object ImageId { get; set; }
- Type: object
Property imageId: The image ID.
Naming convention for image IDs <\/summary> - Public images: Named based on the operating system version, architecture, language, and published date. - Custom images, shared images, cloud marketplace images, and community images: Start with the letter `m`. <\/details> --- ### `InstanceChargeType`Optional public object InstanceChargeType { get; set; }
- *Type:* object Property instanceChargeType: Instance Charge type, allowed value: Prepaid and Postpaid. If specified Prepaid, please ensure you have sufficient balance in your account. Or instance creation will be failure. Default value is Postpaid. --- ### `InstanceName`Optional public object InstanceName { get; set; }
- *Type:* object Property instanceName: Display name of the instance, [2, 128] English or Chinese characters, must start with a letter or Chinese in size, can contain numbers, '_' or '.', '-'. --- ### `InternetChargeType`Optional public object InternetChargeType { get; set; }
- *Type:* object Property internetChargeType: Instance internet access charge type.Support 'PayByBandwidth' and 'PayByTraffic' only. Default is PayByTraffic. --- ### `InternetMaxBandwidthOut`Optional public object InternetMaxBandwidthOut { get; set; }
- *Type:* object Property internetMaxBandwidthOut: The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. Default value: 0. --- ### `IoOptimized`Optional public object IoOptimized { get; set; }
- *Type:* object Property ioOptimized: Specifies whether the instance is I\/O optimized. For instances of [retired instance types](), the default value is none. For instances of other instance types, the default value is optimized. Valid values: * none: The instance is not I/O optimized. * optimized: The instance is I/O optimized. --- ### `KeyPairName`Optional public object KeyPairName { get; set; }
- *Type:* object Property keyPairName: SSH key pair name. --- ### `Password`Optional public object Password { get; set; }
- *Type:* object Property password: Password of created ecs instance. Must contain at least 3 types of special character, lower character, upper character, number. --- ### `PasswordInherit`Optional public object PasswordInherit { get; set; }
- *Type:* object Property passwordInherit: Specifies whether to use the password preset in the image. Valid values: * true: uses the preset password. * false: does not use the preset password. Default value: false. > If you set this parameter to true, make sure that you leave the Password > parameter empty and the selected image has a preset password. --- ### `Period`Optional public object Period { get; set; }
- *Type:* object Property period: Prepaid time period. Unit is month, it could be from 1 to 9 or 12, 24, 36, 48, 60. Default value is 1. --- ### `PeriodUnit`Optional public object PeriodUnit { get; set; }
- *Type:* object Property periodUnit: Unit of prepaid time period, it could be Week\/Month\/Year. Default value is Month. --- ### `PrivateIpAddress`Optional public object PrivateIpAddress { get; set; }
- *Type:* object Property privateIpAddress: Private IP for the instance created. Only works for VPC instance and cannot duplicated with existing instance. --- ### `PrivatePoolOptions`Optional public object PrivatePoolOptions { get; set; }
- *Type:* object Property privatePoolOptions: The options of the private pool. --- ### `RamRoleName`Optional public object RamRoleName { get; set; }
- *Type:* object Property ramRoleName: Instance RAM role name. The name is provided and maintained by Resource Access Management (RAM) and can be queried using ListRoles. For more information, see RAM API CreateRole and ListRoles. --- ### `ResourceGroupId`Optional public object ResourceGroupId { get; set; }
- *Type:* object Property resourceGroupId: Resource group id. --- ### `SecurityEnhancementStrategy`Optional public object SecurityEnhancementStrategy { get; set; }
- *Type:* object Property securityEnhancementStrategy: Specifies whether to enable security hardening. Valid values: * Active: enables security hardening. This value is applicable only to public images. * Deactive: does not enable security hardening. This value is applicable to all images. --- ### `SecurityGroupId`Optional public object SecurityGroupId { get; set; }
- *Type:* object Property securityGroupId: Security group to create ecs instance. For classic instance need the security group not belong to VPC, for VPC instance, please make sure the security group belong to specified VPC. --- ### `SecurityGroupIds`Optional public object SecurityGroupIds { get; set; }
- *Type:* object Property securityGroupIds: The ID list of security group to which to assign the instance. The max length is based on the maximum number of security groups to which an instance can belong. For more information, see the "Security group limits" section in Limits. --- ### `SpotDuration`Optional public object SpotDuration { get; set; }
- *Type:* object Property spotDuration: The protection period of the spot instance. Unit: hours. Valid values: * 1: After a spot instance is created, the system ensures that the instance is not automatically released within 1 hour. After the 1-hour protection period ends, the system compares the bid price with the market price and checks the resource inventory to determine whether to retain or release the instance. * 0: After a spot instance is created, the system does not ensure that the instance can run for one hour. The system compares the biding price with the market prices and checks the resource inventory to determine whether to retain or release the instance. Default value: 1. > * You can set this parameter only to 0 or 1. * The spot instance is billed by second. Specify an appropriate protection period. * The system sends an ECS system event to notify you 5 minutes before the instance is released. --- ### `SpotInterruptionBehavior`Optional public object SpotInterruptionBehavior { get; set; }
- *Type:* object Property spotInterruptionBehavior: The interruption mode of the spot instance. Valid values: * Terminate: The instance is released. * Stop: The instance is stopped in economical mode. For information about the economical mode, see [Economical mode](). Default value: Terminate. --- ### `SpotPriceLimit`Optional public object SpotPriceLimit { get; set; }
- *Type:* object Property spotPriceLimit: The hourly price threshold of a instance, and it takes effect only when parameter InstanceChargeType is PostPaid. Three decimals is allowed at most. --- ### `SpotStrategy`Optional public object SpotStrategy { get; set; }
- *Type:* object Property spotStrategy: The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter InstanceChargeType is PostPaid. Value range: "NoSpot: A regular Pay-As-You-Go instance", "SpotWithPriceLimit: A price threshold for a spot instance, ""SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance. "Default value: NoSpot. --- ### `StorageSetId`Optional public object StorageSetId { get; set; }
- *Type:* object Property storageSetId: The storage set ID. --- ### `StorageSetPartitionNumber`Optional public object StorageSetPartitionNumber { get; set; }
- *Type:* object Property storageSetPartitionNumber: The maximum number of partitions in the storage set. Valid values: integers greater than or equal to 2. --- ### `SubscriptionDeletionForce`Optional public object SubscriptionDeletionForce { get; set; }
- *Type:* object Property subscriptionDeletionForce: This option is only applicable to subscription instances. For subscription instances, if this option is true, the instance will be converted to a postpaid instance before being deleted. If false, the forced deletion will not be performed. This operation will incur additional fees, so choose carefully. --- ### `SystemDiskCategory`Optional public object SystemDiskCategory { get; set; }
- *Type:* object Property systemDiskCategory: Category of system disk. Default is cloud_efficiency. support cloud|cloud_efficiency|cloud_ssd|cloud_essd|ephemeral_ssd|cloud_auto|cloud_essd_entry --- ### `SystemDiskDescription`Optional public object SystemDiskDescription { get; set; }
- *Type:* object Property systemDiskDescription: Description of created system disk. --- ### `SystemDiskDiskName`Optional public object SystemDiskDiskName { get; set; }
- *Type:* object Property systemDiskDiskName: Name of created system disk. --- ### `SystemDiskPerformanceLevel`Optional public object SystemDiskPerformanceLevel { get; set; }
- *Type:* object Property systemDiskPerformanceLevel: The performance level of the enhanced SSD used as the system disk.Default value: PL1. Valid values:PL0: A single enhanced SSD delivers up to 10,000 random read\/write IOPS.PL1: A single enhanced SSD delivers up to 50,000 random read\/write IOPS.PL2: A single enhanced SSD delivers up to 100,000 random read\/write IOPS.PL3: A single enhanced SSD delivers up to 1,000,000 random read\/write IOPS. --- ### `SystemDiskSize`Optional public object SystemDiskSize { get; set; }
- *Type:* object Property systemDiskSize: Disk size of the system disk, range from 20 to 500 GB. If you specify with your own image, make sure the system disk size bigger than image size. --- ### `Tags`Optional public TagsProperty[] Tags { get; set; }
- *Type:* [TagsProperty](../Structs/TagsProperty.md)[] Property tags: Tags to attach to instance. Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required. --- ### `Tenancy`Optional public object Tenancy { get; set; }
- *Type:* object Property tenancy: Specifies whether to create the instance on a dedicated host. Valid values: * **default**: creates the instance on a non-dedicated host. * **host**: creates the instance on a dedicated host. If you do not specify **DedicatedHostId**, Alibaba Cloud selects a dedicated host for the instance. Default value: **default**. --- ### `UseAdditionalService`Optional public object UseAdditionalService { get; set; }
- *Type:* object Property useAdditionalService: Specifies whether to use the system configurations for virtual machines provided by Alibaba Cloud. System configurations for Windows: NTP and KMS. System configurations for Linux: NTP and YUM. --- ### `UserData`Optional public object UserData { get; set; }
- *Type:* object Property userData: The user data of the instance. You must specify Base64-encoded data. The instance user data cannot exceed 32 KB in size before Base64 encoding. For information about the limits, formats, and running frequencies of instance user data, see [Instance user data](). > To ensure security, we recommend that you do not use plaintext to pass in > confidential information, such as passwords or private keys, as user data. If you > need to pass in confidential information, we recommend that you encrypt and > encode the information in Base64 and then decode and decrypt the information in > the same manner in the instance. --- ### `VpcId`Optional public object VpcId { get; set; }
- *Type:* object Property vpcId: The VPC id to create ecs instance. --- ### `VSwitchId`Optional public object VSwitchId { get; set; }
- *Type:* object Property vSwitchId: The ID of the vSwitch to which to connect to the instance. You must set this parameter when you create an instance of the VPC type. The specified vSwitch and security group must belong to the same VPC. You can call the [DescribeVSwitches]() operation to query available vSwitches. Take note of the following items: * If you specify the `VSwitchId` parameter, the zone specified by the `ZoneId` parameter must be the zone where the specified vSwitch is located. You can also leave the `ZoneId` parameter empty. Then, the system selects the zone where the specified vSwitch resides. * If `NetworkInterface.N.InstanceType` is set to `Primary`, you cannot specify `VSwitchId` but can specify `NetworkInterface.N.VSwitchId`. --- ### `ZoneId`Optional public object ZoneId { get; set; }
- *Type:* object Property zoneId: The ID of the zone to which the instance belongs. For more information, call the DescribeZones operation to query the most recent zone list. Default value is empty, which means random selection. --- ### `ZoneIds`Optional public object ZoneIds { get; set; }
- *Type:* object Property zoneIds: Zone ids for query parameters. ---
public object InstanceChargeType { get; set; }
public object InstanceName { get; set; }
public object InternetChargeType { get; set; }
public object InternetMaxBandwidthOut { get; set; }
public object IoOptimized { get; set; }
public object KeyPairName { get; set; }
public object Password { get; set; }
public object PasswordInherit { get; set; }
public object Period { get; set; }
public object PeriodUnit { get; set; }
public object PrivateIpAddress { get; set; }
public object PrivatePoolOptions { get; set; }
public object RamRoleName { get; set; }
public object ResourceGroupId { get; set; }
public object SecurityEnhancementStrategy { get; set; }
public object SecurityGroupId { get; set; }
public object SecurityGroupIds { get; set; }
public object SpotDuration { get; set; }
public object SpotInterruptionBehavior { get; set; }
public object SpotPriceLimit { get; set; }
public object SpotStrategy { get; set; }
public object StorageSetId { get; set; }
public object StorageSetPartitionNumber { get; set; }
public object SubscriptionDeletionForce { get; set; }
public object SystemDiskCategory { get; set; }
public object SystemDiskDescription { get; set; }
public object SystemDiskDiskName { get; set; }
public object SystemDiskPerformanceLevel { get; set; }
public object SystemDiskSize { get; set; }
public TagsProperty[] Tags { get; set; }
public object Tenancy { get; set; }
public object UseAdditionalService { get; set; }
public object UserData { get; set; }
public object VpcId { get; set; }
public object VSwitchId { get; set; }
public object ZoneId { get; set; }
public object ZoneIds { get; set; }