@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class LaunchTemplateSpecification extends Object implements Serializable, Cloneable
Describes the Amazon EC2 launch template and the launch template version that can be used by an Auto Scaling group to configure Amazon EC2 instances.
The launch template that is specified must be configured for use with an Auto Scaling group. For more information, see Creating a launch template for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
Constructor and Description |
---|
LaunchTemplateSpecification() |
Modifier and Type | Method and Description |
---|---|
LaunchTemplateSpecification |
clone() |
boolean |
equals(Object obj) |
String |
getLaunchTemplateId()
The ID of the launch template.
|
String |
getLaunchTemplateName()
The name of the launch template.
|
String |
getVersion()
The version number,
$Latest , or $Default . |
int |
hashCode() |
void |
setLaunchTemplateId(String launchTemplateId)
The ID of the launch template.
|
void |
setLaunchTemplateName(String launchTemplateName)
The name of the launch template.
|
void |
setVersion(String version)
The version number,
$Latest , or $Default . |
String |
toString()
Returns a string representation of this object.
|
LaunchTemplateSpecification |
withLaunchTemplateId(String launchTemplateId)
The ID of the launch template.
|
LaunchTemplateSpecification |
withLaunchTemplateName(String launchTemplateName)
The name of the launch template.
|
LaunchTemplateSpecification |
withVersion(String version)
The version number,
$Latest , or $Default . |
public void setLaunchTemplateId(String launchTemplateId)
The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
launchTemplateId
- The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2
CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
public String getLaunchTemplateId()
The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
public LaunchTemplateSpecification withLaunchTemplateId(String launchTemplateId)
The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
launchTemplateId
- The ID of the launch template. To get the template ID, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2
CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
public void setLaunchTemplateName(String launchTemplateName)
The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
launchTemplateName
- The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2
CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
public String getLaunchTemplateName()
The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
public LaunchTemplateSpecification withLaunchTemplateName(String launchTemplateName)
The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2 CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
launchTemplateName
- The name of the launch template. To get the template name, use the Amazon EC2 DescribeLaunchTemplates API operation. New launch templates can be created using the Amazon EC2
CreateLaunchTemplate API.
Conditional: You must specify either a LaunchTemplateId
or a LaunchTemplateName
.
public void setVersion(String version)
The version number, $Latest
, or $Default
. To get the version number, use the Amazon EC2
DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon
EC2
CreateLaunchTemplateVersion API. If the value is $Latest
, Amazon EC2 Auto Scaling selects the
latest version of the launch template when launching instances. If the value is $Default
, Amazon EC2
Auto Scaling selects the default version of the launch template when launching instances. The default value is
$Default
.
version
- The version number, $Latest
, or $Default
. To get the version number, use the
Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the
Amazon EC2 CreateLaunchTemplateVersion API. If the value is $Latest
, Amazon EC2 Auto Scaling
selects the latest version of the launch template when launching instances. If the value is
$Default
, Amazon EC2 Auto Scaling selects the default version of the launch template when
launching instances. The default value is $Default
.public String getVersion()
The version number, $Latest
, or $Default
. To get the version number, use the Amazon EC2
DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon
EC2
CreateLaunchTemplateVersion API. If the value is $Latest
, Amazon EC2 Auto Scaling selects the
latest version of the launch template when launching instances. If the value is $Default
, Amazon EC2
Auto Scaling selects the default version of the launch template when launching instances. The default value is
$Default
.
$Latest
, or $Default
. To get the version number, use the
Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the
Amazon EC2 CreateLaunchTemplateVersion API. If the value is $Latest
, Amazon EC2 Auto Scaling
selects the latest version of the launch template when launching instances. If the value is
$Default
, Amazon EC2 Auto Scaling selects the default version of the launch template when
launching instances. The default value is $Default
.public LaunchTemplateSpecification withVersion(String version)
The version number, $Latest
, or $Default
. To get the version number, use the Amazon EC2
DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon
EC2
CreateLaunchTemplateVersion API. If the value is $Latest
, Amazon EC2 Auto Scaling selects the
latest version of the launch template when launching instances. If the value is $Default
, Amazon EC2
Auto Scaling selects the default version of the launch template when launching instances. The default value is
$Default
.
version
- The version number, $Latest
, or $Default
. To get the version number, use the
Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the
Amazon EC2 CreateLaunchTemplateVersion API. If the value is $Latest
, Amazon EC2 Auto Scaling
selects the latest version of the launch template when launching instances. If the value is
$Default
, Amazon EC2 Auto Scaling selects the default version of the launch template when
launching instances. The default value is $Default
.public String toString()
toString
in class Object
Object.toString()
public LaunchTemplateSpecification clone()