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

com.aliyun.sdk.service.ecs20140526.models.CreateInstanceRequest Maven / Gradle / Ivy

There is a newer version: 5.0.29
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;

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

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

CreateInstanceRequest

*/ public class CreateInstanceRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("HibernationOptions") private HibernationOptions hibernationOptions; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PrivatePoolOptions") private PrivatePoolOptions privatePoolOptions; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SystemDisk") private SystemDisk systemDisk; @com.aliyun.core.annotation.Host @com.aliyun.core.annotation.NameInMap("SourceRegionId") private String sourceRegionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Affinity") private String affinity; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Arn") private java.util.List < Arn> arn; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("AutoRenew") private Boolean autoRenew; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("AutoRenewPeriod") private Integer autoRenewPeriod; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ClientToken") private String clientToken; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ClusterId") private String clusterId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("CreditSpecification") private String creditSpecification; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DataDisk") private java.util.List < DataDisk> dataDisk; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DedicatedHostId") private String dedicatedHostId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DeletionProtection") private Boolean deletionProtection; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DeploymentSetGroupNo") private Integer deploymentSetGroupNo; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DeploymentSetId") private String deploymentSetId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Description") private String description; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DryRun") private Boolean dryRun; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("HostName") private String hostName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("HpcClusterId") private String hpcClusterId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("HttpEndpoint") private String httpEndpoint; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("HttpPutResponseHopLimit") private Integer httpPutResponseHopLimit; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("HttpTokens") private String httpTokens; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ImageFamily") private String imageFamily; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ImageId") private String imageId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InnerIpAddress") private String innerIpAddress; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InstanceChargeType") 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("InternetMaxBandwidthIn") @com.aliyun.core.annotation.Validation(maximum = 200, minimum = 1) private Integer internetMaxBandwidthIn; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InternetMaxBandwidthOut") private Integer internetMaxBandwidthOut; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("IoOptimized") private String ioOptimized; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("KeyPairName") private String keyPairName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("NodeControllerId") private String nodeControllerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerAccount") private String ownerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerId") private Long ownerId; @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 Integer 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("RamRoleName") private String ramRoleName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("RegionId") @com.aliyun.core.annotation.Validation(required = true) private String regionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceGroupId") private String resourceGroupId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerId") private Long resourceOwnerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SecurityEnhancementStrategy") private String securityEnhancementStrategy; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SecurityGroupId") private String securityGroupId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SpotDuration") @com.aliyun.core.annotation.Validation(maximum = 6) private Integer spotDuration; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SpotInterruptionBehavior") private String spotInterruptionBehavior; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SpotPriceLimit") private Float spotPriceLimit; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("SpotStrategy") private String spotStrategy; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("StorageSetId") private String storageSetId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("StorageSetPartitionNumber") private Integer storageSetPartitionNumber; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Tag") private java.util.List < Tag> tag; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Tenancy") private String tenancy; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("UseAdditionalService") private Boolean useAdditionalService; @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; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("VlanId") private String vlanId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ZoneId") private String zoneId; private CreateInstanceRequest(Builder builder) { super(builder); this.hibernationOptions = builder.hibernationOptions; this.privatePoolOptions = builder.privatePoolOptions; this.systemDisk = builder.systemDisk; this.sourceRegionId = builder.sourceRegionId; this.affinity = builder.affinity; this.arn = builder.arn; this.autoRenew = builder.autoRenew; this.autoRenewPeriod = builder.autoRenewPeriod; this.clientToken = builder.clientToken; this.clusterId = builder.clusterId; this.creditSpecification = builder.creditSpecification; this.dataDisk = builder.dataDisk; this.dedicatedHostId = builder.dedicatedHostId; this.deletionProtection = builder.deletionProtection; this.deploymentSetGroupNo = builder.deploymentSetGroupNo; this.deploymentSetId = builder.deploymentSetId; this.description = builder.description; this.dryRun = builder.dryRun; this.hostName = builder.hostName; this.hpcClusterId = builder.hpcClusterId; this.httpEndpoint = builder.httpEndpoint; this.httpPutResponseHopLimit = builder.httpPutResponseHopLimit; this.httpTokens = builder.httpTokens; this.imageFamily = builder.imageFamily; this.imageId = builder.imageId; this.innerIpAddress = builder.innerIpAddress; this.instanceChargeType = builder.instanceChargeType; this.instanceName = builder.instanceName; this.instanceType = builder.instanceType; this.internetChargeType = builder.internetChargeType; this.internetMaxBandwidthIn = builder.internetMaxBandwidthIn; this.internetMaxBandwidthOut = builder.internetMaxBandwidthOut; this.ioOptimized = builder.ioOptimized; this.keyPairName = builder.keyPairName; this.nodeControllerId = builder.nodeControllerId; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.password = builder.password; this.passwordInherit = builder.passwordInherit; this.period = builder.period; this.periodUnit = builder.periodUnit; this.privateIpAddress = builder.privateIpAddress; this.ramRoleName = builder.ramRoleName; this.regionId = builder.regionId; this.resourceGroupId = builder.resourceGroupId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.securityEnhancementStrategy = builder.securityEnhancementStrategy; this.securityGroupId = builder.securityGroupId; this.spotDuration = builder.spotDuration; this.spotInterruptionBehavior = builder.spotInterruptionBehavior; this.spotPriceLimit = builder.spotPriceLimit; this.spotStrategy = builder.spotStrategy; this.storageSetId = builder.storageSetId; this.storageSetPartitionNumber = builder.storageSetPartitionNumber; this.tag = builder.tag; this.tenancy = builder.tenancy; this.useAdditionalService = builder.useAdditionalService; this.userData = builder.userData; this.vSwitchId = builder.vSwitchId; this.vlanId = builder.vlanId; this.zoneId = builder.zoneId; } public static Builder builder() { return new Builder(); } public static CreateInstanceRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return hibernationOptions */ public HibernationOptions getHibernationOptions() { return this.hibernationOptions; } /** * @return privatePoolOptions */ public PrivatePoolOptions getPrivatePoolOptions() { return this.privatePoolOptions; } /** * @return systemDisk */ public SystemDisk getSystemDisk() { return this.systemDisk; } /** * @return sourceRegionId */ public String getSourceRegionId() { return this.sourceRegionId; } /** * @return affinity */ public String getAffinity() { return this.affinity; } /** * @return arn */ public java.util.List < Arn> getArn() { return this.arn; } /** * @return autoRenew */ public Boolean getAutoRenew() { return this.autoRenew; } /** * @return autoRenewPeriod */ public Integer getAutoRenewPeriod() { return this.autoRenewPeriod; } /** * @return clientToken */ public String getClientToken() { return this.clientToken; } /** * @return clusterId */ public String getClusterId() { return this.clusterId; } /** * @return creditSpecification */ public String getCreditSpecification() { return this.creditSpecification; } /** * @return dataDisk */ public java.util.List < DataDisk> getDataDisk() { return this.dataDisk; } /** * @return dedicatedHostId */ public String getDedicatedHostId() { return this.dedicatedHostId; } /** * @return deletionProtection */ public Boolean getDeletionProtection() { return this.deletionProtection; } /** * @return deploymentSetGroupNo */ public Integer getDeploymentSetGroupNo() { return this.deploymentSetGroupNo; } /** * @return deploymentSetId */ public String getDeploymentSetId() { return this.deploymentSetId; } /** * @return description */ public String getDescription() { return this.description; } /** * @return dryRun */ public Boolean getDryRun() { return this.dryRun; } /** * @return hostName */ public String getHostName() { return this.hostName; } /** * @return hpcClusterId */ public String getHpcClusterId() { return this.hpcClusterId; } /** * @return httpEndpoint */ public String getHttpEndpoint() { return this.httpEndpoint; } /** * @return httpPutResponseHopLimit */ public Integer getHttpPutResponseHopLimit() { return this.httpPutResponseHopLimit; } /** * @return httpTokens */ public String getHttpTokens() { return this.httpTokens; } /** * @return imageFamily */ public String getImageFamily() { return this.imageFamily; } /** * @return imageId */ public String getImageId() { return this.imageId; } /** * @return innerIpAddress */ public String getInnerIpAddress() { return this.innerIpAddress; } /** * @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 internetMaxBandwidthIn */ public Integer getInternetMaxBandwidthIn() { return this.internetMaxBandwidthIn; } /** * @return internetMaxBandwidthOut */ public Integer getInternetMaxBandwidthOut() { return this.internetMaxBandwidthOut; } /** * @return ioOptimized */ public String getIoOptimized() { return this.ioOptimized; } /** * @return keyPairName */ public String getKeyPairName() { return this.keyPairName; } /** * @return nodeControllerId */ public String getNodeControllerId() { return this.nodeControllerId; } /** * @return ownerAccount */ public String getOwnerAccount() { return this.ownerAccount; } /** * @return ownerId */ public Long getOwnerId() { return this.ownerId; } /** * @return password */ public String getPassword() { return this.password; } /** * @return passwordInherit */ public Boolean getPasswordInherit() { return this.passwordInherit; } /** * @return period */ public Integer getPeriod() { return this.period; } /** * @return periodUnit */ public String getPeriodUnit() { return this.periodUnit; } /** * @return privateIpAddress */ public String getPrivateIpAddress() { return this.privateIpAddress; } /** * @return ramRoleName */ public String getRamRoleName() { return this.ramRoleName; } /** * @return regionId */ public String getRegionId() { return this.regionId; } /** * @return resourceGroupId */ public String getResourceGroupId() { return this.resourceGroupId; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return resourceOwnerId */ public Long getResourceOwnerId() { return this.resourceOwnerId; } /** * @return securityEnhancementStrategy */ public String getSecurityEnhancementStrategy() { return this.securityEnhancementStrategy; } /** * @return securityGroupId */ public String getSecurityGroupId() { return this.securityGroupId; } /** * @return spotDuration */ public Integer getSpotDuration() { return this.spotDuration; } /** * @return spotInterruptionBehavior */ public String getSpotInterruptionBehavior() { return this.spotInterruptionBehavior; } /** * @return spotPriceLimit */ public Float getSpotPriceLimit() { return this.spotPriceLimit; } /** * @return spotStrategy */ public String getSpotStrategy() { return this.spotStrategy; } /** * @return storageSetId */ public String getStorageSetId() { return this.storageSetId; } /** * @return storageSetPartitionNumber */ public Integer getStorageSetPartitionNumber() { return this.storageSetPartitionNumber; } /** * @return tag */ public java.util.List < Tag> getTag() { return this.tag; } /** * @return tenancy */ public String getTenancy() { return this.tenancy; } /** * @return useAdditionalService */ public Boolean getUseAdditionalService() { return this.useAdditionalService; } /** * @return userData */ public String getUserData() { return this.userData; } /** * @return vSwitchId */ public String getVSwitchId() { return this.vSwitchId; } /** * @return vlanId */ public String getVlanId() { return this.vlanId; } /** * @return zoneId */ public String getZoneId() { return this.zoneId; } public static final class Builder extends Request.Builder { private HibernationOptions hibernationOptions; private PrivatePoolOptions privatePoolOptions; private SystemDisk systemDisk; private String sourceRegionId; private String affinity; private java.util.List < Arn> arn; private Boolean autoRenew; private Integer autoRenewPeriod; private String clientToken; private String clusterId; private String creditSpecification; private java.util.List < DataDisk> dataDisk; private String dedicatedHostId; private Boolean deletionProtection; private Integer deploymentSetGroupNo; private String deploymentSetId; private String description; private Boolean dryRun; private String hostName; private String hpcClusterId; private String httpEndpoint; private Integer httpPutResponseHopLimit; private String httpTokens; private String imageFamily; private String imageId; private String innerIpAddress; private String instanceChargeType; private String instanceName; private String instanceType; private String internetChargeType; private Integer internetMaxBandwidthIn; private Integer internetMaxBandwidthOut; private String ioOptimized; private String keyPairName; private String nodeControllerId; private String ownerAccount; private Long ownerId; private String password; private Boolean passwordInherit; private Integer period; private String periodUnit; private String privateIpAddress; private String ramRoleName; private String regionId; private String resourceGroupId; private String resourceOwnerAccount; private Long resourceOwnerId; private String securityEnhancementStrategy; private String securityGroupId; private Integer spotDuration; private String spotInterruptionBehavior; private Float spotPriceLimit; private String spotStrategy; private String storageSetId; private Integer storageSetPartitionNumber; private java.util.List < Tag> tag; private String tenancy; private Boolean useAdditionalService; private String userData; private String vSwitchId; private String vlanId; private String zoneId; private Builder() { super(); } private Builder(CreateInstanceRequest request) { super(request); this.hibernationOptions = request.hibernationOptions; this.privatePoolOptions = request.privatePoolOptions; this.systemDisk = request.systemDisk; this.sourceRegionId = request.sourceRegionId; this.affinity = request.affinity; this.arn = request.arn; this.autoRenew = request.autoRenew; this.autoRenewPeriod = request.autoRenewPeriod; this.clientToken = request.clientToken; this.clusterId = request.clusterId; this.creditSpecification = request.creditSpecification; this.dataDisk = request.dataDisk; this.dedicatedHostId = request.dedicatedHostId; this.deletionProtection = request.deletionProtection; this.deploymentSetGroupNo = request.deploymentSetGroupNo; this.deploymentSetId = request.deploymentSetId; this.description = request.description; this.dryRun = request.dryRun; this.hostName = request.hostName; this.hpcClusterId = request.hpcClusterId; this.httpEndpoint = request.httpEndpoint; this.httpPutResponseHopLimit = request.httpPutResponseHopLimit; this.httpTokens = request.httpTokens; this.imageFamily = request.imageFamily; this.imageId = request.imageId; this.innerIpAddress = request.innerIpAddress; this.instanceChargeType = request.instanceChargeType; this.instanceName = request.instanceName; this.instanceType = request.instanceType; this.internetChargeType = request.internetChargeType; this.internetMaxBandwidthIn = request.internetMaxBandwidthIn; this.internetMaxBandwidthOut = request.internetMaxBandwidthOut; this.ioOptimized = request.ioOptimized; this.keyPairName = request.keyPairName; this.nodeControllerId = request.nodeControllerId; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.password = request.password; this.passwordInherit = request.passwordInherit; this.period = request.period; this.periodUnit = request.periodUnit; this.privateIpAddress = request.privateIpAddress; this.ramRoleName = request.ramRoleName; this.regionId = request.regionId; this.resourceGroupId = request.resourceGroupId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.securityEnhancementStrategy = request.securityEnhancementStrategy; this.securityGroupId = request.securityGroupId; this.spotDuration = request.spotDuration; this.spotInterruptionBehavior = request.spotInterruptionBehavior; this.spotPriceLimit = request.spotPriceLimit; this.spotStrategy = request.spotStrategy; this.storageSetId = request.storageSetId; this.storageSetPartitionNumber = request.storageSetPartitionNumber; this.tag = request.tag; this.tenancy = request.tenancy; this.useAdditionalService = request.useAdditionalService; this.userData = request.userData; this.vSwitchId = request.vSwitchId; this.vlanId = request.vlanId; this.zoneId = request.zoneId; } /** * HibernationOptions. */ public Builder hibernationOptions(HibernationOptions hibernationOptions) { this.putQueryParameter("HibernationOptions", hibernationOptions); this.hibernationOptions = hibernationOptions; return this; } /** * PrivatePoolOptions. */ public Builder privatePoolOptions(PrivatePoolOptions privatePoolOptions) { this.putQueryParameter("PrivatePoolOptions", privatePoolOptions); this.privatePoolOptions = privatePoolOptions; return this; } /** * SystemDisk. */ public Builder systemDisk(SystemDisk systemDisk) { this.putQueryParameter("SystemDisk", systemDisk); this.systemDisk = systemDisk; return this; } /** * SourceRegionId. */ public Builder sourceRegionId(String sourceRegionId) { this.putHostParameter("SourceRegionId", sourceRegionId); this.sourceRegionId = sourceRegionId; return this; } /** *

Specifies whether to associate the instance on a dedicated host with the dedicated host. Valid values:

*
    *
  • default: does not associate the 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 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.

* * example: *

default

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

This parameter is in invitational preview and is not publicly available.

*
*/ public Builder arn(java.util.List < Arn> arn) { this.putQueryParameter("Arn", arn); this.arn = arn; return this; } /** *

Specifies whether to enable auto-renewal for the instance. This parameter is valid only if InstanceChargeType is set to PrePaid. Valid values:

*
    *
  • true: enables auto-renewal.
  • *
  • false: does not enable auto-renewal.
  • *
* * example: *

true

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

The auto-renewal period of the instance. This parameter is required if AutoRenew is set to true.

*

Valid values if PeriodUnit is set to Month: 1, 2, 3, 6, and 12.

* * example: *

2

*/ public Builder autoRenewPeriod(Integer autoRenewPeriod) { this.putQueryParameter("AutoRenewPeriod", autoRenewPeriod); this.autoRenewPeriod = autoRenewPeriod; return this; } /** *

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

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

The ID of the cluster in which to create the instance.

*
*

This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility.

*
* * example: *

c-bp67acfmxazb4p****

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

The performance mode of the burstable instance. Valid values:

* * * example: *

Standard

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

The data disks.

*/ public Builder dataDisk(java.util.List < DataDisk> dataDisk) { this.putQueryParameter("DataDisk", dataDisk); this.dataDisk = dataDisk; return this; } /** *

The ID of the dedicated host on which to create the instance.

*

You can call the DescribeDedicatedHosts operation to query the list of dedicated host IDs

*

If you specify DedicatedHostId, the SpotStrategy and SpotPriceLimit parameters are ignored. This is because preemptible instances cannot be created on dedicated hosts.

* * example: *

dh-bp67acfmxazb4p****

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

Specifies whether to enable release protection for the instance. This parameter indicates whether you can use the ECS console or call the DeleteInstance operation to release the instance.

*
    *
  • true: enables release protection.
  • *
  • false (default): disables release protection.
  • *
*
*

This parameter is applicable only to pay-as-you-go instances. It can protect instances against manual releases, but not against automatic releases.

*
* * example: *

false

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

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

*/ public Builder deploymentSetGroupNo(Integer deploymentSetGroupNo) { this.putQueryParameter("DeploymentSetGroupNo", deploymentSetGroupNo); this.deploymentSetGroupNo = deploymentSetGroupNo; return this; } /** *

The ID of the deployment set to which to deploy the instance.

* * example: *

ds-bp1brhwhoqinyjd6****

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

The description of the instance. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

*

This parameter is empty by default.

* * example: *

InstanceTest

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

Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*
    *
  • true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, service limits, and unavailable ECS resources. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
  • *
  • false (default): performs a dry run and performs the actual request. If the request passes the dry run, the operation is performed.
  • *
* * example: *

false

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

The hostname of the instance.

*
    *
  • The hostname cannot start or end with a period (.) or hyphen (-). It cannot contain consecutive periods (.) or hyphens (-).
  • *
  • For a Windows instance, 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 an instance that runs another type of operating system such as Linux, the hostname must be 2 to 64 characters in length. You can use periods (.) to separate the hostname into multiple segments. Each segment can contain letters, digits, and hyphens (-).
  • *
* * example: *

LocalHostName

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

The ID of the high performance computing (HPC) cluster to which to assign the instance.

* * example: *

hpc-bp67acfmxazb4p****

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

Specifies whether to enable the access channel for instance metadata. Valid values:

*
    *
  • enabled
  • *
  • disabled
  • *
*

Default value: enabled.

*
*

For more information about instance metadata, see Overview of instance metadata.

*
* * example: *

enabled

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

This parameter is in invitational preview and is not publicly available.

*
* * example: *

0

*/ public Builder httpPutResponseHopLimit(Integer httpPutResponseHopLimit) { this.putQueryParameter("HttpPutResponseHopLimit", httpPutResponseHopLimit); this.httpPutResponseHopLimit = httpPutResponseHopLimit; return this; } /** *

Specifies whether to forcibly use the security hardening mode (IMDSv2) to access instance metadata. Valid values:

*
    *
  • optional: does not forcefully use the security hardening mode (IMDSv2).
  • *
  • required: forcefully uses the security hardening mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode.
  • *
*

Default value: optional.

*
*

For more information about the modes of accessing instance metadata, see Access mode of instance metadata.

*
* * example: *

optional

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

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.
  • *
* * example: *

hangzhou-daily-update

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

The ID of the image to use to create the instance. To use an Alibaba Cloud Marketplace image, you can view the image ID on the product page of the Alibaba Cloud Marketplace image. This parameter is required if you do not specify ImageFamily to obtain the latest available custom image from the specified image family.

* * example: *

ubuntu_18_04_64_20G_alibase_20190624.vhd

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

The internal IP address to assign to the instance.

* * example: *

192.168.**.**

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

The billing method of the instance. Valid values:

*
    *
  • PrePaid: subscription. If you set this parameter to PrePaid, make sure that you have sufficient balance or credit in your account. Otherwise, an InvalidPayMethod error is returned.
  • *
  • PostPaid (default): pay-as-you-go.
  • *
* * example: *

PrePaid

*/ 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 (-). If you do not specify this parameter, the instance ID is used as the instance name by default.

* * example: *

2018-12-06T103200Z

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

The instance type.

* *

This parameter is required.

* * example: *

ecs.g6.large

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

The billing method for network usage. Default value: PayByTraffic. Valid values:

*
    *
  • PayByBandwidth: pay-by-bandwidth
  • *
  • PayByTraffic (default): pay-by-traffic
  • *
*
*

When the pay-by-traffic billing method is used for network usage, 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 be limited. If you want guaranteed bandwidths for your instance, use the pay-by-bandwidth billing method for network usage.

*
* * example: *

PayByTraffic

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

The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:

*
    *
  • When the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter are 1 to 10 and the default value is 10.
  • *
  • When the purchased outbound public bandwidth is greater than 10 Mbit/s, the valid values of this parameter are 1 to the InternetMaxBandwidthOut value and the default value is the InternetMaxBandwidthOut value.
  • *
* * example: *

50

*/ public Builder internetMaxBandwidthIn(Integer internetMaxBandwidthIn) { this.putQueryParameter("InternetMaxBandwidthIn", internetMaxBandwidthIn); this.internetMaxBandwidthIn = internetMaxBandwidthIn; return this; } /** *

The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100.

*

Default value: 0.

* * example: *

5

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

Specifies whether the instance is I/O optimized. Valid values:

*
    *
  • none: The instance is not I/O optimized.
  • *
  • optimized: The ECS instance is I/O optimized.
  • *
*

For retired instance types, the default value is none. For more information, see Retired instance types.

*

For other instance types, the default value is optimized.

* * example: *

optimized

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

The name of the key pair.

*
*

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.

*
* * example: *

KeyPairTestName

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

This parameter is in invitational preview and is not publicly available.

*
* * example: *

hide

*/ public Builder nodeControllerId(String nodeControllerId) { this.putQueryParameter("NodeControllerId", nodeControllerId); this.nodeControllerId = nodeControllerId; return this; } /** * OwnerAccount. */ public Builder ownerAccount(String ownerAccount) { this.putQueryParameter("OwnerAccount", ownerAccount); this.ownerAccount = ownerAccount; return this; } /** * OwnerId. */ public Builder ownerId(Long ownerId) { this.putQueryParameter("OwnerId", ownerId); this.ownerId = ownerId; return this; } /** *

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. The following special characters are supported:

*
( ) ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; \" < > , . ? /
         * 
*

Take note of the following items:

*
    *
  • For security reasons, we recommend that you use HTTPS to send requests if the Password parameter is specified.
  • *
  • Passwords of Windows instances cannot start with a forward slash (/).
  • *
  • Passwords cannot be set for instances that run specific types of operating systems such as Others Linux and Fedora CoreOS. For these instances, only key pairs can be set.
  • *
* * example: *

TestEcs123!

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

Specifies whether to use the password preset in the image. When you use this parameter, leave the Password parameter empty and make sure that the selected image has a password preset.

* * example: *

false

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

The subscription period of the instance. The unit is specified by PeriodUnit. This parameter is valid and required only when InstanceChargeType is set to PrePaid. If DedicatedHostId is specified, the value of Period must not exceed the subscription period of the specified dedicated host. Valid values:

*

Valid values if PeriodUnit is set to Month: 1, 2, 3, 6, and 12.

* * example: *

1

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

The unit of the subscription period. Valid values:

*

Month

*

Default value: Month.

* * example: *

Month

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

The private IP address to assign to the instance. The private IP address must be an available IP address in the CIDR block of the specified vSwitch.

* * example: *

172.16.236.*

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

The name of the instance Resource Access Management (RAM) role. You can call the ListRoles operation provided by RAM to query the instance RAM roles that you created.

* * example: *

RAMTestName

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

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

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

The ID of the resource group to which to assign the instance.

* * example: *

rg-bp67acfmxazb4p****

*/ public Builder resourceGroupId(String resourceGroupId) { this.putQueryParameter("ResourceGroupId", resourceGroupId); this.resourceGroupId = resourceGroupId; return this; } /** * ResourceOwnerAccount. */ public Builder resourceOwnerAccount(String resourceOwnerAccount) { this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); this.resourceOwnerAccount = resourceOwnerAccount; return this; } /** * ResourceOwnerId. */ public Builder resourceOwnerId(Long resourceOwnerId) { this.putQueryParameter("ResourceOwnerId", resourceOwnerId); this.resourceOwnerId = resourceOwnerId; return this; } /** *

Specifies whether to enable security hardening. Valid values:

*
    *
  • Active: enables security hardening. This value applies only to public images.
  • *
  • Deactive: disables security hardening. This value is applicable to all images.
  • *
* * example: *

Active

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

The ID of the security group to which to assign the instance.

* * example: *

sg-bp15ed6xe1yxeycg****

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

The protection period of the preemptible instance. Unit: hours. Default value: 1. Valid values:

*
    *
  • 1: After a preemptible instance is created, Alibaba Cloud 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 preemptible instance is created, Alibaba Cloud does not ensure that the instance runs for 1 hour. The system compares the bid price with the market price and checks the resource inventory to determine whether to retain or release the instance.
  • *
*

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.

*
*

This parameter takes effect only if the SpotStrategy parameter is set to SpotWithPriceLimit or SpotAsPriceGo.

*
* * example: *

1

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

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

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

The maximum hourly price of the instance. The value is accurate to three decimal places. This parameter is valid only when SpotStrategy is set to SpotWithPriceLimit.

* * example: *

0.98

*/ public Builder spotPriceLimit(Float spotPriceLimit) { this.putQueryParameter("SpotPriceLimit", spotPriceLimit); this.spotPriceLimit = spotPriceLimit; return this; } /** *

The bidding policy for the pay-as-you-go instance. This parameter is valid only if you set InstanceChargeType to PostPaid. Valid values:

*
    *
  • NoSpot (default): The instance is created as a regular pay-as-you-go instance.
  • *
  • SpotWithPriceLimit: The instance is a preemptible instance for which you specify the maximum hourly price.
  • *
  • SpotAsPriceGo: The instance is a preemptible instance for which the market price at the time of purchase is automatically used as the bid price. The market price can be up to the pay-as-you-go price.
  • *
* * example: *

NoSpot

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

The ID of the storage set.

* * example: *

ss-bp1j4i2jdf3owlhe****

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

The maximum number of partitions in the storage set. Valid values: greater than or equal to 2.

* * example: *

2

*/ public Builder storageSetPartitionNumber(Integer storageSetPartitionNumber) { this.putQueryParameter("StorageSetPartitionNumber", storageSetPartitionNumber); this.storageSetPartitionNumber = storageSetPartitionNumber; return this; } /** *

The tags to add to the instance.

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

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.

* * example: *

default

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

Specifies whether to use the system configurations for virtual machines. Alibaba Cloud provides the Network Time Protocol (NTP) and Key Management Service (KMS) system configurations for Windows and the NTP and Yellowdog Updater, Modified (YUM) system configurations for Linux.

* * example: *

true

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

The user data of the instance. The user data must be encoded in Base64. The maximum size of raw data is 16 KB.

* * example: *

ZWNobyBoZWxsbyBlY3Mh

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

The ID of the vSwitch to which to connect the instance. This parameter is required when you create an instance in a VPC. You can call the DescribeVSwitches operation to query available vSwitches.

*
*

If VSwitchId is specified, the zone specified by ZoneId must be the zone where the specified vSwitch resides. You can also leave ZoneId empty. Then, the system selects the zone where the specified vSwitch resides.

*
* * example: *

vsw-bp1s5fnvk4gn2tws0****

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

The ID of the virtual LAN (VLAN).

* * example: *

10

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

The ID of the zone in which to create the instance. You can call the DescribeZones operation to query the zones in a specific region.

*
*

If VSwitchId is specified, the zone specified by ZoneId must be the zone where the specified vSwitch resides. You can also leave ZoneId empty. Then, the system selects the zone where the specified vSwitch resides.

*
*

This parameter is empty by default.

* * example: *

cn-hangzhou-g

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

CreateInstanceRequest

*/ public static class HibernationOptions extends TeaModel { @com.aliyun.core.annotation.NameInMap("Configured") private Boolean configured; private HibernationOptions(Builder builder) { this.configured = builder.configured; } public static Builder builder() { return new Builder(); } public static HibernationOptions create() { return builder().build(); } /** * @return configured */ public Boolean getConfigured() { return this.configured; } public static final class Builder { private Boolean configured; /** *
*

This parameter is in invitational preview and is not publicly available.

*
* * example: *

false

*/ public Builder configured(Boolean configured) { this.configured = configured; return this; } public HibernationOptions build() { return new HibernationOptions(this); } } } /** * * {@link CreateInstanceRequest} extends {@link TeaModel} * *

CreateInstanceRequest

*/ public static class PrivatePoolOptions extends TeaModel { @com.aliyun.core.annotation.NameInMap("Id") private String id; @com.aliyun.core.annotation.NameInMap("MatchCriteria") private String matchCriteria; private PrivatePoolOptions(Builder builder) { this.id = builder.id; this.matchCriteria = builder.matchCriteria; } public static Builder builder() { return new Builder(); } public static PrivatePoolOptions create() { return builder().build(); } /** * @return id */ public String getId() { return this.id; } /** * @return matchCriteria */ public String getMatchCriteria() { return this.matchCriteria; } public static final class Builder { private String id; private String matchCriteria; /** *

The ID of the private pool. The ID of a private pool is the same as that of the elasticity assurance or capacity reservation for which the private pool is generated.

* * example: *

eap-bp67acfmxazb4****

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

The type of the private pool to use to start the instance. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. You can select a private pool to start instances. Valid values:

*
    *
  • Open: open private pool. The system selects a matching open private pool to start the instance. If no matching open private pools are found, resources in the public pool are used. When you set this parameter to Open, you can leave the PrivatePoolOptions.Id parameter empty.
  • *
  • Target: specified private pool. The system uses the capacity in a specified private pool to start the instance. If the specified private pool is unavailable, the instance cannot be started. If you set this parameter to Target, you must specify the PrivatePoolOptions.Id parameter.
  • *
  • None: no private pool. The capacity in private pools is not used.
  • *
*

Default value: none.

*

In the following scenarios, the PrivatePoolOptions.MatchCriteria parameter can be set only to None or left empty:

*
    *
  • Create a preemptible instance.
  • *
  • Create an instance in the classic network.
  • *
  • Create an instance on a dedicated host.
  • *
* * example: *

Open

*/ public Builder matchCriteria(String matchCriteria) { this.matchCriteria = matchCriteria; return this; } public PrivatePoolOptions build() { return new PrivatePoolOptions(this); } } } /** * * {@link CreateInstanceRequest} extends {@link TeaModel} * *

CreateInstanceRequest

*/ public static class SystemDisk extends TeaModel { @com.aliyun.core.annotation.NameInMap("Category") private String category; @com.aliyun.core.annotation.NameInMap("Description") private String description; @com.aliyun.core.annotation.NameInMap("DiskName") private String diskName; @com.aliyun.core.annotation.NameInMap("PerformanceLevel") private String performanceLevel; @com.aliyun.core.annotation.NameInMap("Size") private Integer size; @com.aliyun.core.annotation.NameInMap("StorageClusterId") private String storageClusterId; private SystemDisk(Builder builder) { this.category = builder.category; this.description = builder.description; this.diskName = builder.diskName; this.performanceLevel = builder.performanceLevel; this.size = builder.size; this.storageClusterId = builder.storageClusterId; } public static Builder builder() { return new Builder(); } public static SystemDisk create() { return builder().build(); } /** * @return category */ public String getCategory() { return this.category; } /** * @return description */ public String getDescription() { return this.description; } /** * @return diskName */ public String getDiskName() { return this.diskName; } /** * @return performanceLevel */ public String getPerformanceLevel() { return this.performanceLevel; } /** * @return size */ public Integer getSize() { return this.size; } /** * @return storageClusterId */ public String getStorageClusterId() { return this.storageClusterId; } public static final class Builder { private String category; private String description; private String diskName; private String performanceLevel; private Integer size; private String storageClusterId; /** *

The category of the system disk. Valid values:

*
    *
  • cloud_essd: ESSD. If SystemDisk.Category is set to this value, you can use SystemDisk.PerformanceLevel to specify the performance level of the disk.
  • *
  • cloud_efficiency: ultra disk.
  • *
  • cloud_ssd: standard SSD.
  • *
  • cloud: basic disk.
  • *
*

For non-I/O optimized instances of retired instance types, the default value is cloud. For other types of instances, the default value is cloud_efficiency.

* * example: *

cloud_ssd

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

The description of the system disk. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

*

This parameter is empty by default.

* * example: *

TestDescription

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

The name of the system disk. 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 (_), and hyphens (-).

*

This parameter is empty by default.

* * example: *

SystemDiskName

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

The performance level of the ESSD that is used as the system disk. Default value: PL1. Valid values:

*
    *
  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • *
  • PL1 (default): A single ESSD can deliver up to 50,000 random read/write IOPS.
  • *
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • *
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.
  • *
*

For information about ESSD performance levels, see ESSDs.

* * example: *

PL1

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

The size of the system disk. Unit: GiB. Valid values:

*
    *
  • Basic disks: 20 to 500.
  • *
  • Other disks: 20 to 2048.
  • *
*

The value of this parameter must be at least 20 and greater than or equal to the size of the image.

*

Default value: 40 or the size of the image, whichever is greater.

* * example: *

40

*/ public Builder size(Integer size) { this.size = size; return this; } /** *

The ID of the dedicated block storage cluster. If you want to use disks in a dedicated block storage cluster as system disks when you create instances, you need to specify this parameter.

* * example: *

dbsc-j5e1sf2vaf5he8m2****

*/ public Builder storageClusterId(String storageClusterId) { this.storageClusterId = storageClusterId; return this; } public SystemDisk build() { return new SystemDisk(this); } } } /** * * {@link CreateInstanceRequest} extends {@link TeaModel} * *

CreateInstanceRequest

*/ public static class Arn extends TeaModel { @com.aliyun.core.annotation.NameInMap("AssumeRoleFor") private Long assumeRoleFor; @com.aliyun.core.annotation.NameInMap("RoleType") private String roleType; @com.aliyun.core.annotation.NameInMap("Rolearn") private String rolearn; private Arn(Builder builder) { this.assumeRoleFor = builder.assumeRoleFor; this.roleType = builder.roleType; this.rolearn = builder.rolearn; } public static Builder builder() { return new Builder(); } public static Arn create() { return builder().build(); } /** * @return assumeRoleFor */ public Long getAssumeRoleFor() { return this.assumeRoleFor; } /** * @return roleType */ public String getRoleType() { return this.roleType; } /** * @return rolearn */ public String getRolearn() { return this.rolearn; } public static final class Builder { private Long assumeRoleFor; private String roleType; private String rolearn; /** *
*

This parameter is in invitational preview and is not publicly available.

*
* * example: *

1234567890

*/ public Builder assumeRoleFor(Long assumeRoleFor) { this.assumeRoleFor = assumeRoleFor; return this; } /** *
*

This parameter is in invitational preview and is not publicly available.

*
* * example: *

Primary

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

This parameter is in invitational preview and is not publicly available.

*
* * example: *

acs:ram::123456789012****:role/adminrole

*/ public Builder rolearn(String rolearn) { this.rolearn = rolearn; return this; } public Arn build() { return new Arn(this); } } } /** * * {@link CreateInstanceRequest} extends {@link TeaModel} * *

CreateInstanceRequest

*/ public static class DataDisk extends TeaModel { @com.aliyun.core.annotation.NameInMap("Category") private String category; @com.aliyun.core.annotation.NameInMap("DeleteWithInstance") private Boolean deleteWithInstance; @com.aliyun.core.annotation.NameInMap("Description") private String description; @com.aliyun.core.annotation.NameInMap("Device") private String device; @com.aliyun.core.annotation.NameInMap("DiskName") private String diskName; @com.aliyun.core.annotation.NameInMap("EncryptAlgorithm") private String encryptAlgorithm; @com.aliyun.core.annotation.NameInMap("Encrypted") private Boolean encrypted; @com.aliyun.core.annotation.NameInMap("KMSKeyId") @com.aliyun.core.annotation.Validation(maxLength = 64) private String KMSKeyId; @com.aliyun.core.annotation.NameInMap("PerformanceLevel") private String performanceLevel; @com.aliyun.core.annotation.NameInMap("Size") private Integer size; @com.aliyun.core.annotation.NameInMap("SnapshotId") private String snapshotId; @com.aliyun.core.annotation.NameInMap("StorageClusterId") private String storageClusterId; private DataDisk(Builder builder) { this.category = builder.category; this.deleteWithInstance = builder.deleteWithInstance; this.description = builder.description; this.device = builder.device; this.diskName = builder.diskName; this.encryptAlgorithm = builder.encryptAlgorithm; this.encrypted = builder.encrypted; this.KMSKeyId = builder.KMSKeyId; this.performanceLevel = builder.performanceLevel; this.size = builder.size; this.snapshotId = builder.snapshotId; this.storageClusterId = builder.storageClusterId; } public static Builder builder() { return new Builder(); } public static DataDisk create() { return builder().build(); } /** * @return category */ public String getCategory() { return this.category; } /** * @return deleteWithInstance */ public Boolean getDeleteWithInstance() { return this.deleteWithInstance; } /** * @return description */ public String getDescription() { return this.description; } /** * @return device */ public String getDevice() { return this.device; } /** * @return diskName */ public String getDiskName() { return this.diskName; } /** * @return encryptAlgorithm */ public String getEncryptAlgorithm() { return this.encryptAlgorithm; } /** * @return encrypted */ public Boolean getEncrypted() { return this.encrypted; } /** * @return KMSKeyId */ public String getKMSKeyId() { return this.KMSKeyId; } /** * @return performanceLevel */ public String getPerformanceLevel() { return this.performanceLevel; } /** * @return size */ public Integer getSize() { return this.size; } /** * @return snapshotId */ public String getSnapshotId() { return this.snapshotId; } /** * @return storageClusterId */ public String getStorageClusterId() { return this.storageClusterId; } public static final class Builder { private String category; private Boolean deleteWithInstance; private String description; private String device; private String diskName; private String encryptAlgorithm; private Boolean encrypted; private String KMSKeyId; private String performanceLevel; private Integer size; private String snapshotId; private String storageClusterId; /** *

The category of data disk N. Valid values:

*
    *
  • cloud_efficiency: utra disk.

    *
  • *
  • cloud_ssd: standard SSD.

    *
  • *
  • cloud_essd: ESSD.

    *
  • *
  • cloud: basic disk.

    *
  • *
  • cloud_auto: ESSD AutoPL disk.

    *
  • *
  • cloud_essd_entry: ESSD Entry disk.

    *

    **

    *

    Note This parameter can be set to cloud_essd_entry only when InstanceType is set to ecs.u1 or ecs.e.

    *
  • *
  • elastic_ephemeral_disk_standard: standard elastic ephemeral disk.

    *
  • *
  • elastic_ephemeral_disk_premium: premium elastic ephemeral disk.

    *
  • *
*

For I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value is cloud.

* * example: *

cloud_ssd

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

Specifies whether to release data disk N when the instance is released. Valid values:

*
    *
  • true
  • *
  • false
  • *
*

Default value: true.

* * example: *

true

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

The description of data disk N. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

* * example: *

TestDescription

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

The mount point of data disk N.

*
*

This parameter is applicable to scenarios in which a full image is used to create instances. A full image is an image that contains an operating system, application software, and business data. For these scenarios, you can set this parameter to the mount point of data disk N contained in the full image and modify the DataDisk.N.Size and DataDisk.N.Category parameters to change the category and size of data disk N created based on the image.

*
* * example: *

/dev/xvdb

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

The name of data disk N. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

* * example: *

DataDiskName

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

This parameter is not publicly available.

*
* * example: *

hide

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

Specifies whether to encrypt data disk N. Valid values:

*
    *
  • true
  • *
  • false
  • *
*

Default value: false.

* * example: *

false

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

The ID of the KMS key to use for data disk N.

* * example: *

0e478b7a-4262-4802-b8cb-00d****

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

The performance level of the ESSD to use as data disk N. The value of N must be the same as that in DataDisk.N.Category when DataDisk.N.Category is set to cloud_essd. Valid values:

*
    *
  • PL0: A single ESSD can deliver up to 10,000 random read/write IOPS.
  • *
  • PL1 (default): A single ESSD can deliver up to 50,000 random read/write IOPS.
  • *
  • PL2: A single ESSD can deliver up to 100,000 random read/write IOPS.
  • *
  • PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS.
  • *
*

For more information about ESSD performance levels, see ESSDs.

* * example: *

PL2

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

The size of data disk N. Valid values of N: 1 to 16. Unit: GiB. Valid values:

*
    *
  • Valid values if you set DataDisk.N.Category to cloud_efficiency: 20 to 32768.

    *
  • *
  • Valid values if you set DataDisk.N.Category to cloud_ssd: 20 to 32768.

    *
  • *
  • Valid values if you set DataDisk.N.Category to cloud_essd: vary based on the DataDisk.N.PerformanceLevel value.

    *
      *
    • Valid values when DataDisk.N.PerformanceLevel is set to PL0: 1 to 65536.
    • *
    • Valid values when DataDisk.N.PerformanceLevel is set to PL1: 20 to 65536.
    • *
    • Valid values when DataDisk.N.PerformanceLevel is set to PL2: 461 to 65536.
    • *
    • Valid values when DataDisk.N.PerformanceLevel is set to PL3: 1261 to 65536.
    • *
    *
  • *
  • Valid values if you set DataDisk.N.Category to cloud: 5 to 2000.

    *
  • *
*
*

The value of this parameter must be greater than or equal to the size of the snapshot specified by SnapshotId.

*
* * example: *

2000

*/ public Builder size(Integer size) { this.size = size; return this; } /** *

The ID of the snapshot to use to create data disk N. Valid values of N: 1 to 16.

*
    *
  • If DataDisk.N.SnapshotId is specified, DataDisk.N.Size is ignored. The data disk is created based on the size of the specified snapshot.
  • *
  • Use snapshots created on or after July 15, 2013. Otherwise, an error is returned and your request is rejected.
  • *
* * example: *

s-bp17441ohwka0yuh****

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

The ID of the dedicated block storage cluster to which data disk N belongs. If you want to use a disk in a dedicated block storage cluster as data disk N when you create the instance, specify this parameter.

* * example: *

dbsc-j5e1sf2vaf5he8m2****

*/ public Builder storageClusterId(String storageClusterId) { this.storageClusterId = storageClusterId; return this; } public DataDisk build() { return new DataDisk(this); } } } /** * * {@link CreateInstanceRequest} extends {@link TeaModel} * *

CreateInstanceRequest

*/ 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 tag N to add to the instance, disks, and primary ENI. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot start with acs: or aliyun. It cannot contain http:// or https://.

* * example: *

TestKey

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

The value of tag N to add to the instance, disks, and primary ENI. Valid values of N: 1 to 20. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot contain http:// or https://.

* * example: *

TestValue

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy