public static interface RunInstancesRequest.Builder extends Ec2Request.Builder, SdkPojo, CopyableBuilder<RunInstancesRequest.Builder,RunInstancesRequest>
| Modifier and Type | Method and Description |
|---|---|
RunInstancesRequest.Builder |
additionalInfo(String additionalInfo)
Reserved.
|
RunInstancesRequest.Builder |
blockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance
at launch.
|
RunInstancesRequest.Builder |
blockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance
at launch.
|
RunInstancesRequest.Builder |
blockDeviceMappings(Consumer<BlockDeviceMapping.Builder>... blockDeviceMappings)
The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance
at launch.
|
RunInstancesRequest.Builder |
capacityReservationSpecification(CapacityReservationSpecification capacityReservationSpecification)
Information about the Capacity Reservation targeting option.
|
default RunInstancesRequest.Builder |
capacityReservationSpecification(Consumer<CapacityReservationSpecification.Builder> capacityReservationSpecification)
Information about the Capacity Reservation targeting option.
|
RunInstancesRequest.Builder |
clientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request.
|
default RunInstancesRequest.Builder |
cpuOptions(Consumer<CpuOptionsRequest.Builder> cpuOptions)
The CPU options for the instance.
|
RunInstancesRequest.Builder |
cpuOptions(CpuOptionsRequest cpuOptions)
The CPU options for the instance.
|
default RunInstancesRequest.Builder |
creditSpecification(Consumer<CreditSpecificationRequest.Builder> creditSpecification)
The credit option for CPU usage of the burstable performance instance.
|
RunInstancesRequest.Builder |
creditSpecification(CreditSpecificationRequest creditSpecification)
The credit option for CPU usage of the burstable performance instance.
|
RunInstancesRequest.Builder |
disableApiStop(Boolean disableApiStop)
Indicates whether an instance is enabled for stop protection.
|
RunInstancesRequest.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. |
RunInstancesRequest.Builder |
ebsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for Amazon EBS I/O.
|
RunInstancesRequest.Builder |
elasticGpuSpecification(Collection<ElasticGpuSpecification> elasticGpuSpecification)
An elastic GPU to associate with the instance.
|
RunInstancesRequest.Builder |
elasticGpuSpecification(Consumer<ElasticGpuSpecification.Builder>... elasticGpuSpecification)
An elastic GPU to associate with the instance.
|
RunInstancesRequest.Builder |
elasticGpuSpecification(ElasticGpuSpecification... elasticGpuSpecification)
An elastic GPU to associate with the instance.
|
RunInstancesRequest.Builder |
elasticInferenceAccelerators(Collection<ElasticInferenceAccelerator> elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance.
|
RunInstancesRequest.Builder |
elasticInferenceAccelerators(Consumer<ElasticInferenceAccelerator.Builder>... elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance.
|
RunInstancesRequest.Builder |
elasticInferenceAccelerators(ElasticInferenceAccelerator... elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance.
|
default RunInstancesRequest.Builder |
enclaveOptions(Consumer<EnclaveOptionsRequest.Builder> enclaveOptions)
Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
|
RunInstancesRequest.Builder |
enclaveOptions(EnclaveOptionsRequest enclaveOptions)
Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
|
default RunInstancesRequest.Builder |
hibernationOptions(Consumer<HibernationOptionsRequest.Builder> hibernationOptions)
Indicates whether an instance is enabled for hibernation.
|
RunInstancesRequest.Builder |
hibernationOptions(HibernationOptionsRequest hibernationOptions)
Indicates whether an instance is enabled for hibernation.
|
default RunInstancesRequest.Builder |
iamInstanceProfile(Consumer<IamInstanceProfileSpecification.Builder> iamInstanceProfile)
The name or Amazon Resource Name (ARN) of an IAM instance profile.
|
RunInstancesRequest.Builder |
iamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The name or Amazon Resource Name (ARN) of an IAM instance profile.
|
RunInstancesRequest.Builder |
imageId(String imageId)
The ID of the AMI.
|
RunInstancesRequest.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).
|
RunInstancesRequest.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 RunInstancesRequest.Builder |
instanceMarketOptions(Consumer<InstanceMarketOptionsRequest.Builder> instanceMarketOptions)
The market (purchasing) option for the instances.
|
RunInstancesRequest.Builder |
instanceMarketOptions(InstanceMarketOptionsRequest instanceMarketOptions)
The market (purchasing) option for the instances.
|
RunInstancesRequest.Builder |
instanceType(InstanceType instanceType)
The instance type.
|
RunInstancesRequest.Builder |
instanceType(String instanceType)
The instance type.
|
RunInstancesRequest.Builder |
ipv6AddressCount(Integer ipv6AddressCount)
The number of IPv6 addresses to associate with the primary network interface.
|
RunInstancesRequest.Builder |
ipv6Addresses(Collection<InstanceIpv6Address> ipv6Addresses)
The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
RunInstancesRequest.Builder |
ipv6Addresses(Consumer<InstanceIpv6Address.Builder>... ipv6Addresses)
The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
RunInstancesRequest.Builder |
ipv6Addresses(InstanceIpv6Address... ipv6Addresses)
The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
RunInstancesRequest.Builder |
kernelId(String kernelId)
The ID of the kernel.
|
RunInstancesRequest.Builder |
keyName(String keyName)
The name of the key pair.
|
default RunInstancesRequest.Builder |
launchTemplate(Consumer<LaunchTemplateSpecification.Builder> launchTemplate)
The launch template to use to launch the instances.
|
RunInstancesRequest.Builder |
launchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use to launch the instances.
|
RunInstancesRequest.Builder |
licenseSpecifications(Collection<LicenseConfigurationRequest> licenseSpecifications)
The license configurations.
|
RunInstancesRequest.Builder |
licenseSpecifications(Consumer<LicenseConfigurationRequest.Builder>... licenseSpecifications)
The license configurations.
|
RunInstancesRequest.Builder |
licenseSpecifications(LicenseConfigurationRequest... licenseSpecifications)
The license configurations.
|
default RunInstancesRequest.Builder |
maintenanceOptions(Consumer<InstanceMaintenanceOptionsRequest.Builder> maintenanceOptions)
The maintenance and recovery options for the instance.
|
RunInstancesRequest.Builder |
maintenanceOptions(InstanceMaintenanceOptionsRequest maintenanceOptions)
The maintenance and recovery options for the instance.
|
RunInstancesRequest.Builder |
maxCount(Integer maxCount)
The maximum number of instances to launch.
|
default RunInstancesRequest.Builder |
metadataOptions(Consumer<InstanceMetadataOptionsRequest.Builder> metadataOptions)
The metadata options for the instance.
|
RunInstancesRequest.Builder |
metadataOptions(InstanceMetadataOptionsRequest metadataOptions)
The metadata options for the instance.
|
RunInstancesRequest.Builder |
minCount(Integer minCount)
The minimum number of instances to launch.
|
default RunInstancesRequest.Builder |
monitoring(Consumer<RunInstancesMonitoringEnabled.Builder> monitoring)
Specifies whether detailed monitoring is enabled for the instance.
|
RunInstancesRequest.Builder |
monitoring(RunInstancesMonitoringEnabled monitoring)
Specifies whether detailed monitoring is enabled for the instance.
|
RunInstancesRequest.Builder |
networkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
The network interfaces to associate with the instance.
|
RunInstancesRequest.Builder |
networkInterfaces(Consumer<InstanceNetworkInterfaceSpecification.Builder>... networkInterfaces)
The network interfaces to associate with the instance.
|
RunInstancesRequest.Builder |
networkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
The network interfaces to associate with the instance.
|
RunInstancesRequest.Builder |
overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) |
RunInstancesRequest.Builder |
overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) |
default RunInstancesRequest.Builder |
placement(Consumer<Placement.Builder> placement)
The placement for the instance.
|
RunInstancesRequest.Builder |
placement(Placement placement)
The placement for the instance.
|
default RunInstancesRequest.Builder |
privateDnsNameOptions(Consumer<PrivateDnsNameOptionsRequest.Builder> privateDnsNameOptions)
The options for the instance hostname.
|
RunInstancesRequest.Builder |
privateDnsNameOptions(PrivateDnsNameOptionsRequest privateDnsNameOptions)
The options for the instance hostname.
|
RunInstancesRequest.Builder |
privateIpAddress(String privateIpAddress)
The primary IPv4 address.
|
RunInstancesRequest.Builder |
ramdiskId(String ramdiskId)
The ID of the RAM disk to select.
|
RunInstancesRequest.Builder |
securityGroupIds(Collection<String> securityGroupIds)
The IDs of the security groups.
|
RunInstancesRequest.Builder |
securityGroupIds(String... securityGroupIds)
The IDs of the security groups.
|
RunInstancesRequest.Builder |
securityGroups(Collection<String> securityGroups)
[Default VPC] The names of the security groups.
|
RunInstancesRequest.Builder |
securityGroups(String... securityGroups)
[Default VPC] The names of the security groups.
|
RunInstancesRequest.Builder |
subnetId(String subnetId)
The ID of the subnet to launch the instance into.
|
RunInstancesRequest.Builder |
tagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the resources that are created during instance launch.
|
RunInstancesRequest.Builder |
tagSpecifications(Consumer<TagSpecification.Builder>... tagSpecifications)
The tags to apply to the resources that are created during instance launch.
|
RunInstancesRequest.Builder |
tagSpecifications(TagSpecification... tagSpecifications)
The tags to apply to the resources that are created during instance launch.
|
RunInstancesRequest.Builder |
userData(String userData)
The user data script to make available to the instance.
|
buildoverrideConfigurationequalsBySdkFields, sdkFieldscopyapplyMutation, buildRunInstancesRequest.Builder blockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance at launch. For more information, see Block device mappings in the Amazon EC2 User Guide.
blockDeviceMappings - The block device mapping, which defines the EBS volumes and instance store volumes to attach to the
instance at launch. For more information, see Block
device mappings in the Amazon EC2 User Guide.RunInstancesRequest.Builder blockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance at launch. For more information, see Block device mappings in the Amazon EC2 User Guide.
blockDeviceMappings - The block device mapping, which defines the EBS volumes and instance store volumes to attach to the
instance at launch. For more information, see Block
device mappings in the Amazon EC2 User Guide.RunInstancesRequest.Builder blockDeviceMappings(Consumer<BlockDeviceMapping.Builder>... blockDeviceMappings)
The block device mapping, which defines the EBS volumes and instance store volumes to attach to the instance at launch. For more information, see Block device mappings in the Amazon EC2 User Guide.
This is a convenience method that creates an instance of theBlockDeviceMapping.Builder avoiding the need to create one
manually via BlockDeviceMapping.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
BlockDeviceMapping.Builder#blockDeviceMappings(java.util.Collection) RunInstancesRequest.Builder imageId(String imageId)
The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
imageId - The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a
launch template.RunInstancesRequest.Builder instanceType(String instanceType)
The instance type. For more information, see Instance types in the Amazon EC2 User Guide.
instanceType - The instance type. For more information, see Instance types in
the Amazon EC2 User Guide.InstanceType,
InstanceTypeRunInstancesRequest.Builder instanceType(InstanceType instanceType)
The instance type. For more information, see Instance types in the Amazon EC2 User Guide.
instanceType - The instance type. For more information, see Instance types in
the Amazon EC2 User Guide.InstanceType,
InstanceTypeRunInstancesRequest.Builder ipv6AddressCount(Integer ipv6AddressCount)
The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6AddressCount - The number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the
IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign
specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum
number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
RunInstancesRequest.Builder ipv6Addresses(Collection<InstanceIpv6Address> ipv6Addresses)
The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6Addresses - The IPv6 addresses from the range of the subnet to associate with the primary network interface. You
cannot specify this option and the option to assign a number of IPv6 addresses in the same request.
You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
RunInstancesRequest.Builder ipv6Addresses(InstanceIpv6Address... ipv6Addresses)
The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6Addresses - The IPv6 addresses from the range of the subnet to associate with the primary network interface. You
cannot specify this option and the option to assign a number of IPv6 addresses in the same request.
You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
RunInstancesRequest.Builder ipv6Addresses(Consumer<InstanceIpv6Address.Builder>... ipv6Addresses)
The IPv6 addresses from the range of the subnet to associate with the primary network interface. You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
This is a convenience method that creates an instance of theInstanceIpv6Address.Builder avoiding the need to create one
manually via InstanceIpv6Address.builder().
When the Consumer completes,
SdkBuilder.build() is called immediately
and its result is passed to #ipv6Addresses(List.
ipv6Addresses - a consumer that will call methods on
InstanceIpv6Address.Builder#ipv6Addresses(java.util.Collection) RunInstancesRequest.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 PV-GRUB in the Amazon EC2 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 PV-GRUB in the Amazon EC2 User Guide.
RunInstancesRequest.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.
RunInstancesRequest.Builder maxCount(Integer maxCount)
The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in the
target Availability Zone, Amazon EC2 launches the largest possible number of instances above
MinCount.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
maxCount - The maximum number of instances to launch. If you specify more instances than Amazon EC2 can launch in
the target Availability Zone, Amazon EC2 launches the largest possible number of instances above
MinCount.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 FAQ.
RunInstancesRequest.Builder minCount(Integer minCount)
The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
minCount - The minimum number of instances to launch. If you specify a minimum that is more instances than Amazon
EC2 can launch in the target Availability Zone, Amazon EC2 launches no instances.
Constraints: Between 1 and the maximum number you're allowed for the specified instance type. For more information about the default limits, and how to request an increase, see How many instances can I run in Amazon EC2 in the Amazon EC2 General FAQ.
RunInstancesRequest.Builder monitoring(RunInstancesMonitoringEnabled monitoring)
Specifies whether detailed monitoring is enabled for the instance.
monitoring - Specifies whether detailed monitoring is enabled for the instance.default RunInstancesRequest.Builder monitoring(Consumer<RunInstancesMonitoringEnabled.Builder> monitoring)
Specifies whether detailed monitoring is enabled for the instance.
This is a convenience method that creates an instance of theRunInstancesMonitoringEnabled.Builder
avoiding the need to create one manually via RunInstancesMonitoringEnabled.builder().
When the Consumer completes, SdkBuilder.build() is called
immediately and its result is passed to monitoring(RunInstancesMonitoringEnabled).
monitoring - a consumer that will call methods on RunInstancesMonitoringEnabled.Buildermonitoring(RunInstancesMonitoringEnabled)RunInstancesRequest.Builder placement(Placement placement)
The placement for the instance.
placement - The placement for the instance.default RunInstancesRequest.Builder placement(Consumer<Placement.Builder> placement)
The placement for the instance.
This is a convenience method that creates an instance of thePlacement.Builder avoiding the need to
create one manually via Placement.builder().
When the Consumer completes, SdkBuilder.build() is called immediately and its result
is passed to placement(Placement).
placement - a consumer that will call methods on Placement.Builderplacement(Placement)RunInstancesRequest.Builder ramdiskId(String ramdiskId)
The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the Amazon Web Services Resource Center and search for the kernel ID.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide.
ramdiskId - The ID of the RAM disk to select. Some kernels require additional drivers at launch. Check the kernel
requirements for information about whether you need to specify a RAM disk. To find kernel
requirements, go to the Amazon Web Services Resource Center and search for the kernel ID.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide.
RunInstancesRequest.Builder securityGroupIds(Collection<String> securityGroupIds)
The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
securityGroupIds - The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
RunInstancesRequest.Builder securityGroupIds(String... securityGroupIds)
The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
securityGroupIds - The IDs of the security groups. You can create a security group using CreateSecurityGroup.
If you specify a network interface, you must specify any security groups as part of the network interface.
RunInstancesRequest.Builder securityGroups(Collection<String> securityGroups)
[Default VPC] The names of the security groups.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
securityGroups - [Default VPC] The names of the security groups.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
RunInstancesRequest.Builder securityGroups(String... securityGroups)
[Default VPC] The names of the security groups.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
securityGroups - [Default VPC] The names of the security groups.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
RunInstancesRequest.Builder subnetId(String subnetId)
The ID of the subnet to launch the instance into.
If you specify a network interface, you must specify any subnets as part of the network interface.
subnetId - The ID of the subnet to launch the instance into.
If you specify a network interface, you must specify any subnets as part of the network interface.
RunInstancesRequest.Builder userData(String userData)
The user data script to make available to the instance. For more information, see Run commands on your Linux instance at launch and Run commands on your Windows instance at launch. If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.
userData - The user data script to make available to the instance. For more information, see Run commands on your Linux
instance at launch and Run commands
on your Windows instance at launch. If you are using a command line tool, base64-encoding is
performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded
text. User data is limited to 16 KB.RunInstancesRequest.Builder additionalInfo(String additionalInfo)
Reserved.
additionalInfo - Reserved.RunInstancesRequest.Builder clientToken(String clientToken)
Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.
For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
clientToken - Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not
specify a client token, a randomly generated token is used for the request to ensure idempotency.
For more information, see Ensuring Idempotency.
Constraints: Maximum 64 ASCII characters
RunInstancesRequest.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.
Default: false
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.
Default: false
RunInstancesRequest.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.
Default: false
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.
Default: false
RunInstancesRequest.Builder iamInstanceProfile(IamInstanceProfileSpecification 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 RunInstancesRequest.Builder iamInstanceProfile(Consumer<IamInstanceProfileSpecification.Builder> iamInstanceProfile)
The name or Amazon Resource Name (ARN) of an IAM instance profile.
This is a convenience method that creates an instance of theIamInstanceProfileSpecification.Builder
avoiding the need to create one manually via IamInstanceProfileSpecification.builder().
When the Consumer completes, SdkBuilder.build() is called
immediately and its result is passed to iamInstanceProfile(IamInstanceProfileSpecification).
iamInstanceProfile - a consumer that will call methods on IamInstanceProfileSpecification.BuilderiamInstanceProfile(IamInstanceProfileSpecification)RunInstancesRequest.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,
ShutdownBehaviorRunInstancesRequest.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,
ShutdownBehaviorRunInstancesRequest.Builder networkInterfaces(Collection<InstanceNetworkInterfaceSpecification> networkInterfaces)
The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.
networkInterfaces - The network interfaces to associate with the instance. If you specify a network interface, you must
specify any security groups and subnets as part of the network interface.RunInstancesRequest.Builder networkInterfaces(InstanceNetworkInterfaceSpecification... networkInterfaces)
The network interfaces to associate with the instance. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.
networkInterfaces - The network interfaces to associate with the instance. If you specify a network interface, you must
specify any security groups and subnets as part of the network interface.RunInstancesRequest.Builder networkInterfaces(Consumer<InstanceNetworkInterfaceSpecification.Builder>... networkInterfaces)
The network interfaces to associate with the instance. 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 theInstanceNetworkInterfaceSpecification.Builder avoiding the
need to create one manually via
InstanceNetworkInterfaceSpecification.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
InstanceNetworkInterfaceSpecification.Builder#networkInterfaces(java.util.Collection) RunInstancesRequest.Builder privateIpAddress(String privateIpAddress)
The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
You cannot specify this option and the network interfaces option in the same request.
privateIpAddress - The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet.
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
You cannot specify this option and the network interfaces option in the same request.
RunInstancesRequest.Builder elasticGpuSpecification(Collection<ElasticGpuSpecification> elasticGpuSpecification)
An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide.
elasticGpuSpecification - An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to
your Windows instance to accelerate the graphics performance of your applications. For more
information, see Amazon EC2 Elastic
GPUs in the Amazon EC2 User Guide.RunInstancesRequest.Builder elasticGpuSpecification(ElasticGpuSpecification... elasticGpuSpecification)
An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide.
elasticGpuSpecification - An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to
your Windows instance to accelerate the graphics performance of your applications. For more
information, see Amazon EC2 Elastic
GPUs in the Amazon EC2 User Guide.RunInstancesRequest.Builder elasticGpuSpecification(Consumer<ElasticGpuSpecification.Builder>... elasticGpuSpecification)
An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide.
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 #elasticGpuSpecification(List.
elasticGpuSpecification - a consumer that will call methods on
ElasticGpuSpecification.Builder#elasticGpuSpecification(java.util.Collection) RunInstancesRequest.Builder elasticInferenceAccelerators(Collection<ElasticInferenceAccelerator> 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.
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.
RunInstancesRequest.Builder elasticInferenceAccelerators(ElasticInferenceAccelerator... 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.
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.
RunInstancesRequest.Builder elasticInferenceAccelerators(Consumer<ElasticInferenceAccelerator.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.
ElasticInferenceAccelerator.Builder avoiding the need to
create one manually via
ElasticInferenceAccelerator.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
ElasticInferenceAccelerator.Builder#elasticInferenceAccelerators(java.util.Collection) RunInstancesRequest.Builder tagSpecifications(Collection<TagSpecification> 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.
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.
RunInstancesRequest.Builder tagSpecifications(TagSpecification... 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.
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.
RunInstancesRequest.Builder tagSpecifications(Consumer<TagSpecification.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.
This is a convenience method that creates an instance of theTagSpecification.Builder avoiding the need to create one
manually via TagSpecification.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
TagSpecification.Builder#tagSpecifications(java.util.Collection) RunInstancesRequest.Builder launchTemplate(LaunchTemplateSpecification launchTemplate)
The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.
launchTemplate - The launch template to use to launch the instances. Any parameters that you specify in
RunInstances override the same parameters in the launch template. You can specify either the
name or ID of a launch template, but not both.default RunInstancesRequest.Builder launchTemplate(Consumer<LaunchTemplateSpecification.Builder> launchTemplate)
The launch template to use to launch the instances. Any parameters that you specify in RunInstances override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.
This is a convenience method that creates an instance of theLaunchTemplateSpecification.Builder
avoiding the need to create one manually via LaunchTemplateSpecification.builder().
When the Consumer completes, SdkBuilder.build() is called
immediately and its result is passed to launchTemplate(LaunchTemplateSpecification).
launchTemplate - a consumer that will call methods on LaunchTemplateSpecification.BuilderlaunchTemplate(LaunchTemplateSpecification)RunInstancesRequest.Builder instanceMarketOptions(InstanceMarketOptionsRequest instanceMarketOptions)
The market (purchasing) option for the instances.
For RunInstances, persistent Spot Instance requests are only supported when
InstanceInterruptionBehavior is set to either hibernate or stop.
instanceMarketOptions - The market (purchasing) option for the instances.
For RunInstances, persistent Spot Instance requests are only supported when
InstanceInterruptionBehavior is set to either hibernate or stop.
default RunInstancesRequest.Builder instanceMarketOptions(Consumer<InstanceMarketOptionsRequest.Builder> instanceMarketOptions)
The market (purchasing) option for the instances.
For RunInstances, persistent Spot Instance requests are only supported when
InstanceInterruptionBehavior is set to either hibernate or stop.
InstanceMarketOptionsRequest.Builder
avoiding the need to create one manually via InstanceMarketOptionsRequest.builder().
When the Consumer completes, SdkBuilder.build() is called
immediately and its result is passed to instanceMarketOptions(InstanceMarketOptionsRequest).
instanceMarketOptions - a consumer that will call methods on InstanceMarketOptionsRequest.BuilderinstanceMarketOptions(InstanceMarketOptionsRequest)RunInstancesRequest.Builder creditSpecification(CreditSpecificationRequest creditSpecification)
The credit option for CPU usage of the burstable performance instance. Valid values are standard
and unlimited. To change this attribute after launch, use
ModifyInstanceCreditSpecification. For more information, see Burstable
performance instances in the Amazon EC2 User Guide.
Default: standard (T2 instances) or unlimited (T3/T3a/T4g instances)
For T3 instances with host tenancy, only standard is supported.
creditSpecification - The credit option for CPU usage of the burstable performance instance. Valid values are
standard and unlimited. To change this attribute after launch, use ModifyInstanceCreditSpecification. For more information, see Burstable performance instances in the Amazon EC2 User Guide.
Default: standard (T2 instances) or unlimited (T3/T3a/T4g instances)
For T3 instances with host tenancy, only standard is supported.
default RunInstancesRequest.Builder creditSpecification(Consumer<CreditSpecificationRequest.Builder> creditSpecification)
The credit option for CPU usage of the burstable performance instance. Valid values are standard
and unlimited. To change this attribute after launch, use
ModifyInstanceCreditSpecification. For more information, see Burstable
performance instances in the Amazon EC2 User Guide.
Default: standard (T2 instances) or unlimited (T3/T3a/T4g instances)
For T3 instances with host tenancy, only standard is supported.
CreditSpecificationRequest.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.BuildercreditSpecification(CreditSpecificationRequest)RunInstancesRequest.Builder cpuOptions(CpuOptionsRequest cpuOptions)
The CPU options for the instance. For more information, see Optimize CPU options in the Amazon EC2 User Guide.
cpuOptions - The CPU options for the instance. For more information, see Optimize CPU
options in the Amazon EC2 User Guide.default RunInstancesRequest.Builder cpuOptions(Consumer<CpuOptionsRequest.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 theCpuOptionsRequest.Builder avoiding the
need to create one manually via CpuOptionsRequest.builder().
When the Consumer completes, SdkBuilder.build() is called immediately and its
result is passed to cpuOptions(CpuOptionsRequest).
cpuOptions - a consumer that will call methods on CpuOptionsRequest.BuildercpuOptions(CpuOptionsRequest)RunInstancesRequest.Builder capacityReservationSpecification(CapacityReservationSpecification capacityReservationSpecification)
Information about 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 - Information about 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 RunInstancesRequest.Builder capacityReservationSpecification(Consumer<CapacityReservationSpecification.Builder> capacityReservationSpecification)
Information about 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.Builder
avoiding the need to create one manually via CapacityReservationSpecification.builder().
When the Consumer completes, SdkBuilder.build() is called
immediately and its result is passed to
capacityReservationSpecification(CapacityReservationSpecification).
capacityReservationSpecification - a consumer that will call methods on CapacityReservationSpecification.BuildercapacityReservationSpecification(CapacityReservationSpecification)RunInstancesRequest.Builder hibernationOptions(HibernationOptionsRequest 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 EC2 User Guide.
You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.
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 EC2 User Guide.
You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.
default RunInstancesRequest.Builder hibernationOptions(Consumer<HibernationOptionsRequest.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 EC2 User Guide.
You can't enable hibernation and Amazon Web Services Nitro Enclaves on the same instance.
This is a convenience method that creates an instance of theHibernationOptionsRequest.Builder
avoiding the need to create one manually via HibernationOptionsRequest.builder().
When the Consumer completes, SdkBuilder.build() is called immediately
and its result is passed to hibernationOptions(HibernationOptionsRequest).
hibernationOptions - a consumer that will call methods on HibernationOptionsRequest.BuilderhibernationOptions(HibernationOptionsRequest)RunInstancesRequest.Builder licenseSpecifications(Collection<LicenseConfigurationRequest> licenseSpecifications)
The license configurations.
licenseSpecifications - The license configurations.RunInstancesRequest.Builder licenseSpecifications(LicenseConfigurationRequest... licenseSpecifications)
The license configurations.
licenseSpecifications - The license configurations.RunInstancesRequest.Builder licenseSpecifications(Consumer<LicenseConfigurationRequest.Builder>... licenseSpecifications)
The license configurations.
This is a convenience method that creates an instance of theLicenseConfigurationRequest.Builder avoiding the need to
create one manually via
LicenseConfigurationRequest.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
LicenseConfigurationRequest.Builder#licenseSpecifications(java.util.Collection) RunInstancesRequest.Builder metadataOptions(InstanceMetadataOptionsRequest metadataOptions)
The metadata options for the instance. For more information, see Instance metadata and user data.
metadataOptions - The metadata options for the instance. For more information, see Instance
metadata and user data.default RunInstancesRequest.Builder metadataOptions(Consumer<InstanceMetadataOptionsRequest.Builder> metadataOptions)
The metadata options for the instance. For more information, see Instance metadata and user data.
This is a convenience method that creates an instance of theInstanceMetadataOptionsRequest.Builder
avoiding the need to create one manually via InstanceMetadataOptionsRequest.builder().
When the Consumer completes, SdkBuilder.build() is called
immediately and its result is passed to metadataOptions(InstanceMetadataOptionsRequest).
metadataOptions - a consumer that will call methods on InstanceMetadataOptionsRequest.BuildermetadataOptions(InstanceMetadataOptionsRequest)RunInstancesRequest.Builder enclaveOptions(EnclaveOptionsRequest 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 RunInstancesRequest.Builder enclaveOptions(Consumer<EnclaveOptionsRequest.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 theEnclaveOptionsRequest.Builder avoiding
the need to create one manually via EnclaveOptionsRequest.builder().
When the Consumer completes, SdkBuilder.build() is called immediately and
its result is passed to enclaveOptions(EnclaveOptionsRequest).
enclaveOptions - a consumer that will call methods on EnclaveOptionsRequest.BuilderenclaveOptions(EnclaveOptionsRequest)RunInstancesRequest.Builder privateDnsNameOptions(PrivateDnsNameOptionsRequest privateDnsNameOptions)
The options for the instance hostname. The default values are inherited from the subnet. Applies only if creating a network interface, not attaching an existing one.
privateDnsNameOptions - The options for the instance hostname. The default values are inherited from the subnet. Applies only
if creating a network interface, not attaching an existing one.default RunInstancesRequest.Builder privateDnsNameOptions(Consumer<PrivateDnsNameOptionsRequest.Builder> privateDnsNameOptions)
The options for the instance hostname. The default values are inherited from the subnet. Applies only if creating a network interface, not attaching an existing one.
This is a convenience method that creates an instance of thePrivateDnsNameOptionsRequest.Builder
avoiding the need to create one manually via PrivateDnsNameOptionsRequest.builder().
When the Consumer completes, SdkBuilder.build() is called
immediately and its result is passed to privateDnsNameOptions(PrivateDnsNameOptionsRequest).
privateDnsNameOptions - a consumer that will call methods on PrivateDnsNameOptionsRequest.BuilderprivateDnsNameOptions(PrivateDnsNameOptionsRequest)RunInstancesRequest.Builder maintenanceOptions(InstanceMaintenanceOptionsRequest maintenanceOptions)
The maintenance and recovery options for the instance.
maintenanceOptions - The maintenance and recovery options for the instance.default RunInstancesRequest.Builder maintenanceOptions(Consumer<InstanceMaintenanceOptionsRequest.Builder> maintenanceOptions)
The maintenance and recovery options for the instance.
This is a convenience method that creates an instance of theInstanceMaintenanceOptionsRequest.Builder avoiding the need to create one manually via
InstanceMaintenanceOptionsRequest.builder().
When the Consumer completes, SdkBuilder.build() is called
immediately and its result is passed to maintenanceOptions(InstanceMaintenanceOptionsRequest).
maintenanceOptions - a consumer that will call methods on InstanceMaintenanceOptionsRequest.BuildermaintenanceOptions(InstanceMaintenanceOptionsRequest)RunInstancesRequest.Builder disableApiStop(Boolean disableApiStop)
Indicates whether an instance is enabled for stop protection. For more information, see Stop protection.
disableApiStop - Indicates whether an instance is enabled for stop protection. For more information, see Stop
protection.RunInstancesRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
overrideConfiguration in interface AwsRequest.BuilderRunInstancesRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
overrideConfiguration in interface AwsRequest.BuilderCopyright © 2023. All rights reserved.