public class CreateLaunchTemplateRequest
extends com.aliyun.tea.TeaModel
限定符和类型 | 类和说明 |
---|---|
static class |
CreateLaunchTemplateRequest.CreateLaunchTemplateRequestDataDisk |
static class |
CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface |
static class |
CreateLaunchTemplateRequest.CreateLaunchTemplateRequestSystemDisk |
static class |
CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTag |
static class |
CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTemplateTag |
限定符和类型 | 字段和说明 |
---|---|
String |
autoReleaseTime
The automatic release time of the instance.
|
Boolean |
autoRenew
Specifies whether to enable auto-renewal.
|
Integer |
autoRenewPeriod
The auto-renewal period of the instance.
|
String |
creditSpecification
The performance mode of the burstable instance.
|
List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestDataDisk> |
dataDisk
The data disks.
|
Boolean |
deletionProtection
Specifies whether to enable release protection for the instance.
|
String |
deploymentSetId
The ID of the deployment set to which to deploy the instance.
|
String |
description
The instance description.
|
Boolean |
enableVmOsConfig
Specifies whether to enable the operating system configuration of the instance.
|
String |
hostName
The instance hostname.
|
String |
httpEndpoint
example:
enabled
|
Integer |
httpPutResponseHopLimit
example:
3
|
String |
httpTokens
example:
optional
|
String |
imageId
The ID of the image to use to create the instance.
|
String |
imageOwnerAlias
The source of the image.
|
String |
instanceChargeType
The billing method of the instance.
|
String |
instanceName
The instance name.
|
String |
instanceType
The instance type of the instance.
|
String |
internetChargeType
The billing method for network usage.
|
Integer |
internetMaxBandwidthIn
The maximum inbound public bandwidth.
|
Integer |
internetMaxBandwidthOut
The maximum outbound public bandwidth.
|
String |
ioOptimized
Specifies whether to create an I/O optimized instance.
|
Integer |
ipv6AddressCount
The number of IPv6 addresses to randomly generate for the primary elastic network interface (ENI).
|
String |
keyPairName
The name of the key pair.
|
String |
launchTemplateName
The name of the launch template.
|
List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface> |
networkInterface
The information of the ENIs.
|
String |
networkType
The network type of the instance.
|
String |
ownerAccount |
Long |
ownerId |
Boolean |
passwordInherit
Specifies whether to use the preset password of the image.
|
Integer |
period
The subscription duration of the instance.
|
String |
periodUnit
The unit of the subscription period.
|
String |
privateIpAddress
The private IP address to assign to the instance.
|
String |
ramRoleName
The name of the instance Resource Access Management (RAM) role.
|
String |
regionId
The ID of the region in which to create the launch template.
|
String |
resourceGroupId
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and elastic network interface (ENI).
|
String |
resourceOwnerAccount |
Long |
resourceOwnerId |
String |
securityEnhancementStrategy
Specifies whether to enable security hardening for the operating system.
|
String |
securityGroupId
The ID of the security group to which to assign the instance.
|
List<String> |
securityGroupIds
The IDs of the security groups to which to assign the instance.
|
Integer |
spotDuration
The protection period of the preemptible instance.
|
Float |
spotPriceLimit
The maximum hourly price of the instance.
|
String |
spotStrategy
The bidding policy for the pay-as-you-go instance.
|
CreateLaunchTemplateRequest.CreateLaunchTemplateRequestSystemDisk |
systemDisk |
List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTag> |
tag
The tags to add to the instance, disks, and primary ENI that are created from the launch template.
|
String |
templateResourceGroupId
The ID of the resource group to which the launch template belongs.
|
List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTemplateTag> |
templateTag
The tags to add to the launch template.
|
String |
userData
The user data of the instance.
|
String |
versionDescription
The description of the launch template version.
|
String |
vpcId
The ID of the virtual private cloud (VPC).
|
String |
vSwitchId
The ID of the vSwitch to which to connect the instance.
|
String |
zoneId
The ID of the zone in which to create the instance.
|
构造器和说明 |
---|
CreateLaunchTemplateRequest() |
@NameInMap(value="SystemDisk") public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestSystemDisk systemDisk
@NameInMap(value="AutoReleaseTime") public String autoReleaseTime
The automatic release time of the instance. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.
ss
is not 00
, the time is automatically rounded down to the nearest minute based on the value of mm
.2018-01-01T12:05:00Z
@NameInMap(value="AutoRenew") public Boolean autoRenew
Specifies whether to enable auto-renewal. Valid values:
Default value: false.
example:This parameter takes effect only if you set
InstanceChargeType
toPrePaid
.
true
@NameInMap(value="AutoRenewPeriod") public Integer autoRenewPeriod
The auto-renewal period of the instance. Valid values:
Valid values when PeriodUnit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60.
Default value: 1.
example:1
@NameInMap(value="CreditSpecification") public String creditSpecification
The performance mode of the burstable instance. Valid values:
Standard
@NameInMap(value="DataDisk") public List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestDataDisk> dataDisk
The data disks.
@NameInMap(value="DeletionProtection") public Boolean deletionProtection
Specifies whether to enable release protection for the instance. This parameter specifies whether you can use the ECS console or call the DeleteInstance operation to release the instance. Valid values:
Default value: false.
example:This parameter is applicable only to pay-as-you-go instances. The release protection feature can protect instances against manual releases, but not against automatic releases.
false
@NameInMap(value="DeploymentSetId") public String deploymentSetId
The ID of the deployment set to which to deploy the instance.
example:ds-bp1brhwhoqinyjd6****
@NameInMap(value="Description") public String description
The instance description. The description must be 2 to 256 characters in length and cannot start with http://
or https://
.
testECSDescription
@NameInMap(value="EnableVmOsConfig") public Boolean enableVmOsConfig
Specifies whether to enable the operating system configuration of the instance.
example:This parameter will be removed in the future. To ensure future compatibility, we recommend that you use other parameters.
false
@NameInMap(value="HostName") public String hostName
The instance hostname.
testHostName
@NameInMap(value="HttpEndpoint") public String httpEndpoint
enabled
@NameInMap(value="HttpPutResponseHopLimit") public Integer httpPutResponseHopLimit
3
@NameInMap(value="HttpTokens") public String httpTokens
optional
@NameInMap(value="ImageId") public String imageId
The ID of the image to use to create the instance. You can call the DescribeImages operation to query available images.
example:win2008r2_64_ent_sp1_en-us_40G_alibase_20170915.vhd
@NameInMap(value="ImageOwnerAlias") public String imageOwnerAlias
The source of the image. Valid values:
system
@NameInMap(value="InstanceChargeType") public String instanceChargeType
The billing method of the instance. Valid values:
InvalidPayMethod
error is returned.PrePaid
@NameInMap(value="InstanceName") public String instanceName
The instance name. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). The default value of this parameter is the InstanceId
value.
When you create multiple ECS instances at a time, you can batch configure sequential names for the instances. The instance names can contain square brackets ([]) and commas (,). For more information, see Batch configure sequential names or hostnames for multiple instances.
example:k8s-node-[1,4]-alibabacloud
@NameInMap(value="InstanceType") public String instanceType
The instance type of the instance. For more information, see Instance families. Alternatively, you can call the DescribeInstanceTypes operation to query the most recent instance type list.
example:ecs.g5.large
@NameInMap(value="InternetChargeType") public String internetChargeType
The billing method for network usage. Valid values:
example:When the pay-by-traffic billing method for network usage is used, the maximum inbound and outbound bandwidths are used as the upper limits of bandwidths instead of guaranteed performance specifications. In scenarios where demand outstrips resource supplies, these maximum bandwidths may be limited. If you want guaranteed bandwidths for your instance, use the pay-by-bandwidth billing method for network usage.
PayByTraffic
@NameInMap(value="InternetMaxBandwidthIn") public Integer internetMaxBandwidthIn
The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:
InternetMaxBandwidthOut
value and the default value is the InternetMaxBandwidthOut
value.10
@NameInMap(value="InternetMaxBandwidthOut") public Integer internetMaxBandwidthOut
The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100.
example:10
@NameInMap(value="IoOptimized") public String ioOptimized
Specifies whether to create an I/O optimized instance. Valid values:
optimized
@NameInMap(value="Ipv6AddressCount") public Integer ipv6AddressCount
The number of IPv6 addresses to randomly generate for the primary elastic network interface (ENI). Valid values: 1 to 10.
example:1
@NameInMap(value="KeyPairName") public String keyPairName
The name of the key pair. This parameter is empty by default.
Password
parameter takes effect even if the KeyPairName parameter is specified.testKeyPairName
@NameInMap(value="LaunchTemplateName") public String launchTemplateName
The name of the launch template. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http://
or https://
. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
This parameter is required.
example:testLaunchTemplateName
@NameInMap(value="NetworkInterface") public List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface> networkInterface
The information of the ENIs.
@NameInMap(value="NetworkType") public String networkType
The network type of the instance. Valid values:
vpc
@NameInMap(value="OwnerAccount") public String ownerAccount
@NameInMap(value="OwnerId") public Long ownerId
@NameInMap(value="PasswordInherit") public Boolean passwordInherit
Specifies whether to use the preset password of the image.
example:If you set the PasswordInherit parameter to true, make sure that you leave the Password parameter empty and the selected image has a preset password.
false
@NameInMap(value="Period") public Integer period
The subscription duration of the instance. Unit: months. This parameter is valid and required only when InstanceChargeType
is set to PrePaid
. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
1
@NameInMap(value="PeriodUnit") public String periodUnit
The unit of the subscription period. Valid values:
Month (default)
example:Month
@NameInMap(value="PrivateIpAddress") public String privateIpAddress
The private IP address to assign to the instance.
To assign a private IP address to an instance that resides in a VPC, make sure that the IP address is an idle IP address within the CIDR block of the vSwitch specified by the VSwitchId
parameter.
10.1.**.**
@NameInMap(value="RamRoleName") public String ramRoleName
The name of the instance Resource Access Management (RAM) role. You can call the ListRoles operation provided by RAM to query the instance RAM roles that you created.
example:testRamRoleName
@NameInMap(value="RegionId") public String regionId
The ID of the region in which to create the launch template. You can call the DescribeRegions operation to query the most recent region list.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="ResourceGroupId") public String resourceGroupId
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and elastic network interface (ENI).
example:rg-bp67acfmxazb4p****
@NameInMap(value="ResourceOwnerAccount") public String resourceOwnerAccount
@NameInMap(value="ResourceOwnerId") public Long resourceOwnerId
@NameInMap(value="SecurityEnhancementStrategy") public String securityEnhancementStrategy
Specifies whether to enable security hardening for the operating system. Valid values:
Deactive
@NameInMap(value="SecurityGroupId") public String securityGroupId
The ID of the security group to which to assign the instance. Instances in the same security group can communicate with each other. A security group can contain up to 1,000 instances.
example:You cannot specify both the
SecurityGroupId
andSecurityGroupIds.N
parameters.
sg-bp15ed6xe1yxeycg****
@NameInMap(value="SecurityGroupIds") public List<String> securityGroupIds
The IDs of the security groups to which to assign the instance. The valid values of N are based on the maximum number of security groups to which the instance can belong. For more information, see the "Security group limits" section in Limits.
example:You cannot specify both the
SecurityGroupId
andSecurityGroupIds.N
parameters.
sg-bp15ed6xe1yxeycg7****
@NameInMap(value="SpotDuration") public Integer spotDuration
The protection period of the preemptible instance. Unit: hours. Default value: 1. Valid values:
Alibaba Cloud sends an ECS system event to notify you 5 minutes before the instance is released. Preemptible instances are billed by second. We recommend that you specify a protection period based on your business requirements.
example:This parameter takes effect only if SpotStrategy is set to SpotWithPriceLimit or SpotAsPriceGo.
1
@NameInMap(value="SpotPriceLimit") public Float spotPriceLimit
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
.
0.97
@NameInMap(value="SpotStrategy") public String spotStrategy
The bidding policy for the pay-as-you-go instance. This parameter is valid only when the InstanceChargeType
parameter is set to PostPaid
. Valid values:
NoSpot
@NameInMap(value="Tag") public List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTag> tag
The tags to add to the instance, disks, and primary ENI that are created from the launch template.
Scenario
If you created a launch template by calling the CreateLaunchTemplate operation and use the default version that is automatically generated for the launch template to create instances, the specified tags are automatically added to the created instances, disks, and primary ENIs. For more information about the default versions of launch templates, see [xxxx]\(url).
@NameInMap(value="TemplateResourceGroupId") public String templateResourceGroupId
The ID of the resource group to which the launch template belongs.
example:rg-bp67acfmxazb4p****
@NameInMap(value="TemplateTag") public List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTemplateTag> templateTag
The tags to add to the launch template.
You can add tags to or query the tags of launch templates by calling API operations. You cannot add tags to or query the tags of launch templates in the ECS console.
@NameInMap(value="UserData") public String userData
The user data of the instance. The user data must be encoded in Base64. The maximum size of raw data is 32 KB.
example:ZWNobyBoZWxsbyBlY3Mh
@NameInMap(value="VSwitchId") public String vSwitchId
The ID of the vSwitch to which to connect the instance. This parameter is required if you specify the VpcId parameter.
example:vsw-bp1s5fnvk4gn2tws0****
@NameInMap(value="VersionDescription") public String versionDescription
The description of the launch template version. The description must be 2 to 256 characters in length and cannot start with http://
or https://
.
testVersionDescription
@NameInMap(value="VpcId") public String vpcId
The ID of the virtual private cloud (VPC).
example:vpc-bp12433upq1y5scen****
@NameInMap(value="ZoneId") public String zoneId
The ID of the zone in which to create the instance.
example:cn-hangzhou-g
public static CreateLaunchTemplateRequest build(Map<String,?> map) throws Exception
Exception
public CreateLaunchTemplateRequest setSystemDisk(CreateLaunchTemplateRequest.CreateLaunchTemplateRequestSystemDisk systemDisk)
public CreateLaunchTemplateRequest.CreateLaunchTemplateRequestSystemDisk getSystemDisk()
public CreateLaunchTemplateRequest setAutoReleaseTime(String autoReleaseTime)
public String getAutoReleaseTime()
public CreateLaunchTemplateRequest setAutoRenew(Boolean autoRenew)
public Boolean getAutoRenew()
public CreateLaunchTemplateRequest setAutoRenewPeriod(Integer autoRenewPeriod)
public Integer getAutoRenewPeriod()
public CreateLaunchTemplateRequest setCreditSpecification(String creditSpecification)
public String getCreditSpecification()
public CreateLaunchTemplateRequest setDataDisk(List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestDataDisk> dataDisk)
public List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestDataDisk> getDataDisk()
public CreateLaunchTemplateRequest setDeletionProtection(Boolean deletionProtection)
public Boolean getDeletionProtection()
public CreateLaunchTemplateRequest setDeploymentSetId(String deploymentSetId)
public String getDeploymentSetId()
public CreateLaunchTemplateRequest setDescription(String description)
public String getDescription()
public CreateLaunchTemplateRequest setEnableVmOsConfig(Boolean enableVmOsConfig)
public Boolean getEnableVmOsConfig()
public CreateLaunchTemplateRequest setHostName(String hostName)
public String getHostName()
public CreateLaunchTemplateRequest setHttpEndpoint(String httpEndpoint)
public String getHttpEndpoint()
public CreateLaunchTemplateRequest setHttpPutResponseHopLimit(Integer httpPutResponseHopLimit)
public Integer getHttpPutResponseHopLimit()
public CreateLaunchTemplateRequest setHttpTokens(String httpTokens)
public String getHttpTokens()
public CreateLaunchTemplateRequest setImageId(String imageId)
public String getImageId()
public CreateLaunchTemplateRequest setImageOwnerAlias(String imageOwnerAlias)
public String getImageOwnerAlias()
public CreateLaunchTemplateRequest setInstanceChargeType(String instanceChargeType)
public String getInstanceChargeType()
public CreateLaunchTemplateRequest setInstanceName(String instanceName)
public String getInstanceName()
public CreateLaunchTemplateRequest setInstanceType(String instanceType)
public String getInstanceType()
public CreateLaunchTemplateRequest setInternetChargeType(String internetChargeType)
public String getInternetChargeType()
public CreateLaunchTemplateRequest setInternetMaxBandwidthIn(Integer internetMaxBandwidthIn)
public Integer getInternetMaxBandwidthIn()
public CreateLaunchTemplateRequest setInternetMaxBandwidthOut(Integer internetMaxBandwidthOut)
public Integer getInternetMaxBandwidthOut()
public CreateLaunchTemplateRequest setIoOptimized(String ioOptimized)
public String getIoOptimized()
public CreateLaunchTemplateRequest setIpv6AddressCount(Integer ipv6AddressCount)
public Integer getIpv6AddressCount()
public CreateLaunchTemplateRequest setKeyPairName(String keyPairName)
public String getKeyPairName()
public CreateLaunchTemplateRequest setLaunchTemplateName(String launchTemplateName)
public String getLaunchTemplateName()
public CreateLaunchTemplateRequest setNetworkInterface(List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface> networkInterface)
public List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestNetworkInterface> getNetworkInterface()
public CreateLaunchTemplateRequest setNetworkType(String networkType)
public String getNetworkType()
public CreateLaunchTemplateRequest setOwnerAccount(String ownerAccount)
public String getOwnerAccount()
public CreateLaunchTemplateRequest setOwnerId(Long ownerId)
public Long getOwnerId()
public CreateLaunchTemplateRequest setPasswordInherit(Boolean passwordInherit)
public Boolean getPasswordInherit()
public CreateLaunchTemplateRequest setPeriod(Integer period)
public Integer getPeriod()
public CreateLaunchTemplateRequest setPeriodUnit(String periodUnit)
public String getPeriodUnit()
public CreateLaunchTemplateRequest setPrivateIpAddress(String privateIpAddress)
public String getPrivateIpAddress()
public CreateLaunchTemplateRequest setRamRoleName(String ramRoleName)
public String getRamRoleName()
public CreateLaunchTemplateRequest setRegionId(String regionId)
public String getRegionId()
public CreateLaunchTemplateRequest setResourceGroupId(String resourceGroupId)
public String getResourceGroupId()
public CreateLaunchTemplateRequest setResourceOwnerAccount(String resourceOwnerAccount)
public String getResourceOwnerAccount()
public CreateLaunchTemplateRequest setResourceOwnerId(Long resourceOwnerId)
public Long getResourceOwnerId()
public CreateLaunchTemplateRequest setSecurityEnhancementStrategy(String securityEnhancementStrategy)
public String getSecurityEnhancementStrategy()
public CreateLaunchTemplateRequest setSecurityGroupId(String securityGroupId)
public String getSecurityGroupId()
public CreateLaunchTemplateRequest setSecurityGroupIds(List<String> securityGroupIds)
public CreateLaunchTemplateRequest setSpotDuration(Integer spotDuration)
public Integer getSpotDuration()
public CreateLaunchTemplateRequest setSpotPriceLimit(Float spotPriceLimit)
public Float getSpotPriceLimit()
public CreateLaunchTemplateRequest setSpotStrategy(String spotStrategy)
public String getSpotStrategy()
public CreateLaunchTemplateRequest setTag(List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTag> tag)
public List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTag> getTag()
public CreateLaunchTemplateRequest setTemplateResourceGroupId(String templateResourceGroupId)
public String getTemplateResourceGroupId()
public CreateLaunchTemplateRequest setTemplateTag(List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTemplateTag> templateTag)
public List<CreateLaunchTemplateRequest.CreateLaunchTemplateRequestTemplateTag> getTemplateTag()
public CreateLaunchTemplateRequest setUserData(String userData)
public String getUserData()
public CreateLaunchTemplateRequest setVSwitchId(String vSwitchId)
public String getVSwitchId()
public CreateLaunchTemplateRequest setVersionDescription(String versionDescription)
public String getVersionDescription()
public CreateLaunchTemplateRequest setVpcId(String vpcId)
public String getVpcId()
public CreateLaunchTemplateRequest setZoneId(String zoneId)
public String getZoneId()
Copyright © 2024. All rights reserved.