All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.sdk.service.ens20171110.models.RunInstancesRequest Maven / Gradle / Ivy

The newest version!
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ens20171110.models;

import com.aliyun.sdk.gateway.pop.*;
import darabonba.core.*;
import darabonba.core.async.*;
import darabonba.core.sync.*;
import darabonba.core.client.*;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;

/**
 * 
 * {@link RunInstancesRequest} extends {@link RequestModel}
 *
 * 

RunInstancesRequest

*/ public class RunInstancesRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Amount") @com.aliyun.core.annotation.Validation(required = true, maximum = 100, minimum = 1) private Long amount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("AutoReleaseTime") private String autoReleaseTime; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("AutoRenew") private Boolean autoRenew; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("AutoUseCoupon") private String autoUseCoupon; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("BillingCycle") private String billingCycle; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Carrier") private String carrier; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataDisk") private java.util.List dataDisk; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("EnsRegionId") private String ensRegionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("HostName") private String hostName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ImageId") private String imageId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InstanceChargeStrategy") private String instanceChargeStrategy; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InstanceChargeType") @com.aliyun.core.annotation.Validation(required = true) private String instanceChargeType; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InstanceName") private String instanceName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InstanceType") @com.aliyun.core.annotation.Validation(required = true) private String instanceType; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InternetChargeType") private String internetChargeType; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InternetMaxBandwidthOut") @com.aliyun.core.annotation.Validation(required = true) private Long internetMaxBandwidthOut; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("IpType") private String ipType; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("KeyPairName") private String keyPairName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("NetDistrictCode") private String netDistrictCode; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("NetWorkId") private String netWorkId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Password") private String password; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PasswordInherit") private Boolean passwordInherit; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Period") private Long period; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PeriodUnit") private String periodUnit; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PrivateIpAddress") private String privateIpAddress; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PublicIpIdentification") private Boolean publicIpIdentification; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ScheduleAreaLevel") @com.aliyun.core.annotation.Validation(required = true) private String scheduleAreaLevel; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SchedulingPriceStrategy") private String schedulingPriceStrategy; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SchedulingStrategy") private String schedulingStrategy; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SecurityId") private String securityId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SpotDuration") private Integer spotDuration; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SpotStrategy") private String spotStrategy; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SystemDisk") private SystemDisk systemDisk; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Tag") private java.util.List tag; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("UniqueSuffix") private Boolean uniqueSuffix; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("UserData") private String userData; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("VSwitchId") private String vSwitchId; private RunInstancesRequest(Builder builder) { super(builder); this.amount = builder.amount; this.autoReleaseTime = builder.autoReleaseTime; this.autoRenew = builder.autoRenew; this.autoUseCoupon = builder.autoUseCoupon; this.billingCycle = builder.billingCycle; this.carrier = builder.carrier; this.dataDisk = builder.dataDisk; this.ensRegionId = builder.ensRegionId; this.hostName = builder.hostName; this.imageId = builder.imageId; this.instanceChargeStrategy = builder.instanceChargeStrategy; this.instanceChargeType = builder.instanceChargeType; this.instanceName = builder.instanceName; this.instanceType = builder.instanceType; this.internetChargeType = builder.internetChargeType; this.internetMaxBandwidthOut = builder.internetMaxBandwidthOut; this.ipType = builder.ipType; this.keyPairName = builder.keyPairName; this.netDistrictCode = builder.netDistrictCode; this.netWorkId = builder.netWorkId; this.password = builder.password; this.passwordInherit = builder.passwordInherit; this.period = builder.period; this.periodUnit = builder.periodUnit; this.privateIpAddress = builder.privateIpAddress; this.publicIpIdentification = builder.publicIpIdentification; this.scheduleAreaLevel = builder.scheduleAreaLevel; this.schedulingPriceStrategy = builder.schedulingPriceStrategy; this.schedulingStrategy = builder.schedulingStrategy; this.securityId = builder.securityId; this.spotDuration = builder.spotDuration; this.spotStrategy = builder.spotStrategy; this.systemDisk = builder.systemDisk; this.tag = builder.tag; this.uniqueSuffix = builder.uniqueSuffix; this.userData = builder.userData; this.vSwitchId = builder.vSwitchId; } public static Builder builder() { return new Builder(); } public static RunInstancesRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return amount */ public Long getAmount() { return this.amount; } /** * @return autoReleaseTime */ public String getAutoReleaseTime() { return this.autoReleaseTime; } /** * @return autoRenew */ public Boolean getAutoRenew() { return this.autoRenew; } /** * @return autoUseCoupon */ public String getAutoUseCoupon() { return this.autoUseCoupon; } /** * @return billingCycle */ public String getBillingCycle() { return this.billingCycle; } /** * @return carrier */ public String getCarrier() { return this.carrier; } /** * @return dataDisk */ public java.util.List getDataDisk() { return this.dataDisk; } /** * @return ensRegionId */ public String getEnsRegionId() { return this.ensRegionId; } /** * @return hostName */ public String getHostName() { return this.hostName; } /** * @return imageId */ public String getImageId() { return this.imageId; } /** * @return instanceChargeStrategy */ public String getInstanceChargeStrategy() { return this.instanceChargeStrategy; } /** * @return instanceChargeType */ public String getInstanceChargeType() { return this.instanceChargeType; } /** * @return instanceName */ public String getInstanceName() { return this.instanceName; } /** * @return instanceType */ public String getInstanceType() { return this.instanceType; } /** * @return internetChargeType */ public String getInternetChargeType() { return this.internetChargeType; } /** * @return internetMaxBandwidthOut */ public Long getInternetMaxBandwidthOut() { return this.internetMaxBandwidthOut; } /** * @return ipType */ public String getIpType() { return this.ipType; } /** * @return keyPairName */ public String getKeyPairName() { return this.keyPairName; } /** * @return netDistrictCode */ public String getNetDistrictCode() { return this.netDistrictCode; } /** * @return netWorkId */ public String getNetWorkId() { return this.netWorkId; } /** * @return password */ public String getPassword() { return this.password; } /** * @return passwordInherit */ public Boolean getPasswordInherit() { return this.passwordInherit; } /** * @return period */ public Long getPeriod() { return this.period; } /** * @return periodUnit */ public String getPeriodUnit() { return this.periodUnit; } /** * @return privateIpAddress */ public String getPrivateIpAddress() { return this.privateIpAddress; } /** * @return publicIpIdentification */ public Boolean getPublicIpIdentification() { return this.publicIpIdentification; } /** * @return scheduleAreaLevel */ public String getScheduleAreaLevel() { return this.scheduleAreaLevel; } /** * @return schedulingPriceStrategy */ public String getSchedulingPriceStrategy() { return this.schedulingPriceStrategy; } /** * @return schedulingStrategy */ public String getSchedulingStrategy() { return this.schedulingStrategy; } /** * @return securityId */ public String getSecurityId() { return this.securityId; } /** * @return spotDuration */ public Integer getSpotDuration() { return this.spotDuration; } /** * @return spotStrategy */ public String getSpotStrategy() { return this.spotStrategy; } /** * @return systemDisk */ public SystemDisk getSystemDisk() { return this.systemDisk; } /** * @return tag */ public java.util.List getTag() { return this.tag; } /** * @return uniqueSuffix */ public Boolean getUniqueSuffix() { return this.uniqueSuffix; } /** * @return userData */ public String getUserData() { return this.userData; } /** * @return vSwitchId */ public String getVSwitchId() { return this.vSwitchId; } public static final class Builder extends Request.Builder { private Long amount; private String autoReleaseTime; private Boolean autoRenew; private String autoUseCoupon; private String billingCycle; private String carrier; private java.util.List dataDisk; private String ensRegionId; private String hostName; private String imageId; private String instanceChargeStrategy; private String instanceChargeType; private String instanceName; private String instanceType; private String internetChargeType; private Long internetMaxBandwidthOut; private String ipType; private String keyPairName; private String netDistrictCode; private String netWorkId; private String password; private Boolean passwordInherit; private Long period; private String periodUnit; private String privateIpAddress; private Boolean publicIpIdentification; private String scheduleAreaLevel; private String schedulingPriceStrategy; private String schedulingStrategy; private String securityId; private Integer spotDuration; private String spotStrategy; private SystemDisk systemDisk; private java.util.List tag; private Boolean uniqueSuffix; private String userData; private String vSwitchId; private Builder() { super(); } private Builder(RunInstancesRequest request) { super(request); this.amount = request.amount; this.autoReleaseTime = request.autoReleaseTime; this.autoRenew = request.autoRenew; this.autoUseCoupon = request.autoUseCoupon; this.billingCycle = request.billingCycle; this.carrier = request.carrier; this.dataDisk = request.dataDisk; this.ensRegionId = request.ensRegionId; this.hostName = request.hostName; this.imageId = request.imageId; this.instanceChargeStrategy = request.instanceChargeStrategy; this.instanceChargeType = request.instanceChargeType; this.instanceName = request.instanceName; this.instanceType = request.instanceType; this.internetChargeType = request.internetChargeType; this.internetMaxBandwidthOut = request.internetMaxBandwidthOut; this.ipType = request.ipType; this.keyPairName = request.keyPairName; this.netDistrictCode = request.netDistrictCode; this.netWorkId = request.netWorkId; this.password = request.password; this.passwordInherit = request.passwordInherit; this.period = request.period; this.periodUnit = request.periodUnit; this.privateIpAddress = request.privateIpAddress; this.publicIpIdentification = request.publicIpIdentification; this.scheduleAreaLevel = request.scheduleAreaLevel; this.schedulingPriceStrategy = request.schedulingPriceStrategy; this.schedulingStrategy = request.schedulingStrategy; this.securityId = request.securityId; this.spotDuration = request.spotDuration; this.spotStrategy = request.spotStrategy; this.systemDisk = request.systemDisk; this.tag = request.tag; this.uniqueSuffix = request.uniqueSuffix; this.userData = request.userData; this.vSwitchId = request.vSwitchId; } /** *

The number of instances that you want to create. Valid values: 1 to 100.

*

This parameter is required.

* * example: *

1

*/ public Builder amount(Long amount) { this.putQueryParameter("Amount", amount); this.amount = amount; return this; } /** *

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 Coordinated Universal Time (UTC).

*
    *
  • If the value of ss is not 00, the start time is automatically rounded down to the nearest minute based on the value of mm.
  • *
  • The specified time must be at least one hour later than the current time.
  • *
*

Use the UTC time format: yyyy-MM-ddTHH:mmZ

* * example: *

2023-06-28T14:38:52Z

*/ public Builder autoReleaseTime(String autoReleaseTime) { this.putQueryParameter("AutoReleaseTime", autoReleaseTime); this.autoReleaseTime = autoReleaseTime; return this; } /** *

Specifies whether to enable auto-renewal. Valid values:

*
    *
  • true.
  • *
  • false (default).
  • *
*
*

This parameter is not available when InstanceChargeType is set to PostPaid.

*
* * example: *

true

*/ public Builder autoRenew(Boolean autoRenew) { this.putQueryParameter("AutoRenew", autoRenew); this.autoRenew = autoRenew; return this; } /** *

Specifies whether to use coupons. Default value: true.

* * example: *

true

*/ public Builder autoUseCoupon(String autoUseCoupon) { this.putQueryParameter("AutoUseCoupon", autoUseCoupon); this.autoUseCoupon = autoUseCoupon; return this; } /** *

The billing cycle of computing resources of the instance. Only pay-as-you-go instances are supported. Valid values:

*
    *
  • Day.
  • *
  • Month.
  • *
* * example: *

Day

*/ public Builder billingCycle(String billingCycle) { this.putQueryParameter("BillingCycle", billingCycle); this.billingCycle = billingCycle; return this; } /** *

The Internet service provider (ISP).

*
*

This parameter is not available if ScheduleAreaLevel is set to Region and is required if ScheduleAreaLevel is set to other values.

*
* * example: *

telecom

*/ public Builder carrier(String carrier) { this.putQueryParameter("Carrier", carrier); this.carrier = carrier; return this; } /** *

The specifications of data disks.

*/ public Builder dataDisk(java.util.List dataDisk) { String dataDiskShrink = shrink(dataDisk, "DataDisk", "json"); this.putQueryParameter("DataDisk", dataDiskShrink); this.dataDisk = dataDisk; return this; } /** *

The ID of the node.

*
*

This parameter is required if ScheduleAreaLevel is set to Region and is not available if ScheduleAreaLevel is set to other values.

*
* * example: *

cn-foshan-telecom

*/ public Builder ensRegionId(String ensRegionId) { this.putQueryParameter("EnsRegionId", ensRegionId); this.ensRegionId = ensRegionId; return this; } /** *

The name of the host.

* * example: *

test-HostName

*/ public Builder hostName(String hostName) { this.putQueryParameter("HostName", hostName); this.hostName = hostName; return this; } /** *

The ID of the image. For ARM PCB-based server instances, leave this parameter empty. For other instances, this parameter is required.

* * example: *

m-5si16wo6simkt267p8b7hcmy3

*/ public Builder imageId(String imageId) { this.putQueryParameter("ImageId", imageId); this.imageId = imageId; return this; } /** *

The billing policy of the instance. Valid values:

*
    *
  • instance: Bills are generated based on instances.
  • *
  • If you do not specify this parameter, bills are generated based on users.
  • *
* * example: *

instance

*/ public Builder instanceChargeStrategy(String instanceChargeStrategy) { this.putQueryParameter("InstanceChargeStrategy", instanceChargeStrategy); this.instanceChargeStrategy = instanceChargeStrategy; return this; } /** *

The billing method of the instance. Valid values:

*
    *
  • PrePaid: subscription.
  • *
  • PostPaid: pay-as-you-go.
  • *
*

This parameter is required.

* * example: *

PostPaid

*/ public Builder instanceChargeType(String instanceChargeType) { this.putQueryParameter("InstanceChargeType", instanceChargeType); this.instanceChargeType = instanceChargeType; return this; } /** *

The name of the instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

*

The default value of this parameter is the value of the InstanceId parameter.

* * example: *

TestName

*/ public Builder instanceName(String instanceName) { this.putQueryParameter("InstanceName", instanceName); this.instanceName = instanceName; return this; } /** *

The instance type.

*

This parameter is required.

* * example: *

ens.sn1.small

*/ public Builder instanceType(String instanceType) { this.putQueryParameter("InstanceType", instanceType); this.instanceType = instanceType; return this; } /** *

The bandwidth billing method. Valid values:

*
    *
  • BandwidthByDay: pay by daily peak bandwidth
  • *
  • 95BandwidthByMonth: pay by monthly 95th percentile bandwidth
  • *
*
*

This parameter is required if you purchase an ENS instance for the first time. The value that you specified is used as the default value for subsequent purchases.

*
* * example: *

BandwidthByDay

*/ public Builder internetChargeType(String internetChargeType) { this.putQueryParameter("InternetChargeType", internetChargeType); this.internetChargeType = internetChargeType; return this; } /** *

The maximum public bandwidth. If the value of this parameter is greater than 0, a public IP address is assigned to the instance.

*

This parameter is required.

* * example: *

1

*/ public Builder internetMaxBandwidthOut(Long internetMaxBandwidthOut) { this.putQueryParameter("InternetMaxBandwidthOut", internetMaxBandwidthOut); this.internetMaxBandwidthOut = internetMaxBandwidthOut; return this; } /** *

The type of the IP address. Examples:

*
    *
  • ipv4 (default).
  • *
  • ipv6.
  • *
  • ipv4Andipv6.
  • *
* * example: *

ipv4

*/ public Builder ipType(String ipType) { this.putQueryParameter("IpType", ipType); this.ipType = ipType; return this; } /** *

The name of the key pair.

*
*

You need to specify at least one of Password, KeyPairName, and PasswordInherit.

*
* * example: *

wx2-jumpserver

*/ public Builder keyPairName(String keyPairName) { this.putQueryParameter("KeyPairName", keyPairName); this.keyPairName = keyPairName; return this; } /** *

The code of the region.

*
*

This parameter is not available if ScheduleAreaLevel is set to Region and is required if ScheduleAreaLevel is set to other values.

*
* * example: *

350000

*/ public Builder netDistrictCode(String netDistrictCode) { this.putQueryParameter("NetDistrictCode", netDistrictCode); this.netDistrictCode = netDistrictCode; return this; } /** *

The ID of the network.

*
*

This parameter is available only if ScheduleAreaLevel is set to Region and cannot be configured if ScheduleAreaLevel is set to other values. Otherwise, an error occurs.

*
* * example: *

net-id

*/ public Builder netWorkId(String netWorkId) { this.putQueryParameter("NetWorkId", netWorkId); this.netWorkId = netWorkId; return this; } /** *

The password that is used to connect to the instance.

*
*

You need to specify at least one of Password, KeyPairName, and PasswordInherit.

*
* * example: *

testPassword

*/ public Builder password(String password) { this.putQueryParameter("Password", password); this.password = password; return this; } /** *

Specifies whether to use the preset password of the image. Valid values:

*
    *
  • true
  • *
  • false
  • *
*
*

You need to specify at least one of Password, KeyPairName, and PasswordInherit.

*
* * example: *

false

*/ public Builder passwordInherit(Boolean passwordInherit) { this.putQueryParameter("PasswordInherit", passwordInherit); this.passwordInherit = passwordInherit; return this; } /** *

The unit of the subscription period.

*
    *
  • If PeriodUnit is set to Day, Period can only be set to 3.
  • *
  • If PeriodUnit is Month, Period can be set to 1 to 9 or 12.
  • *
* * example: *

1-9,12

*/ public Builder period(Long period) { this.putQueryParameter("Period", period); this.period = period; return this; } /** *

The unit of the subscription period. Valid values:

*
    *
  • Month (default).
  • *
  • Day.
  • *
* * example: *

Month

*/ public Builder periodUnit(String periodUnit) { this.putQueryParameter("PeriodUnit", periodUnit); this.periodUnit = periodUnit; return this; } /** *

The private IP address.

*
*

This parameter is available only if ScheduleAreaLevel is set to Region and cannot be configured if ScheduleAreaLevel is set to other values. Otherwise, an error occurs. If you specify a private IP address, the number of instances must be 1. The private IP address takes effect only when the private IP address and the vSwitch ID are not empty.

*
* * example: *

10.0.0.120

*/ public Builder privateIpAddress(String privateIpAddress) { this.putQueryParameter("PrivateIpAddress", privateIpAddress); this.privateIpAddress = privateIpAddress; return this; } /** *

Specifies whether to enable public IP address identification. Valid values: true and false. Default value: false.

* * example: *

true

*/ public Builder publicIpIdentification(Boolean publicIpIdentification) { this.putQueryParameter("PublicIpIdentification", publicIpIdentification); this.publicIpIdentification = publicIpIdentification; return this; } /** *

The scheduling level. This parameter specifies area-level scheduling or node-level scheduling. Valid values:

*
    *
  • Big: greater area
  • *
  • Middle: province
  • *
  • Small: city
  • *
  • Region: node
  • *
*

This parameter is required.

* * example: *

Region

*/ public Builder scheduleAreaLevel(String scheduleAreaLevel) { this.putQueryParameter("ScheduleAreaLevel", scheduleAreaLevel); this.scheduleAreaLevel = scheduleAreaLevel; return this; } /** *

The scheduling price policy. Valid values:

*
    *
  • PriceHighPriority: The high price prevails.
  • *
  • PriceLowPriority: The low price prevails.
  • *
* * example: *

PriceHighPriority

*/ public Builder schedulingPriceStrategy(String schedulingPriceStrategy) { this.putQueryParameter("SchedulingPriceStrategy", schedulingPriceStrategy); this.schedulingPriceStrategy = schedulingPriceStrategy; return this; } /** *

The scheduling policy of the taint. Valid values:

*
    *
  • Concentrate
  • *
  • Disperse
  • *
*
*

If ScheduleAreaLevel is set to Region, set this parameter to Concentrate. If ScheduleAreaLevel is set to other values, set this parameter to Concentrate or Disperse based on your business requirements.

*
* * example: *

concentrate

*/ public Builder schedulingStrategy(String schedulingStrategy) { this.putQueryParameter("SchedulingStrategy", schedulingStrategy); this.schedulingStrategy = schedulingStrategy; return this; } /** *

The ID of security group.

* * example: *

sg-test

*/ public Builder securityId(String securityId) { this.putQueryParameter("SecurityId", securityId); this.securityId = securityId; return this; } /** * SpotDuration. */ public Builder spotDuration(Integer spotDuration) { this.putQueryParameter("SpotDuration", spotDuration); this.spotDuration = spotDuration; return this; } /** *

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:

*
    *
  • NoSpot: The instance is created as a regular pay-as-you-go instance.
  • *
  • SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is automatically used as the bidding price.
  • *
*

Default value: NoSpot.

* * example: *

SpotAsPriceGo

*/ public Builder spotStrategy(String spotStrategy) { this.putQueryParameter("SpotStrategy", spotStrategy); this.spotStrategy = spotStrategy; return this; } /** *

The specification of the system disk.

*/ public Builder systemDisk(SystemDisk systemDisk) { String systemDiskShrink = shrink(systemDisk, "SystemDisk", "json"); this.putQueryParameter("SystemDisk", systemDiskShrink); this.systemDisk = systemDisk; return this; } /** *

The tags.

*/ public Builder tag(java.util.List tag) { this.putQueryParameter("Tag", tag); this.tag = tag; return this; } /** *

Specifies whether to append sequential suffixes to the hostname specified by the HostName parameter and to the instance name specified by the InstanceName parameter. The sequential suffixes range from 001 to 999.

* * example: *

True

*/ public Builder uniqueSuffix(Boolean uniqueSuffix) { this.putQueryParameter("UniqueSuffix", uniqueSuffix); this.uniqueSuffix = uniqueSuffix; return this; } /** *

The custom data. The maximum data size is 16 KB. You can specify UserData. UserData must be Base64-encoded.

* * example: *

ZWtest

*/ public Builder userData(String userData) { this.putQueryParameter("UserData", userData); this.userData = userData; return this; } /** *

The ID of the vSwitch.

*
*

This parameter is available only if ScheduleAreaLevel is set to Region and cannot be configured if ScheduleAreaLevel is set to other values. Otherwise, an error occurs.

*
* * example: *

vsw-5sagnw7m613oulalkd10nv0ob

*/ public Builder vSwitchId(String vSwitchId) { this.putQueryParameter("VSwitchId", vSwitchId); this.vSwitchId = vSwitchId; return this; } @Override public RunInstancesRequest build() { return new RunInstancesRequest(this); } } /** * * {@link RunInstancesRequest} extends {@link TeaModel} * *

RunInstancesRequest

*/ public static class DataDisk extends TeaModel { @com.aliyun.core.annotation.NameInMap("Category") private String category; @com.aliyun.core.annotation.NameInMap("Encrypted") private Boolean encrypted; @com.aliyun.core.annotation.NameInMap("KMSKeyId") private String KMSKeyId; @com.aliyun.core.annotation.NameInMap("Size") private Long size; private DataDisk(Builder builder) { this.category = builder.category; this.encrypted = builder.encrypted; this.KMSKeyId = builder.KMSKeyId; this.size = builder.size; } public static Builder builder() { return new Builder(); } public static DataDisk create() { return builder().build(); } /** * @return category */ public String getCategory() { return this.category; } /** * @return encrypted */ public Boolean getEncrypted() { return this.encrypted; } /** * @return KMSKeyId */ public String getKMSKeyId() { return this.KMSKeyId; } /** * @return size */ public Long getSize() { return this.size; } public static final class Builder { private String category; private Boolean encrypted; private String KMSKeyId; private Long size; /** *

The category of the disk. Valid values:

*
    *
  • cloud_efficiency: ultra disk.
  • *
  • cloud_ssd: all-flash disk.
  • *
  • local_hdd: local HDD.
  • *
  • local_ssd: local SSD.
  • *
* * example: *

cloud_efficiency

*/ public Builder category(String category) { this.category = category; return this; } /** *

Indicates whether the cloud disk is encrypted. Valid values:

*
    *
  • true.
  • *
  • false (default).
  • *
* * example: *

false

*/ public Builder encrypted(Boolean encrypted) { this.encrypted = encrypted; return this; } /** *

The ID of the Key Management Service (KMS) key that is used for the disk. Valid values:

*
    *
  • true.
  • *
  • false (default).
  • *
*
*

If you set the Encrypted parameter to true, the default service key is used when the KMSKeyId parameter is empty.

*
* * example: *

false

*/ public Builder KMSKeyId(String KMSKeyId) { this.KMSKeyId = KMSKeyId; return this; } /** *

The size of a data disk. Unit: GiB.

* * example: *

20

*/ public Builder size(Long size) { this.size = size; return this; } public DataDisk build() { return new DataDisk(this); } } } /** * * {@link RunInstancesRequest} extends {@link TeaModel} * *

RunInstancesRequest

*/ public static class SystemDisk extends TeaModel { @com.aliyun.core.annotation.NameInMap("Category") private String category; @com.aliyun.core.annotation.NameInMap("Size") private Long size; private SystemDisk(Builder builder) { this.category = builder.category; this.size = builder.size; } public static Builder builder() { return new Builder(); } public static SystemDisk create() { return builder().build(); } /** * @return category */ public String getCategory() { return this.category; } /** * @return size */ public Long getSize() { return this.size; } public static final class Builder { private String category; private Long size; /** *

The category of the system disk.

* * example: *

local_ssd

*/ public Builder category(String category) { this.category = category; return this; } /** *

The size of the system disk. Unit: GiB.

* * example: *

50

*/ public Builder size(Long size) { this.size = size; return this; } public SystemDisk build() { return new SystemDisk(this); } } } /** * * {@link RunInstancesRequest} extends {@link TeaModel} * *

RunInstancesRequest

*/ public static class Tag extends TeaModel { @com.aliyun.core.annotation.NameInMap("Key") private String key; @com.aliyun.core.annotation.NameInMap("Value") private String value; private Tag(Builder builder) { this.key = builder.key; this.value = builder.value; } public static Builder builder() { return new Builder(); } public static Tag create() { return builder().build(); } /** * @return key */ public String getKey() { return this.key; } /** * @return value */ public String getValue() { return this.value; } public static final class Builder { private String key; private String value; /** *

The key of the tag.

* * example: *

team

*/ public Builder key(String key) { this.key = key; return this; } /** *

The value of the tag.

* * example: *

tagValue

*/ public Builder value(String value) { this.value = value; return this; } public Tag build() { return new Tag(this); } } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy