Struct aws_sdk_ec2::input::RunInstancesInput [−][src]
#[non_exhaustive]pub struct RunInstancesInput {Show 37 fields
pub block_device_mappings: Option<Vec<BlockDeviceMapping>>,
pub image_id: Option<String>,
pub instance_type: Option<InstanceType>,
pub ipv6_address_count: Option<i32>,
pub ipv6_addresses: Option<Vec<InstanceIpv6Address>>,
pub kernel_id: Option<String>,
pub key_name: Option<String>,
pub max_count: Option<i32>,
pub min_count: Option<i32>,
pub monitoring: Option<RunInstancesMonitoringEnabled>,
pub placement: Option<Placement>,
pub ramdisk_id: Option<String>,
pub security_group_ids: Option<Vec<String>>,
pub security_groups: Option<Vec<String>>,
pub subnet_id: Option<String>,
pub user_data: Option<String>,
pub additional_info: Option<String>,
pub client_token: Option<String>,
pub disable_api_termination: Option<bool>,
pub dry_run: Option<bool>,
pub ebs_optimized: Option<bool>,
pub iam_instance_profile: Option<IamInstanceProfileSpecification>,
pub instance_initiated_shutdown_behavior: Option<ShutdownBehavior>,
pub network_interfaces: Option<Vec<InstanceNetworkInterfaceSpecification>>,
pub private_ip_address: Option<String>,
pub elastic_gpu_specification: Option<Vec<ElasticGpuSpecification>>,
pub elastic_inference_accelerators: Option<Vec<ElasticInferenceAccelerator>>,
pub tag_specifications: Option<Vec<TagSpecification>>,
pub launch_template: Option<LaunchTemplateSpecification>,
pub instance_market_options: Option<InstanceMarketOptionsRequest>,
pub credit_specification: Option<CreditSpecificationRequest>,
pub cpu_options: Option<CpuOptionsRequest>,
pub capacity_reservation_specification: Option<CapacityReservationSpecification>,
pub hibernation_options: Option<HibernationOptionsRequest>,
pub license_specifications: Option<Vec<LicenseConfigurationRequest>>,
pub metadata_options: Option<InstanceMetadataOptionsRequest>,
pub enclave_options: Option<EnclaveOptionsRequest>,
}
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.block_device_mappings: Option<Vec<BlockDeviceMapping>>
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.
image_id: Option<String>
The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
instance_type: Option<InstanceType>
The instance type. For more information, see Instance types in the Amazon EC2 User Guide.
Default: m1.small
ipv6_address_count: Option<i32>
[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.
ipv6_addresses: Option<Vec<InstanceIpv6Address>>
[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.
kernel_id: Option<String>
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.
key_name: Option<String>
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.
max_count: Option<i32>
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.
min_count: Option<i32>
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.
monitoring: Option<RunInstancesMonitoringEnabled>
Specifies whether detailed monitoring is enabled for the instance.
placement: Option<Placement>
The placement for the instance.
ramdisk_id: Option<String>
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.
security_group_ids: Option<Vec<String>>
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.
security_groups: Option<Vec<String>>
[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.
subnet_id: Option<String>
[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.
user_data: Option<String>
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.
additional_info: Option<String>
Reserved.
client_token: Option<String>
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
disable_api_termination: Option<bool>
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
dry_run: Option<bool>
Checks whether you have the required permissions for the action, without actually making the request,
and provides an error response. If you have the required permissions, the error response is DryRunOperation
.
Otherwise, it is UnauthorizedOperation
.
ebs_optimized: Option<bool>
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
iam_instance_profile: Option<IamInstanceProfileSpecification>
The name or Amazon Resource Name (ARN) of an IAM instance profile.
instance_initiated_shutdown_behavior: Option<ShutdownBehavior>
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
network_interfaces: Option<Vec<InstanceNetworkInterfaceSpecification>>
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.
private_ip_address: Option<String>
[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.
elastic_gpu_specification: Option<Vec<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.
elastic_inference_accelerators: Option<Vec<ElasticInferenceAccelerator>>
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.
tag_specifications: Option<Vec<TagSpecification>>
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.
launch_template: Option<LaunchTemplateSpecification>
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.
instance_market_options: Option<InstanceMarketOptionsRequest>
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
.
credit_specification: Option<CreditSpecificationRequest>
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
instances)
For T3 instances with host
tenancy, only standard
is
supported.
cpu_options: Option<CpuOptionsRequest>
The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon EC2 User Guide.
capacity_reservation_specification: Option<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).
hibernation_options: Option<HibernationOptionsRequest>
Indicates whether an instance is enabled for hibernation. 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.
license_specifications: Option<Vec<LicenseConfigurationRequest>>
The license configurations.
metadata_options: Option<InstanceMetadataOptionsRequest>
The metadata options for the instance. For more information, see Instance metadata and user data.
enclave_options: Option<EnclaveOptionsRequest>
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.
Implementations
pub async fn make_operation(
self,
_config: &Config
) -> Result<Operation<RunInstances, AwsErrorRetryPolicy>, BuildError>
pub async fn make_operation(
self,
_config: &Config
) -> Result<Operation<RunInstances, AwsErrorRetryPolicy>, BuildError>
Consumes the builder and constructs an Operation<RunInstances
>
Creates a new builder-style object to manufacture RunInstancesInput
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.
The ID of the AMI. An AMI ID is required to launch an instance and must be specified here or in a launch template.
The instance type. For more information, see Instance types in the Amazon EC2 User Guide.
Default: m1.small
[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.
[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.
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.
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.
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.
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.
Specifies whether detailed monitoring is enabled for the instance.
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.
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.
[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.
[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.
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.
Reserved.
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
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
Checks whether you have the required permissions for the action, without actually making the request,
and provides an error response. If you have the required permissions, the error response is DryRunOperation
.
Otherwise, it is UnauthorizedOperation
.
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
The name or Amazon Resource Name (ARN) of an IAM instance profile.
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
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.
[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.
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.
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.
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.
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.
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
.
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
instances)
For T3 instances with host
tenancy, only standard
is
supported.
The CPU options for the instance. For more information, see Optimizing CPU options in the Amazon EC2 User Guide.
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).
Indicates whether an instance is enabled for hibernation. 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.
The license configurations.
The metadata options for the instance. For more information, see Instance metadata and user data.
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.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for RunInstancesInput
impl Send for RunInstancesInput
impl Sync for RunInstancesInput
impl Unpin for RunInstancesInput
impl UnwindSafe for RunInstancesInput
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more