public static interface RequestLaunchTemplateData.Builder extends SdkPojo, CopyableBuilder<RequestLaunchTemplateData.Builder,RequestLaunchTemplateData>
equalsBySdkFields, sdkFields
copy
applyMutation, build
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 Elastic Compute Cloud User Guide.
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.
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.
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.RequestLaunchTemplateData.Builder iamInstanceProfile(LaunchTemplateIamInstanceProfileSpecificationRequest iamInstanceProfile)
The name or Amazon Resource Name (ARN) of an IAM instance profile.
iamInstanceProfile
- The name or Amazon Resource Name (ARN) of an IAM instance profile.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
via LaunchTemplateIamInstanceProfileSpecificationRequest.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is called immediately and its
result is passed to iamInstanceProfile(LaunchTemplateIamInstanceProfileSpecificationRequest)
.
iamInstanceProfile
- a consumer that will call methods on
LaunchTemplateIamInstanceProfileSpecificationRequest.Builder
iamInstanceProfile(LaunchTemplateIamInstanceProfileSpecificationRequest)
RequestLaunchTemplateData.Builder blockDeviceMappings(Collection<LaunchTemplateBlockDeviceMappingRequest> blockDeviceMappings)
The block device mapping.
blockDeviceMappings
- The block device mapping.RequestLaunchTemplateData.Builder blockDeviceMappings(LaunchTemplateBlockDeviceMappingRequest... blockDeviceMappings)
The block device mapping.
blockDeviceMappings
- The block device mapping.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 via
LaunchTemplateBlockDeviceMappingRequest.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is
called immediately and its result is passed to #blockDeviceMappings(List
.
blockDeviceMappings
- a consumer that will call methods on
LaunchTemplateBlockDeviceMappingRequest.Builder
#blockDeviceMappings(java.util.Collection)
RequestLaunchTemplateData.Builder networkInterfaces(Collection<LaunchTemplateInstanceNetworkInterfaceSpecificationRequest> networkInterfaces)
One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.
networkInterfaces
- One or more network interfaces. If you specify a network interface, you must specify any security
groups and subnets as part of the network interface.RequestLaunchTemplateData.Builder networkInterfaces(LaunchTemplateInstanceNetworkInterfaceSpecificationRequest... networkInterfaces)
One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.
networkInterfaces
- One or more network interfaces. If you specify a network interface, you must specify any security
groups and subnets as part of the network interface.RequestLaunchTemplateData.Builder networkInterfaces(Consumer<LaunchTemplateInstanceNetworkInterfaceSpecificationRequest.Builder>... networkInterfaces)
One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.
This is a convenience method that creates an instance of theLaunchTemplateInstanceNetworkInterfaceSpecificationRequest.Builder
avoiding the need to create one manually via
LaunchTemplateInstanceNetworkInterfaceSpecificationRequest.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is called immediately and its result is passed to #networkInterfaces(List
.
networkInterfaces
- a consumer that will call methods on
LaunchTemplateInstanceNetworkInterfaceSpecificationRequest.Builder
#networkInterfaces(java.util.Collection)
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 Elastic Compute Cloud User Guide.
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 Elastic Compute Cloud User Guide.
RequestLaunchTemplateData.Builder instanceType(String instanceType)
The instance type. For more information, see Instance types in the Amazon Elastic Compute Cloud User Guide.
If you specify InstanceType
, you can't specify InstanceRequirements
.
instanceType
- The instance type. For more information, see Instance types in
the Amazon Elastic Compute Cloud User Guide.
If you specify InstanceType
, you can't specify InstanceRequirements
.
InstanceType
,
InstanceType
RequestLaunchTemplateData.Builder instanceType(InstanceType instanceType)
The instance type. For more information, see Instance types in the Amazon Elastic Compute Cloud User Guide.
If you specify InstanceType
, you can't specify InstanceRequirements
.
instanceType
- The instance type. For more information, see Instance types in
the Amazon Elastic Compute Cloud User Guide.
If you specify InstanceType
, you can't specify InstanceRequirements
.
InstanceType
,
InstanceType
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.
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.
RequestLaunchTemplateData.Builder monitoring(LaunchTemplatesMonitoringRequest monitoring)
The monitoring for the instance.
monitoring
- The monitoring for the instance.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 via LaunchTemplatesMonitoringRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called
immediately and its result is passed to monitoring(LaunchTemplatesMonitoringRequest)
.
monitoring
- a consumer that will call methods on LaunchTemplatesMonitoringRequest.Builder
monitoring(LaunchTemplatesMonitoringRequest)
RequestLaunchTemplateData.Builder placement(LaunchTemplatePlacementRequest placement)
The placement for the instance.
placement
- The placement for the instance.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 via LaunchTemplatePlacementRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called
immediately and its result is passed to placement(LaunchTemplatePlacementRequest)
.
placement
- a consumer that will call methods on LaunchTemplatePlacementRequest.Builder
placement(LaunchTemplatePlacementRequest)
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 Elastic Compute Cloud User Guide.
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.
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 set InstanceInitiatedShutdownBehavior
to
terminate
, you can terminate the instance by running the shutdown command from the instance.
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 set InstanceInitiatedShutdownBehavior
to terminate
, you can terminate the instance by running the shutdown command from the
instance.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
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
ShutdownBehavior
,
ShutdownBehavior
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
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
ShutdownBehavior
,
ShutdownBehavior
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 Linux instance at launch (Linux) or Work with instance user data (Windows) in the Amazon Elastic Compute Cloud 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.
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 Linux
instance at launch (Linux) or Work
with instance user data (Windows) in the Amazon Elastic Compute Cloud 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.
RequestLaunchTemplateData.Builder tagSpecifications(Collection<LaunchTemplateTagSpecificationRequest> tagSpecifications)
The tags to apply to the resources that are created during instance launch.
You can specify tags for the following resources only:
Instances
Volumes
Elastic graphics
Spot Instance requests
Network interfaces
To tag a resource after it has been created, see CreateTags.
To tag the launch template itself, you must use the TagSpecification parameter.
tagSpecifications
- The tags to apply to the resources that are created during instance launch.
You can specify tags for the following resources only:
Instances
Volumes
Elastic graphics
Spot Instance requests
Network interfaces
To tag a resource after it has been created, see CreateTags.
To tag the launch template itself, you must use the TagSpecification parameter.
RequestLaunchTemplateData.Builder tagSpecifications(LaunchTemplateTagSpecificationRequest... tagSpecifications)
The tags to apply to the resources that are created during instance launch.
You can specify tags for the following resources only:
Instances
Volumes
Elastic graphics
Spot Instance requests
Network interfaces
To tag a resource after it has been created, see CreateTags.
To tag the launch template itself, you must use the TagSpecification parameter.
tagSpecifications
- The tags to apply to the resources that are created during instance launch.
You can specify tags for the following resources only:
Instances
Volumes
Elastic graphics
Spot Instance requests
Network interfaces
To tag a resource after it has been created, see CreateTags.
To tag the launch template itself, you must use the TagSpecification parameter.
RequestLaunchTemplateData.Builder tagSpecifications(Consumer<LaunchTemplateTagSpecificationRequest.Builder>... tagSpecifications)
The tags to apply to the resources that are created during instance launch.
You can specify tags for the following resources only:
Instances
Volumes
Elastic graphics
Spot Instance requests
Network interfaces
To tag a resource after it has been created, see CreateTags.
To tag the launch template itself, you must use the TagSpecification parameter.
LaunchTemplateTagSpecificationRequest.Builder
avoiding the
need to create one manually via
LaunchTemplateTagSpecificationRequest.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is
called immediately and its result is passed to #tagSpecifications(List
.
tagSpecifications
- a consumer that will call methods on
LaunchTemplateTagSpecificationRequest.Builder
#tagSpecifications(java.util.Collection)
RequestLaunchTemplateData.Builder elasticGpuSpecifications(Collection<ElasticGpuSpecification> elasticGpuSpecifications)
An elastic GPU to associate with the instance.
elasticGpuSpecifications
- An elastic GPU to associate with the instance.RequestLaunchTemplateData.Builder elasticGpuSpecifications(ElasticGpuSpecification... elasticGpuSpecifications)
An elastic GPU to associate with the instance.
elasticGpuSpecifications
- An elastic GPU to associate with the instance.RequestLaunchTemplateData.Builder elasticGpuSpecifications(Consumer<ElasticGpuSpecification.Builder>... elasticGpuSpecifications)
An elastic GPU to associate with the instance.
This is a convenience method that creates an instance of theElasticGpuSpecification.Builder
avoiding the need to create
one manually via ElasticGpuSpecification.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is called
immediately and its result is passed to #elasticGpuSpecifications(List
.
elasticGpuSpecifications
- a consumer that will call methods on
ElasticGpuSpecification.Builder
#elasticGpuSpecifications(java.util.Collection)
RequestLaunchTemplateData.Builder elasticInferenceAccelerators(Collection<LaunchTemplateElasticInferenceAccelerator> elasticInferenceAccelerators)
The elastic inference accelerator for the instance.
elasticInferenceAccelerators
- The elastic inference accelerator for the instance.RequestLaunchTemplateData.Builder elasticInferenceAccelerators(LaunchTemplateElasticInferenceAccelerator... elasticInferenceAccelerators)
The elastic inference accelerator for the instance.
elasticInferenceAccelerators
- The elastic inference accelerator for the instance.RequestLaunchTemplateData.Builder elasticInferenceAccelerators(Consumer<LaunchTemplateElasticInferenceAccelerator.Builder>... elasticInferenceAccelerators)
The elastic inference accelerator for the instance.
This is a convenience method that creates an instance of theLaunchTemplateElasticInferenceAccelerator.Builder
avoiding
the need to create one manually via
LaunchTemplateElasticInferenceAccelerator.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is called immediately and its result is passed to #elasticInferenceAccelerators(List
.
elasticInferenceAccelerators
- a consumer that will call methods on
LaunchTemplateElasticInferenceAccelerator.Builder
#elasticInferenceAccelerators(java.util.Collection)
RequestLaunchTemplateData.Builder securityGroupIds(Collection<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.
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.RequestLaunchTemplateData.Builder securityGroupIds(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.
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.RequestLaunchTemplateData.Builder securityGroups(Collection<String> securityGroups)
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.
securityGroups
- 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.RequestLaunchTemplateData.Builder securityGroups(String... securityGroups)
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.
securityGroups
- 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.RequestLaunchTemplateData.Builder instanceMarketOptions(LaunchTemplateInstanceMarketOptionsRequest instanceMarketOptions)
The market (purchasing) option for the instances.
instanceMarketOptions
- The market (purchasing) option for the instances.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 via
LaunchTemplateInstanceMarketOptionsRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is
called immediately and its result is passed to
instanceMarketOptions(LaunchTemplateInstanceMarketOptionsRequest)
.
instanceMarketOptions
- a consumer that will call methods on LaunchTemplateInstanceMarketOptionsRequest.Builder
instanceMarketOptions(LaunchTemplateInstanceMarketOptionsRequest)
RequestLaunchTemplateData.Builder creditSpecification(CreditSpecificationRequest creditSpecification)
The credit option for CPU usage of the instance. Valid only for T instances.
creditSpecification
- The credit option for CPU usage of the instance. Valid only for T instances.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 via CreditSpecificationRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately
and its result is passed to creditSpecification(CreditSpecificationRequest)
.
creditSpecification
- a consumer that will call methods on CreditSpecificationRequest.Builder
creditSpecification(CreditSpecificationRequest)
RequestLaunchTemplateData.Builder cpuOptions(LaunchTemplateCpuOptionsRequest cpuOptions)
The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.
cpuOptions
- The CPU options for the instance. For more information, see Optimizing CPU
Options in the Amazon Elastic Compute Cloud User Guide.default RequestLaunchTemplateData.Builder cpuOptions(Consumer<LaunchTemplateCpuOptionsRequest.Builder> cpuOptions)
The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.
This is a convenience method that creates an instance of theLaunchTemplateCpuOptionsRequest.Builder
avoiding the need to create one manually via LaunchTemplateCpuOptionsRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called
immediately and its result is passed to cpuOptions(LaunchTemplateCpuOptionsRequest)
.
cpuOptions
- a consumer that will call methods on LaunchTemplateCpuOptionsRequest.Builder
cpuOptions(LaunchTemplateCpuOptionsRequest)
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).
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).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 open
, 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 via LaunchTemplateCapacityReservationSpecificationRequest.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is called immediately and its
result is passed to
capacityReservationSpecification(LaunchTemplateCapacityReservationSpecificationRequest)
.
capacityReservationSpecification
- a consumer that will call methods on
LaunchTemplateCapacityReservationSpecificationRequest.Builder
capacityReservationSpecification(LaunchTemplateCapacityReservationSpecificationRequest)
RequestLaunchTemplateData.Builder licenseSpecifications(Collection<LaunchTemplateLicenseConfigurationRequest> licenseSpecifications)
The license configurations.
licenseSpecifications
- The license configurations.RequestLaunchTemplateData.Builder licenseSpecifications(LaunchTemplateLicenseConfigurationRequest... licenseSpecifications)
The license configurations.
licenseSpecifications
- The license configurations.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 via
LaunchTemplateLicenseConfigurationRequest.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is called immediately and its result is passed to #licenseSpecifications(List
.
licenseSpecifications
- a consumer that will call methods on
LaunchTemplateLicenseConfigurationRequest.Builder
#licenseSpecifications(java.util.Collection)
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 instance in the Amazon Elastic Compute Cloud User Guide.
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 instance
in the Amazon Elastic Compute Cloud User Guide.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 instance in the Amazon Elastic Compute Cloud User Guide.
This is a convenience method that creates an instance of theLaunchTemplateHibernationOptionsRequest.Builder
avoiding the need to create one manually via
LaunchTemplateHibernationOptionsRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is
called immediately and its result is passed to
hibernationOptions(LaunchTemplateHibernationOptionsRequest)
.
hibernationOptions
- a consumer that will call methods on LaunchTemplateHibernationOptionsRequest.Builder
hibernationOptions(LaunchTemplateHibernationOptionsRequest)
RequestLaunchTemplateData.Builder metadataOptions(LaunchTemplateInstanceMetadataOptionsRequest metadataOptions)
The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide.
metadataOptions
- The metadata options for the instance. For more information, see Instance
metadata and user data in the Amazon Elastic Compute Cloud User Guide.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 Elastic Compute Cloud User Guide.
This is a convenience method that creates an instance of theLaunchTemplateInstanceMetadataOptionsRequest.Builder
avoiding the need to create one manually via
LaunchTemplateInstanceMetadataOptionsRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is
called immediately and its result is passed to
metadataOptions(LaunchTemplateInstanceMetadataOptionsRequest)
.
metadataOptions
- a consumer that will call methods on LaunchTemplateInstanceMetadataOptionsRequest.Builder
metadataOptions(LaunchTemplateInstanceMetadataOptionsRequest)
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.
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.
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 via
LaunchTemplateEnclaveOptionsRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called
immediately and its result is passed to enclaveOptions(LaunchTemplateEnclaveOptionsRequest)
.
enclaveOptions
- a consumer that will call methods on LaunchTemplateEnclaveOptionsRequest.Builder
enclaveOptions(LaunchTemplateEnclaveOptionsRequest)
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
and MemoryMiB
. 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 specify InstanceType
.
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.
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
and MemoryMiB
. 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 specify InstanceType
.
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.
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
and MemoryMiB
. 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 specify InstanceType
.
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 via InstanceRequirementsRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called
immediately and its result is passed to instanceRequirements(InstanceRequirementsRequest)
.
instanceRequirements
- a consumer that will call methods on InstanceRequirementsRequest.Builder
instanceRequirements(InstanceRequirementsRequest)
RequestLaunchTemplateData.Builder privateDnsNameOptions(LaunchTemplatePrivateDnsNameOptionsRequest privateDnsNameOptions)
The options for the instance hostname. The default values are inherited from the subnet.
privateDnsNameOptions
- The options for the instance hostname. The default values are inherited from the subnet.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 via
LaunchTemplatePrivateDnsNameOptionsRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is
called immediately and its result is passed to
privateDnsNameOptions(LaunchTemplatePrivateDnsNameOptionsRequest)
.
privateDnsNameOptions
- a consumer that will call methods on LaunchTemplatePrivateDnsNameOptionsRequest.Builder
privateDnsNameOptions(LaunchTemplatePrivateDnsNameOptionsRequest)
RequestLaunchTemplateData.Builder maintenanceOptions(LaunchTemplateInstanceMaintenanceOptionsRequest maintenanceOptions)
The maintenance options for the instance.
maintenanceOptions
- The maintenance options for the instance.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 via
LaunchTemplateInstanceMaintenanceOptionsRequest.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called immediately and its result is passed to
maintenanceOptions(LaunchTemplateInstanceMaintenanceOptionsRequest)
.
maintenanceOptions
- a consumer that will call methods on LaunchTemplateInstanceMaintenanceOptionsRequest.Builder
maintenanceOptions(LaunchTemplateInstanceMaintenanceOptionsRequest)
RequestLaunchTemplateData.Builder disableApiStop(Boolean disableApiStop)
Indicates whether to enable the instance for stop protection. For more information, see Stop protection in the Amazon Elastic Compute Cloud User Guide.
disableApiStop
- Indicates whether to enable the instance for stop protection. For more information, see Stop
protection in the Amazon Elastic Compute Cloud User Guide.Copyright © 2023. All rights reserved.