@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class LaunchTemplate extends Object implements Serializable, Cloneable
Describes a launch template and overrides.
You specify these properties as part of a mixed instances policy.
When you update the launch template or overrides in the UpdateAutoScalingGroup API call, 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 properties that you specify override the same properties in the launch template.
|
int |
hashCode() |
void |
setLaunchTemplateSpecification(LaunchTemplateSpecification launchTemplateSpecification)
The launch template to use.
|
void |
setOverrides(Collection<LaunchTemplateOverrides> overrides)
Any properties that you specify override the same properties 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 properties that you specify override the same properties in the launch template.
|
LaunchTemplate |
withOverrides(LaunchTemplateOverrides... overrides)
Any properties that you specify override the same properties in the launch template.
|
public void setLaunchTemplateSpecification(LaunchTemplateSpecification launchTemplateSpecification)
The launch template to use.
launchTemplateSpecification
- The launch template to use.public LaunchTemplateSpecification getLaunchTemplateSpecification()
The launch template to use.
public LaunchTemplate withLaunchTemplateSpecification(LaunchTemplateSpecification launchTemplateSpecification)
The launch template to use.
launchTemplateSpecification
- The launch template to use.public List<LaunchTemplateOverrides> getOverrides()
Any properties that you specify override the same properties in the launch template. If not provided, Amazon EC2 Auto Scaling uses the instance type specified in the launch template when it launches an instance.
public void setOverrides(Collection<LaunchTemplateOverrides> overrides)
Any properties that you specify override the same properties in the launch template. If not provided, Amazon EC2 Auto Scaling uses the instance type specified in the launch template when it launches an instance.
overrides
- Any properties that you specify override the same properties in the launch template. If not provided,
Amazon EC2 Auto Scaling uses the instance type specified in the launch template when it launches an
instance.public LaunchTemplate withOverrides(LaunchTemplateOverrides... overrides)
Any properties that you specify override the same properties in the launch template. If not provided, Amazon EC2 Auto Scaling uses the instance type specified in the launch template when it launches an instance.
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 properties that you specify override the same properties in the launch template. If not provided,
Amazon EC2 Auto Scaling uses the instance type specified in the launch template when it launches an
instance.public LaunchTemplate withOverrides(Collection<LaunchTemplateOverrides> overrides)
Any properties that you specify override the same properties in the launch template. If not provided, Amazon EC2 Auto Scaling uses the instance type specified in the launch template when it launches an instance.
overrides
- Any properties that you specify override the same properties in the launch template. If not provided,
Amazon EC2 Auto Scaling uses the instance type specified in the launch template when it launches an
instance.public String toString()
toString
in class Object
Object.toString()
public LaunchTemplate clone()