public static final class CreateInstanceRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
CreateInstanceRequest.Builder |
autoRenew(String autoRenew)
Specifies whether to enable the auto-renewal feature.
|
CreateInstanceRequest.Builder |
autoRenewPeriod(String autoRenewPeriod)
The auto-renewal period for the instance.
|
CreateInstanceRequest |
build() |
CreateInstanceRequest.Builder |
dataDisk(List<CreateInstanceRequest.DataDisk> dataDisk)
DataDisk.
|
CreateInstanceRequest.Builder |
ensRegionId(String ensRegionId)
The region ID.
|
CreateInstanceRequest.Builder |
hostName(String hostName)
The hostname of the Elastic Compute Service (ECS) instance.
|
CreateInstanceRequest.Builder |
imageId(String imageId)
The ID of the image file that you select when creating the instance.
|
CreateInstanceRequest.Builder |
instanceName(String instanceName)
The name of the instance.
|
CreateInstanceRequest.Builder |
instanceType(String instanceType)
The type of the instance.
|
CreateInstanceRequest.Builder |
internetChargeType(String internetChargeType)
This parameter is required if you create the instance for the first time.
|
CreateInstanceRequest.Builder |
ipType(String ipType)
The type of IP address.
|
CreateInstanceRequest.Builder |
keyPairName(String keyPairName)
The name of the key pair.
|
CreateInstanceRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateInstanceRequest.Builder |
password(String password)
The password of the instance.
|
CreateInstanceRequest.Builder |
passwordInherit(Boolean passwordInherit)
Specifies whether to use the preset password of the image.
|
CreateInstanceRequest.Builder |
paymentType(String paymentType)
The billing method of the instance.
|
CreateInstanceRequest.Builder |
period(String period)
The subscription period of the instance.
|
CreateInstanceRequest.Builder |
privateIpAddress(String privateIpAddress)
The internal IP address.
|
CreateInstanceRequest.Builder |
publicIpIdentification(Boolean publicIpIdentification)
Specifies whether a public IP address can be assigned to the specified instance.
|
CreateInstanceRequest.Builder |
quantity(String quantity)
The number of instances.
|
CreateInstanceRequest.Builder |
systemDisk(CreateInstanceRequest.SystemDisk systemDisk)
SystemDisk.
|
CreateInstanceRequest.Builder |
uniqueSuffix(Boolean uniqueSuffix)
Specifies whether to automatically append sequential suffixes to the hostnames specified by the **HostName** parameter and instance names specified by the **InstanceName** parameter.
|
CreateInstanceRequest.Builder |
userData(String userData)
Custom data.
|
CreateInstanceRequest.Builder |
vSwitchId(String vSwitchId)
The ID of the vSwitch.
|
public CreateInstanceRequest.Builder dataDisk(List<CreateInstanceRequest.DataDisk> dataDisk)
public CreateInstanceRequest.Builder systemDisk(CreateInstanceRequest.SystemDisk systemDisk)
public CreateInstanceRequest.Builder autoRenew(String autoRenew)
public CreateInstanceRequest.Builder autoRenewPeriod(String autoRenewPeriod)
public CreateInstanceRequest.Builder ensRegionId(String ensRegionId)
public CreateInstanceRequest.Builder hostName(String hostName)
Naming rules for specific instances: * For Windows instances, the hostname must be **2** to **15** characters in length and cannot contain periods (.) or contain only digits. The hostname cannot contain periods (.) or contain only digits. * For instances that run one of other operating systems 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 CreateInstanceRequest.Builder imageId(String imageId)
public CreateInstanceRequest.Builder instanceName(String instanceName)
* The name must be **2** to **128** characters in length. * It must start with a letter but cannot start with http:// or https://. * The name 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 CreateInstanceRequest.Builder instanceType(String instanceType)
For more information, see [](~~66124~~).
public CreateInstanceRequest.Builder internetChargeType(String internetChargeType)
* **BandwidthByDay**: Pay by daily peak bandwidth. * **95BandwidthByMonth**: Pay by monthly 95th percentile bandwidth.
public CreateInstanceRequest.Builder ipType(String ipType)
* **ipv4**: IPv4. This is the default value. * **ipv6**: IPv6. * **ipv4Andipv6**: IPv4 and IPv6.
public CreateInstanceRequest.Builder keyPairName(String keyPairName)
public CreateInstanceRequest.Builder ownerId(Long ownerId)
public CreateInstanceRequest.Builder password(String password)
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: ``()`~!@#$%^&*-_+=|{}[]:;\"<>,.?/``
public CreateInstanceRequest.Builder passwordInherit(Boolean passwordInherit)
- **true**: The password preset in the image is used, and the **Password** parameter must be null. For secure access, make sure that the selected image has a password configured. - **false**: does not use the password preset in the image.
public CreateInstanceRequest.Builder paymentType(String paymentType)
public CreateInstanceRequest.Builder period(String period)
public CreateInstanceRequest.Builder privateIpAddress(String privateIpAddress)
public CreateInstanceRequest.Builder publicIpIdentification(Boolean publicIpIdentification)
* **true** * **false**
public CreateInstanceRequest.Builder quantity(String quantity)
public CreateInstanceRequest.Builder uniqueSuffix(Boolean uniqueSuffix)
Examples: **LocalHost001** and **LocalHost002**, and **MyInstance001** and **MyInstance002**. Default value: **false**.
public CreateInstanceRequest.Builder userData(String userData)
You can specify custom data. The data is encoded in Base64. The system does not encrypt your custom data when API requests are initiated. We recommend that you do not pass in confidential information such as passwords and private keys in plaintext. If you want to provide sensitive data such as passwords and private keys, encrypt the data and then encode it in Base64. The data is decrypted on the instance in the way it is encrypted. For more information, see [User data formats](https://cloudinit.readthedocs.io/en/latest/topics/format.html).
public CreateInstanceRequest.Builder vSwitchId(String vSwitchId)
public CreateInstanceRequest build()
Copyright © 2024. All rights reserved.