Interface RequestLaunchTemplateData.Builder
-
- All Superinterfaces:
Buildable
,CopyableBuilder<RequestLaunchTemplateData.Builder,RequestLaunchTemplateData>
,SdkBuilder<RequestLaunchTemplateData.Builder,RequestLaunchTemplateData>
,SdkPojo
- Enclosing class:
- RequestLaunchTemplateData
public static interface RequestLaunchTemplateData.Builder extends SdkPojo, CopyableBuilder<RequestLaunchTemplateData.Builder,RequestLaunchTemplateData>
-
-
Method Summary
-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
kernelId
RequestLaunchTemplateData.Builder kernelId(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 EC2 User Guide.
- Parameters:
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 EC2 User Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ebsOptimized
RequestLaunchTemplateData.Builder ebsOptimized(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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
iamInstanceProfile
RequestLaunchTemplateData.Builder iamInstanceProfile(LaunchTemplateIamInstanceProfileSpecificationRequest iamInstanceProfile)
The name or Amazon Resource Name (ARN) of an IAM instance profile.
- Parameters:
iamInstanceProfile
- The name or Amazon Resource Name (ARN) of an IAM instance profile.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
iamInstanceProfile
default RequestLaunchTemplateData.Builder iamInstanceProfile(Consumer<LaunchTemplateIamInstanceProfileSpecificationRequest.Builder> iamInstanceProfile)
The name or Amazon Resource Name (ARN) of an IAM instance profile.
This is a convenience method that creates an instance of theLaunchTemplateIamInstanceProfileSpecificationRequest.Builder
avoiding the need to create one manually viaLaunchTemplateIamInstanceProfileSpecificationRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toiamInstanceProfile(LaunchTemplateIamInstanceProfileSpecificationRequest)
.- Parameters:
iamInstanceProfile
- a consumer that will call methods onLaunchTemplateIamInstanceProfileSpecificationRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
iamInstanceProfile(LaunchTemplateIamInstanceProfileSpecificationRequest)
-
blockDeviceMappings
RequestLaunchTemplateData.Builder blockDeviceMappings(Collection<LaunchTemplateBlockDeviceMappingRequest> blockDeviceMappings)
The block device mapping.
- Parameters:
blockDeviceMappings
- The block device mapping.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
blockDeviceMappings
RequestLaunchTemplateData.Builder blockDeviceMappings(LaunchTemplateBlockDeviceMappingRequest... blockDeviceMappings)
The block device mapping.
- Parameters:
blockDeviceMappings
- The block device mapping.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
blockDeviceMappings
RequestLaunchTemplateData.Builder blockDeviceMappings(Consumer<LaunchTemplateBlockDeviceMappingRequest.Builder>... blockDeviceMappings)
The block device mapping.
This is a convenience method that creates an instance of theLaunchTemplateBlockDeviceMappingRequest.Builder
avoiding the need to create one manually viaLaunchTemplateBlockDeviceMappingRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#blockDeviceMappings(List
.) - Parameters:
blockDeviceMappings
- a consumer that will call methods onLaunchTemplateBlockDeviceMappingRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#blockDeviceMappings(java.util.Collection
)
-
networkInterfaces
RequestLaunchTemplateData.Builder networkInterfaces(Collection<LaunchTemplateInstanceNetworkInterfaceSpecificationRequest> networkInterfaces)
The network interfaces for the instance.
- Parameters:
networkInterfaces
- The network interfaces for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
networkInterfaces
RequestLaunchTemplateData.Builder networkInterfaces(LaunchTemplateInstanceNetworkInterfaceSpecificationRequest... networkInterfaces)
The network interfaces for the instance.
- Parameters:
networkInterfaces
- The network interfaces for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
networkInterfaces
RequestLaunchTemplateData.Builder networkInterfaces(Consumer<LaunchTemplateInstanceNetworkInterfaceSpecificationRequest.Builder>... networkInterfaces)
The network interfaces for the instance.
This is a convenience method that creates an instance of theLaunchTemplateInstanceNetworkInterfaceSpecificationRequest.Builder
avoiding the need to create one manually viaLaunchTemplateInstanceNetworkInterfaceSpecificationRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#networkInterfaces(List
.) - Parameters:
networkInterfaces
- a consumer that will call methods onLaunchTemplateInstanceNetworkInterfaceSpecificationRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#networkInterfaces(java.util.Collection
)
-
imageId
RequestLaunchTemplateData.Builder imageId(String imageId)
The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, which will resolve to an AMI ID on launch.
Valid formats:
-
ami-17characters00000
-
resolve:ssm:parameter-name
-
resolve:ssm:parameter-name:version-number
-
resolve:ssm:parameter-name:label
-
resolve:ssm:public-parameter
Currently, EC2 Fleet and Spot Fleet do not support specifying a Systems Manager parameter. If the launch template will be used by an EC2 Fleet or Spot Fleet, you must specify the AMI ID.
For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.
- Parameters:
imageId
- The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, which will resolve to an AMI ID on launch.Valid formats:
-
ami-17characters00000
-
resolve:ssm:parameter-name
-
resolve:ssm:parameter-name:version-number
-
resolve:ssm:parameter-name:label
-
resolve:ssm:public-parameter
Currently, EC2 Fleet and Spot Fleet do not support specifying a Systems Manager parameter. If the launch template will be used by an EC2 Fleet or Spot Fleet, you must specify the AMI ID.
For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
instanceType
RequestLaunchTemplateData.Builder instanceType(String instanceType)
The instance type. For more information, see Amazon EC2 instance types in the Amazon EC2 User Guide.
If you specify
InstanceType
, you can't specifyInstanceRequirements
.- Parameters:
instanceType
- The instance type. For more information, see Amazon EC2 instance types in the Amazon EC2 User Guide.If you specify
InstanceType
, you can't specifyInstanceRequirements
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceType
,InstanceType
-
instanceType
RequestLaunchTemplateData.Builder instanceType(InstanceType instanceType)
The instance type. For more information, see Amazon EC2 instance types in the Amazon EC2 User Guide.
If you specify
InstanceType
, you can't specifyInstanceRequirements
.- Parameters:
instanceType
- The instance type. For more information, see Amazon EC2 instance types in the Amazon EC2 User Guide.If you specify
InstanceType
, you can't specifyInstanceRequirements
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
InstanceType
,InstanceType
-
keyName
RequestLaunchTemplateData.Builder keyName(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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
monitoring
RequestLaunchTemplateData.Builder monitoring(LaunchTemplatesMonitoringRequest monitoring)
The monitoring for the instance.
- Parameters:
monitoring
- The monitoring for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
monitoring
default RequestLaunchTemplateData.Builder monitoring(Consumer<LaunchTemplatesMonitoringRequest.Builder> monitoring)
The monitoring for the instance.
This is a convenience method that creates an instance of theLaunchTemplatesMonitoringRequest.Builder
avoiding the need to create one manually viaLaunchTemplatesMonitoringRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tomonitoring(LaunchTemplatesMonitoringRequest)
.- Parameters:
monitoring
- a consumer that will call methods onLaunchTemplatesMonitoringRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
monitoring(LaunchTemplatesMonitoringRequest)
-
placement
RequestLaunchTemplateData.Builder placement(LaunchTemplatePlacementRequest placement)
The placement for the instance.
- Parameters:
placement
- The placement for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
placement
default RequestLaunchTemplateData.Builder placement(Consumer<LaunchTemplatePlacementRequest.Builder> placement)
The placement for the instance.
This is a convenience method that creates an instance of theLaunchTemplatePlacementRequest.Builder
avoiding the need to create one manually viaLaunchTemplatePlacementRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toplacement(LaunchTemplatePlacementRequest)
.- Parameters:
placement
- a consumer that will call methods onLaunchTemplatePlacementRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
placement(LaunchTemplatePlacementRequest)
-
ramDiskId
RequestLaunchTemplateData.Builder ramDiskId(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 EC2 User Guide.
- Parameters:
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 EC2 User Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
disableApiTermination
RequestLaunchTemplateData.Builder disableApiTermination(Boolean disableApiTermination)
If you set this parameter to
true
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.- Parameters:
disableApiTermination
- If you set this parameter totrue
, you can't terminate the instance using the Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute. Alternatively, if you setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceInitiatedShutdownBehavior
RequestLaunchTemplateData.Builder instanceInitiatedShutdownBehavior(String 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
- Parameters:
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
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ShutdownBehavior
,ShutdownBehavior
-
instanceInitiatedShutdownBehavior
RequestLaunchTemplateData.Builder instanceInitiatedShutdownBehavior(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
- Parameters:
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
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
ShutdownBehavior
,ShutdownBehavior
-
userData
RequestLaunchTemplateData.Builder userData(String userData)
The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Run commands on your Amazon EC2 instance at launch in the Amazon EC2 User Guide.
If you are creating the launch template for use with Batch, the user data must be provided in the MIME multi-part archive format. For more information, see Amazon EC2 user data in launch templates in the Batch User Guide.
- Parameters:
userData
- The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Run commands on your Amazon EC2 instance at launch in the Amazon EC2 User Guide.If you are creating the launch template for use with Batch, the user data must be provided in the MIME multi-part archive format. For more information, see Amazon EC2 user data in launch templates in the Batch User Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagSpecifications
RequestLaunchTemplateData.Builder tagSpecifications(Collection<LaunchTemplateTagSpecificationRequest> tagSpecifications)
The tags to apply to the resources that are created during instance launch. These tags are not applied to the launch template.
- Parameters:
tagSpecifications
- The tags to apply to the resources that are created during instance launch. These tags are not applied to the launch template.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagSpecifications
RequestLaunchTemplateData.Builder tagSpecifications(LaunchTemplateTagSpecificationRequest... tagSpecifications)
The tags to apply to the resources that are created during instance launch. These tags are not applied to the launch template.
- Parameters:
tagSpecifications
- The tags to apply to the resources that are created during instance launch. These tags are not applied to the launch template.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tagSpecifications
RequestLaunchTemplateData.Builder tagSpecifications(Consumer<LaunchTemplateTagSpecificationRequest.Builder>... tagSpecifications)
The tags to apply to the resources that are created during instance launch. These tags are not applied to the launch template.
This is a convenience method that creates an instance of theLaunchTemplateTagSpecificationRequest.Builder
avoiding the need to create one manually viaLaunchTemplateTagSpecificationRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#tagSpecifications(List
.) - Parameters:
tagSpecifications
- a consumer that will call methods onLaunchTemplateTagSpecificationRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#tagSpecifications(java.util.Collection
)
-
elasticGpuSpecifications
RequestLaunchTemplateData.Builder elasticGpuSpecifications(Collection<ElasticGpuSpecification> elasticGpuSpecifications)
Deprecated.
Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances.
- Parameters:
elasticGpuSpecifications
- Deprecated.Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
elasticGpuSpecifications
RequestLaunchTemplateData.Builder elasticGpuSpecifications(ElasticGpuSpecification... elasticGpuSpecifications)
Deprecated.
Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances.
- Parameters:
elasticGpuSpecifications
- Deprecated.Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
elasticGpuSpecifications
RequestLaunchTemplateData.Builder elasticGpuSpecifications(Consumer<ElasticGpuSpecification.Builder>... elasticGpuSpecifications)
Deprecated.
Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, G4dn, or G5 instances.
ElasticGpuSpecification.Builder
avoiding the need to create one manually viaElasticGpuSpecification.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#elasticGpuSpecifications(List
.) - Parameters:
elasticGpuSpecifications
- a consumer that will call methods onElasticGpuSpecification.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#elasticGpuSpecifications(java.util.Collection
)
-
elasticInferenceAccelerators
RequestLaunchTemplateData.Builder elasticInferenceAccelerators(Collection<LaunchTemplateElasticInferenceAccelerator> elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
You cannot specify accelerators from different generations in the same request.
Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
- Parameters:
elasticInferenceAccelerators
- An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.You cannot specify accelerators from different generations in the same request.
Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
elasticInferenceAccelerators
RequestLaunchTemplateData.Builder elasticInferenceAccelerators(LaunchTemplateElasticInferenceAccelerator... elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
You cannot specify accelerators from different generations in the same request.
Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
- Parameters:
elasticInferenceAccelerators
- An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.You cannot specify accelerators from different generations in the same request.
Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
elasticInferenceAccelerators
RequestLaunchTemplateData.Builder elasticInferenceAccelerators(Consumer<LaunchTemplateElasticInferenceAccelerator.Builder>... elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance. Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
You cannot specify accelerators from different generations in the same request.
Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service.
LaunchTemplateElasticInferenceAccelerator.Builder
avoiding the need to create one manually viaLaunchTemplateElasticInferenceAccelerator.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#elasticInferenceAccelerators(List
.) - Parameters:
elasticInferenceAccelerators
- a consumer that will call methods onLaunchTemplateElasticInferenceAccelerator.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#elasticInferenceAccelerators(java.util.Collection
)
-
securityGroupIds
RequestLaunchTemplateData.Builder securityGroupIds(Collection<String> securityGroupIds)
The IDs of the security groups.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
- Parameters:
securityGroupIds
- The IDs of the security groups.If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
securityGroupIds
RequestLaunchTemplateData.Builder securityGroupIds(String... securityGroupIds)
The IDs of the security groups.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
- Parameters:
securityGroupIds
- The IDs of the security groups.If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
securityGroups
RequestLaunchTemplateData.Builder securityGroups(Collection<String> securityGroups)
The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
- Parameters:
securityGroups
- The names of the security groups. For a nondefault VPC, you must use security group IDs instead.If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
securityGroups
RequestLaunchTemplateData.Builder securityGroups(String... securityGroups)
The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
- Parameters:
securityGroups
- The names of the security groups. For a nondefault VPC, you must use security group IDs instead.If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceMarketOptions
RequestLaunchTemplateData.Builder instanceMarketOptions(LaunchTemplateInstanceMarketOptionsRequest instanceMarketOptions)
The market (purchasing) option for the instances.
- Parameters:
instanceMarketOptions
- The market (purchasing) option for the instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceMarketOptions
default RequestLaunchTemplateData.Builder instanceMarketOptions(Consumer<LaunchTemplateInstanceMarketOptionsRequest.Builder> instanceMarketOptions)
The market (purchasing) option for the instances.
This is a convenience method that creates an instance of theLaunchTemplateInstanceMarketOptionsRequest.Builder
avoiding the need to create one manually viaLaunchTemplateInstanceMarketOptionsRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toinstanceMarketOptions(LaunchTemplateInstanceMarketOptionsRequest)
.- Parameters:
instanceMarketOptions
- a consumer that will call methods onLaunchTemplateInstanceMarketOptionsRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
instanceMarketOptions(LaunchTemplateInstanceMarketOptionsRequest)
-
creditSpecification
RequestLaunchTemplateData.Builder creditSpecification(CreditSpecificationRequest creditSpecification)
The credit option for CPU usage of the instance. Valid only for T instances.
- Parameters:
creditSpecification
- The credit option for CPU usage of the instance. Valid only for T instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
creditSpecification
default RequestLaunchTemplateData.Builder creditSpecification(Consumer<CreditSpecificationRequest.Builder> creditSpecification)
The credit option for CPU usage of the instance. Valid only for T instances.
This is a convenience method that creates an instance of theCreditSpecificationRequest.Builder
avoiding the need to create one manually viaCreditSpecificationRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocreditSpecification(CreditSpecificationRequest)
.- Parameters:
creditSpecification
- a consumer that will call methods onCreditSpecificationRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
creditSpecification(CreditSpecificationRequest)
-
cpuOptions
RequestLaunchTemplateData.Builder cpuOptions(LaunchTemplateCpuOptionsRequest cpuOptions)
The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide.
- Parameters:
cpuOptions
- The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
cpuOptions
default RequestLaunchTemplateData.Builder cpuOptions(Consumer<LaunchTemplateCpuOptionsRequest.Builder> cpuOptions)
The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide.
This is a convenience method that creates an instance of theLaunchTemplateCpuOptionsRequest.Builder
avoiding the need to create one manually viaLaunchTemplateCpuOptionsRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocpuOptions(LaunchTemplateCpuOptionsRequest)
.- Parameters:
cpuOptions
- a consumer that will call methods onLaunchTemplateCpuOptionsRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
cpuOptions(LaunchTemplateCpuOptionsRequest)
-
capacityReservationSpecification
RequestLaunchTemplateData.Builder capacityReservationSpecification(LaunchTemplateCapacityReservationSpecificationRequest capacityReservationSpecification)
The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to
open
, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).- Parameters:
capacityReservationSpecification
- The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults toopen
, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
capacityReservationSpecification
default RequestLaunchTemplateData.Builder capacityReservationSpecification(Consumer<LaunchTemplateCapacityReservationSpecificationRequest.Builder> capacityReservationSpecification)
The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults to
This is a convenience method that creates an instance of theopen
, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).LaunchTemplateCapacityReservationSpecificationRequest.Builder
avoiding the need to create one manually viaLaunchTemplateCapacityReservationSpecificationRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tocapacityReservationSpecification(LaunchTemplateCapacityReservationSpecificationRequest)
.- Parameters:
capacityReservationSpecification
- a consumer that will call methods onLaunchTemplateCapacityReservationSpecificationRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
capacityReservationSpecification(LaunchTemplateCapacityReservationSpecificationRequest)
-
licenseSpecifications
RequestLaunchTemplateData.Builder licenseSpecifications(Collection<LaunchTemplateLicenseConfigurationRequest> licenseSpecifications)
The license configurations.
- Parameters:
licenseSpecifications
- The license configurations.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
licenseSpecifications
RequestLaunchTemplateData.Builder licenseSpecifications(LaunchTemplateLicenseConfigurationRequest... licenseSpecifications)
The license configurations.
- Parameters:
licenseSpecifications
- The license configurations.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
licenseSpecifications
RequestLaunchTemplateData.Builder licenseSpecifications(Consumer<LaunchTemplateLicenseConfigurationRequest.Builder>... licenseSpecifications)
The license configurations.
This is a convenience method that creates an instance of theLaunchTemplateLicenseConfigurationRequest.Builder
avoiding the need to create one manually viaLaunchTemplateLicenseConfigurationRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed to#licenseSpecifications(List
.) - Parameters:
licenseSpecifications
- a consumer that will call methods onLaunchTemplateLicenseConfigurationRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#licenseSpecifications(java.util.Collection
)
-
hibernationOptions
RequestLaunchTemplateData.Builder hibernationOptions(LaunchTemplateHibernationOptionsRequest hibernationOptions)
Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites. For more information, see Hibernate your Amazon EC2 instance in the Amazon EC2 User Guide.
- Parameters:
hibernationOptions
- Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites. For more information, see Hibernate your Amazon EC2 instance in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
hibernationOptions
default RequestLaunchTemplateData.Builder hibernationOptions(Consumer<LaunchTemplateHibernationOptionsRequest.Builder> hibernationOptions)
Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites. For more information, see Hibernate your Amazon EC2 instance in the Amazon EC2 User Guide.
This is a convenience method that creates an instance of theLaunchTemplateHibernationOptionsRequest.Builder
avoiding the need to create one manually viaLaunchTemplateHibernationOptionsRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tohibernationOptions(LaunchTemplateHibernationOptionsRequest)
.- Parameters:
hibernationOptions
- a consumer that will call methods onLaunchTemplateHibernationOptionsRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
hibernationOptions(LaunchTemplateHibernationOptionsRequest)
-
metadataOptions
RequestLaunchTemplateData.Builder metadataOptions(LaunchTemplateInstanceMetadataOptionsRequest metadataOptions)
The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon EC2 User Guide.
- Parameters:
metadataOptions
- The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metadataOptions
default RequestLaunchTemplateData.Builder metadataOptions(Consumer<LaunchTemplateInstanceMetadataOptionsRequest.Builder> metadataOptions)
The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon EC2 User Guide.
This is a convenience method that creates an instance of theLaunchTemplateInstanceMetadataOptionsRequest.Builder
avoiding the need to create one manually viaLaunchTemplateInstanceMetadataOptionsRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tometadataOptions(LaunchTemplateInstanceMetadataOptionsRequest)
.- Parameters:
metadataOptions
- a consumer that will call methods onLaunchTemplateInstanceMetadataOptionsRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
metadataOptions(LaunchTemplateInstanceMetadataOptionsRequest)
-
enclaveOptions
RequestLaunchTemplateData.Builder enclaveOptions(LaunchTemplateEnclaveOptionsRequest enclaveOptions)
Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide.
You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.
- Parameters:
enclaveOptions
- Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide.You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
enclaveOptions
default RequestLaunchTemplateData.Builder enclaveOptions(Consumer<LaunchTemplateEnclaveOptionsRequest.Builder> enclaveOptions)
Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? in the Amazon Web Services Nitro Enclaves User Guide.
You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same instance.
This is a convenience method that creates an instance of theLaunchTemplateEnclaveOptionsRequest.Builder
avoiding the need to create one manually viaLaunchTemplateEnclaveOptionsRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toenclaveOptions(LaunchTemplateEnclaveOptionsRequest)
.- Parameters:
enclaveOptions
- a consumer that will call methods onLaunchTemplateEnclaveOptionsRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
enclaveOptions(LaunchTemplateEnclaveOptionsRequest)
-
instanceRequirements
RequestLaunchTemplateData.Builder instanceRequirements(InstanceRequirementsRequest instanceRequirements)
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.
You must specify
VCpuCount
andMemoryMiB
. All other attributes are optional. Any unspecified optional attribute is set to its default.When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.
To limit the list of instance types from which Amazon EC2 can identify matching instance types, you can use one of the following parameters, but not both in the same request:
-
AllowedInstanceTypes
- The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes. -
ExcludedInstanceTypes
- The instance types to exclude from the list, even if they match your specified attributes.
If you specify
InstanceRequirements
, you can't specifyInstanceType
.Attribute-based instance type selection is only supported when using Auto Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to use the launch template in the launch instance wizard, or with the RunInstances API or AWS ::EC2::Instance Amazon Web Services CloudFormation resource, you can't specify
InstanceRequirements
.For more information, see Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot placement score in the Amazon EC2 User Guide.
- Parameters:
instanceRequirements
- The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.You must specify
VCpuCount
andMemoryMiB
. All other attributes are optional. Any unspecified optional attribute is set to its default.When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.
To limit the list of instance types from which Amazon EC2 can identify matching instance types, you can use one of the following parameters, but not both in the same request:
-
AllowedInstanceTypes
- The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes. -
ExcludedInstanceTypes
- The instance types to exclude from the list, even if they match your specified attributes.
If you specify
InstanceRequirements
, you can't specifyInstanceType
.Attribute-based instance type selection is only supported when using Auto Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to use the launch template in the launch instance wizard, or with the RunInstances API or AWS::EC2::Instance Amazon Web Services CloudFormation resource, you can't specify
InstanceRequirements
.For more information, see Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot placement score in the Amazon EC2 User Guide.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
instanceRequirements
default RequestLaunchTemplateData.Builder instanceRequirements(Consumer<InstanceRequirementsRequest.Builder> instanceRequirements)
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.
You must specify
VCpuCount
andMemoryMiB
. All other attributes are optional. Any unspecified optional attribute is set to its default.When you specify multiple attributes, you get instance types that satisfy all of the specified attributes. If you specify multiple values for an attribute, you get instance types that satisfy any of the specified values.
To limit the list of instance types from which Amazon EC2 can identify matching instance types, you can use one of the following parameters, but not both in the same request:
-
AllowedInstanceTypes
- The instance types to include in the list. All other instance types are ignored, even if they match your specified attributes. -
ExcludedInstanceTypes
- The instance types to exclude from the list, even if they match your specified attributes.
If you specify
InstanceRequirements
, you can't specifyInstanceType
.Attribute-based instance type selection is only supported when using Auto Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to use the launch template in the launch instance wizard, or with the RunInstances API or AWS ::EC2::Instance Amazon Web Services CloudFormation resource, you can't specify
InstanceRequirements
.For more information, see Attribute-based instance type selection for EC2 Fleet, Attribute-based instance type selection for Spot Fleet, and Spot placement score in the Amazon EC2 User Guide.
This is a convenience method that creates an instance of theInstanceRequirementsRequest.Builder
avoiding the need to create one manually viaInstanceRequirementsRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toinstanceRequirements(InstanceRequirementsRequest)
.- Parameters:
instanceRequirements
- a consumer that will call methods onInstanceRequirementsRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
instanceRequirements(InstanceRequirementsRequest)
-
-
privateDnsNameOptions
RequestLaunchTemplateData.Builder privateDnsNameOptions(LaunchTemplatePrivateDnsNameOptionsRequest privateDnsNameOptions)
The options for the instance hostname. The default values are inherited from the subnet.
- Parameters:
privateDnsNameOptions
- The options for the instance hostname. The default values are inherited from the subnet.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
privateDnsNameOptions
default RequestLaunchTemplateData.Builder privateDnsNameOptions(Consumer<LaunchTemplatePrivateDnsNameOptionsRequest.Builder> privateDnsNameOptions)
The options for the instance hostname. The default values are inherited from the subnet.
This is a convenience method that creates an instance of theLaunchTemplatePrivateDnsNameOptionsRequest.Builder
avoiding the need to create one manually viaLaunchTemplatePrivateDnsNameOptionsRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toprivateDnsNameOptions(LaunchTemplatePrivateDnsNameOptionsRequest)
.- Parameters:
privateDnsNameOptions
- a consumer that will call methods onLaunchTemplatePrivateDnsNameOptionsRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
privateDnsNameOptions(LaunchTemplatePrivateDnsNameOptionsRequest)
-
maintenanceOptions
RequestLaunchTemplateData.Builder maintenanceOptions(LaunchTemplateInstanceMaintenanceOptionsRequest maintenanceOptions)
The maintenance options for the instance.
- Parameters:
maintenanceOptions
- The maintenance options for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
maintenanceOptions
default RequestLaunchTemplateData.Builder maintenanceOptions(Consumer<LaunchTemplateInstanceMaintenanceOptionsRequest.Builder> maintenanceOptions)
The maintenance options for the instance.
This is a convenience method that creates an instance of theLaunchTemplateInstanceMaintenanceOptionsRequest.Builder
avoiding the need to create one manually viaLaunchTemplateInstanceMaintenanceOptionsRequest.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed tomaintenanceOptions(LaunchTemplateInstanceMaintenanceOptionsRequest)
.- Parameters:
maintenanceOptions
- a consumer that will call methods onLaunchTemplateInstanceMaintenanceOptionsRequest.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
maintenanceOptions(LaunchTemplateInstanceMaintenanceOptionsRequest)
-
disableApiStop
RequestLaunchTemplateData.Builder disableApiStop(Boolean disableApiStop)
Indicates whether to enable the instance for stop protection. For more information, see Enable stop protection for your instance in the Amazon EC2 User Guide.
- Parameters:
disableApiStop
- Indicates whether to enable the instance for stop protection. For more information, see Enable stop protection for your instance in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-