public class CreateLaunchTemplateRequest extends AbstractModel
header, skipSign
Constructor and Description |
---|
CreateLaunchTemplateRequest() |
CreateLaunchTemplateRequest(CreateLaunchTemplateRequest 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 |
---|---|
ActionTimer |
getActionTimer()
Get Scheduled task.
|
String |
getCamRoleName()
Get CAM role name.
|
String |
getClientToken()
Get A string used to ensure the idempotence of the request.
|
DataDisk[] |
getDataDisks()
Get Instance data disk configuration information.
|
Boolean |
getDisableApiTermination()
Get Instance destruction protection flag: indicates whether an instance is allowed to be deleted through an api.
|
String[] |
getDisasterRecoverGroupIds()
Get Placement group ID.
|
Boolean |
getDryRun()
Get Whether it is a pre-check for this request only.
|
Boolean |
getEnableJumboFrame()
Get
|
EnhancedService |
getEnhancedService()
Get Enhanced services.
|
String |
getHostName()
Get Specifies the HostName of the cloud virtual machine.
the dot (.) and hyphen (-) cannot be used at the beginning or end of the HostName, and cannot be used consecutively.for Windows instances: the character length is 2 to 15. |
String |
getHpcClusterId()
Get High-performance computing cluster ID.
|
String |
getImageId()
Get Specify an effective [mirror](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`.
|
InstanceChargePrepaid |
getInstanceChargePrepaid()
Get Prepaid mode, that is, annual and monthly subscription related parameter settings.
|
String |
getInstanceChargeType()
Get Instance [billing mode](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1).
PREPAID: prepaid, that is, monthly subscription.POSTPAID_BY_HOUR: pay-as-you-go by hour.CDHPAID: CDH instance (created based on CDH; the resources of the host are free of charge).SPOTPAID: spot payment.Default value: POSTPAID_BY_HOUR. |
Long |
getInstanceCount()
Get Number of instances to purchase.
|
InstanceMarketOptionsRequest |
getInstanceMarketOptions()
Get Market-Related options of the instance, such as relevant parameters of the bidding instance.
|
String |
getInstanceName()
Get Instance display name.
|
String |
getInstanceType()
Get Instance model.
|
InternetAccessible |
getInternetAccessible()
Get Public bandwidth-related settings.
|
String |
getLaunchTemplateName()
Get Name of an instance launch template.
|
TagSpecification[] |
getLaunchTemplateTagSpecification()
Get Description list of tags.
|
String |
getLaunchTemplateVersionDescription()
Get Version description of an instance launch template.
|
LoginSettings |
getLoginSettings()
Get Instance login settings.
|
Metadata |
getMetadata()
Get Custom metadata.
|
Placement |
getPlacement()
Get Location of the instance.
|
String[] |
getSecurityGroupIds()
Get Security group to which an instance belongs.
|
SystemDisk |
getSystemDisk()
Get Instance system disk configuration information.
|
TagSpecification[] |
getTagSpecification()
Get List of tag descriptions.
|
String |
getTemplateDataModifyAction()
Get Specifies that only the Update and Replace parameters are allowed.
|
String |
getUserData()
Get User data provided for an instance must be encoded in base64.
|
VirtualPrivateCloud |
getVirtualPrivateCloud()
Get VPC-related information configuration.
|
void |
setActionTimer(ActionTimer ActionTimer)
Set Scheduled task.
|
void |
setCamRoleName(String CamRoleName)
Set CAM role name.
|
void |
setClientToken(String ClientToken)
Set A string used to ensure the idempotence of the request.
|
void |
setDataDisks(DataDisk[] DataDisks)
Set Instance data disk configuration information.
|
void |
setDisableApiTermination(Boolean DisableApiTermination)
Set Instance destruction protection flag: indicates whether an instance is allowed to be deleted through an api.
|
void |
setDisasterRecoverGroupIds(String[] DisasterRecoverGroupIds)
Set Placement group ID.
|
void |
setDryRun(Boolean DryRun)
Set Whether it is a pre-check for this request only.
|
void |
setEnableJumboFrame(Boolean EnableJumboFrame)
Set
|
void |
setEnhancedService(EnhancedService EnhancedService)
Set Enhanced services.
|
void |
setHostName(String HostName)
Set Specifies the HostName of the cloud virtual machine.
the dot (.) and hyphen (-) cannot be used at the beginning or end of the HostName, and cannot be used consecutively.for Windows instances: the character length is 2 to 15. |
void |
setHpcClusterId(String HpcClusterId)
Set High-performance computing cluster ID.
|
void |
setImageId(String ImageId)
Set Specify an effective [mirror](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`.
|
void |
setInstanceChargePrepaid(InstanceChargePrepaid InstanceChargePrepaid)
Set Prepaid mode, that is, annual and monthly subscription related parameter settings.
|
void |
setInstanceChargeType(String InstanceChargeType)
Set Instance [billing mode](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1).
PREPAID: prepaid, that is, monthly subscription.POSTPAID_BY_HOUR: pay-as-you-go by hour.CDHPAID: CDH instance (created based on CDH; the resources of the host are free of charge).SPOTPAID: spot payment.Default value: POSTPAID_BY_HOUR. |
void |
setInstanceCount(Long InstanceCount)
Set Number of instances to purchase.
|
void |
setInstanceMarketOptions(InstanceMarketOptionsRequest InstanceMarketOptions)
Set Market-Related options of the instance, such as relevant parameters of the bidding instance.
|
void |
setInstanceName(String InstanceName)
Set Instance display name.
|
void |
setInstanceType(String InstanceType)
Set Instance model.
|
void |
setInternetAccessible(InternetAccessible InternetAccessible)
Set Public bandwidth-related settings.
|
void |
setLaunchTemplateName(String LaunchTemplateName)
Set Name of an instance launch template.
|
void |
setLaunchTemplateTagSpecification(TagSpecification[] LaunchTemplateTagSpecification)
Set Description list of tags.
|
void |
setLaunchTemplateVersionDescription(String LaunchTemplateVersionDescription)
Set Version description of an instance launch template.
|
void |
setLoginSettings(LoginSettings LoginSettings)
Set Instance login settings.
|
void |
setMetadata(Metadata Metadata)
Set Custom metadata.
|
void |
setPlacement(Placement Placement)
Set Location of the instance.
|
void |
setSecurityGroupIds(String[] SecurityGroupIds)
Set Security group to which an instance belongs.
|
void |
setSystemDisk(SystemDisk SystemDisk)
Set Instance system disk configuration information.
|
void |
setTagSpecification(TagSpecification[] TagSpecification)
Set List of tag descriptions.
|
void |
setTemplateDataModifyAction(String TemplateDataModifyAction)
Set Specifies that only the Update and Replace parameters are allowed.
|
void |
setUserData(String UserData)
Set User data provided for an instance must be encoded in base64.
|
void |
setVirtualPrivateCloud(VirtualPrivateCloud VirtualPrivateCloud)
Set VPC-related information configuration.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public CreateLaunchTemplateRequest()
public CreateLaunchTemplateRequest(CreateLaunchTemplateRequest source)
public String getLaunchTemplateName()
public void setLaunchTemplateName(String LaunchTemplateName)
LaunchTemplateName
- Name of an instance launch template. It contains 2 to 128 English or Chinese characters.public Placement getPlacement()
public void setPlacement(Placement Placement)
Placement
- Location of the instance. You can specify attributes such as availability zone, project, and host (specified when creating a instance on the CDH) to which the instance belongs through this parameter.public String getImageId()
public void setImageId(String ImageId)
ImageId
- Specify an effective [mirror](https://intl.cloud.tencent.com/document/product/213/4940?from_cn_redirect=1) ID in the format of `img-xxx`. there are four image types: public String getLaunchTemplateVersionDescription()
public void setLaunchTemplateVersionDescription(String LaunchTemplateVersionDescription)
LaunchTemplateVersionDescription
- Version description of an instance launch template. It contains 2 to 256 English or Chinese characters.public String getInstanceType()
public void setInstanceType(String InstanceType)
InstanceType
- Instance model. Different instance models specify different resource specifications.
public SystemDisk getSystemDisk()
public void setSystemDisk(SystemDisk SystemDisk)
SystemDisk
- Instance system disk configuration information. If this parameter is not specified, it will be assigned based on the system default values.public DataDisk[] getDataDisks()
public void setDataDisks(DataDisk[] DataDisks)
DataDisks
- Instance data disk configuration information. if not specified, no data disks are purchased by default. support specifying 21 data disks at the time of purchase, among which a maximum of 1 LOCAL_BASIC data disk or LOCAL_SSD data disk can be included, and a maximum of 20 CLOUD_BASIC data disks, CLOUD_PREMIUM data disks or CLOUD_SSD data disks can be included.public VirtualPrivateCloud getVirtualPrivateCloud()
public void setVirtualPrivateCloud(VirtualPrivateCloud VirtualPrivateCloud)
VirtualPrivateCloud
- VPC-related information configuration. You can specify information such as VPC ID and subnet ID through this parameter. If this parameter is not specified, use the basic network by default. If a VPC IP is specified in this parameter, it indicates the primary network interface card IP of each instance. In addition, the number of the InstanceCount parameter should be consistent with the number of the VPC IP and should not exceed 20.public InternetAccessible getInternetAccessible()
public void setInternetAccessible(InternetAccessible InternetAccessible)
InternetAccessible
- Public bandwidth-related settings. If this parameter is not specified, the public bandwidth is 0 Mbps by default.public Long getInstanceCount()
public void setInstanceCount(Long InstanceCount)
InstanceCount
- Number of instances to purchase. value range for monthly subscription instances: [1, 300]. value range for pay-as-you-go instances: [1, 100]. default value: 1. the number of instances to purchase must not exceed the remaining user quota. for specific quota limitations, see [CVM instance purchase limitations](https://intl.cloud.tencent.com/document/product/213/2664?from_cn_redirect=1).public String getInstanceName()
public void setInstanceName(String InstanceName)
InstanceName
- Instance display name. public LoginSettings getLoginSettings()
public void setLoginSettings(LoginSettings LoginSettings)
LoginSettings
- Instance login settings. this parameter allows you to set the instance login method to key or maintain the original login settings of the image.public String[] getSecurityGroupIds()
public void setSecurityGroupIds(String[] SecurityGroupIds)
SecurityGroupIds
- Security group to which an instance belongs. this parameter can be obtained by calling the sgId field in the returned value of [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808?from_cn_redirect=1). if not specified, the default security group is bound.public EnhancedService getEnhancedService()
public void setEnhancedService(EnhancedService EnhancedService)
EnhancedService
- Enhanced services. You can specify whether to enable services such as Cloud Security and Cloud Monitor through this parameter. If this parameter is not specified, Cloud Monitor and Cloud Security are enabled for public images by default, but not enabled for custom images and marketplace images by default. Instead, they use services retained in the images.public String getClientToken()
public void setClientToken(String ClientToken)
ClientToken
- A string used to ensure the idempotence of the request. This string is generated by the customer and should be unique across different requests, with a maximum length of 64 ASCII characters. If this parameter is not specified, the idempotence of the request cannot be guaranteed.public String getHostName()
public void setHostName(String HostName)
HostName
- Specifies the HostName of the cloud virtual machine.public ActionTimer getActionTimer()
public void setActionTimer(ActionTimer ActionTimer)
ActionTimer
- Scheduled task. You can specify a scheduled task for the instance through this parameter. Currently, only scheduled termination is supported.public String[] getDisasterRecoverGroupIds()
public void setDisasterRecoverGroupIds(String[] DisasterRecoverGroupIds)
DisasterRecoverGroupIds
- Placement group ID. Only one can be specified.public TagSpecification[] getTagSpecification()
public void setTagSpecification(TagSpecification[] TagSpecification)
TagSpecification
- List of tag descriptions. You can bind tags to corresponding resource instances at the same time by specifying this parameter. Currently, only binding tags to the CVM is supported.public InstanceMarketOptionsRequest getInstanceMarketOptions()
public void setInstanceMarketOptions(InstanceMarketOptionsRequest InstanceMarketOptions)
InstanceMarketOptions
- Market-Related options of the instance, such as relevant parameters of the bidding instance. this parameter is required if the payment mode of the specified instance is spot payment.public String getUserData()
public void setUserData(String UserData)
UserData
- User data provided for an instance must be encoded in base64. valid values for maximum data size are up to 16 KB. for details on obtaining this parameter, see running commands at startup for Windows (https://intl.cloud.tencent.com/document/product/213/17526?from_cn_redirect=1) and Linux (https://intl.cloud.tencent.com/document/product/213/17525?from_cn_redirect=1).public Boolean getDryRun()
public void setDryRun(Boolean DryRun)
DryRun
- Whether it is a pre-check for this request only.
true: sends a check request without creating an instance. check items include whether required parameters are filled in, request format, service limits, and cvm inventory.
If the check fails, return the corresponding error code.
If the check passed, return RequestId.
false (default): sends a normal request. after passing the check, creates an instance directly.public String getCamRoleName()
public void setCamRoleName(String CamRoleName)
CamRoleName
- CAM role name. it can be obtained through the roleName in the return value from the API DescribeRoleList.public String getHpcClusterId()
public void setHpcClusterId(String HpcClusterId)
HpcClusterId
- High-performance computing cluster ID. If the created instance is a high-performance computing instance, the cluster where the instance is placed should be specified. Otherwise, it cannot be specified.public String getInstanceChargeType()
public void setInstanceChargeType(String InstanceChargeType)
InstanceChargeType
- Instance [billing mode](https://intl.cloud.tencent.com/document/product/213/2180?from_cn_redirect=1).public InstanceChargePrepaid getInstanceChargePrepaid()
public void setInstanceChargePrepaid(InstanceChargePrepaid InstanceChargePrepaid)
InstanceChargePrepaid
- Prepaid mode, that is, annual and monthly subscription related parameter settings. Through this parameter, you can specify the purchase duration of annual and monthly subscription instances, whether to set auto-renewal, etc. If the specified instance's billing mode is the prepaid mode, this parameter must be passed.public Boolean getDisableApiTermination()
public void setDisableApiTermination(Boolean DisableApiTermination)
DisableApiTermination
- Instance destruction protection flag: indicates whether an instance is allowed to be deleted through an api. value ranges from: - **TRUE**: indicates that instance protection is enabled, deletion through apis is not allowed. - **FALSE**: indicates that instance protection is disabled, deletion through apis is allowed. default value: FALSE.public Boolean getEnableJumboFrame()
public void setEnableJumboFrame(Boolean EnableJumboFrame)
EnableJumboFrame
- public TagSpecification[] getLaunchTemplateTagSpecification()
public void setLaunchTemplateTagSpecification(TagSpecification[] LaunchTemplateTagSpecification)
LaunchTemplateTagSpecification
- Description list of tags. by specifying this parameter, tags can be bound to the instance launch template.public Metadata getMetadata()
public void setMetadata(Metadata Metadata)
Metadata
- Custom metadata. specifies that custom metadata key-value pairs can be added when creating a CVM.
Note: this field is in beta test.public String getTemplateDataModifyAction()
public void setTemplateDataModifyAction(String TemplateDataModifyAction)
TemplateDataModifyAction
- Specifies that only the Update and Replace parameters are allowed. this parameter is valid only when custom Metadata is used in the template and Metadata is also transmitted in RunInstances. defaults to Replace.
-Update: if template t contains this parameter with a value of Update and metadata=[k1:v1, k2:v2], then RunInstances (with metadata=[k2:v3]) + t creates a cvm using metadata=[k1:v1, k2:v3].
-Replace: if the template t contains this parameter with a value of Replace and metadata=[k1:v1, k2:v2], then when creating a cvm using RunInstances (with metadata=[k2:v3]) + t, the created cvm will use metadata=[k2:v3].
Note: this field is in beta test.Copyright © 2025. All rights reserved.