@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class LaunchTemplate extends Object implements Serializable, Cloneable
Describes a launch template and overrides.
The overrides are used to override the instance type specified by the launch template with multiple instance types that can be used to launch On-Demand Instances and Spot Instances.
When you update the launch template or overrides, existing Amazon EC2 instances continue to run. When scale out occurs, Amazon EC2 Auto Scaling launches instances to match the new settings. When scale in occurs, Amazon EC2 Auto Scaling terminates instances according to the group's termination policies.
| Constructor and Description |
|---|
LaunchTemplate() |
| Modifier and Type | Method and Description |
|---|---|
LaunchTemplate |
clone() |
boolean |
equals(Object obj) |
LaunchTemplateSpecification |
getLaunchTemplateSpecification()
The launch template to use.
|
List<LaunchTemplateOverrides> |
getOverrides()
Any parameters that you specify override the same parameters in the launch template.
|
int |
hashCode() |
void |
setLaunchTemplateSpecification(LaunchTemplateSpecification launchTemplateSpecification)
The launch template to use.
|
void |
setOverrides(Collection<LaunchTemplateOverrides> overrides)
Any parameters that you specify override the same parameters in the launch template.
|
String |
toString()
Returns a string representation of this object.
|
LaunchTemplate |
withLaunchTemplateSpecification(LaunchTemplateSpecification launchTemplateSpecification)
The launch template to use.
|
LaunchTemplate |
withOverrides(Collection<LaunchTemplateOverrides> overrides)
Any parameters that you specify override the same parameters in the launch template.
|
LaunchTemplate |
withOverrides(LaunchTemplateOverrides... overrides)
Any parameters that you specify override the same parameters in the launch template.
|
public void setLaunchTemplateSpecification(LaunchTemplateSpecification launchTemplateSpecification)
The launch template to use. You must specify either the launch template ID or launch template name in the request.
launchTemplateSpecification - The launch template to use. You must specify either the launch template ID or launch template name in the
request.public LaunchTemplateSpecification getLaunchTemplateSpecification()
The launch template to use. You must specify either the launch template ID or launch template name in the request.
public LaunchTemplate withLaunchTemplateSpecification(LaunchTemplateSpecification launchTemplateSpecification)
The launch template to use. You must specify either the launch template ID or launch template name in the request.
launchTemplateSpecification - The launch template to use. You must specify either the launch template ID or launch template name in the
request.public List<LaunchTemplateOverrides> getOverrides()
Any parameters that you specify override the same parameters in the launch template. Currently, the only supported override is instance type. You can specify between 1 and 20 instance types.
If not provided, Amazon EC2 Auto Scaling will use the instance type specified in the launch template to launch instances.
If not provided, Amazon EC2 Auto Scaling will use the instance type specified in the launch template to launch instances.
public void setOverrides(Collection<LaunchTemplateOverrides> overrides)
Any parameters that you specify override the same parameters in the launch template. Currently, the only supported override is instance type. You can specify between 1 and 20 instance types.
If not provided, Amazon EC2 Auto Scaling will use the instance type specified in the launch template to launch instances.
overrides - Any parameters that you specify override the same parameters in the launch template. Currently, the only
supported override is instance type. You can specify between 1 and 20 instance types.
If not provided, Amazon EC2 Auto Scaling will use the instance type specified in the launch template to launch instances.
public LaunchTemplate withOverrides(LaunchTemplateOverrides... overrides)
Any parameters that you specify override the same parameters in the launch template. Currently, the only supported override is instance type. You can specify between 1 and 20 instance types.
If not provided, Amazon EC2 Auto Scaling will use the instance type specified in the launch template to launch instances.
NOTE: This method appends the values to the existing list (if any). Use
setOverrides(java.util.Collection) or withOverrides(java.util.Collection) if you want to
override the existing values.
overrides - Any parameters that you specify override the same parameters in the launch template. Currently, the only
supported override is instance type. You can specify between 1 and 20 instance types.
If not provided, Amazon EC2 Auto Scaling will use the instance type specified in the launch template to launch instances.
public LaunchTemplate withOverrides(Collection<LaunchTemplateOverrides> overrides)
Any parameters that you specify override the same parameters in the launch template. Currently, the only supported override is instance type. You can specify between 1 and 20 instance types.
If not provided, Amazon EC2 Auto Scaling will use the instance type specified in the launch template to launch instances.
overrides - Any parameters that you specify override the same parameters in the launch template. Currently, the only
supported override is instance type. You can specify between 1 and 20 instance types.
If not provided, Amazon EC2 Auto Scaling will use the instance type specified in the launch template to launch instances.
public String toString()
toString in class ObjectObject.toString()public LaunchTemplate clone()
Copyright © 2020. All rights reserved.