public static final class CreateLaunchTemplateRequest.Builder extends Object
限定符和类型 | 方法和说明 |
---|---|
CreateLaunchTemplateRequest.Builder |
autoReleaseTime(String autoReleaseTime)
The automatic release time of the instance.
|
CreateLaunchTemplateRequest.Builder |
autoRenew(Boolean autoRenew)
Specifies whether to enable auto-renewal for the instance.
|
CreateLaunchTemplateRequest.Builder |
autoRenewPeriod(Integer autoRenewPeriod)
The auto-renewal period of the instance.
|
CreateLaunchTemplateRequest |
build() |
CreateLaunchTemplateRequest.Builder |
creditSpecification(String creditSpecification)
The performance mode of the burstable instance.
|
CreateLaunchTemplateRequest.Builder |
dataDisk(List<CreateLaunchTemplateRequest.DataDisk> dataDisk)
The data disks.
|
CreateLaunchTemplateRequest.Builder |
deletionProtection(Boolean deletionProtection)
Specifies whether to enable release protection for the instance.
|
CreateLaunchTemplateRequest.Builder |
deploymentSetId(String deploymentSetId)
The ID of the deployment set to which to deploy the instance.
|
CreateLaunchTemplateRequest.Builder |
description(String description)
The instance description.
|
CreateLaunchTemplateRequest.Builder |
enableVmOsConfig(Boolean enableVmOsConfig)
Specifies whether to enable the operating system configuration of the instance.
|
CreateLaunchTemplateRequest.Builder |
hostName(String hostName)
The instance hostname.
|
CreateLaunchTemplateRequest.Builder |
imageId(String imageId)
The ID of the image to use to create the instance.
|
CreateLaunchTemplateRequest.Builder |
imageOwnerAlias(String imageOwnerAlias)
The source of the image.
|
CreateLaunchTemplateRequest.Builder |
instanceChargeType(String instanceChargeType)
The billing method of the instance.
|
CreateLaunchTemplateRequest.Builder |
instanceName(String instanceName)
The instance name.
|
CreateLaunchTemplateRequest.Builder |
instanceType(String instanceType)
The instance type of the instance.
|
CreateLaunchTemplateRequest.Builder |
internetChargeType(String internetChargeType)
The billing method for network usage.
|
CreateLaunchTemplateRequest.Builder |
internetMaxBandwidthIn(Integer internetMaxBandwidthIn)
The maximum inbound public bandwidth.
|
CreateLaunchTemplateRequest.Builder |
internetMaxBandwidthOut(Integer internetMaxBandwidthOut)
The maximum outbound public bandwidth.
|
CreateLaunchTemplateRequest.Builder |
ioOptimized(String ioOptimized)
Specifies whether to create an I/O optimized instance.
|
CreateLaunchTemplateRequest.Builder |
ipv6AddressCount(Integer ipv6AddressCount)
The number of IPv6 addresses to randomly generate for the primary elastic network interface (ENI).
|
CreateLaunchTemplateRequest.Builder |
keyPairName(String keyPairName)
The name of the key pair.
|
CreateLaunchTemplateRequest.Builder |
launchTemplateName(String launchTemplateName)
The name of the launch template.
|
CreateLaunchTemplateRequest.Builder |
networkInterface(List<CreateLaunchTemplateRequest.NetworkInterface> networkInterface)
The information of the ENIs.
|
CreateLaunchTemplateRequest.Builder |
networkType(String networkType)
The network type of the instance.
|
CreateLaunchTemplateRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateLaunchTemplateRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateLaunchTemplateRequest.Builder |
passwordInherit(Boolean passwordInherit)
Specifies whether to use the preset password of the image.
|
CreateLaunchTemplateRequest.Builder |
period(Integer period)
The subscription duration of the instance.
|
CreateLaunchTemplateRequest.Builder |
periodUnit(String periodUnit)
The unit of the subscription period.
|
CreateLaunchTemplateRequest.Builder |
privateIpAddress(String privateIpAddress)
The private IP address to assign to the instance.
|
CreateLaunchTemplateRequest.Builder |
ramRoleName(String ramRoleName)
The name of the instance Resource Access Management (RAM) role.
|
CreateLaunchTemplateRequest.Builder |
regionId(String regionId)
The ID of the region in which to create the launch template.
|
CreateLaunchTemplateRequest.Builder |
resourceGroupId(String resourceGroupId)
The ID of the resource group to which to assign the instance, Elastic Block Storage (EBS) device, and elastic network interface (ENI).
|
CreateLaunchTemplateRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateLaunchTemplateRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
CreateLaunchTemplateRequest.Builder |
securityEnhancementStrategy(String securityEnhancementStrategy)
Specifies whether to enable security hardening for the operating system.
|
CreateLaunchTemplateRequest.Builder |
securityGroupId(String securityGroupId)
The ID of the security group to which to assign the instance.
|
CreateLaunchTemplateRequest.Builder |
securityGroupIds(List<String> securityGroupIds)
The IDs of the security groups to which to assign the instance.
|
CreateLaunchTemplateRequest.Builder |
sourceRegionId(String sourceRegionId)
SourceRegionId.
|
CreateLaunchTemplateRequest.Builder |
spotDuration(Integer spotDuration)
The protection period of the preemptible instance.
|
CreateLaunchTemplateRequest.Builder |
spotPriceLimit(Float spotPriceLimit)
The maximum hourly price of the instance.
|
CreateLaunchTemplateRequest.Builder |
spotStrategy(String spotStrategy)
The bidding policy for the pay-as-you-go instance.
|
CreateLaunchTemplateRequest.Builder |
systemDisk(CreateLaunchTemplateRequest.SystemDisk systemDisk)
SystemDisk.
|
CreateLaunchTemplateRequest.Builder |
tag(List<CreateLaunchTemplateRequest.Tag> tag)
The tags to add to the instance, disks, and primary ENI.
|
CreateLaunchTemplateRequest.Builder |
templateResourceGroupId(String templateResourceGroupId)
The ID of the resource group to which the launch template belongs.
|
CreateLaunchTemplateRequest.Builder |
templateTag(List<CreateLaunchTemplateRequest.TemplateTag> templateTag)
The tags to add to the launch template.
|
CreateLaunchTemplateRequest.Builder |
userData(String userData)
The user data of the instance.
|
CreateLaunchTemplateRequest.Builder |
versionDescription(String versionDescription)
The description of the launch template version.
|
CreateLaunchTemplateRequest.Builder |
vpcId(String vpcId)
The ID of the virtual private cloud (VPC).
|
CreateLaunchTemplateRequest.Builder |
vSwitchId(String vSwitchId)
The ID of the vSwitch to which to connect the instance.
|
CreateLaunchTemplateRequest.Builder |
zoneId(String zoneId)
The ID of the zone in which to create the instance.
|
public CreateLaunchTemplateRequest.Builder systemDisk(CreateLaunchTemplateRequest.SystemDisk systemDisk)
public CreateLaunchTemplateRequest.Builder sourceRegionId(String sourceRegionId)
public CreateLaunchTemplateRequest.Builder autoReleaseTime(String autoReleaseTime)
* If the value of `ss` is not `00`, the time is automatically rounded down to the nearest minute based on the value of `mm`. * The specified time must be at least 30 minutes later than the current time. * The specified time can be at most three years later than the current time.
public CreateLaunchTemplateRequest.Builder autoRenew(Boolean autoRenew)
* true * false Default value: false.
public CreateLaunchTemplateRequest.Builder autoRenewPeriod(Integer autoRenewPeriod)
Valid values when PeriodUnit is set to Month: 1, 2, 3, 6, 12, 24, 36, 48, and 60. Default value: 1.
public CreateLaunchTemplateRequest.Builder creditSpecification(String creditSpecification)
* Standard: the standard mode. For more information, see the "Standard mode" section in [Overview of burstable instances](~~59977~~). * Unlimited: the unlimited mode. For more information, see the "Unlimited mode" section in [Overview of burstable instances](~~59977~~).
public CreateLaunchTemplateRequest.Builder dataDisk(List<CreateLaunchTemplateRequest.DataDisk> dataDisk)
public CreateLaunchTemplateRequest.Builder deletionProtection(Boolean deletionProtection)
* true * false Default value: false. > 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.
public CreateLaunchTemplateRequest.Builder deploymentSetId(String deploymentSetId)
public CreateLaunchTemplateRequest.Builder description(String description)
public CreateLaunchTemplateRequest.Builder enableVmOsConfig(Boolean enableVmOsConfig)
> This parameter will be removed in the future. To ensure future compatibility, we recommend that you use other parameters.
public CreateLaunchTemplateRequest.Builder hostName(String hostName)
* The hostname cannot start or end with a period (.) or hyphen (-). It cannot contain consecutive periods (.) or hyphens (-). * For Windows instances, 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 instances that run 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 CreateLaunchTemplateRequest.Builder imageId(String imageId)
public CreateLaunchTemplateRequest.Builder imageOwnerAlias(String imageOwnerAlias)
* system: public image provided by Alibaba Cloud. * self: custom image that you created. * others: shared image from another Alibaba Cloud account. * marketplace:[Alibaba Cloud Marketplace](https://marketplace.alibabacloud.com/) image. If Alibaba Cloud Marketplace images are available, you can use the images without the need to subscribe to the images. Take note of the billing details of Alibaba Cloud Marketplace images.
public CreateLaunchTemplateRequest.Builder instanceChargeType(String instanceChargeType)
* PrePaid: subscription. If you set this parameter to PrePaid, make sure that your account has sufficient credits.Otherwise, an `InvalidPayMethod` error is returned. * PostPaid: pay-as-you-go.
public CreateLaunchTemplateRequest.Builder instanceName(String instanceName)
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](~~196048~~).
public CreateLaunchTemplateRequest.Builder instanceType(String instanceType)
public CreateLaunchTemplateRequest.Builder internetChargeType(String internetChargeType)
* 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 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.
public CreateLaunchTemplateRequest.Builder internetMaxBandwidthIn(Integer internetMaxBandwidthIn)
* 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 CreateLaunchTemplateRequest.Builder internetMaxBandwidthOut(Integer internetMaxBandwidthOut)
public CreateLaunchTemplateRequest.Builder ioOptimized(String ioOptimized)
* none: creates a non-I/O optimized instance. * optimized: creates an I/O optimized instance.
public CreateLaunchTemplateRequest.Builder ipv6AddressCount(Integer ipv6AddressCount)
public CreateLaunchTemplateRequest.Builder keyPairName(String keyPairName)
* For Windows instances, this parameter is ignored The `Password` parameter takes effect even if the KeyPairName parameter is specified. * For Linux instances, the password-based logon method is disabled by default.
public CreateLaunchTemplateRequest.Builder launchTemplateName(String launchTemplateName)
public CreateLaunchTemplateRequest.Builder networkInterface(List<CreateLaunchTemplateRequest.NetworkInterface> networkInterface)
public CreateLaunchTemplateRequest.Builder networkType(String networkType)
* classic: classic network * vpc: VPC
public CreateLaunchTemplateRequest.Builder ownerAccount(String ownerAccount)
public CreateLaunchTemplateRequest.Builder ownerId(Long ownerId)
public CreateLaunchTemplateRequest.Builder passwordInherit(Boolean passwordInherit)
> 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.
public CreateLaunchTemplateRequest.Builder period(Integer period)
public CreateLaunchTemplateRequest.Builder periodUnit(String periodUnit)
Month (default)
public CreateLaunchTemplateRequest.Builder privateIpAddress(String privateIpAddress)
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.
public CreateLaunchTemplateRequest.Builder ramRoleName(String ramRoleName)
public CreateLaunchTemplateRequest.Builder regionId(String regionId)
public CreateLaunchTemplateRequest.Builder resourceGroupId(String resourceGroupId)
public CreateLaunchTemplateRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateLaunchTemplateRequest.Builder resourceOwnerId(Long resourceOwnerId)
public CreateLaunchTemplateRequest.Builder securityEnhancementStrategy(String securityEnhancementStrategy)
* 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 CreateLaunchTemplateRequest.Builder securityGroupId(String securityGroupId)
> You cannot specify both the `SecurityGroupId` and `SecurityGroupIds.N` parameters.
public CreateLaunchTemplateRequest.Builder securityGroupIds(List<String> securityGroupIds)
> You cannot specify both the `SecurityGroupId` and `SecurityGroupIds.N` parameters.
public CreateLaunchTemplateRequest.Builder spotDuration(Integer spotDuration)
* 1: After a preemptible instance is created, Alibaba Cloud ensures that the instance is not automatically released within 1 hour. After the 1-hour protection period ends, the system compares the bid price with the market price and checks the resource inventory to determine whether to retain or release the instance. * 0: After a preemptible instance is created, Alibaba Cloud does not ensure that the instance runs for 1 hour. The system compares the bid price with the market price and checks the resource inventory to determine whether to retain or release the instance. 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. > This parameter takes effect only if SpotStrategy is set to SpotWithPriceLimit or SpotAsPriceGo.
public CreateLaunchTemplateRequest.Builder spotPriceLimit(Float spotPriceLimit)
public CreateLaunchTemplateRequest.Builder spotStrategy(String spotStrategy)
* NoSpot: The instance is 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 bidding price.
public CreateLaunchTemplateRequest.Builder tag(List<CreateLaunchTemplateRequest.Tag> tag)
public CreateLaunchTemplateRequest.Builder templateResourceGroupId(String templateResourceGroupId)
public CreateLaunchTemplateRequest.Builder templateTag(List<CreateLaunchTemplateRequest.TemplateTag> templateTag)
public CreateLaunchTemplateRequest.Builder userData(String userData)
public CreateLaunchTemplateRequest.Builder vSwitchId(String vSwitchId)
public CreateLaunchTemplateRequest.Builder versionDescription(String versionDescription)
public CreateLaunchTemplateRequest.Builder vpcId(String vpcId)
public CreateLaunchTemplateRequest.Builder zoneId(String zoneId)
public CreateLaunchTemplateRequest build()
Copyright © 2024. All rights reserved.