public class RunInstancesRequest
extends com.aliyun.tea.TeaModel
限定符和类型 | 类和说明 |
---|---|
static class |
RunInstancesRequest.RunInstancesRequestArn |
static class |
RunInstancesRequest.RunInstancesRequestCpuOptions |
static class |
RunInstancesRequest.RunInstancesRequestDataDisk |
static class |
RunInstancesRequest.RunInstancesRequestHibernationOptions |
static class |
RunInstancesRequest.RunInstancesRequestImageOptions |
static class |
RunInstancesRequest.RunInstancesRequestNetworkInterface |
static class |
RunInstancesRequest.RunInstancesRequestNetworkOptions |
static class |
RunInstancesRequest.RunInstancesRequestPrivateDnsNameOptions |
static class |
RunInstancesRequest.RunInstancesRequestPrivatePoolOptions |
static class |
RunInstancesRequest.RunInstancesRequestSchedulerOptions |
static class |
RunInstancesRequest.RunInstancesRequestSecurityOptions |
static class |
RunInstancesRequest.RunInstancesRequestSystemDisk |
static class |
RunInstancesRequest.RunInstancesRequestTag |
限定符和类型 | 字段和说明 |
---|---|
String |
affinity
Specifies whether to associate an instance on a dedicated host with the dedicated host.
|
Integer |
amount
The desired number of ECS instances that you want to create.
|
List<RunInstancesRequest.RunInstancesRequestArn> |
arn
This parameter is not publicly available.
|
Boolean |
autoPay
Specifies whether to automatically complete the payment for instance creation.
|
String |
autoReleaseTime
The time when to automatically release the pay-as-you-go instance.
|
Boolean |
autoRenew
Specifies whether to enable auto-renewal for the instance.
|
Integer |
autoRenewPeriod
The auto-renewal period of the instance.
|
String |
clientToken
The client token that is used to ensure the idempotence of the request.
|
RunInstancesRequest.RunInstancesRequestCpuOptions |
cpuOptions |
String |
creditSpecification
The performance mode of the burstable instance.
|
List<RunInstancesRequest.RunInstancesRequestDataDisk> |
dataDisk
The data disks.
|
String |
dedicatedHostId
The ID of the dedicated host on which to create the instance.
|
Boolean |
deletionProtection
Specifies whether to enable release protection for the instance.
|
Integer |
deploymentSetGroupNo
The number of the deployment set group to which to deploy the instance.
|
String |
deploymentSetId
The ID of the deployment set to which to deploy the instance.
|
String |
description
The description of the instance.
|
Boolean |
dryRun
Specifies whether to check the validity of the request without actually making the request.
|
RunInstancesRequest.RunInstancesRequestHibernationOptions |
hibernationOptions |
String |
hostName
The hostname of the instance.
|
List<String> |
hostNames
The hostname of instance N.
|
String |
hpcClusterId
The ID of the high performance computing (HPC) cluster to which the instance belongs.
|
String |
httpEndpoint
Specifies whether to enable the access channel for instance metadata.
|
Integer |
httpPutResponseHopLimit
The HTTP PUT response hop limit for accessing instance metadata.
|
String |
httpTokens
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata.
|
String |
imageFamily
The name of the image family.
|
String |
imageId
The ID of the image.
|
RunInstancesRequest.RunInstancesRequestImageOptions |
imageOptions
Details about the image options.
|
String |
instanceChargeType
The billing method of the instance.
|
String |
instanceName
The name of the instance.
|
String |
instanceType
The instance type.
|
String |
internetChargeType
The billing method for network usage.
|
Integer |
internetMaxBandwidthIn
The maximum inbound public bandwidth.
|
Integer |
internetMaxBandwidthOut
The maximum outbound public bandwidth.
|
String |
ioOptimized
Specifies whether the instance is I/O optimized.
|
List<String> |
ipv6Address
IPv6 address N to be assigned to the primary ENI.
|
Integer |
ipv6AddressCount
The number of IPv6 addresses to randomly generate for the primary ENI.
|
String |
isp
This parameter is in invitational preview and is unavailable.
|
String |
keyPairName
The name of the key pair.
|
String |
launchTemplateId
The ID of the launch template.
|
String |
launchTemplateName
The name of the launch template.
|
Long |
launchTemplateVersion
The version of the launch template.
|
Integer |
minAmount
The minimum number of ECS instances that you want to create.
|
List<RunInstancesRequest.RunInstancesRequestNetworkInterface> |
networkInterface
The information of the elastic network interfaces (ENIs).
|
Integer |
networkInterfaceQueueNumber
The number of queues supported by the primary ENI.
|
RunInstancesRequest.RunInstancesRequestNetworkOptions |
networkOptions
Details about network options.
|
String |
ownerAccount |
Long |
ownerId |
String |
password
The password of the instance.
|
Boolean |
passwordInherit
Specifies whether to use the password preset in the image.
|
Integer |
period
The subscription period of the instance.
|
String |
periodUnit
The unit of the subscription period.
|
RunInstancesRequest.RunInstancesRequestPrivateDnsNameOptions |
privateDnsNameOptions
This parameter is in invitational preview and is not publicly available.
|
String |
privateIpAddress
The private IP address to assign to the instance.
|
RunInstancesRequest.RunInstancesRequestPrivatePoolOptions |
privatePoolOptions |
String |
ramRoleName
The name of the Resource Access Management (RAM) role.
|
String |
regionId
The ID of the region in which to create the instance.
|
String |
resourceGroupId
The ID of the resource group to which to assign the instance.
|
String |
resourceOwnerAccount |
Long |
resourceOwnerId |
RunInstancesRequest.RunInstancesRequestSchedulerOptions |
schedulerOptions |
String |
securityEnhancementStrategy
Specifies whether to enable security hardening.
|
String |
securityGroupId
The ID of the security group to which you want to assign the instance.
|
List<String> |
securityGroupIds
The ID of security group N to which to assign the instance.
|
RunInstancesRequest.RunInstancesRequestSecurityOptions |
securityOptions |
Integer |
spotDuration
The protection period of the preemptible instance.
|
String |
spotInterruptionBehavior
The interruption mode of the preemptible instance.
|
Float |
spotPriceLimit
The maximum hourly price of the instance.
|
String |
spotStrategy
The bidding policy for the pay-as-you-go instance.
|
String |
storageSetId
The ID of the storage set.
|
Integer |
storageSetPartitionNumber
The maximum number of partitions in the storage set.
|
RunInstancesRequest.RunInstancesRequestSystemDisk |
systemDisk |
List<RunInstancesRequest.RunInstancesRequestTag> |
tag
The tags to add to the instance, disks, and primary ENI.
|
String |
tenancy
Specifies whether to create the instance on a dedicated host.
|
Boolean |
uniqueSuffix
Specifies whether to automatically append incremental suffixes to the hostname specified by the
HostName parameter and to the instance name specified by the InstanceName parameter when you batch create instances. |
String |
userData
The user data of the instance.
|
String |
vSwitchId
The ID of the vSwitch to which to connect to the instance.
|
String |
zoneId
The ID of the zone in which to create the instance.
|
构造器和说明 |
---|
RunInstancesRequest() |
@NameInMap(value="CpuOptions") public RunInstancesRequest.RunInstancesRequestCpuOptions cpuOptions
@NameInMap(value="HibernationOptions") public RunInstancesRequest.RunInstancesRequestHibernationOptions hibernationOptions
@NameInMap(value="PrivatePoolOptions") public RunInstancesRequest.RunInstancesRequestPrivatePoolOptions privatePoolOptions
@NameInMap(value="SchedulerOptions") public RunInstancesRequest.RunInstancesRequestSchedulerOptions schedulerOptions
@NameInMap(value="SecurityOptions") public RunInstancesRequest.RunInstancesRequestSecurityOptions securityOptions
@NameInMap(value="SystemDisk") public RunInstancesRequest.RunInstancesRequestSystemDisk systemDisk
@NameInMap(value="Affinity") public String affinity
Specifies whether to associate an instance on a dedicated host with the dedicated host. Valid values:
Default value: default.
example:default
@NameInMap(value="Amount") public Integer amount
The desired number of ECS instances that you want to create. Valid values: 1 to 100.
The number of ECS instances that can be created varies based on the Amount and MinAmount values.
If you do not specify MinAmount, the RunInstances operation creates ECS instances based on the Amount value. If the available resources are insufficient to create the desired number of ECS instances, the RunInstances operation returns an error response and no ECS instances are created.
If you specify MinAmount, take note of the following items:
Default value: 1.
example:3
@NameInMap(value="Arn") public List<RunInstancesRequest.RunInstancesRequestArn> arn
This parameter is not publicly available.
@NameInMap(value="AutoPay") public Boolean autoPay
Specifies whether to automatically complete the payment for instance creation. Valid values:
true: The payment is automatically completed.
**
Note Make sure that your account balance is sufficient. Otherwise, your order becomes invalid and is canceled. If your account balance is insufficient, you can set AutoPay
to false
to generate an unpaid order. Then, you can log on to the ECS console to pay for the order.
false: An order is generated but no payment is made.
**
Note When InstanceChargeType
is set to PostPaid
, AutoPay
cannot be set to false
.
Default value: true.
example:true
@NameInMap(value="AutoReleaseTime") public String autoReleaseTime
The time when to automatically release the pay-as-you-go instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ
format. The time must be in UTC.
ss
) is not 00
, the start time is automatically rounded to the nearest minute based on the value of minutes (mm
).2018-01-01T12:05:00Z
@NameInMap(value="AutoRenew") public Boolean autoRenew
Specifies whether to enable auto-renewal for the instance. This parameter is valid only when the InstanceChargeType
parameter is set to PrePaid
. Valid values:
Default value: false.
example:true
@NameInMap(value="AutoRenewPeriod") public Integer autoRenewPeriod
The auto-renewal period of the instance. Valid values:
Default value: 1.
example:1
@NameInMap(value="ClientToken") public String clientToken
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.**** For more information, see How to ensure idempotence.
example:123e4567-e89b-12d3-a456-426655440000
@NameInMap(value="CreditSpecification") public String creditSpecification
The performance mode of the burstable instance. Valid values:
Standard
@NameInMap(value="DataDisk") public List<RunInstancesRequest.RunInstancesRequestDataDisk> dataDisk
The data disks.
@NameInMap(value="DedicatedHostId") public String dedicatedHostId
The ID of the dedicated host on which to create the instance. Preemptible instances cannot be created on dedicated hosts. If you specify DedicatedHostId
, SpotStrategy
and SpotPriceLimit
are ignored.
You can call the DescribeDedicatedHosts operation to query the list of dedicated host IDs.
example:dh-bp67acfmxazb4p****
@NameInMap(value="DeletionProtection") public Boolean deletionProtection
Specifies whether to enable release protection for the instance. This parameter determines whether you can use the ECS console or call the DeleteInstance operation to release the instance. Valid values:
Default value: false.
example:This parameter is applicable to only pay-as-you-go instances. It can protect instances against manual releases, but not against automatic releases.
false
@NameInMap(value="DeploymentSetGroupNo") public Integer deploymentSetGroupNo
The number of the deployment set group to which to deploy the instance. If the deployment set specified by the DeploymentSetId parameter uses the high availability group strategy (AvailabilityGroup), you can use the DeploymentSetGroupNo parameter to specify a deployment set group in the deployment set. Valid values: 1 to 7.
example:1
@NameInMap(value="DeploymentSetId") public String deploymentSetId
The ID of the deployment set to which to deploy the instance.
example:ds-bp1brhwhoqinyjd6****
@NameInMap(value="Description") public String description
The description of the instance. The description must be 2 to 256 characters in length, and cannot start with http://
or https://
.
Instance_Description
@NameInMap(value="DryRun") public Boolean dryRun
Specifies whether to check the validity of the request without actually making the request. Default value: false. Valid values:
DryRunOperation
error code is returned.false
@NameInMap(value="HostName") public String hostName
The hostname of the instance. Take note of the following items:
The hostname cannot start or end with a period (.) or hyphen (-). It cannot contain consecutive periods (.) or hyphens (-).
For Windows instances, the hostname must be 2 to 15 characters in length and cannot contain periods (.) or contain only digits. It can contain letters, digits, and hyphens (-).
For instances that run other operating systems such as Linux, take note of the following items:
${instance_id}
placeholder to pass instance IDs into the hostname specified by HostName
. For example, if you set HostName
to k8s-${instance_id} and the instance is assigned an ID of i-123abc****
, the hostname of the instance is k8s-i-123abc****
.When you create multiple instances, you can perform the following operations:
HostNames.N
parameter to configure different hostnames for instances. You cannot specify both the HostName
and HostNames.N
parameters.k8s-node-[1,4]-ecshost
@NameInMap(value="HostNames") public List<String> hostNames
The hostname of instance N. You can use this parameter to specify different hostnames for multiple instances.
example:ecs-host-01
@NameInMap(value="HpcClusterId") public String 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.
example:hpc-bp67acfmxazb4p****
@NameInMap(value="HttpEndpoint") public String httpEndpoint
Specifies whether to enable the access channel for instance metadata. Valid values:
Default value: enabled.
example:For more information about instance metadata, see Overview of ECS instance metadata.
enabled
@NameInMap(value="HttpPutResponseHopLimit") public Integer httpPutResponseHopLimit
The HTTP PUT response hop limit for accessing instance metadata. Valid values: 1 to 64.
Default value: 1.
example:3
@NameInMap(value="HttpTokens") public String httpTokens
Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Valid values:
Default value: optional.
example:For more information about the modes of accessing instance metadata, see Access mode of instance metadata.
optional
@NameInMap(value="ImageFamily") public String 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 instances.
The name must be 2 to 128 characters in length. The name cannot start with a digit, a special character, http://, or https://. The name can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:).
Take note of the following items:
ImageId
, you cannot specify ImageFamily.ImageId
but use LaunchTemplateId
or LaunchTemplateName
to specify a launch template that has ImageId
specified, you cannot specify ImageFamily.ImageId
but use LaunchTemplateId
or LaunchTemplateName
to specify a launch template that does not have ImageId
specified, you can specify ImageFamily.ImageId
, LaunchTemplateId
, or LaunchTemplateName
, you can specify ImageFamily.example:For information about image families that are associated with Alibaba Cloud official images, see Overview of public images.
hangzhou-daily-update
@NameInMap(value="ImageId") public String imageId
The ID of the image. You can call the DescribeImages operation to query available images. If you do not use LaunchTemplateId
or LaunchTemplateName
to specify a launch template and do not set ImageFamily
to obtain the latest available custom image from a specified image family, you must specify ImageId
.
aliyun_2_1903_x64_20G_alibase_20200324.vhd
@NameInMap(value="ImageOptions") public RunInstancesRequest.RunInstancesRequestImageOptions imageOptions
Details about the image options.
@NameInMap(value="InstanceChargeType") public String instanceChargeType
The billing method of the instance. Valid values:
Default value: PostPaid.
If you set this parameter to PrePaid, make sure that your account has sufficient balance or credit. Otherwise, an InvalidPayMethod
error is returned.
PrePaid
@NameInMap(value="InstanceName") public String instanceName
The name of the instance. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). The default value of this parameter is the InstanceId
value.
When you batch create instances, you can batch configure sequential names for the instances. The sequential names can contain brackets ([ ]) and commas (,). For more information, see Batch configure sequential names or hostnames for multiple instances.
example:k8s-node-[1,4]-alibabacloud
@NameInMap(value="InstanceType") public String instanceType
The instance type. If you do not use LaunchTemplateId
or LaunchTemplateName
to specify a launch template, you must set the InstanceType
parameter.
ecs.g6.large
@NameInMap(value="InternetChargeType") public String internetChargeType
The billing method for network usage. Valid values:
Default value: PayByTraffic.
example:When the pay-by-traffic billing method for network usage is used, the maximum inbound and outbound bandwidths are used as the upper limits of bandwidths instead of guaranteed performance specifications. In scenarios where demand outstrips resource supplies, these maximum bandwidth values may not be reached. If you want guaranteed bandwidths for your instance, use the pay-by-bandwidth billing method for network usage.
PayByTraffic
@NameInMap(value="InternetMaxBandwidthIn") public Integer internetMaxBandwidthIn
The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:
InternetMaxBandwidthOut
value and the default value is the InternetMaxBandwidthOut
value.10
@NameInMap(value="InternetMaxBandwidthOut") public Integer internetMaxBandwidthOut
The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100.
Default value: 0.
example:10
@NameInMap(value="IoOptimized") public String 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:
optimized
@NameInMap(value="Ipv6Address") public List<String> ipv6Address
IPv6 address N to be assigned to the primary ENI. Valid values of N: 1 to 10.
Example: Ipv6Address.1=2001:db8:1234:1a00::***
.
Take note of the following items:
Ipv6Address.N
parameter is specified, you must set the Amount
parameter to 1 and leave the Ipv6AddressCount
parameter empty.NetworkInterface.N.InstanceType
is set to Primary
, you cannot set Ipv6Addresses.N
or Ipv6AddressCount
and must set NetworkInterface.N.Ipv6Addresses.N
or NetworkInterface.N.Ipv6AddressCount
.Ipv6Address.1=2001:db8:1234:1a00::***
@NameInMap(value="Ipv6AddressCount") public Integer ipv6AddressCount
The number of IPv6 addresses to randomly generate for the primary ENI. Valid values: 1 to 10.
Take note of the following items:
Ipv6Addresses.N
and Ipv6AddressCount
parameters.NetworkInterface.N.InstanceType
is set to Primary
, you cannot specify Ipv6Address.N
or Ipv6AddressCount
but can specify NetworkInterface.N.Ipv6Address.N
or NetworkInterface.N.Ipv6AddressCount
.1
@NameInMap(value="Isp") public String isp
example:This parameter is in invitational preview and is unavailable.
null
@NameInMap(value="KeyPairName") public String keyPairName
The name of the key pair.
example:For Windows instances, this parameter is ignored. This parameter is empty by default. The
Password
parameter takes effect even if the KeyPairName parameter is specified.
KeyPair_Name
@NameInMap(value="LaunchTemplateId") public String launchTemplateId
The ID of the launch template. For more information, call the DescribeLaunchTemplates operation.
To use a launch template to create an instance, you must use the LaunchTemplateId
or LaunchTemplateName
parameter to specify the launch template.
lt-bp1apo0bbbkuy0rj****
@NameInMap(value="LaunchTemplateName") public String launchTemplateName
The name of the launch template.
To use a launch template to create an instance, you must use the LaunchTemplateId
or LaunchTemplateName
parameter to specify the launch template.
LaunchTemplate_Name
@NameInMap(value="LaunchTemplateVersion") public Long launchTemplateVersion
The version of the launch template. If you set the LaunchTemplateId
or LaunchTemplateName
parameter but do not set the version number of the launch template, the default template version is used.
3
@NameInMap(value="MinAmount") public Integer minAmount
The minimum number of ECS instances that you want to create. Valid values: 1 to 100.
The number of ECS instances that can be created varies based on the Amount and MinAmount values.
If you do not specify MinAmount, the RunInstances operation creates ECS instances based on the Amount value. If the available resources are insufficient to create the desired number of ECS instances, the RunInstances operation returns an error response and no ECS instances are created.
If you specify MinAmount, take note of the following items:
2
@NameInMap(value="NetworkInterface") public List<RunInstancesRequest.RunInstancesRequestNetworkInterface> networkInterface
The information of the elastic network interfaces (ENIs).
@NameInMap(value="NetworkInterfaceQueueNumber") public Integer networkInterfaceQueueNumber
The number of queues supported by the primary ENI. Take note of the following items:
MaximumQueueNumberPerEni
and TotalEniQueueQuantity
values.NetworkInterface.N.InstanceType
is set to Primary
, you cannot specify NetworkInterfaceQueueNumber
but can specify NetworkInterface.N.QueueNumber
.8
@NameInMap(value="NetworkOptions") public RunInstancesRequest.RunInstancesRequestNetworkOptions networkOptions
Details about network options.
@NameInMap(value="OwnerAccount") public String ownerAccount
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="Password") public String password
The password of the instance. The password must be 8 to 30 characters in length and contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. Special characters include:
()`~!@#$%^&*-_+=|{}[]:;\\"<>,.?/
For Windows instances, the password cannot start with a forward slash (/).
example:If the
Password
parameter is specified, we recommend that you send requests over HTTPS to prevent password leaks.
EcsV587!
@NameInMap(value="PasswordInherit") public Boolean passwordInherit
Specifies whether to use the password preset in the image. Valid values:
Default value: false.
example:If you set this parameter to true, make sure that you leave the Password parameter empty and the selected image has a preset password.
false
@NameInMap(value="Period") public Integer period
The subscription period of the instance. The unit is specified by the PeriodUnit
parameter. This parameter is valid and required only when InstanceChargeType
is set to PrePaid
. If the DedicatedHostId
parameter is specified, the value of Period must not exceed the subscription period of the specified dedicated host. Valid values:
1
@NameInMap(value="PeriodUnit") public String periodUnit
The unit of the subscription period. Default value: Month. Valid values:
Month
@NameInMap(value="PrivateDnsNameOptions") public RunInstancesRequest.RunInstancesRequestPrivateDnsNameOptions privateDnsNameOptions
This parameter is in invitational preview and is not publicly available.
@NameInMap(value="PrivateIpAddress") public String privateIpAddress
The private IP address to assign to the instance. To assign a private IP address to an instance that resides in a VPC, make sure that the IP address is an idle IP address within the CIDR block of the vSwitch specified by VSwitchId
.
Take note of the following items:
If PrivateIpAddress
is specified, take note of the following items:
Amount
is set to 1, a single instance is created and the specified private IP address is assigned to the instance.Amount
is set to a numeric value greater than 1, the specified number of instances are created and consecutive private IP addresses starting from the specified one are assigned to the instances. In this case, you cannot specify parameters that start with NetworkInterface.N
to attach secondary ENIs to the instances.If NetworkInterface.N.InstanceType
is set to Primary
, you cannot specify PrivateIpAddress
but can specify NetworkInterface.N.PrimaryIpAddress
.
example:The first IP address and last three IP addresses of each vSwitch CIDR block are reserved. You cannot specify the IP addresses. For example, if a vSwitch CIDR block is 192.168.1.0/24, the IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved.
10.1.**.**
@NameInMap(value="RamRoleName") public String ramRoleName
The name of the Resource Access Management (RAM) role. You can call the ListRoles operation provided by RAM to query the instance RAM roles that you created.
example:RAM_Name
@NameInMap(value="RegionId") public String regionId
The ID of the region in which to create the instance. You can call the DescribeRegions operation to query the most recent region list.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="ResourceGroupId") public String resourceGroupId
The ID of the resource group to which to assign the instance.
example:rg-bp67acfmxazb4p****
@NameInMap(value="ResourceOwnerAccount") public String resourceOwnerAccount
@NameInMap(value="ResourceOwnerId") public Long resourceOwnerId
@NameInMap(value="SecurityEnhancementStrategy") public String securityEnhancementStrategy
Specifies whether to enable security hardening. Valid values:
Active
@NameInMap(value="SecurityGroupId") public String securityGroupId
The ID of the security group to which you want to assign the instance. Instances in the same security group can communicate with each other. The maximum number of instances allowed in a security group varies based on the type of the security group. For more information, see the "Security group limits" section in Limits.
The network type of the new instance is the same as the network type of the security group specified by
SecurityGroupId
. For example, if the specified security group is of the VPC type, the new instance is also of the VPC type and you must specifyVSwitchId
.
If you do not use LaunchTemplateId
or LaunchTemplateName
to specify a launch template, you must specify a security group ID. Take note of the following items:
SecurityGroupId
to specify a single security group or set SecurityGroupIds.N
to specify one or more security groups. However, you cannot specify both SecurityGroupId
and SecurityGroupIds.N
in the same request.NetworkInterface.N.InstanceType
is set to Primary
, you cannot specify SecurityGroupId
or SecurityGroupIds.N
but can specify NetworkInterface.N.SecurityGroupId
or NetworkInterface.N.SecurityGroupIds.N
.sg-bp15ed6xe1yxeycg7****
@NameInMap(value="SecurityGroupIds") public List<String> securityGroupIds
The ID of security group N to which to assign the instance. The valid values of N vary based on the maximum number of security groups to which an instance can belong. For more information, see the Security group limits section of the "Limits" topic.
Take note of the following items:
SecurityGroupId
and SecurityGroupIds.N
in the same request.NetworkInterface.N.InstanceType
is set to Primary
, you cannot specify SecurityGroupId
or SecurityGroupIds.N
but can specify NetworkInterface.N.SecurityGroupId
or NetworkInterface.N.SecurityGroupIds.N
.sg-bp15ed6xe1yxeycg7****
@NameInMap(value="SpotDuration") public Integer spotDuration
The protection period of the preemptible instance. Unit: hours. Default value: 1. Valid values:
Alibaba Cloud sends an ECS system event to notify you 5 minutes before the instance is released. Preemptible instances are billed by second. We recommend that you specify an appropriate protection period based on your business requirements.
example:1
@NameInMap(value="SpotInterruptionBehavior") public String spotInterruptionBehavior
The interruption mode of the preemptible 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.
example:Terminate
@NameInMap(value="SpotPriceLimit") public Float spotPriceLimit
The maximum hourly price of the instance. The value is accurate to three decimal places. This parameter is valid only when the SpotStrategy
parameter is set to SpotWithPriceLimit
.
0.97
@NameInMap(value="SpotStrategy") public String spotStrategy
The bidding policy for the pay-as-you-go instance. This parameter is valid only when the InstanceChargeType
parameter is set to PostPaid
. Valid values:
Default value: NoSpot.
example:NoSpot
@NameInMap(value="StorageSetId") public String storageSetId
The ID of the storage set.
example:ss-bp67acfmxazb4p****
@NameInMap(value="StorageSetPartitionNumber") public Integer storageSetPartitionNumber
The maximum number of partitions in the storage set. Valid values: greater than or equal to 2.
example:2
@NameInMap(value="Tag") public List<RunInstancesRequest.RunInstancesRequestTag> tag
The tags to add to the instance, disks, and primary ENI.
@NameInMap(value="Tenancy") public String tenancy
Specifies whether to create the instance on a dedicated host. Valid values:
DedicatedHostId
parameter, Alibaba Cloud selects a dedicated host for the instance.Default value: default.
example:default
@NameInMap(value="UniqueSuffix") public Boolean uniqueSuffix
Specifies whether to automatically append incremental suffixes to the hostname specified by the HostName
parameter and to the instance name specified by the InstanceName
parameter when you batch create instances. The incremental suffixes can range from 001 to 999. Valid values:
Default value: false.
When the HostName
or InstanceName
value is set in the name_prefix[begin_number,bits]
format without name_suffix
, the UniqueSuffix
parameter does not take effect. The names are sorted in the specified sequence.
For more information, see Batch configure sequential names or hostnames for multiple instances.
example:true
@NameInMap(value="UserData") public String 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.
example: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.
ZWNobyBoZWxsbyBlY3Mh
@NameInMap(value="VSwitchId") public String 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:
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.NetworkInterface.N.InstanceType
is set to Primary
, you cannot specify VSwitchId
but can specify NetworkInterface.N.VSwitchId
.vsw-bp1s5fnvk4gn2tws0****
@NameInMap(value="ZoneId") public String zoneId
The ID of the zone in which to create the instance. You can call the DescribeZones operation to query the most recent zone list.
If you specify the
VSwitchId
parameter, the zone specified by theZoneId
parameter must be the zone where the vSwitch is located. You can also leave theZoneId
parameter empty. Then, the system selects the zone where the specified vSwitch is located.
This parameter is empty by default.
example:cn-hangzhou-g
public static RunInstancesRequest build(Map<String,?> map) throws Exception
Exception
public RunInstancesRequest setCpuOptions(RunInstancesRequest.RunInstancesRequestCpuOptions cpuOptions)
public RunInstancesRequest.RunInstancesRequestCpuOptions getCpuOptions()
public RunInstancesRequest setHibernationOptions(RunInstancesRequest.RunInstancesRequestHibernationOptions hibernationOptions)
public RunInstancesRequest.RunInstancesRequestHibernationOptions getHibernationOptions()
public RunInstancesRequest setPrivatePoolOptions(RunInstancesRequest.RunInstancesRequestPrivatePoolOptions privatePoolOptions)
public RunInstancesRequest.RunInstancesRequestPrivatePoolOptions getPrivatePoolOptions()
public RunInstancesRequest setSchedulerOptions(RunInstancesRequest.RunInstancesRequestSchedulerOptions schedulerOptions)
public RunInstancesRequest.RunInstancesRequestSchedulerOptions getSchedulerOptions()
public RunInstancesRequest setSecurityOptions(RunInstancesRequest.RunInstancesRequestSecurityOptions securityOptions)
public RunInstancesRequest.RunInstancesRequestSecurityOptions getSecurityOptions()
public RunInstancesRequest setSystemDisk(RunInstancesRequest.RunInstancesRequestSystemDisk systemDisk)
public RunInstancesRequest.RunInstancesRequestSystemDisk getSystemDisk()
public RunInstancesRequest setAffinity(String affinity)
public String getAffinity()
public RunInstancesRequest setAmount(Integer amount)
public Integer getAmount()
public RunInstancesRequest setArn(List<RunInstancesRequest.RunInstancesRequestArn> arn)
public List<RunInstancesRequest.RunInstancesRequestArn> getArn()
public RunInstancesRequest setAutoPay(Boolean autoPay)
public Boolean getAutoPay()
public RunInstancesRequest setAutoReleaseTime(String autoReleaseTime)
public String getAutoReleaseTime()
public RunInstancesRequest setAutoRenew(Boolean autoRenew)
public Boolean getAutoRenew()
public RunInstancesRequest setAutoRenewPeriod(Integer autoRenewPeriod)
public Integer getAutoRenewPeriod()
public RunInstancesRequest setClientToken(String clientToken)
public String getClientToken()
public RunInstancesRequest setCreditSpecification(String creditSpecification)
public String getCreditSpecification()
public RunInstancesRequest setDataDisk(List<RunInstancesRequest.RunInstancesRequestDataDisk> dataDisk)
public List<RunInstancesRequest.RunInstancesRequestDataDisk> getDataDisk()
public RunInstancesRequest setDedicatedHostId(String dedicatedHostId)
public String getDedicatedHostId()
public RunInstancesRequest setDeletionProtection(Boolean deletionProtection)
public Boolean getDeletionProtection()
public RunInstancesRequest setDeploymentSetGroupNo(Integer deploymentSetGroupNo)
public Integer getDeploymentSetGroupNo()
public RunInstancesRequest setDeploymentSetId(String deploymentSetId)
public String getDeploymentSetId()
public RunInstancesRequest setDescription(String description)
public String getDescription()
public RunInstancesRequest setDryRun(Boolean dryRun)
public Boolean getDryRun()
public RunInstancesRequest setHostName(String hostName)
public String getHostName()
public RunInstancesRequest setHostNames(List<String> hostNames)
public RunInstancesRequest setHpcClusterId(String hpcClusterId)
public String getHpcClusterId()
public RunInstancesRequest setHttpEndpoint(String httpEndpoint)
public String getHttpEndpoint()
public RunInstancesRequest setHttpPutResponseHopLimit(Integer httpPutResponseHopLimit)
public Integer getHttpPutResponseHopLimit()
public RunInstancesRequest setHttpTokens(String httpTokens)
public String getHttpTokens()
public RunInstancesRequest setImageFamily(String imageFamily)
public String getImageFamily()
public RunInstancesRequest setImageId(String imageId)
public String getImageId()
public RunInstancesRequest setImageOptions(RunInstancesRequest.RunInstancesRequestImageOptions imageOptions)
public RunInstancesRequest.RunInstancesRequestImageOptions getImageOptions()
public RunInstancesRequest setInstanceChargeType(String instanceChargeType)
public String getInstanceChargeType()
public RunInstancesRequest setInstanceName(String instanceName)
public String getInstanceName()
public RunInstancesRequest setInstanceType(String instanceType)
public String getInstanceType()
public RunInstancesRequest setInternetChargeType(String internetChargeType)
public String getInternetChargeType()
public RunInstancesRequest setInternetMaxBandwidthIn(Integer internetMaxBandwidthIn)
public Integer getInternetMaxBandwidthIn()
public RunInstancesRequest setInternetMaxBandwidthOut(Integer internetMaxBandwidthOut)
public Integer getInternetMaxBandwidthOut()
public RunInstancesRequest setIoOptimized(String ioOptimized)
public String getIoOptimized()
public RunInstancesRequest setIpv6Address(List<String> ipv6Address)
public RunInstancesRequest setIpv6AddressCount(Integer ipv6AddressCount)
public Integer getIpv6AddressCount()
public RunInstancesRequest setIsp(String isp)
public String getIsp()
public RunInstancesRequest setKeyPairName(String keyPairName)
public String getKeyPairName()
public RunInstancesRequest setLaunchTemplateId(String launchTemplateId)
public String getLaunchTemplateId()
public RunInstancesRequest setLaunchTemplateName(String launchTemplateName)
public String getLaunchTemplateName()
public RunInstancesRequest setLaunchTemplateVersion(Long launchTemplateVersion)
public Long getLaunchTemplateVersion()
public RunInstancesRequest setMinAmount(Integer minAmount)
public Integer getMinAmount()
public RunInstancesRequest setNetworkInterface(List<RunInstancesRequest.RunInstancesRequestNetworkInterface> networkInterface)
public List<RunInstancesRequest.RunInstancesRequestNetworkInterface> getNetworkInterface()
public RunInstancesRequest setNetworkInterfaceQueueNumber(Integer networkInterfaceQueueNumber)
public Integer getNetworkInterfaceQueueNumber()
public RunInstancesRequest setNetworkOptions(RunInstancesRequest.RunInstancesRequestNetworkOptions networkOptions)
public RunInstancesRequest.RunInstancesRequestNetworkOptions getNetworkOptions()
public RunInstancesRequest setOwnerAccount(String ownerAccount)
public String getOwnerAccount()
public RunInstancesRequest setOwnerId(Long ownerId)
public Long getOwnerId()
public RunInstancesRequest setPassword(String password)
public String getPassword()
public RunInstancesRequest setPasswordInherit(Boolean passwordInherit)
public Boolean getPasswordInherit()
public RunInstancesRequest setPeriod(Integer period)
public Integer getPeriod()
public RunInstancesRequest setPeriodUnit(String periodUnit)
public String getPeriodUnit()
public RunInstancesRequest setPrivateDnsNameOptions(RunInstancesRequest.RunInstancesRequestPrivateDnsNameOptions privateDnsNameOptions)
public RunInstancesRequest.RunInstancesRequestPrivateDnsNameOptions getPrivateDnsNameOptions()
public RunInstancesRequest setPrivateIpAddress(String privateIpAddress)
public String getPrivateIpAddress()
public RunInstancesRequest setRamRoleName(String ramRoleName)
public String getRamRoleName()
public RunInstancesRequest setRegionId(String regionId)
public String getRegionId()
public RunInstancesRequest setResourceGroupId(String resourceGroupId)
public String getResourceGroupId()
public RunInstancesRequest setResourceOwnerAccount(String resourceOwnerAccount)
public String getResourceOwnerAccount()
public RunInstancesRequest setResourceOwnerId(Long resourceOwnerId)
public Long getResourceOwnerId()
public RunInstancesRequest setSecurityEnhancementStrategy(String securityEnhancementStrategy)
public String getSecurityEnhancementStrategy()
public RunInstancesRequest setSecurityGroupId(String securityGroupId)
public String getSecurityGroupId()
public RunInstancesRequest setSecurityGroupIds(List<String> securityGroupIds)
public RunInstancesRequest setSpotDuration(Integer spotDuration)
public Integer getSpotDuration()
public RunInstancesRequest setSpotInterruptionBehavior(String spotInterruptionBehavior)
public String getSpotInterruptionBehavior()
public RunInstancesRequest setSpotPriceLimit(Float spotPriceLimit)
public Float getSpotPriceLimit()
public RunInstancesRequest setSpotStrategy(String spotStrategy)
public String getSpotStrategy()
public RunInstancesRequest setStorageSetId(String storageSetId)
public String getStorageSetId()
public RunInstancesRequest setStorageSetPartitionNumber(Integer storageSetPartitionNumber)
public Integer getStorageSetPartitionNumber()
public RunInstancesRequest setTag(List<RunInstancesRequest.RunInstancesRequestTag> tag)
public List<RunInstancesRequest.RunInstancesRequestTag> getTag()
public RunInstancesRequest setTenancy(String tenancy)
public String getTenancy()
public RunInstancesRequest setUniqueSuffix(Boolean uniqueSuffix)
public Boolean getUniqueSuffix()
public RunInstancesRequest setUserData(String userData)
public String getUserData()
public RunInstancesRequest setVSwitchId(String vSwitchId)
public String getVSwitchId()
public RunInstancesRequest setZoneId(String zoneId)
public String getZoneId()
Copyright © 2024. All rights reserved.