public class RunInstancesRequest extends AbstractModel
Constructor and Description |
---|
RunInstancesRequest() |
RunInstancesRequest(RunInstancesRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String |
getClientToken()
Get The string used to ensure the idempotency of the request.
|
DataDisk[] |
getDataDisks()
Get Data disk information.
|
Long |
getDataDiskSize()
Get Data disk size in GB.
|
EnhancedService |
getEnhancedService()
Get Enhanced services.
|
String |
getHostName()
Get Server name
`HostName` cannot start or end with a dot or hyphen and cannot contain consecutive dots or hyphens.
|
String |
getImageId()
Get Image ID.
|
Long |
getInstanceChargeType()
Get Instance billing type.
|
String |
getInstanceName()
Get Instance display name.
|
String |
getInstanceType()
Get Model.
|
Long |
getInternetMaxBandwidthIn()
Get Public network inbound bandwidth cap in Mbps.
|
Long |
getInternetMaxBandwidthOut()
Get Public network outbound bandwidth cap in Mbps.
|
String |
getKeepImageLogin()
Get Whether to keep the original settings for the image.
|
String[] |
getKeyIds()
Get Key pair.
|
String |
getModuleId()
Get Module ID.
|
String |
getPassword()
Get Instance login password.
|
String[] |
getSecurityGroupIds()
Get Security group of the instance, which can be obtained from the `sgId` field in the returned value of the `DescribeSecurityGroups` API.
|
SystemDisk |
getSystemDisk()
Get System disk information.
|
Long |
getSystemDiskSize()
Get System disk size in GB.
|
TagSpecification[] |
getTagSpecification()
Get Tag list
|
String |
getUserData()
Get The user data provided to the instance, which needs to be Base64-encoded with a maximum size of 16 KB
|
ZoneInstanceCountISP[] |
getZoneInstanceCountISPSet()
Get List of AZs in which to create instances, the number of instances to be created, and the ISPs.
|
void |
setClientToken(String ClientToken)
Set The string used to ensure the idempotency of the request.
|
void |
setDataDisks(DataDisk[] DataDisks)
Set Data disk information.
|
void |
setDataDiskSize(Long DataDiskSize)
Set Data disk size in GB.
|
void |
setEnhancedService(EnhancedService EnhancedService)
Set Enhanced services.
|
void |
setHostName(String HostName)
Set Server name
`HostName` cannot start or end with a dot or hyphen and cannot contain consecutive dots or hyphens.
|
void |
setImageId(String ImageId)
Set Image ID.
|
void |
setInstanceChargeType(Long InstanceChargeType)
Set Instance billing type.
|
void |
setInstanceName(String InstanceName)
Set Instance display name.
|
void |
setInstanceType(String InstanceType)
Set Model.
|
void |
setInternetMaxBandwidthIn(Long InternetMaxBandwidthIn)
Set Public network inbound bandwidth cap in Mbps.
|
void |
setInternetMaxBandwidthOut(Long InternetMaxBandwidthOut)
Set Public network outbound bandwidth cap in Mbps.
|
void |
setKeepImageLogin(String KeepImageLogin)
Set Whether to keep the original settings for the image.
|
void |
setKeyIds(String[] KeyIds)
Set Key pair.
|
void |
setModuleId(String ModuleId)
Set Module ID.
|
void |
setPassword(String Password)
Set Instance login password.
|
void |
setSecurityGroupIds(String[] SecurityGroupIds)
Set Security group of the instance, which can be obtained from the `sgId` field in the returned value of the `DescribeSecurityGroups` API.
|
void |
setSystemDisk(SystemDisk SystemDisk)
Set System disk information.
|
void |
setSystemDiskSize(Long SystemDiskSize)
Set System disk size in GB.
|
void |
setTagSpecification(TagSpecification[] TagSpecification)
Set Tag list
|
void |
setUserData(String UserData)
Set The user data provided to the instance, which needs to be Base64-encoded with a maximum size of 16 KB
|
void |
setZoneInstanceCountISPSet(ZoneInstanceCountISP[] ZoneInstanceCountISPSet)
Set List of AZs in which to create instances, the number of instances to be created, and the ISPs.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonString
public RunInstancesRequest()
public RunInstancesRequest(RunInstancesRequest source)
public ZoneInstanceCountISP[] getZoneInstanceCountISPSet()
public void setZoneInstanceCountISPSet(ZoneInstanceCountISP[] ZoneInstanceCountISPSet)
ZoneInstanceCountISPSet
- List of AZs in which to create instances, the number of instances to be created, and the ISPs. You can create up to 100 instances in a region at a time.public String getPassword()
public void setPassword(String Password)
Password
- Instance login password. Different OS types have different limits on password complexity as detailed below:
The password of a Linux instance must contain 8–30 characters in at least two of the following character types: letters, digits, and special symbols [( ) ` ~ ! @ # $ % ^ & - + = | { } [ ] : ; ' , . ? / ]. The password of a Windows instance must contain 12–30 characters in at least three of the following character types: letters, digits, and special symbols [( ) ` ~ ! @ # $ % ^ & - + = | { } [ ] : ; ' , . ? /].public Long getInternetMaxBandwidthOut()
public void setInternetMaxBandwidthOut(Long InternetMaxBandwidthOut)
InternetMaxBandwidthOut
- Public network outbound bandwidth cap in Mbps.
1. If you don't specify this parameter or specify it as `0`, the default value under the corresponding module will be used.
2. If you don't specify this parameter or specify it as `0` without specifying the module, the value of `InternetMaxBandwidthIn` will be usedpublic String getModuleId()
public void setModuleId(String ModuleId)
ModuleId
- Module ID. If you don't specify this parameter, you must specify the `ImageId`, `InstanceType`, `DataDiskSize`, and `InternetMaxBandwidthOut` parameterspublic String getImageId()
public void setImageId(String ImageId)
ImageId
- Image ID. If you don't specify this parameter or specify it as null, the default value under the corresponding module will be used.public String getInstanceName()
public void setInstanceName(String InstanceName)
InstanceName
- Instance display name.
If this parameter is not specified, `Not named` will be displayed by default.
If you purchase multiple instances and specify the pattern string `{R:x}`, display names will be generated based on `[x, x+n-1]`, where `n` is the number of the purchased instances. For example, if you specify `server\_{R:3}` and purchase 1 instance, the display name will be `server\_3`, and if you purchase 2 instances, the display names will be `server\_3` and `server\_4` respectively.
You can specify multiple pattern strings `{R:x}`.
If you purchase multiple instances and don't specify the pattern string, the instance display names will be suffixed with 1, 2...n, where `n` indicates the number of the purchased instances. For example, if you specify `server_` and purchase 2 instances, the instance display names will be `server\_1` and `server\_2` respectively.
If the purchased instances belong to different regions or ISPs, the above rules will apply to each region and ISP independently.
It can contain up to 60 characters (including pattern string).public String getHostName()
public void setHostName(String HostName)
HostName
- Server name
`HostName` cannot start or end with a dot or hyphen and cannot contain consecutive dots or hyphens.
Windows instance: the name can contain 2–15 letters, digits, and hyphens but not dots or only digits.
Other types (such as Linux) of instances: the name should be a combination of 2 to 60 characters, supporting multiple dots. A string between two dots can contain letters, digits, and hyphens.public String getClientToken()
public void setClientToken(String ClientToken)
ClientToken
- The string used to ensure the idempotency of the request. Currently, it is a reserved parameter; therefore, do not use it.public EnhancedService getEnhancedService()
public void setEnhancedService(EnhancedService EnhancedService)
EnhancedService
- Enhanced services. You can use this parameter to specify whether to enable services such as Cloud Security and Cloud Monitor. If this parameter is not specified, Cloud Monitor and Cloud Security will be enabled for public images by default.public TagSpecification[] getTagSpecification()
public void setTagSpecification(TagSpecification[] TagSpecification)
TagSpecification
- Tag listpublic String getUserData()
public void setUserData(String UserData)
UserData
- The user data provided to the instance, which needs to be Base64-encoded with a maximum size of 16 KBpublic String getInstanceType()
public void setInstanceType(String InstanceType)
InstanceType
- Model. If you don't specify this parameter or specify it as null, the default value under the corresponding module will be used.public Long getDataDiskSize()
public void setDataDiskSize(Long DataDiskSize)
DataDiskSize
- Data disk size in GB. If you don't specify this parameter or specify it as `0`, the default value under the corresponding module will be usedpublic String[] getSecurityGroupIds()
public void setSecurityGroupIds(String[] SecurityGroupIds)
SecurityGroupIds
- Security group of the instance, which can be obtained from the `sgId` field in the returned value of the `DescribeSecurityGroups` API. If this parameter is not specified, the default security group will be bound by default.public Long getSystemDiskSize()
public void setSystemDiskSize(Long SystemDiskSize)
SystemDiskSize
- System disk size in GB. If you don't specify this parameter or specify it as `0`, the default value under the corresponding module will be usedpublic Long getInternetMaxBandwidthIn()
public void setInternetMaxBandwidthIn(Long InternetMaxBandwidthIn)
InternetMaxBandwidthIn
- Public network inbound bandwidth cap in Mbps.
1. If you don't specify this parameter or specify it as `0`, the default value under the corresponding module will be used.
2. If you don't specify this parameter or specify it as `0` without specifying the module, the value of `InternetMaxBandwidthOut` will be usedpublic Long getInstanceChargeType()
public void setInstanceChargeType(Long InstanceChargeType)
InstanceChargeType
- Instance billing type. Valid values:
0: postpaid by resource usage, where the daily peak usage of the CPU, memory, and disk will be calculated. This billing mode applies only to non-GNR models;
1: hourly postpaid at the unit price of xx USD/instance/hour. This billing mode applies only to GNR models. To enable it, submit a ticket for application;
2: monthly postpaid at the unit price of xx USD/instance/month. This billing mode applies only to GNR models;
If this field is left empty, `0` will be selected by default for non-GNR models, and `2` will be selected by default for GNR models.public String[] getKeyIds()
public void setKeyIds(String[] KeyIds)
KeyIds
- Key pair.public String getKeepImageLogin()
public void setKeepImageLogin(String KeepImageLogin)
KeepImageLogin
- Whether to keep the original settings for the image. You cannot specify this parameter if `Password` or `KeyIds.N` is specified. You can specify this parameter as `TRUE` only when you create an instance by using a custom image, shared image, or image imported from an external resource. Valid values:
TRUE: yes
FALSE: no
Default value: FALSE.
Note: this field may return null, indicating that no valid values can be obtained.public SystemDisk getSystemDisk()
public void setSystemDisk(SystemDisk SystemDisk)
SystemDisk
- System disk information.public DataDisk[] getDataDisks()
public void setDataDisks(DataDisk[] DataDisks)
DataDisks
- Data disk information.Copyright © 2023. All rights reserved.