#[non_exhaustive]pub struct ResponseLaunchTemplateData {Show 33 fields
pub kernel_id: Option<String>,
pub ebs_optimized: Option<bool>,
pub iam_instance_profile: Option<LaunchTemplateIamInstanceProfileSpecification>,
pub block_device_mappings: Option<Vec<LaunchTemplateBlockDeviceMapping>>,
pub network_interfaces: Option<Vec<LaunchTemplateInstanceNetworkInterfaceSpecification>>,
pub image_id: Option<String>,
pub instance_type: Option<InstanceType>,
pub key_name: Option<String>,
pub monitoring: Option<LaunchTemplatesMonitoring>,
pub placement: Option<LaunchTemplatePlacement>,
pub ram_disk_id: Option<String>,
pub disable_api_termination: Option<bool>,
pub instance_initiated_shutdown_behavior: Option<ShutdownBehavior>,
pub user_data: Option<String>,
pub tag_specifications: Option<Vec<LaunchTemplateTagSpecification>>,
pub elastic_gpu_specifications: Option<Vec<ElasticGpuSpecificationResponse>>,
pub elastic_inference_accelerators: Option<Vec<LaunchTemplateElasticInferenceAcceleratorResponse>>,
pub security_group_ids: Option<Vec<String>>,
pub security_groups: Option<Vec<String>>,
pub instance_market_options: Option<LaunchTemplateInstanceMarketOptions>,
pub credit_specification: Option<CreditSpecification>,
pub cpu_options: Option<LaunchTemplateCpuOptions>,
pub capacity_reservation_specification: Option<LaunchTemplateCapacityReservationSpecificationResponse>,
pub license_specifications: Option<Vec<LaunchTemplateLicenseConfiguration>>,
pub hibernation_options: Option<LaunchTemplateHibernationOptions>,
pub metadata_options: Option<LaunchTemplateInstanceMetadataOptions>,
pub enclave_options: Option<LaunchTemplateEnclaveOptions>,
pub instance_requirements: Option<InstanceRequirements>,
pub private_dns_name_options: Option<LaunchTemplatePrivateDnsNameOptions>,
pub maintenance_options: Option<LaunchTemplateInstanceMaintenanceOptions>,
pub disable_api_stop: Option<bool>,
pub operator: Option<OperatorResponse>,
pub network_performance_options: Option<LaunchTemplateNetworkPerformanceOptions>,
}
Expand description
The information for a launch template.
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.kernel_id: Option<String>
The ID of the kernel, if applicable.
ebs_optimized: Option<bool>
Indicates whether the instance is optimized for Amazon EBS I/O.
iam_instance_profile: Option<LaunchTemplateIamInstanceProfileSpecification>
The IAM instance profile.
block_device_mappings: Option<Vec<LaunchTemplateBlockDeviceMapping>>
The block device mappings.
network_interfaces: Option<Vec<LaunchTemplateInstanceNetworkInterfaceSpecification>>
The network interfaces.
image_id: Option<String>
The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI at instance launch.
The value depends on what you specified in the request. The possible values are:
-
If an AMI ID was specified in the request, then this is the AMI ID.
-
If a Systems Manager parameter was specified in the request, and
ResolveAlias
was configured astrue
, then this is the AMI ID that the parameter is mapped to in the Parameter Store. -
If a Systems Manager parameter was specified in the request, and
ResolveAlias
was configured asfalse
, then this is the parameter value.
For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.
instance_type: Option<InstanceType>
The instance type.
key_name: Option<String>
The name of the key pair.
monitoring: Option<LaunchTemplatesMonitoring>
The monitoring for the instance.
placement: Option<LaunchTemplatePlacement>
The placement of the instance.
ram_disk_id: Option<String>
The ID of the RAM disk, if applicable.
disable_api_termination: Option<bool>
If set to true
, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.
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).
user_data: Option<String>
The user data for the instance.
tag_specifications: Option<Vec<LaunchTemplateTagSpecification>>
The tags that are applied to the resources that are created during instance launch.
elastic_gpu_specifications: Option<Vec<ElasticGpuSpecificationResponse>>
Deprecated.
Amazon Elastic Graphics reached end of life on January 8, 2024.
elastic_inference_accelerators: Option<Vec<LaunchTemplateElasticInferenceAcceleratorResponse>>
Amazon Elastic Inference is no longer available.
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.
security_group_ids: Option<Vec<String>>
The security group IDs.
security_groups: Option<Vec<String>>
The security group names.
instance_market_options: Option<LaunchTemplateInstanceMarketOptions>
The market (purchasing) option for the instances.
credit_specification: Option<CreditSpecification>
The credit option for CPU usage of the instance.
cpu_options: Option<LaunchTemplateCpuOptions>
The CPU options for the instance. For more information, see CPU options for Amazon EC2 instances in the Amazon EC2 User Guide.
capacity_reservation_specification: Option<LaunchTemplateCapacityReservationSpecificationResponse>
Information about the Capacity Reservation targeting option.
license_specifications: Option<Vec<LaunchTemplateLicenseConfiguration>>
The license configurations.
hibernation_options: Option<LaunchTemplateHibernationOptions>
Indicates whether an instance is configured for hibernation. For more information, see Hibernate your Amazon EC2 instance in the Amazon EC2 User Guide.
metadata_options: Option<LaunchTemplateInstanceMetadataOptions>
The metadata options for the instance. For more information, see Configure the Instance Metadata Service options in the Amazon EC2 User Guide.
enclave_options: Option<LaunchTemplateEnclaveOptions>
Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
instance_requirements: Option<InstanceRequirements>
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
.
private_dns_name_options: Option<LaunchTemplatePrivateDnsNameOptions>
The options for the instance hostname.
maintenance_options: Option<LaunchTemplateInstanceMaintenanceOptions>
The maintenance options for your instance.
disable_api_stop: Option<bool>
Indicates whether the instance is enabled for stop protection. For more information, see Enable stop protection for your EC2 instances in the Amazon EC2 User Guide.
operator: Option<OperatorResponse>
The entity that manages the launch template.
network_performance_options: Option<LaunchTemplateNetworkPerformanceOptions>
Contains the launch template settings for network performance options for your instance.
Implementations§
Source§impl ResponseLaunchTemplateData
impl ResponseLaunchTemplateData
Sourcepub fn ebs_optimized(&self) -> Option<bool>
pub fn ebs_optimized(&self) -> Option<bool>
Indicates whether the instance is optimized for Amazon EBS I/O.
Sourcepub fn iam_instance_profile(
&self,
) -> Option<&LaunchTemplateIamInstanceProfileSpecification>
pub fn iam_instance_profile( &self, ) -> Option<&LaunchTemplateIamInstanceProfileSpecification>
The IAM instance profile.
Sourcepub fn block_device_mappings(&self) -> &[LaunchTemplateBlockDeviceMapping]
pub fn block_device_mappings(&self) -> &[LaunchTemplateBlockDeviceMapping]
The block device mappings.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .block_device_mappings.is_none()
.
Sourcepub fn network_interfaces(
&self,
) -> &[LaunchTemplateInstanceNetworkInterfaceSpecification]
pub fn network_interfaces( &self, ) -> &[LaunchTemplateInstanceNetworkInterfaceSpecification]
The network interfaces.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .network_interfaces.is_none()
.
Sourcepub fn image_id(&self) -> Option<&str>
pub fn image_id(&self) -> Option<&str>
The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter will resolve to the ID of the AMI at instance launch.
The value depends on what you specified in the request. The possible values are:
-
If an AMI ID was specified in the request, then this is the AMI ID.
-
If a Systems Manager parameter was specified in the request, and
ResolveAlias
was configured astrue
, then this is the AMI ID that the parameter is mapped to in the Parameter Store. -
If a Systems Manager parameter was specified in the request, and
ResolveAlias
was configured asfalse
, then this is the parameter value.
For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon EC2 User Guide.
Sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type.
Sourcepub fn monitoring(&self) -> Option<&LaunchTemplatesMonitoring>
pub fn monitoring(&self) -> Option<&LaunchTemplatesMonitoring>
The monitoring for the instance.
Sourcepub fn placement(&self) -> Option<&LaunchTemplatePlacement>
pub fn placement(&self) -> Option<&LaunchTemplatePlacement>
The placement of the instance.
Sourcepub fn ram_disk_id(&self) -> Option<&str>
pub fn ram_disk_id(&self) -> Option<&str>
The ID of the RAM disk, if applicable.
Sourcepub fn disable_api_termination(&self) -> Option<bool>
pub fn disable_api_termination(&self) -> Option<bool>
If set to true
, indicates that the instance cannot be terminated using the Amazon EC2 console, command line tool, or API.
Sourcepub fn instance_initiated_shutdown_behavior(&self) -> Option<&ShutdownBehavior>
pub fn instance_initiated_shutdown_behavior(&self) -> Option<&ShutdownBehavior>
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Sourcepub fn tag_specifications(&self) -> &[LaunchTemplateTagSpecification]
pub fn tag_specifications(&self) -> &[LaunchTemplateTagSpecification]
The tags that are applied to the resources that are created during instance launch.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .tag_specifications.is_none()
.
Sourcepub fn elastic_gpu_specifications(&self) -> &[ElasticGpuSpecificationResponse]
pub fn elastic_gpu_specifications(&self) -> &[ElasticGpuSpecificationResponse]
Deprecated.
Amazon Elastic Graphics reached end of life on January 8, 2024.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .elastic_gpu_specifications.is_none()
.
Sourcepub fn elastic_inference_accelerators(
&self,
) -> &[LaunchTemplateElasticInferenceAcceleratorResponse]
pub fn elastic_inference_accelerators( &self, ) -> &[LaunchTemplateElasticInferenceAcceleratorResponse]
Amazon Elastic Inference is no longer available.
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.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .elastic_inference_accelerators.is_none()
.
Sourcepub fn security_group_ids(&self) -> &[String]
pub fn security_group_ids(&self) -> &[String]
The security group IDs.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .security_group_ids.is_none()
.
Sourcepub fn security_groups(&self) -> &[String]
pub fn security_groups(&self) -> &[String]
The security group names.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .security_groups.is_none()
.
Sourcepub fn instance_market_options(
&self,
) -> Option<&LaunchTemplateInstanceMarketOptions>
pub fn instance_market_options( &self, ) -> Option<&LaunchTemplateInstanceMarketOptions>
The market (purchasing) option for the instances.
Sourcepub fn credit_specification(&self) -> Option<&CreditSpecification>
pub fn credit_specification(&self) -> Option<&CreditSpecification>
The credit option for CPU usage of the instance.
Sourcepub fn cpu_options(&self) -> Option<&LaunchTemplateCpuOptions>
pub fn cpu_options(&self) -> Option<&LaunchTemplateCpuOptions>
The CPU options for the instance. For more information, see CPU options for Amazon EC2 instances in the Amazon EC2 User Guide.
Sourcepub fn capacity_reservation_specification(
&self,
) -> Option<&LaunchTemplateCapacityReservationSpecificationResponse>
pub fn capacity_reservation_specification( &self, ) -> Option<&LaunchTemplateCapacityReservationSpecificationResponse>
Information about the Capacity Reservation targeting option.
Sourcepub fn license_specifications(&self) -> &[LaunchTemplateLicenseConfiguration]
pub fn license_specifications(&self) -> &[LaunchTemplateLicenseConfiguration]
The license configurations.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .license_specifications.is_none()
.
Sourcepub fn hibernation_options(&self) -> Option<&LaunchTemplateHibernationOptions>
pub fn hibernation_options(&self) -> Option<&LaunchTemplateHibernationOptions>
Indicates whether an instance is configured for hibernation. For more information, see Hibernate your Amazon EC2 instance in the Amazon EC2 User Guide.
Sourcepub fn metadata_options(&self) -> Option<&LaunchTemplateInstanceMetadataOptions>
pub fn metadata_options(&self) -> Option<&LaunchTemplateInstanceMetadataOptions>
The metadata options for the instance. For more information, see Configure the Instance Metadata Service options in the Amazon EC2 User Guide.
Sourcepub fn enclave_options(&self) -> Option<&LaunchTemplateEnclaveOptions>
pub fn enclave_options(&self) -> Option<&LaunchTemplateEnclaveOptions>
Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves.
Sourcepub fn instance_requirements(&self) -> Option<&InstanceRequirements>
pub fn instance_requirements(&self) -> Option<&InstanceRequirements>
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
.
Sourcepub fn private_dns_name_options(
&self,
) -> Option<&LaunchTemplatePrivateDnsNameOptions>
pub fn private_dns_name_options( &self, ) -> Option<&LaunchTemplatePrivateDnsNameOptions>
The options for the instance hostname.
Sourcepub fn maintenance_options(
&self,
) -> Option<&LaunchTemplateInstanceMaintenanceOptions>
pub fn maintenance_options( &self, ) -> Option<&LaunchTemplateInstanceMaintenanceOptions>
The maintenance options for your instance.
Sourcepub fn disable_api_stop(&self) -> Option<bool>
pub fn disable_api_stop(&self) -> Option<bool>
Indicates whether the instance is enabled for stop protection. For more information, see Enable stop protection for your EC2 instances in the Amazon EC2 User Guide.
Sourcepub fn operator(&self) -> Option<&OperatorResponse>
pub fn operator(&self) -> Option<&OperatorResponse>
The entity that manages the launch template.
Sourcepub fn network_performance_options(
&self,
) -> Option<&LaunchTemplateNetworkPerformanceOptions>
pub fn network_performance_options( &self, ) -> Option<&LaunchTemplateNetworkPerformanceOptions>
Contains the launch template settings for network performance options for your instance.
Source§impl ResponseLaunchTemplateData
impl ResponseLaunchTemplateData
Sourcepub fn builder() -> ResponseLaunchTemplateDataBuilder
pub fn builder() -> ResponseLaunchTemplateDataBuilder
Creates a new builder-style object to manufacture ResponseLaunchTemplateData
.
Trait Implementations§
Source§impl Clone for ResponseLaunchTemplateData
impl Clone for ResponseLaunchTemplateData
Source§fn clone(&self) -> ResponseLaunchTemplateData
fn clone(&self) -> ResponseLaunchTemplateData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ResponseLaunchTemplateData
impl Debug for ResponseLaunchTemplateData
impl StructuralPartialEq for ResponseLaunchTemplateData
Auto Trait Implementations§
impl Freeze for ResponseLaunchTemplateData
impl RefUnwindSafe for ResponseLaunchTemplateData
impl Send for ResponseLaunchTemplateData
impl Sync for ResponseLaunchTemplateData
impl Unpin for ResponseLaunchTemplateData
impl UnwindSafe for ResponseLaunchTemplateData
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);