@Generated(value="software.amazon.awssdk:codegen") public final class RequestLaunchTemplateData extends Object implements SdkPojo, Serializable, ToCopyableBuilder<RequestLaunchTemplateData.Builder,RequestLaunchTemplateData>
The information to include in the launch template.
Modifier and Type | Class and Description |
---|---|
static interface |
RequestLaunchTemplateData.Builder |
Modifier and Type | Method and Description |
---|---|
List<LaunchTemplateBlockDeviceMappingRequest> |
blockDeviceMappings()
The block device mapping.
|
static RequestLaunchTemplateData.Builder |
builder() |
LaunchTemplateCapacityReservationSpecificationRequest |
capacityReservationSpecification()
The Capacity Reservation targeting option.
|
LaunchTemplateCpuOptionsRequest |
cpuOptions()
The CPU options for the instance.
|
CreditSpecificationRequest |
creditSpecification()
The credit option for CPU usage of the instance.
|
Boolean |
disableApiTermination()
If set to
true , you can't terminate the instance using the Amazon EC2 console, CLI, or API. |
Boolean |
ebsOptimized()
Indicates whether the instance is optimized for Amazon EBS I/O.
|
List<ElasticGpuSpecification> |
elasticGpuSpecifications()
An elastic GPU to associate with the instance.
|
List<LaunchTemplateElasticInferenceAccelerator> |
elasticInferenceAccelerators()
The elastic inference accelerator for the instance.
|
boolean |
equals(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
LaunchTemplateHibernationOptionsRequest |
hibernationOptions()
Indicates whether an instance is enabled for hibernation.
|
LaunchTemplateIamInstanceProfileSpecificationRequest |
iamInstanceProfile()
The IAM instance profile.
|
String |
imageId()
The ID of the AMI, which you can get by using DescribeImages.
|
ShutdownBehavior |
instanceInitiatedShutdownBehavior()
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
|
String |
instanceInitiatedShutdownBehaviorAsString()
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the
operating system command for system shutdown).
|
LaunchTemplateInstanceMarketOptionsRequest |
instanceMarketOptions()
The market (purchasing) option for the instances.
|
InstanceType |
instanceType()
The instance type.
|
String |
instanceTypeAsString()
The instance type.
|
String |
kernelId()
The ID of the kernel.
|
String |
keyName()
The name of the key pair.
|
List<LaunchTemplateLicenseConfigurationRequest> |
licenseSpecifications()
The license configurations.
|
LaunchTemplatesMonitoringRequest |
monitoring()
The monitoring for the instance.
|
List<LaunchTemplateInstanceNetworkInterfaceSpecificationRequest> |
networkInterfaces()
One or more network interfaces.
|
LaunchTemplatePlacementRequest |
placement()
The placement for the instance.
|
String |
ramDiskId()
The ID of the RAM disk.
|
List<SdkField<?>> |
sdkFields() |
List<String> |
securityGroupIds()
One or more security group IDs.
|
List<String> |
securityGroups()
[EC2-Classic, default VPC] One or more security group names.
|
static Class<? extends RequestLaunchTemplateData.Builder> |
serializableBuilderClass() |
List<LaunchTemplateTagSpecificationRequest> |
tagSpecifications()
The tags to apply to the resources during launch.
|
RequestLaunchTemplateData.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
String |
userData()
The Base64-encoded user data to make available to the instance.
|
copy
public String kernelId()
The ID of the kernel.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.
public Boolean ebsOptimized()
Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.
public LaunchTemplateIamInstanceProfileSpecificationRequest iamInstanceProfile()
The IAM instance profile.
public List<LaunchTemplateBlockDeviceMappingRequest> blockDeviceMappings()
The block device mapping.
Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
Supplying both a snapshot ID and an encryption value as arguments for block-device mapping results in an error. This is because only blank volumes can be encrypted on start, and these are not created from a snapshot. If a snapshot is the basis for the volume, it contains data by definition and its encryption status cannot be changed using this action.
public List<LaunchTemplateInstanceNetworkInterfaceSpecificationRequest> networkInterfaces()
One or more network interfaces.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public String imageId()
The ID of the AMI, which you can get by using DescribeImages.
public InstanceType instanceType()
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
If the service returns an enum value that is not available in the current SDK version, instanceType
will
return InstanceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
instanceTypeAsString()
.
InstanceType
public String instanceTypeAsString()
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
If the service returns an enum value that is not available in the current SDK version, instanceType
will
return InstanceType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
instanceTypeAsString()
.
InstanceType
public String keyName()
The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
public LaunchTemplatesMonitoringRequest monitoring()
The monitoring for the instance.
public LaunchTemplatePlacementRequest placement()
The placement for the instance.
public String ramDiskId()
The ID of the RAM disk.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.
public Boolean disableApiTermination()
If set to true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API. To
change this attribute to false
after launch, use ModifyInstanceAttribute.
true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API.
To change this attribute to false
after launch, use ModifyInstanceAttribute.public ShutdownBehavior instanceInitiatedShutdownBehavior()
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
If the service returns an enum value that is not available in the current SDK version,
instanceInitiatedShutdownBehavior
will return ShutdownBehavior.UNKNOWN_TO_SDK_VERSION
. The raw
value returned by the service is available from instanceInitiatedShutdownBehaviorAsString()
.
Default: stop
ShutdownBehavior
public String instanceInitiatedShutdownBehaviorAsString()
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
If the service returns an enum value that is not available in the current SDK version,
instanceInitiatedShutdownBehavior
will return ShutdownBehavior.UNKNOWN_TO_SDK_VERSION
. The raw
value returned by the service is available from instanceInitiatedShutdownBehaviorAsString()
.
Default: stop
ShutdownBehavior
public String userData()
The Base64-encoded user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows).
public List<LaunchTemplateTagSpecificationRequest> tagSpecifications()
The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<ElasticGpuSpecification> elasticGpuSpecifications()
An elastic GPU to associate with the instance.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<LaunchTemplateElasticInferenceAccelerator> elasticInferenceAccelerators()
The elastic inference accelerator for the instance.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<String> securityGroupIds()
One or more security group IDs. You can create a security group using CreateSecurityGroup. You cannot specify both a security group ID and security name in the same request.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public List<String> securityGroups()
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public LaunchTemplateInstanceMarketOptionsRequest instanceMarketOptions()
The market (purchasing) option for the instances.
public CreditSpecificationRequest creditSpecification()
The credit option for CPU usage of the instance. Valid for T2 or T3 instances only.
public LaunchTemplateCpuOptionsRequest cpuOptions()
The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.
public LaunchTemplateCapacityReservationSpecificationRequest capacityReservationSpecification()
The Capacity Reservation targeting option.
public LaunchTemplateHibernationOptionsRequest hibernationOptions()
Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites. Hibernation is currently supported only for Amazon Linux. For more information, see Hibernate Your Instance in the Amazon Elastic Compute Cloud User Guide.
public List<LaunchTemplateLicenseConfigurationRequest> licenseSpecifications()
The license configurations.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public RequestLaunchTemplateData.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<RequestLaunchTemplateData.Builder,RequestLaunchTemplateData>
public static RequestLaunchTemplateData.Builder builder()
public static Class<? extends RequestLaunchTemplateData.Builder> serializableBuilderClass()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.