Struct aws_sdk_ec2::model::request_launch_template_data::Builder
source · [−]#[non_exhaustive]pub struct Builder { /* private fields */ }
Expand description
A builder for RequestLaunchTemplateData
Implementations
The ID of the kernel.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.
The ID of the kernel.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.
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.
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.
pub fn iam_instance_profile(
self,
input: LaunchTemplateIamInstanceProfileSpecificationRequest
) -> Self
pub fn iam_instance_profile(
self,
input: LaunchTemplateIamInstanceProfileSpecificationRequest
) -> Self
The name or Amazon Resource Name (ARN) of an IAM instance profile.
pub fn set_iam_instance_profile(
self,
input: Option<LaunchTemplateIamInstanceProfileSpecificationRequest>
) -> Self
pub fn set_iam_instance_profile(
self,
input: Option<LaunchTemplateIamInstanceProfileSpecificationRequest>
) -> Self
The name or Amazon Resource Name (ARN) of an IAM instance profile.
Appends an item to block_device_mappings
.
To override the contents of this collection use set_block_device_mappings
.
The block device mapping.
pub fn set_block_device_mappings(
self,
input: Option<Vec<LaunchTemplateBlockDeviceMappingRequest>>
) -> Self
pub fn set_block_device_mappings(
self,
input: Option<Vec<LaunchTemplateBlockDeviceMappingRequest>>
) -> Self
The block device mapping.
pub fn network_interfaces(
self,
input: LaunchTemplateInstanceNetworkInterfaceSpecificationRequest
) -> Self
pub fn network_interfaces(
self,
input: LaunchTemplateInstanceNetworkInterfaceSpecificationRequest
) -> Self
Appends an item to network_interfaces
.
To override the contents of this collection use set_network_interfaces
.
One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.
pub fn set_network_interfaces(
self,
input: Option<Vec<LaunchTemplateInstanceNetworkInterfaceSpecificationRequest>>
) -> Self
pub fn set_network_interfaces(
self,
input: Option<Vec<LaunchTemplateInstanceNetworkInterfaceSpecificationRequest>>
) -> Self
One or more network interfaces. If you specify a network interface, you must specify any security groups and subnets as part of the network interface.
The ID of the AMI.
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
If you specify InstanceTypes
, you can't specify InstanceRequirements
.
The instance type. For more information, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
If you specify InstanceTypes
, you can't specify InstanceRequirements
.
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 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 monitoring for the instance.
The monitoring for the instance.
The placement for the instance.
The placement for the instance.
The ID of the RAM disk.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.
The ID of the RAM disk.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide.
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.
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.
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
pub fn set_instance_initiated_shutdown_behavior(
self,
input: Option<ShutdownBehavior>
) -> Self
pub fn set_instance_initiated_shutdown_behavior(
self,
input: Option<ShutdownBehavior>
) -> Self
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 user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Running Commands on Your Linux Instance at Launch (Linux) or Adding User Data (Windows).
If you are creating the launch template for use with Batch, the user data must be provided in the MIME multi-part archive format. For more information, see Amazon EC2 user data in launch templates in the Batch User Guide.
The user data to make available to the instance. You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Running Commands on Your Linux Instance at Launch (Linux) or Adding User Data (Windows).
If you are creating the launch template for use with Batch, the user data must be provided in the MIME multi-part archive format. For more information, see Amazon EC2 user data in launch templates in the Batch User Guide.
Appends an item to tag_specifications
.
To override the contents of this collection use set_tag_specifications
.
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.
pub fn set_tag_specifications(
self,
input: Option<Vec<LaunchTemplateTagSpecificationRequest>>
) -> Self
pub fn set_tag_specifications(
self,
input: Option<Vec<LaunchTemplateTagSpecificationRequest>>
) -> Self
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.
Appends an item to elastic_gpu_specifications
.
To override the contents of this collection use set_elastic_gpu_specifications
.
An elastic GPU to associate with the instance.
pub fn set_elastic_gpu_specifications(
self,
input: Option<Vec<ElasticGpuSpecification>>
) -> Self
pub fn set_elastic_gpu_specifications(
self,
input: Option<Vec<ElasticGpuSpecification>>
) -> Self
An elastic GPU to associate with the instance.
pub fn elastic_inference_accelerators(
self,
input: LaunchTemplateElasticInferenceAccelerator
) -> Self
pub fn elastic_inference_accelerators(
self,
input: LaunchTemplateElasticInferenceAccelerator
) -> Self
Appends an item to elastic_inference_accelerators
.
To override the contents of this collection use set_elastic_inference_accelerators
.
The elastic inference accelerator for the instance.
pub fn set_elastic_inference_accelerators(
self,
input: Option<Vec<LaunchTemplateElasticInferenceAccelerator>>
) -> Self
pub fn set_elastic_inference_accelerators(
self,
input: Option<Vec<LaunchTemplateElasticInferenceAccelerator>>
) -> Self
The elastic inference accelerator for the instance.
Appends an item to security_group_ids
.
To override the contents of this collection use set_security_group_ids
.
One or more security group IDs. You can create a security group using CreateSecurityGroup. You cannot specify both a security group ID and security name in the same request.
One or more security group IDs. You can create a security group using CreateSecurityGroup. You cannot specify both a security group ID and security name in the same request.
Appends an item to security_groups
.
To override the contents of this collection use set_security_groups
.
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.
[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.
pub fn instance_market_options(
self,
input: LaunchTemplateInstanceMarketOptionsRequest
) -> Self
pub fn instance_market_options(
self,
input: LaunchTemplateInstanceMarketOptionsRequest
) -> Self
The market (purchasing) option for the instances.
pub fn set_instance_market_options(
self,
input: Option<LaunchTemplateInstanceMarketOptionsRequest>
) -> Self
pub fn set_instance_market_options(
self,
input: Option<LaunchTemplateInstanceMarketOptionsRequest>
) -> Self
The market (purchasing) option for the instances.
The credit option for CPU usage of the instance. Valid for T2, T3, or T3a instances only.
The credit option for CPU usage of the instance. Valid for T2, T3, or T3a instances only.
The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.
The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide.
pub fn capacity_reservation_specification(
self,
input: LaunchTemplateCapacityReservationSpecificationRequest
) -> Self
pub fn capacity_reservation_specification(
self,
input: LaunchTemplateCapacityReservationSpecificationRequest
) -> Self
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).
pub fn set_capacity_reservation_specification(
self,
input: Option<LaunchTemplateCapacityReservationSpecificationRequest>
) -> Self
pub fn set_capacity_reservation_specification(
self,
input: Option<LaunchTemplateCapacityReservationSpecificationRequest>
) -> Self
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).
pub fn license_specifications(
self,
input: LaunchTemplateLicenseConfigurationRequest
) -> Self
pub fn license_specifications(
self,
input: LaunchTemplateLicenseConfigurationRequest
) -> Self
Appends an item to license_specifications
.
To override the contents of this collection use set_license_specifications
.
The license configurations.
pub fn set_license_specifications(
self,
input: Option<Vec<LaunchTemplateLicenseConfigurationRequest>>
) -> Self
pub fn set_license_specifications(
self,
input: Option<Vec<LaunchTemplateLicenseConfigurationRequest>>
) -> Self
The license configurations.
Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.
pub fn set_hibernation_options(
self,
input: Option<LaunchTemplateHibernationOptionsRequest>
) -> Self
pub fn set_hibernation_options(
self,
input: Option<LaunchTemplateHibernationOptionsRequest>
) -> Self
Indicates whether an instance is enabled for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites. For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide.
The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide.
pub fn set_metadata_options(
self,
input: Option<LaunchTemplateInstanceMetadataOptionsRequest>
) -> Self
pub fn set_metadata_options(
self,
input: Option<LaunchTemplateInstanceMetadataOptionsRequest>
) -> Self
The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide.
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.
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.
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.
If you specify InstanceRequirements
, you can't specify InstanceTypes
.
The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.
If you specify InstanceRequirements
, you can't specify InstanceTypes
.
pub fn private_dns_name_options(
self,
input: LaunchTemplatePrivateDnsNameOptionsRequest
) -> Self
pub fn private_dns_name_options(
self,
input: LaunchTemplatePrivateDnsNameOptionsRequest
) -> Self
The options for the instance hostname. The default values are inherited from the subnet.
pub fn set_private_dns_name_options(
self,
input: Option<LaunchTemplatePrivateDnsNameOptionsRequest>
) -> Self
pub fn set_private_dns_name_options(
self,
input: Option<LaunchTemplatePrivateDnsNameOptionsRequest>
) -> Self
The options for the instance hostname. The default values are inherited from the subnet.
Consumes the builder and constructs a RequestLaunchTemplateData
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl UnwindSafe for Builder
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