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

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

// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;

import com.aliyun.core.annotation.*;
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 { @Query @NameInMap("HibernationOptions") private HibernationOptions hibernationOptions; @Query @NameInMap("PrivatePoolOptions") private PrivatePoolOptions privatePoolOptions; @Query @NameInMap("SystemDisk") private SystemDisk systemDisk; @Host @NameInMap("SourceRegionId") private String sourceRegionId; @Query @NameInMap("Affinity") private String affinity; @Query @NameInMap("Arn") private java.util.List < Arn> arn; @Query @NameInMap("AutoRenew") private Boolean autoRenew; @Query @NameInMap("AutoRenewPeriod") private Integer autoRenewPeriod; @Query @NameInMap("ClientToken") private String clientToken; @Query @NameInMap("ClusterId") private String clusterId; @Query @NameInMap("CreditSpecification") private String creditSpecification; @Query @NameInMap("DataDisk") private java.util.List < DataDisk> dataDisk; @Query @NameInMap("DedicatedHostId") private String dedicatedHostId; @Query @NameInMap("DeletionProtection") private Boolean deletionProtection; @Query @NameInMap("DeploymentSetGroupNo") private Integer deploymentSetGroupNo; @Query @NameInMap("DeploymentSetId") private String deploymentSetId; @Query @NameInMap("Description") private String description; @Query @NameInMap("DryRun") private Boolean dryRun; @Query @NameInMap("HostName") private String hostName; @Query @NameInMap("HpcClusterId") private String hpcClusterId; @Query @NameInMap("HttpEndpoint") private String httpEndpoint; @Query @NameInMap("HttpPutResponseHopLimit") private Integer httpPutResponseHopLimit; @Query @NameInMap("HttpTokens") private String httpTokens; @Query @NameInMap("ImageFamily") private String imageFamily; @Query @NameInMap("ImageId") private String imageId; @Query @NameInMap("InnerIpAddress") private String innerIpAddress; @Query @NameInMap("InstanceChargeType") private String instanceChargeType; @Query @NameInMap("InstanceName") private String instanceName; @Query @NameInMap("InstanceType") @Validation(required = true) private String instanceType; @Query @NameInMap("InternetChargeType") private String internetChargeType; @Query @NameInMap("InternetMaxBandwidthIn") @Validation(maximum = 200, minimum = 1) private Integer internetMaxBandwidthIn; @Query @NameInMap("InternetMaxBandwidthOut") private Integer internetMaxBandwidthOut; @Query @NameInMap("IoOptimized") private String ioOptimized; @Query @NameInMap("KeyPairName") private String keyPairName; @Query @NameInMap("NodeControllerId") private String nodeControllerId; @Query @NameInMap("OwnerAccount") private String ownerAccount; @Query @NameInMap("OwnerId") private Long ownerId; @Query @NameInMap("Password") private String password; @Query @NameInMap("PasswordInherit") private Boolean passwordInherit; @Query @NameInMap("Period") private Integer period; @Query @NameInMap("PeriodUnit") private String periodUnit; @Query @NameInMap("PrivateIpAddress") private String privateIpAddress; @Query @NameInMap("RamRoleName") private String ramRoleName; @Query @NameInMap("RegionId") @Validation(required = true) private String regionId; @Query @NameInMap("ResourceGroupId") private String resourceGroupId; @Query @NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @Query @NameInMap("ResourceOwnerId") private Long resourceOwnerId; @Query @NameInMap("SecurityEnhancementStrategy") private String securityEnhancementStrategy; @Query @NameInMap("SecurityGroupId") private String securityGroupId; @Query @NameInMap("SpotDuration") @Validation(maximum = 6) private Integer spotDuration; @Query @NameInMap("SpotInterruptionBehavior") private String spotInterruptionBehavior; @Query @NameInMap("SpotPriceLimit") private Float spotPriceLimit; @Query @NameInMap("SpotStrategy") private String spotStrategy; @Query @NameInMap("StorageSetId") private String storageSetId; @Query @NameInMap("StorageSetPartitionNumber") private Integer storageSetPartitionNumber; @Query @NameInMap("Tag") private java.util.List < Tag> tag; @Query @NameInMap("Tenancy") private String tenancy; @Query @NameInMap("UseAdditionalService") private Boolean useAdditionalService; @Query @NameInMap("UserData") private String userData; @Query @NameInMap("VSwitchId") private String vSwitchId; @Query @NameInMap("VlanId") private String vlanId; @Query @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. */ public Builder affinity(String affinity) { this.putQueryParameter("Affinity", affinity); this.affinity = affinity; return this; } /** * > This parameter is in invitational preview and is unavailable. */ 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 when the `InstanceChargeType` parameter is set to `PrePaid`. Default value: false. Valid values: *

* * * true: enables auto-renewal. * * false: does not enable auto-renewal. */ public Builder autoRenew(Boolean autoRenew) { this.putQueryParameter("AutoRenew", autoRenew); this.autoRenew = autoRenew; return this; } /** * The auto-renewal cycle of the instance. This parameter is required when AutoRenew is set to true. *

* * Valid values when PeriodUnit is set to Month: 1, 2, 3, 6, and 12 */ 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 value, but you must make sure that the value is unique among different requests. The **ClientToken** value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](~~25693~~). */ 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. */ public Builder clusterId(String clusterId) { this.putQueryParameter("ClusterId", clusterId); this.clusterId = clusterId; return this; } /** * The performance mode of the burstable instance. Valid values: *

* * * Standard: the standard mode. For more information, see the "Standard mode" section in [Burstable instances](~~59977~~). * * Unlimited: the unlimited mode. For more information, see the "Unlimited mode" section in [Burstable instances](~~59977~~). */ public Builder creditSpecification(String creditSpecification) { this.putQueryParameter("CreditSpecification", creditSpecification); this.creditSpecification = creditSpecification; return this; } /** * The list of 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](~~134242~~) operation to query the list of dedicated host IDs. * * If the `DedicatedHostId` parameter is specified, the `SpotStrategy` and `SpotPriceLimit` parameters are ignored. This is because preemptible instances cannot be created on dedicated hosts. */ 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 determines whether you can use the ECS console or call the [DeleteInstance](~~25507~~) operation to release the instance. Default value: false. Valid values: *

* * * true: enables release protection. * * false: 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. */ 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. */ 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. */ 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. */ public Builder description(String description) { this.putQueryParameter("Description", description); this.description = description; return this; } /** * Specifies whether to check the validity of the request without actually making the request. Default value: false. Valid values: *

* * * true: The validity of the request is checked but the request is not made. Check items include whether required parameters are specified, the request format, service limits, and available ECS resources. If the check fails, the corresponding error code is returned. If the check succeeds, the `DryRunOperation` error code is returned. * * false: The validity of the request is checked, and the request is made if the check succeeds. */ 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 (-). */ public Builder hostName(String hostName) { this.putQueryParameter("HostName", hostName); this.hostName = hostName; return this; } /** * The ID of the HPC cluster to which to assign the instance. */ 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: enables the access channel for instance metadata. * * disabled: disables the access channel for instance metadata. * * Default value: enabled. * * > For more information about instance metadata, see [Overview of ECS instance metadata](~~49122~~). */ public Builder httpEndpoint(String httpEndpoint) { this.putQueryParameter("HttpEndpoint", httpEndpoint); this.httpEndpoint = httpEndpoint; return this; } /** * > This parameter is currently in invitational preview and unavailable for general users. */ public Builder httpPutResponseHopLimit(Integer httpPutResponseHopLimit) { this.putQueryParameter("HttpPutResponseHopLimit", httpPutResponseHopLimit); this.httpPutResponseHopLimit = httpPutResponseHopLimit; return this; } /** * Specifies whether to forcefully use the security-enhanced mode (IMDSv2) to access instance metadata. Valid values: *

* * * optional: does not forcibly use the security-enhanced mode (IMDSv2). * * required: forcefully uses the security-enhanced mode (IMDSv2). After you set this parameter to required, you cannot access instance metadata in normal mode. * * Default value: optional. * * > For more information about modes of accessing instance metadata, see [Access mode of instance metadata](~~150575~~). */ 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. */ 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 the `ImageFamily` parameter to obtain the latest available custom image from the specified image family. */ public Builder imageId(String imageId) { this.putQueryParameter("ImageId", imageId); this.imageId = imageId; return this; } /** * The internal IP address to assign to the instance. */ public Builder innerIpAddress(String innerIpAddress) { this.putQueryParameter("InnerIpAddress", innerIpAddress); this.innerIpAddress = innerIpAddress; return this; } /** * The billing method of the instance. Default value: PostPaid. 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: pay-as-you-go. */ 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. */ public Builder instanceName(String instanceName) { this.putQueryParameter("InstanceName", instanceName); this.instanceName = instanceName; return this; } /** * The instance type. *

* * * Select an instance type. See [Instance families](~~25378~~) or call the [DescribeInstanceTypes](~~25620~~) operation to query the performance data of an instance type, or see [Best practices for instance type selection](~~58291~~) to learn about how to select instance types. * * Query available resources. You can call the [DescribeAvailableResource](~~66186~~) operation to query available resources in a specific region or zone. */ 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: pay-by-traffic * * > When the **pay-by-traffic** billing method for network usage is used, the maximum inbound and outbound bandwidth values are used as upper limits of bandwidths instead of guaranteed performance specifications. In scenarios where demand outstrips resource supplies, these maximum bandwidth values may not be reached. If you want guaranteed bandwidths for your instance, use the **pay-by-bandwidth** billing method for network usage. */ 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. */ 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. */ 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 instance is I/O optimized. * * For retired instance types, the default value is none. For more information, see [Retired instance types](~~55263~~). * * For other instance types, the default value is 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. */ public Builder keyPairName(String keyPairName) { this.putQueryParameter("KeyPairName", keyPairName); this.keyPairName = keyPairName; return this; } /** * > This parameter is in invitational preview and is unavailable. */ 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. Special characters include: *

* * ```plain * ( ) ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; \" < > , . ? / * ``` * * 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 some types of operating systems such as Others Linux and Fedora CoreOS. For these instances, only key pairs can be set. */ 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 Password empty and make sure that the selected image has a password preset. */ 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 the `PeriodUnit` parameter. This parameter is valid and required only when `InstanceChargeType` is set to `PrePaid`. If the `DedicatedHostId` parameter is specified, the value of Period must not exceed the subscription period of the specified dedicated host. Valid values: *

* * Valid values when PeriodUnit is set to Month: 1, 2, 3, 6, and 12 */ 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. */ 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 within the CIDR block of the specified vSwitch. */ 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](~~28713~~) operation provided by RAM to query the instance RAM roles that you created. */ 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](~~25609~~) operation to query the most recent region list. */ 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. */ 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 is applicable only to public images. * * Deactive: does not enable security hardening. This value is applicable to all images. */ 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. Instances in the same security group can communicate with each other. */ public Builder securityGroupId(String securityGroupId) { this.putQueryParameter("SecurityGroupId", securityGroupId); this.securityGroupId = securityGroupId; return this; } /** * The protection period of the preemptible instance. Unit: hours. Valid values: 0, 1, 2, 3, 4, 5, and 6. *

* * * Protection periods of 2, 3, 4, 5, and 6 hours are in invitational preview. If you want to set this parameter to one of these values, submit a ticket. * * If this parameter is set to 0, no protection period is configured for the preemptible instance. * * Default value: 1. */ public Builder spotDuration(Integer spotDuration) { this.putQueryParameter("SpotDuration", spotDuration); this.spotDuration = spotDuration; return this; } /** * The interruption mode of the preemptible instance. Default value: Terminate. Set the value to Terminate, which specifies to release the instance. */ 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 the `SpotStrategy` parameter is set to `SpotWithPriceLimit`. */ 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 when the `InstanceChargeType` parameter is set to `PostPaid`. Default value: NoSpot. Valid values: *

* * * NoSpot: The instance is created as a regular pay-as-you-go instance. * * SpotWithPriceLimit: The instance is created as a preemptible instance with a user-defined maximum hourly price. * * SpotAsPriceGo: The instance is created as a preemptible instance for which the market price at the time of purchase is automatically used as the bid price. */ public Builder spotStrategy(String spotStrategy) { this.putQueryParameter("SpotStrategy", spotStrategy); this.spotStrategy = spotStrategy; return this; } /** * The ID of the storage set. */ 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. */ public Builder storageSetPartitionNumber(Integer storageSetPartitionNumber) { this.putQueryParameter("StorageSetPartitionNumber", storageSetPartitionNumber); this.storageSetPartitionNumber = storageSetPartitionNumber; return this; } /** * The tags. */ 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 the `DedicatedHostId` parameter, Alibaba Cloud selects a dedicated host for the instance. * * Default value: 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 provided by Alibaba Cloud (Windows: NTP and KMS. Linux: NTP and YUM). */ 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. */ 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](~~35748~~) operation to query available vSwitches. *

* * > If the `VSwitchId` parameter is specified, the zone specified by the `ZoneId` parameter must be the zone where the specified vSwitch is located. You can also leave the `ZoneId` parameter empty. Then, the system selects the zone where the specified vSwitch is located. */ public Builder vSwitchId(String vSwitchId) { this.putQueryParameter("VSwitchId", vSwitchId); this.vSwitchId = vSwitchId; return this; } /** * The ID of the virtual LAN (VLAN). */ 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](~~25610~~) operation to query the most recent zone list. *

* * > If the `VSwitchId` parameter is specified, the zone specified by the `ZoneId` parameter must be the zone where the specified vSwitch is located. You can also leave the `ZoneId` parameter empty. Then, the system selects the zone where the specified vSwitch is located. * * This parameter is empty by default. */ public Builder zoneId(String zoneId) { this.putQueryParameter("ZoneId", zoneId); this.zoneId = zoneId; return this; } @Override public CreateInstanceRequest build() { return new CreateInstanceRequest(this); } } public static class HibernationOptions extends TeaModel { @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 unavailable. */ public Builder configured(Boolean configured) { this.configured = configured; return this; } public HibernationOptions build() { return new HibernationOptions(this); } } } public static class PrivatePoolOptions extends TeaModel { @NameInMap("Id") private String id; @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 to use to create the instance. 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. */ public Builder id(String id) { this.id = id; return this; } /** * The type of the private pool to use to create the instance. A private pool is generated when an elasticity assurance or a capacity reservation takes effect. You can select a private pool when you create an instance. Valid values: *

* * * Open: open private pool. The system selects a matching open private pool to create 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 create the instance. If the specified private pool is unavailable, the instance cannot be created. 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. */ public Builder matchCriteria(String matchCriteria) { this.matchCriteria = matchCriteria; return this; } public PrivatePoolOptions build() { return new PrivatePoolOptions(this); } } } public static class SystemDisk extends TeaModel { @NameInMap("Category") private String category; @NameInMap("Description") private String description; @NameInMap("DiskName") private String diskName; @NameInMap("PerformanceLevel") private String performanceLevel; @NameInMap("Size") private Integer size; @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. When the parameter is set to this value, you can use the `SystemDisk.PerformanceLevel` parameter 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 instances, the default value is cloud_efficiency. */ 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. */ 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. */ public Builder diskName(String diskName) { this.diskName = diskName; return this; } /** * The performance level of the ESSD to use as the system disk. Default value: PL1. Valid values: *

* * * PL0: A single ESSD can deliver up to 10,000 random read/write IOPS. * * PL1: 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](~~122389~~). */ public Builder performanceLevel(String performanceLevel) { this.performanceLevel = performanceLevel; return this; } /** * The size of the system disk. Unit: GiB. Valid values: 20 to 500. *

* * The value of this parameter must be at least 20 and greater than or equal to the size of the specified image. * * Default value: 40 or the size of the image, whichever is greater. */ public Builder size(Integer size) { this.size = size; return this; } /** * The ID of the dedicated block storage cluster. If you want to use a disk in a dedicated block storage cluster as the system disk when you create the instance, you must specify this parameter. For more information about dedicated block storage clusters, see [What is Dedicated Block Storage Cluster?](~~208883~~) */ public Builder storageClusterId(String storageClusterId) { this.storageClusterId = storageClusterId; return this; } public SystemDisk build() { return new SystemDisk(this); } } } public static class Arn extends TeaModel { @NameInMap("AssumeRoleFor") private Long assumeRoleFor; @NameInMap("RoleType") private String roleType; @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 unavailable. */ public Builder assumeRoleFor(Long assumeRoleFor) { this.assumeRoleFor = assumeRoleFor; return this; } /** * > This parameter is in invitational preview and is unavailable. */ public Builder roleType(String roleType) { this.roleType = roleType; return this; } /** * > This parameter is in invitational preview and is unavailable. */ public Builder rolearn(String rolearn) { this.rolearn = rolearn; return this; } public Arn build() { return new Arn(this); } } } public static class DataDisk extends TeaModel { @NameInMap("Category") private String category; @NameInMap("DeleteWithInstance") private Boolean deleteWithInstance; @NameInMap("Description") private String description; @NameInMap("Device") private String device; @NameInMap("DiskName") private String diskName; @NameInMap("EncryptAlgorithm") private String encryptAlgorithm; @NameInMap("Encrypted") private Boolean encrypted; @NameInMap("KMSKeyId") private String KMSKeyId; @NameInMap("PerformanceLevel") private String performanceLevel; @NameInMap("Size") private Integer size; @NameInMap("SnapshotId") private String snapshotId; @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: ultra disk * * cloud_ssd: standard SSD * * cloud_essd: ESSD * * cloud: basic disk * * For I/O optimized instances, the default value is cloud_efficiency. For non-I/O optimized instances, the default value is cloud. */ public Builder category(String category) { this.category = category; return this; } /** * Specifies whether to release data disk N when the instance is released. *

* * Default value: 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://`. */ public Builder description(String description) { this.description = description; return this; } /** * The mount point of data disk N. *

* * > This parameter will be removed in the future. We recommend that you use other parameters to ensure future compatibility. */ 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. It must start with a letter and cannot start with `http://` or `https://`. It can contain letters, digits, colons (:), underscores (\_), and hyphens (-). */ public Builder diskName(String diskName) { this.diskName = diskName; return this; } /** * The algorithm to use to encrypt data disk N. */ public Builder encryptAlgorithm(String encryptAlgorithm) { this.encryptAlgorithm = encryptAlgorithm; return this; } /** * Specifies whether to encrypt data disk N. *

* * Default value: false. */ public Builder encrypted(Boolean encrypted) { this.encrypted = encrypted; return this; } /** * The ID of the Key Management Service (KMS) key to use for data disk N. */ public Builder KMSKeyId(String KMSKeyId) { this.KMSKeyId = KMSKeyId; return this; } /** * The performance level of the ESSD to use as data disk N. The N value must be the same as that in `DataDisk.N.Category` when DataDisk.N.Category is set to cloud_essd. Default value: PL1. Valid values: *

* * * PL0: A single ESSD can deliver up to 10,000 random read/write IOPS. * * PL1: 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](~~122389~~). */ 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 when DataDisk.N.Category is set to cloud_efficiency: 20 to 32768. * * * Valid values when DataDisk.N.Category is set to cloud_ssd: 20 to 32768. * * * Valid values when DataDisk.N.Category is set to cloud_essd: depend on the `DataDisk.N.PerformanceLevel` value. * * * Valid values when the DataDisk.N.PerformanceLevel parameter is set to PL0: 40 to 32768. * * Valid values when the DataDisk.N.PerformanceLevel parameter is set to PL1: 20 to 32768. * * Valid values when the DataDisk.N.PerformanceLevel parameter is set to PL2: 461 to 32768. * * Valid values when the DataDisk.N.PerformanceLevel parameter is set to PL3: 1261 to 32768. * * * Valid values when DataDisk.N.Category is set to cloud: 5 to 2000. * * The value of this parameter must be greater than or equal to the size of the snapshot specified by the `SnapshotId` parameter. */ 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 the `DataDisk.N.SnapshotId` parameter is specified, the `DataDisk.N.Size` parameter is ignored and the data disk is created with the size of the specified snapshot. * * Use snapshots created after July 15, 2013. Otherwise, an error is returned and your request is rejected. */ public Builder snapshotId(String snapshotId) { this.snapshotId = snapshotId; return this; } /** * The ID of the dedicated block storage cluster. If you want to use a disk in a dedicated block storage cluster as data disk N when you create the instance, you must specify this parameter. */ public Builder storageClusterId(String storageClusterId) { this.storageClusterId = storageClusterId; return this; } public DataDisk build() { return new DataDisk(this); } } } public static class Tag extends TeaModel { @NameInMap("Key") private String key; @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 elastic network interface (ENI). Valid values of N: 1 to 20. The tag key cannot be an empty string. It can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`. */ 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. It can be up to 128 characters in length. It cannot start with `acs:` or contain `http://` or `https://`. */ public Builder value(String value) { this.value = value; return this; } public Tag build() { return new Tag(this); } } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy