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 entries.
|
RunInstancesRequest.Builder |
blockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mapping entries.
|
RunInstancesRequest.Builder |
blockDeviceMappings(Consumer<BlockDeviceMapping.Builder>... blockDeviceMappings)
The block device mapping entries.
|
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 |
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 |
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 IAM instance profile.
|
RunInstancesRequest.Builder |
iamInstanceProfile(IamInstanceProfileSpecification iamInstanceProfile)
The 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)
[EC2-VPC] The number of IPv6 addresses to associate with the primary network interface.
|
RunInstancesRequest.Builder |
ipv6Addresses(Collection<InstanceIpv6Address> ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
RunInstancesRequest.Builder |
ipv6Addresses(Consumer<InstanceIpv6Address.Builder>... ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
RunInstancesRequest.Builder |
ipv6Addresses(InstanceIpv6Address... ipv6Addresses)
[EC2-VPC] 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.
|
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.
|
RunInstancesRequest.Builder |
privateIpAddress(String privateIpAddress)
[EC2-VPC] 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)
[EC2-Classic, default VPC] The names of the security groups.
|
RunInstancesRequest.Builder |
securityGroups(String... securityGroups)
[EC2-Classic, default VPC] The names of the security groups.
|
RunInstancesRequest.Builder |
subnetId(String subnetId)
[EC2-VPC] The ID of the subnet to launch the instance into.
|
RunInstancesRequest.Builder |
tagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the resources during launch.
|
RunInstancesRequest.Builder |
tagSpecifications(Consumer<TagSpecification.Builder>... tagSpecifications)
The tags to apply to the resources during launch.
|
RunInstancesRequest.Builder |
tagSpecifications(TagSpecification... tagSpecifications)
The tags to apply to the resources during launch.
|
RunInstancesRequest.Builder |
userData(String userData)
The user data to make available to the instance.
|
build
overrideConfiguration
equalsBySdkFields, sdkFields
copy
applyMutation, build
RunInstancesRequest.Builder blockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings)
The block device mapping entries.
blockDeviceMappings
- The block device mapping entries.RunInstancesRequest.Builder blockDeviceMappings(BlockDeviceMapping... blockDeviceMappings)
The block device mapping entries.
blockDeviceMappings
- The block device mapping entries.RunInstancesRequest.Builder blockDeviceMappings(Consumer<BlockDeviceMapping.Builder>... blockDeviceMappings)
The block device mapping entries.
This is a convenience that creates an instance of theList.Builder
avoiding the
need to create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called immediately
and its result is passed to #blockDeviceMappings(List)
.blockDeviceMappings
- a consumer that will call methods on List.Builder
#blockDeviceMappings(List)
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 Elastic Compute Cloud User Guide.
Default: m1.small
instanceType
- The instance type. For more information, see Instance Types in
the Amazon Elastic Compute Cloud User Guide.
Default: m1.small
InstanceType
,
InstanceType
RunInstancesRequest.Builder instanceType(InstanceType instanceType)
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
Default: m1.small
instanceType
- The instance type. For more information, see Instance Types in
the Amazon Elastic Compute Cloud User Guide.
Default: m1.small
InstanceType
,
InstanceType
RunInstancesRequest.Builder ipv6AddressCount(Integer ipv6AddressCount)
[EC2-VPC] 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
- [EC2-VPC] 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)
[EC2-VPC] 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
- [EC2-VPC] 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)
[EC2-VPC] 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
- [EC2-VPC] 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)
[EC2-VPC] 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 that creates an instance of theList.Builder
avoiding the
need to create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called immediately
and its result is passed to #ipv6Addresses(List)
.ipv6Addresses
- a consumer that will call methods on List.Builder
#ipv6Addresses(List)
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 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 PV-GRUB in the Amazon Elastic Compute Cloud 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 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.Builder
monitoring(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 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.Builder
placement(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 AWS 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 Elastic Compute Cloud 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 AWS 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 Elastic Compute Cloud 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)
[EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
securityGroups
- [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use
security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
RunInstancesRequest.Builder securityGroups(String... securityGroups)
[EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
securityGroups
- [EC2-Classic, default VPC] The names of the security groups. For a nondefault VPC, you must use
security group IDs instead.
If you specify a network interface, you must specify any security groups as part of the network interface.
Default: Amazon EC2 uses the default security group.
RunInstancesRequest.Builder subnetId(String subnetId)
[EC2-VPC] 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
- [EC2-VPC] 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 to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (Linux) and Adding User Data (Windows). 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 to make available to the instance. For more information, see Running Commands on Your
Linux Instance at Launch (Linux) and Adding User Data (Windows). 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 IAM instance profile.
iamInstanceProfile
- The IAM instance profile.default RunInstancesRequest.Builder iamInstanceProfile(Consumer<IamInstanceProfileSpecification.Builder> iamInstanceProfile)
The IAM instance profile.
This is a convenience 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.Builder
iamInstanceProfile(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
,
ShutdownBehavior
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).
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
RunInstancesRequest.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 that creates an instance of the.Builder
avoiding the need to create one manually via #builder()
.
When the Consumer
completes, List.Builder#build()
is
called immediately and its result is passed to #networkInterfaces(List)
.networkInterfaces
- a consumer that will call methods on List.Builder
#networkInterfaces(List)
RunInstancesRequest.Builder privateIpAddress(String privateIpAddress)
[EC2-VPC] 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
- [EC2-VPC] 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 Elastic Compute Cloud 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 Elastic Compute Cloud 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 Elastic Compute Cloud 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 Elastic Compute Cloud 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 Elastic Compute Cloud User Guide.
This is a convenience that creates an instance of theList.Builder
avoiding
the need to create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called
immediately and its result is passed to #elasticGpuSpecification(List)
.elasticGpuSpecification
- a consumer that will call methods on List.Builder
#elasticGpuSpecification(List)
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.
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.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.
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.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.
This is a convenience that creates an instance of theList.Builder
avoiding the need to create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called
immediately and its result is passed to #elasticInferenceAccelerators(List)
.elasticInferenceAccelerators
- a consumer that will call methods on List.Builder
#elasticInferenceAccelerators(List)
RunInstancesRequest.Builder tagSpecifications(Collection<TagSpecification> tagSpecifications)
The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.
tagSpecifications
- The tags to apply to the resources during launch. You can only tag instances and volumes on launch.
The specified tags are applied to all instances or volumes that are created during launch. To tag a
resource after it has been created, see CreateTags.RunInstancesRequest.Builder tagSpecifications(TagSpecification... tagSpecifications)
The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.
tagSpecifications
- The tags to apply to the resources during launch. You can only tag instances and volumes on launch.
The specified tags are applied to all instances or volumes that are created during launch. To tag a
resource after it has been created, see CreateTags.RunInstancesRequest.Builder tagSpecifications(Consumer<TagSpecification.Builder>... tagSpecifications)
The tags to apply to the resources during launch. You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch. To tag a resource after it has been created, see CreateTags.
This is a convenience that creates an instance of theList.Builder
avoiding the
need to create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called immediately and
its result is passed to #tagSpecifications(List)
.tagSpecifications
- a consumer that will call methods on List.Builder
#tagSpecifications(List)
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 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.Builder
launchTemplate(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.Builder
instanceMarketOptions(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 Elastic Compute Cloud User Guide.
Default: standard
(T2 instances) or unlimited
(T3/T3a instances)
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 Elastic Compute Cloud User Guide.
Default: standard
(T2 instances) or unlimited
(T3/T3a instances)
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 Elastic Compute Cloud User Guide.
Default: standard
(T2 instances) or unlimited
(T3/T3a instances)
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.Builder
creditSpecification(CreditSpecificationRequest)
RunInstancesRequest.Builder cpuOptions(CpuOptionsRequest 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 RunInstancesRequest.Builder cpuOptions(Consumer<CpuOptionsRequest.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 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.Builder
cpuOptions(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.Builder
capacityReservationSpecification(CapacityReservationSpecification)
RunInstancesRequest.Builder hibernationOptions(HibernationOptionsRequest hibernationOptions)
Indicates whether an instance is enabled for hibernation. For more information, see Hibernate Your Instance in the Amazon Elastic Compute Cloud User Guide.
hibernationOptions
- Indicates whether an instance is enabled for hibernation. For more information, see Hibernate Your Instance
in the Amazon Elastic Compute Cloud User Guide.default RunInstancesRequest.Builder hibernationOptions(Consumer<HibernationOptionsRequest.Builder> hibernationOptions)
Indicates whether an instance is enabled for hibernation. For more information, see Hibernate Your Instance in the Amazon Elastic Compute Cloud User Guide.
This is a convenience 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.Builder
hibernationOptions(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 that creates an instance of theList.Builder
avoiding the need to create one manually via List#builder()
.
When the Consumer
completes, List.Builder#build()
is called
immediately and its result is passed to #licenseSpecifications(List)
.licenseSpecifications
- a consumer that will call methods on List.Builder
#licenseSpecifications(List)
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 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.Builder
metadataOptions(InstanceMetadataOptionsRequest)
RunInstancesRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration)
overrideConfiguration
in interface AwsRequest.Builder
RunInstancesRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer)
overrideConfiguration
in interface AwsRequest.Builder
Copyright © 2020. All rights reserved.