@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()
An optional setting.
|
int |
hashCode() |
void |
setLaunchTemplateSpecification(LaunchTemplateSpecification launchTemplateSpecification)
The launch template to use.
|
void |
setOverrides(Collection<LaunchTemplateOverrides> overrides)
An optional setting.
|
String |
toString()
Returns a string representation of this object.
|
LaunchTemplate |
withLaunchTemplateSpecification(LaunchTemplateSpecification launchTemplateSpecification)
The launch template to use.
|
LaunchTemplate |
withOverrides(Collection<LaunchTemplateOverrides> overrides)
An optional setting.
|
LaunchTemplate |
withOverrides(LaunchTemplateOverrides... overrides)
An optional setting.
|
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()
An optional setting. 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.
public void setOverrides(Collection<LaunchTemplateOverrides> overrides)
An optional setting. 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.
overrides
- An optional setting. 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.public LaunchTemplate withOverrides(LaunchTemplateOverrides... overrides)
An optional setting. 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.
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
- An optional setting. 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.public LaunchTemplate withOverrides(Collection<LaunchTemplateOverrides> overrides)
An optional setting. 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.
overrides
- An optional setting. 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.public String toString()
toString
in class Object
Object.toString()
public LaunchTemplate clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.