// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes an image.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Image {
/// <p>The platform details associated with the billing code of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub platform_details: ::std::option::Option<::std::string::String>,
/// <p>The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. <code>usageOperation</code> corresponds to the <a href="https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation">lineitem/Operation</a> column on your Amazon Web Services Cost and Usage Report and in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Amazon Web Services Price List API</a>. You can view these fields on the <b>Instances</b> or <b>AMIs</b> pages in the Amazon EC2 console, or in the responses that are returned by the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a> command in the Amazon EC2 API, or the <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html">describe-images</a> command in the CLI.</p>
pub usage_operation: ::std::option::Option<::std::string::String>,
/// <p>Any block device mapping entries.</p>
pub block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
/// <p>The description of the AMI that was provided during image creation.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>Specifies whether enhanced networking with ENA is enabled.</p>
pub ena_support: ::std::option::Option<bool>,
/// <p>The hypervisor type of the image. Only <code>xen</code> is supported. <code>ovm</code> is not supported.</p>
pub hypervisor: ::std::option::Option<crate::types::HypervisorType>,
/// <p>The owner alias (<code>amazon</code> | <code>aws-backup-vault</code> | <code>aws-marketplace</code>).</p>
pub image_owner_alias: ::std::option::Option<::std::string::String>,
/// <p>The name of the AMI that was provided during image creation.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
pub root_device_name: ::std::option::Option<::std::string::String>,
/// <p>The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.</p>
pub root_device_type: ::std::option::Option<crate::types::DeviceType>,
/// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
pub sriov_net_support: ::std::option::Option<::std::string::String>,
/// <p>The reason for the state change.</p>
pub state_reason: ::std::option::Option<crate::types::StateReason>,
/// <p>Any tags assigned to the image.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>The type of virtualization of the AMI.</p>
pub virtualization_type: ::std::option::Option<crate::types::VirtualizationType>,
/// <p>The boot mode of the image. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Instance launch behavior with Amazon EC2 boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub boot_mode: ::std::option::Option<crate::types::BootModeValues>,
/// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub tpm_support: ::std::option::Option<crate::types::TpmSupportValues>,
/// <p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p>
pub deprecation_time: ::std::option::Option<::std::string::String>,
/// <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub imds_support: ::std::option::Option<crate::types::ImdsSupportValues>,
/// <p>The ID of the instance that the AMI was created from if the AMI was created using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html">CreateImage</a>. This field only appears if the AMI was created using CreateImage.</p>
pub source_instance_id: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether deregistration protection is enabled for the AMI.</p>
pub deregistration_protection: ::std::option::Option<::std::string::String>,
/// <p>The date and time, in <a href="http://www.iso.org/iso/iso8601">ISO 8601 date-time format</a>, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.</p><note>
/// <p><code>lastLaunchedTime</code> data is available starting April 2017.</p>
/// </note>
pub last_launched_time: ::std::option::Option<::std::string::String>,
/// <p>If <code>true</code>, the AMI satisfies the criteria for Allowed AMIs and can be discovered and used in the account. If <code>false</code> and Allowed AMIs is set to <code>enabled</code>, the AMI can't be discovered or used in the account. If <code>false</code> and Allowed AMIs is set to <code>audit-mode</code>, the AMI can be discovered and used in the account.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-allowed-amis.html">Control the discovery and use of AMIs in Amazon EC2 with Allowed AMIs</a> in <i>Amazon EC2 User Guide</i>.</p>
pub image_allowed: ::std::option::Option<bool>,
/// <p>The ID of the source AMI from which the AMI was created.</p>
pub source_image_id: ::std::option::Option<::std::string::String>,
/// <p>The Region of the source AMI.</p>
pub source_image_region: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether the image is eligible for Amazon Web Services Free Tier.</p>
/// <ul>
/// <li>
/// <p>If <code>true</code>, the AMI is eligible for Free Tier and can be used to launch instances under the Free Tier limits.</p></li>
/// <li>
/// <p>If <code>false</code>, the AMI is not eligible for Free Tier.</p></li>
/// </ul>
pub free_tier_eligible: ::std::option::Option<bool>,
/// <p>The ID of the AMI.</p>
pub image_id: ::std::option::Option<::std::string::String>,
/// <p>The location of the AMI.</p>
pub image_location: ::std::option::Option<::std::string::String>,
/// <p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>
pub state: ::std::option::Option<crate::types::ImageState>,
/// <p>The ID of the Amazon Web Services account that owns the image.</p>
pub owner_id: ::std::option::Option<::std::string::String>,
/// <p>The date and time the image was created.</p>
pub creation_date: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>
pub public: ::std::option::Option<bool>,
/// <p>Any product codes associated with the AMI.</p>
pub product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>,
/// <p>The architecture of the image.</p>
pub architecture: ::std::option::Option<crate::types::ArchitectureValues>,
/// <p>The type of image.</p>
pub image_type: ::std::option::Option<crate::types::ImageTypeValues>,
/// <p>The kernel associated with the image, if any. Only applicable for machine images.</p>
pub kernel_id: ::std::option::Option<::std::string::String>,
/// <p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>
pub ramdisk_id: ::std::option::Option<::std::string::String>,
/// <p>This value is set to <code>windows</code> for Windows AMIs; otherwise, it is blank.</p>
pub platform: ::std::option::Option<crate::types::PlatformValues>,
}
impl Image {
/// <p>The platform details associated with the billing code of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn platform_details(&self) -> ::std::option::Option<&str> {
self.platform_details.as_deref()
}
/// <p>The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. <code>usageOperation</code> corresponds to the <a href="https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation">lineitem/Operation</a> column on your Amazon Web Services Cost and Usage Report and in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Amazon Web Services Price List API</a>. You can view these fields on the <b>Instances</b> or <b>AMIs</b> pages in the Amazon EC2 console, or in the responses that are returned by the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a> command in the Amazon EC2 API, or the <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html">describe-images</a> command in the CLI.</p>
pub fn usage_operation(&self) -> ::std::option::Option<&str> {
self.usage_operation.as_deref()
}
/// <p>Any block device mapping entries.</p>
///
/// 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()`.
pub fn block_device_mappings(&self) -> &[crate::types::BlockDeviceMapping] {
self.block_device_mappings.as_deref().unwrap_or_default()
}
/// <p>The description of the AMI that was provided during image creation.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>Specifies whether enhanced networking with ENA is enabled.</p>
pub fn ena_support(&self) -> ::std::option::Option<bool> {
self.ena_support
}
/// <p>The hypervisor type of the image. Only <code>xen</code> is supported. <code>ovm</code> is not supported.</p>
pub fn hypervisor(&self) -> ::std::option::Option<&crate::types::HypervisorType> {
self.hypervisor.as_ref()
}
/// <p>The owner alias (<code>amazon</code> | <code>aws-backup-vault</code> | <code>aws-marketplace</code>).</p>
pub fn image_owner_alias(&self) -> ::std::option::Option<&str> {
self.image_owner_alias.as_deref()
}
/// <p>The name of the AMI that was provided during image creation.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
pub fn root_device_name(&self) -> ::std::option::Option<&str> {
self.root_device_name.as_deref()
}
/// <p>The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.</p>
pub fn root_device_type(&self) -> ::std::option::Option<&crate::types::DeviceType> {
self.root_device_type.as_ref()
}
/// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
pub fn sriov_net_support(&self) -> ::std::option::Option<&str> {
self.sriov_net_support.as_deref()
}
/// <p>The reason for the state change.</p>
pub fn state_reason(&self) -> ::std::option::Option<&crate::types::StateReason> {
self.state_reason.as_ref()
}
/// <p>Any tags assigned to the image.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>The type of virtualization of the AMI.</p>
pub fn virtualization_type(&self) -> ::std::option::Option<&crate::types::VirtualizationType> {
self.virtualization_type.as_ref()
}
/// <p>The boot mode of the image. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Instance launch behavior with Amazon EC2 boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn boot_mode(&self) -> ::std::option::Option<&crate::types::BootModeValues> {
self.boot_mode.as_ref()
}
/// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn tpm_support(&self) -> ::std::option::Option<&crate::types::TpmSupportValues> {
self.tpm_support.as_ref()
}
/// <p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p>
pub fn deprecation_time(&self) -> ::std::option::Option<&str> {
self.deprecation_time.as_deref()
}
/// <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn imds_support(&self) -> ::std::option::Option<&crate::types::ImdsSupportValues> {
self.imds_support.as_ref()
}
/// <p>The ID of the instance that the AMI was created from if the AMI was created using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html">CreateImage</a>. This field only appears if the AMI was created using CreateImage.</p>
pub fn source_instance_id(&self) -> ::std::option::Option<&str> {
self.source_instance_id.as_deref()
}
/// <p>Indicates whether deregistration protection is enabled for the AMI.</p>
pub fn deregistration_protection(&self) -> ::std::option::Option<&str> {
self.deregistration_protection.as_deref()
}
/// <p>The date and time, in <a href="http://www.iso.org/iso/iso8601">ISO 8601 date-time format</a>, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.</p><note>
/// <p><code>lastLaunchedTime</code> data is available starting April 2017.</p>
/// </note>
pub fn last_launched_time(&self) -> ::std::option::Option<&str> {
self.last_launched_time.as_deref()
}
/// <p>If <code>true</code>, the AMI satisfies the criteria for Allowed AMIs and can be discovered and used in the account. If <code>false</code> and Allowed AMIs is set to <code>enabled</code>, the AMI can't be discovered or used in the account. If <code>false</code> and Allowed AMIs is set to <code>audit-mode</code>, the AMI can be discovered and used in the account.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-allowed-amis.html">Control the discovery and use of AMIs in Amazon EC2 with Allowed AMIs</a> in <i>Amazon EC2 User Guide</i>.</p>
pub fn image_allowed(&self) -> ::std::option::Option<bool> {
self.image_allowed
}
/// <p>The ID of the source AMI from which the AMI was created.</p>
pub fn source_image_id(&self) -> ::std::option::Option<&str> {
self.source_image_id.as_deref()
}
/// <p>The Region of the source AMI.</p>
pub fn source_image_region(&self) -> ::std::option::Option<&str> {
self.source_image_region.as_deref()
}
/// <p>Indicates whether the image is eligible for Amazon Web Services Free Tier.</p>
/// <ul>
/// <li>
/// <p>If <code>true</code>, the AMI is eligible for Free Tier and can be used to launch instances under the Free Tier limits.</p></li>
/// <li>
/// <p>If <code>false</code>, the AMI is not eligible for Free Tier.</p></li>
/// </ul>
pub fn free_tier_eligible(&self) -> ::std::option::Option<bool> {
self.free_tier_eligible
}
/// <p>The ID of the AMI.</p>
pub fn image_id(&self) -> ::std::option::Option<&str> {
self.image_id.as_deref()
}
/// <p>The location of the AMI.</p>
pub fn image_location(&self) -> ::std::option::Option<&str> {
self.image_location.as_deref()
}
/// <p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>
pub fn state(&self) -> ::std::option::Option<&crate::types::ImageState> {
self.state.as_ref()
}
/// <p>The ID of the Amazon Web Services account that owns the image.</p>
pub fn owner_id(&self) -> ::std::option::Option<&str> {
self.owner_id.as_deref()
}
/// <p>The date and time the image was created.</p>
pub fn creation_date(&self) -> ::std::option::Option<&str> {
self.creation_date.as_deref()
}
/// <p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>
pub fn public(&self) -> ::std::option::Option<bool> {
self.public
}
/// <p>Any product codes associated with the AMI.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.product_codes.is_none()`.
pub fn product_codes(&self) -> &[crate::types::ProductCode] {
self.product_codes.as_deref().unwrap_or_default()
}
/// <p>The architecture of the image.</p>
pub fn architecture(&self) -> ::std::option::Option<&crate::types::ArchitectureValues> {
self.architecture.as_ref()
}
/// <p>The type of image.</p>
pub fn image_type(&self) -> ::std::option::Option<&crate::types::ImageTypeValues> {
self.image_type.as_ref()
}
/// <p>The kernel associated with the image, if any. Only applicable for machine images.</p>
pub fn kernel_id(&self) -> ::std::option::Option<&str> {
self.kernel_id.as_deref()
}
/// <p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>
pub fn ramdisk_id(&self) -> ::std::option::Option<&str> {
self.ramdisk_id.as_deref()
}
/// <p>This value is set to <code>windows</code> for Windows AMIs; otherwise, it is blank.</p>
pub fn platform(&self) -> ::std::option::Option<&crate::types::PlatformValues> {
self.platform.as_ref()
}
}
impl Image {
/// Creates a new builder-style object to manufacture [`Image`](crate::types::Image).
pub fn builder() -> crate::types::builders::ImageBuilder {
crate::types::builders::ImageBuilder::default()
}
}
/// A builder for [`Image`](crate::types::Image).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ImageBuilder {
pub(crate) platform_details: ::std::option::Option<::std::string::String>,
pub(crate) usage_operation: ::std::option::Option<::std::string::String>,
pub(crate) block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) ena_support: ::std::option::Option<bool>,
pub(crate) hypervisor: ::std::option::Option<crate::types::HypervisorType>,
pub(crate) image_owner_alias: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) root_device_name: ::std::option::Option<::std::string::String>,
pub(crate) root_device_type: ::std::option::Option<crate::types::DeviceType>,
pub(crate) sriov_net_support: ::std::option::Option<::std::string::String>,
pub(crate) state_reason: ::std::option::Option<crate::types::StateReason>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) virtualization_type: ::std::option::Option<crate::types::VirtualizationType>,
pub(crate) boot_mode: ::std::option::Option<crate::types::BootModeValues>,
pub(crate) tpm_support: ::std::option::Option<crate::types::TpmSupportValues>,
pub(crate) deprecation_time: ::std::option::Option<::std::string::String>,
pub(crate) imds_support: ::std::option::Option<crate::types::ImdsSupportValues>,
pub(crate) source_instance_id: ::std::option::Option<::std::string::String>,
pub(crate) deregistration_protection: ::std::option::Option<::std::string::String>,
pub(crate) last_launched_time: ::std::option::Option<::std::string::String>,
pub(crate) image_allowed: ::std::option::Option<bool>,
pub(crate) source_image_id: ::std::option::Option<::std::string::String>,
pub(crate) source_image_region: ::std::option::Option<::std::string::String>,
pub(crate) free_tier_eligible: ::std::option::Option<bool>,
pub(crate) image_id: ::std::option::Option<::std::string::String>,
pub(crate) image_location: ::std::option::Option<::std::string::String>,
pub(crate) state: ::std::option::Option<crate::types::ImageState>,
pub(crate) owner_id: ::std::option::Option<::std::string::String>,
pub(crate) creation_date: ::std::option::Option<::std::string::String>,
pub(crate) public: ::std::option::Option<bool>,
pub(crate) product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>,
pub(crate) architecture: ::std::option::Option<crate::types::ArchitectureValues>,
pub(crate) image_type: ::std::option::Option<crate::types::ImageTypeValues>,
pub(crate) kernel_id: ::std::option::Option<::std::string::String>,
pub(crate) ramdisk_id: ::std::option::Option<::std::string::String>,
pub(crate) platform: ::std::option::Option<crate::types::PlatformValues>,
}
impl ImageBuilder {
/// <p>The platform details associated with the billing code of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn platform_details(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.platform_details = ::std::option::Option::Some(input.into());
self
}
/// <p>The platform details associated with the billing code of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_platform_details(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.platform_details = input;
self
}
/// <p>The platform details associated with the billing code of the AMI. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html">Understand AMI billing information</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn get_platform_details(&self) -> &::std::option::Option<::std::string::String> {
&self.platform_details
}
/// <p>The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. <code>usageOperation</code> corresponds to the <a href="https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation">lineitem/Operation</a> column on your Amazon Web Services Cost and Usage Report and in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Amazon Web Services Price List API</a>. You can view these fields on the <b>Instances</b> or <b>AMIs</b> pages in the Amazon EC2 console, or in the responses that are returned by the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a> command in the Amazon EC2 API, or the <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html">describe-images</a> command in the CLI.</p>
pub fn usage_operation(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.usage_operation = ::std::option::Option::Some(input.into());
self
}
/// <p>The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. <code>usageOperation</code> corresponds to the <a href="https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation">lineitem/Operation</a> column on your Amazon Web Services Cost and Usage Report and in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Amazon Web Services Price List API</a>. You can view these fields on the <b>Instances</b> or <b>AMIs</b> pages in the Amazon EC2 console, or in the responses that are returned by the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a> command in the Amazon EC2 API, or the <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html">describe-images</a> command in the CLI.</p>
pub fn set_usage_operation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.usage_operation = input;
self
}
/// <p>The operation of the Amazon EC2 instance and the billing code that is associated with the AMI. <code>usageOperation</code> corresponds to the <a href="https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation">lineitem/Operation</a> column on your Amazon Web Services Cost and Usage Report and in the <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html">Amazon Web Services Price List API</a>. You can view these fields on the <b>Instances</b> or <b>AMIs</b> pages in the Amazon EC2 console, or in the responses that are returned by the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html">DescribeImages</a> command in the Amazon EC2 API, or the <a href="https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html">describe-images</a> command in the CLI.</p>
pub fn get_usage_operation(&self) -> &::std::option::Option<::std::string::String> {
&self.usage_operation
}
/// Appends an item to `block_device_mappings`.
///
/// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
///
/// <p>Any block device mapping entries.</p>
pub fn block_device_mappings(mut self, input: crate::types::BlockDeviceMapping) -> Self {
let mut v = self.block_device_mappings.unwrap_or_default();
v.push(input);
self.block_device_mappings = ::std::option::Option::Some(v);
self
}
/// <p>Any block device mapping entries.</p>
pub fn set_block_device_mappings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>) -> Self {
self.block_device_mappings = input;
self
}
/// <p>Any block device mapping entries.</p>
pub fn get_block_device_mappings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>> {
&self.block_device_mappings
}
/// <p>The description of the AMI that was provided during image creation.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>The description of the AMI that was provided during image creation.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The description of the AMI that was provided during image creation.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>Specifies whether enhanced networking with ENA is enabled.</p>
pub fn ena_support(mut self, input: bool) -> Self {
self.ena_support = ::std::option::Option::Some(input);
self
}
/// <p>Specifies whether enhanced networking with ENA is enabled.</p>
pub fn set_ena_support(mut self, input: ::std::option::Option<bool>) -> Self {
self.ena_support = input;
self
}
/// <p>Specifies whether enhanced networking with ENA is enabled.</p>
pub fn get_ena_support(&self) -> &::std::option::Option<bool> {
&self.ena_support
}
/// <p>The hypervisor type of the image. Only <code>xen</code> is supported. <code>ovm</code> is not supported.</p>
pub fn hypervisor(mut self, input: crate::types::HypervisorType) -> Self {
self.hypervisor = ::std::option::Option::Some(input);
self
}
/// <p>The hypervisor type of the image. Only <code>xen</code> is supported. <code>ovm</code> is not supported.</p>
pub fn set_hypervisor(mut self, input: ::std::option::Option<crate::types::HypervisorType>) -> Self {
self.hypervisor = input;
self
}
/// <p>The hypervisor type of the image. Only <code>xen</code> is supported. <code>ovm</code> is not supported.</p>
pub fn get_hypervisor(&self) -> &::std::option::Option<crate::types::HypervisorType> {
&self.hypervisor
}
/// <p>The owner alias (<code>amazon</code> | <code>aws-backup-vault</code> | <code>aws-marketplace</code>).</p>
pub fn image_owner_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.image_owner_alias = ::std::option::Option::Some(input.into());
self
}
/// <p>The owner alias (<code>amazon</code> | <code>aws-backup-vault</code> | <code>aws-marketplace</code>).</p>
pub fn set_image_owner_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.image_owner_alias = input;
self
}
/// <p>The owner alias (<code>amazon</code> | <code>aws-backup-vault</code> | <code>aws-marketplace</code>).</p>
pub fn get_image_owner_alias(&self) -> &::std::option::Option<::std::string::String> {
&self.image_owner_alias
}
/// <p>The name of the AMI that was provided during image creation.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the AMI that was provided during image creation.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the AMI that was provided during image creation.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
pub fn root_device_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.root_device_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
pub fn set_root_device_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.root_device_name = input;
self
}
/// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p>
pub fn get_root_device_name(&self) -> &::std::option::Option<::std::string::String> {
&self.root_device_name
}
/// <p>The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.</p>
pub fn root_device_type(mut self, input: crate::types::DeviceType) -> Self {
self.root_device_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.</p>
pub fn set_root_device_type(mut self, input: ::std::option::Option<crate::types::DeviceType>) -> Self {
self.root_device_type = input;
self
}
/// <p>The type of root device used by the AMI. The AMI can use an Amazon EBS volume or an instance store volume.</p>
pub fn get_root_device_type(&self) -> &::std::option::Option<crate::types::DeviceType> {
&self.root_device_type
}
/// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
pub fn sriov_net_support(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.sriov_net_support = ::std::option::Option::Some(input.into());
self
}
/// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
pub fn set_sriov_net_support(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.sriov_net_support = input;
self
}
/// <p>Specifies whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
pub fn get_sriov_net_support(&self) -> &::std::option::Option<::std::string::String> {
&self.sriov_net_support
}
/// <p>The reason for the state change.</p>
pub fn state_reason(mut self, input: crate::types::StateReason) -> Self {
self.state_reason = ::std::option::Option::Some(input);
self
}
/// <p>The reason for the state change.</p>
pub fn set_state_reason(mut self, input: ::std::option::Option<crate::types::StateReason>) -> Self {
self.state_reason = input;
self
}
/// <p>The reason for the state change.</p>
pub fn get_state_reason(&self) -> &::std::option::Option<crate::types::StateReason> {
&self.state_reason
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Any tags assigned to the image.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>Any tags assigned to the image.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>Any tags assigned to the image.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>The type of virtualization of the AMI.</p>
pub fn virtualization_type(mut self, input: crate::types::VirtualizationType) -> Self {
self.virtualization_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of virtualization of the AMI.</p>
pub fn set_virtualization_type(mut self, input: ::std::option::Option<crate::types::VirtualizationType>) -> Self {
self.virtualization_type = input;
self
}
/// <p>The type of virtualization of the AMI.</p>
pub fn get_virtualization_type(&self) -> &::std::option::Option<crate::types::VirtualizationType> {
&self.virtualization_type
}
/// <p>The boot mode of the image. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Instance launch behavior with Amazon EC2 boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn boot_mode(mut self, input: crate::types::BootModeValues) -> Self {
self.boot_mode = ::std::option::Option::Some(input);
self
}
/// <p>The boot mode of the image. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Instance launch behavior with Amazon EC2 boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::BootModeValues>) -> Self {
self.boot_mode = input;
self
}
/// <p>The boot mode of the image. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Instance launch behavior with Amazon EC2 boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::BootModeValues> {
&self.boot_mode
}
/// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn tpm_support(mut self, input: crate::types::TpmSupportValues) -> Self {
self.tpm_support = ::std::option::Option::Some(input);
self
}
/// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_tpm_support(mut self, input: ::std::option::Option<crate::types::TpmSupportValues>) -> Self {
self.tpm_support = input;
self
}
/// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html">NitroTPM</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn get_tpm_support(&self) -> &::std::option::Option<crate::types::TpmSupportValues> {
&self.tpm_support
}
/// <p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p>
pub fn deprecation_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.deprecation_time = ::std::option::Option::Some(input.into());
self
}
/// <p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p>
pub fn set_deprecation_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.deprecation_time = input;
self
}
/// <p>The date and time to deprecate the AMI, in UTC, in the following format: <i>YYYY</i>-<i>MM</i>-<i>DD</i>T<i>HH</i>:<i>MM</i>:<i>SS</i>Z. If you specified a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.</p>
pub fn get_deprecation_time(&self) -> &::std::option::Option<::std::string::String> {
&self.deprecation_time
}
/// <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn imds_support(mut self, input: crate::types::ImdsSupportValues) -> Self {
self.imds_support = ::std::option::Option::Some(input);
self
}
/// <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_imds_support(mut self, input: ::std::option::Option<crate::types::ImdsSupportValues>) -> Self {
self.imds_support = input;
self
}
/// <p>If <code>v2.0</code>, it indicates that IMDSv2 is specified in the AMI. Instances launched from this AMI will have <code>HttpTokens</code> automatically set to <code>required</code> so that, by default, the instance requires that IMDSv2 is used when requesting instance metadata. In addition, <code>HttpPutResponseHopLimit</code> is set to <code>2</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration">Configure the AMI</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn get_imds_support(&self) -> &::std::option::Option<crate::types::ImdsSupportValues> {
&self.imds_support
}
/// <p>The ID of the instance that the AMI was created from if the AMI was created using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html">CreateImage</a>. This field only appears if the AMI was created using CreateImage.</p>
pub fn source_instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_instance_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the instance that the AMI was created from if the AMI was created using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html">CreateImage</a>. This field only appears if the AMI was created using CreateImage.</p>
pub fn set_source_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_instance_id = input;
self
}
/// <p>The ID of the instance that the AMI was created from if the AMI was created using <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html">CreateImage</a>. This field only appears if the AMI was created using CreateImage.</p>
pub fn get_source_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_instance_id
}
/// <p>Indicates whether deregistration protection is enabled for the AMI.</p>
pub fn deregistration_protection(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.deregistration_protection = ::std::option::Option::Some(input.into());
self
}
/// <p>Indicates whether deregistration protection is enabled for the AMI.</p>
pub fn set_deregistration_protection(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.deregistration_protection = input;
self
}
/// <p>Indicates whether deregistration protection is enabled for the AMI.</p>
pub fn get_deregistration_protection(&self) -> &::std::option::Option<::std::string::String> {
&self.deregistration_protection
}
/// <p>The date and time, in <a href="http://www.iso.org/iso/iso8601">ISO 8601 date-time format</a>, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.</p><note>
/// <p><code>lastLaunchedTime</code> data is available starting April 2017.</p>
/// </note>
pub fn last_launched_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_launched_time = ::std::option::Option::Some(input.into());
self
}
/// <p>The date and time, in <a href="http://www.iso.org/iso/iso8601">ISO 8601 date-time format</a>, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.</p><note>
/// <p><code>lastLaunchedTime</code> data is available starting April 2017.</p>
/// </note>
pub fn set_last_launched_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_launched_time = input;
self
}
/// <p>The date and time, in <a href="http://www.iso.org/iso/iso8601">ISO 8601 date-time format</a>, when the AMI was last used to launch an EC2 instance. When the AMI is used to launch an instance, there is a 24-hour delay before that usage is reported.</p><note>
/// <p><code>lastLaunchedTime</code> data is available starting April 2017.</p>
/// </note>
pub fn get_last_launched_time(&self) -> &::std::option::Option<::std::string::String> {
&self.last_launched_time
}
/// <p>If <code>true</code>, the AMI satisfies the criteria for Allowed AMIs and can be discovered and used in the account. If <code>false</code> and Allowed AMIs is set to <code>enabled</code>, the AMI can't be discovered or used in the account. If <code>false</code> and Allowed AMIs is set to <code>audit-mode</code>, the AMI can be discovered and used in the account.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-allowed-amis.html">Control the discovery and use of AMIs in Amazon EC2 with Allowed AMIs</a> in <i>Amazon EC2 User Guide</i>.</p>
pub fn image_allowed(mut self, input: bool) -> Self {
self.image_allowed = ::std::option::Option::Some(input);
self
}
/// <p>If <code>true</code>, the AMI satisfies the criteria for Allowed AMIs and can be discovered and used in the account. If <code>false</code> and Allowed AMIs is set to <code>enabled</code>, the AMI can't be discovered or used in the account. If <code>false</code> and Allowed AMIs is set to <code>audit-mode</code>, the AMI can be discovered and used in the account.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-allowed-amis.html">Control the discovery and use of AMIs in Amazon EC2 with Allowed AMIs</a> in <i>Amazon EC2 User Guide</i>.</p>
pub fn set_image_allowed(mut self, input: ::std::option::Option<bool>) -> Self {
self.image_allowed = input;
self
}
/// <p>If <code>true</code>, the AMI satisfies the criteria for Allowed AMIs and can be discovered and used in the account. If <code>false</code> and Allowed AMIs is set to <code>enabled</code>, the AMI can't be discovered or used in the account. If <code>false</code> and Allowed AMIs is set to <code>audit-mode</code>, the AMI can be discovered and used in the account.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-allowed-amis.html">Control the discovery and use of AMIs in Amazon EC2 with Allowed AMIs</a> in <i>Amazon EC2 User Guide</i>.</p>
pub fn get_image_allowed(&self) -> &::std::option::Option<bool> {
&self.image_allowed
}
/// <p>The ID of the source AMI from which the AMI was created.</p>
pub fn source_image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_image_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the source AMI from which the AMI was created.</p>
pub fn set_source_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_image_id = input;
self
}
/// <p>The ID of the source AMI from which the AMI was created.</p>
pub fn get_source_image_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_image_id
}
/// <p>The Region of the source AMI.</p>
pub fn source_image_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_image_region = ::std::option::Option::Some(input.into());
self
}
/// <p>The Region of the source AMI.</p>
pub fn set_source_image_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_image_region = input;
self
}
/// <p>The Region of the source AMI.</p>
pub fn get_source_image_region(&self) -> &::std::option::Option<::std::string::String> {
&self.source_image_region
}
/// <p>Indicates whether the image is eligible for Amazon Web Services Free Tier.</p>
/// <ul>
/// <li>
/// <p>If <code>true</code>, the AMI is eligible for Free Tier and can be used to launch instances under the Free Tier limits.</p></li>
/// <li>
/// <p>If <code>false</code>, the AMI is not eligible for Free Tier.</p></li>
/// </ul>
pub fn free_tier_eligible(mut self, input: bool) -> Self {
self.free_tier_eligible = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the image is eligible for Amazon Web Services Free Tier.</p>
/// <ul>
/// <li>
/// <p>If <code>true</code>, the AMI is eligible for Free Tier and can be used to launch instances under the Free Tier limits.</p></li>
/// <li>
/// <p>If <code>false</code>, the AMI is not eligible for Free Tier.</p></li>
/// </ul>
pub fn set_free_tier_eligible(mut self, input: ::std::option::Option<bool>) -> Self {
self.free_tier_eligible = input;
self
}
/// <p>Indicates whether the image is eligible for Amazon Web Services Free Tier.</p>
/// <ul>
/// <li>
/// <p>If <code>true</code>, the AMI is eligible for Free Tier and can be used to launch instances under the Free Tier limits.</p></li>
/// <li>
/// <p>If <code>false</code>, the AMI is not eligible for Free Tier.</p></li>
/// </ul>
pub fn get_free_tier_eligible(&self) -> &::std::option::Option<bool> {
&self.free_tier_eligible
}
/// <p>The ID of the AMI.</p>
pub fn image_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.image_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the AMI.</p>
pub fn set_image_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.image_id = input;
self
}
/// <p>The ID of the AMI.</p>
pub fn get_image_id(&self) -> &::std::option::Option<::std::string::String> {
&self.image_id
}
/// <p>The location of the AMI.</p>
pub fn image_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.image_location = ::std::option::Option::Some(input.into());
self
}
/// <p>The location of the AMI.</p>
pub fn set_image_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.image_location = input;
self
}
/// <p>The location of the AMI.</p>
pub fn get_image_location(&self) -> &::std::option::Option<::std::string::String> {
&self.image_location
}
/// <p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>
pub fn state(mut self, input: crate::types::ImageState) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
/// <p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>
pub fn set_state(mut self, input: ::std::option::Option<crate::types::ImageState>) -> Self {
self.state = input;
self
}
/// <p>The current state of the AMI. If the state is <code>available</code>, the image is successfully registered and can be used to launch an instance.</p>
pub fn get_state(&self) -> &::std::option::Option<crate::types::ImageState> {
&self.state
}
/// <p>The ID of the Amazon Web Services account that owns the image.</p>
pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the Amazon Web Services account that owns the image.</p>
pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner_id = input;
self
}
/// <p>The ID of the Amazon Web Services account that owns the image.</p>
pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owner_id
}
/// <p>The date and time the image was created.</p>
pub fn creation_date(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.creation_date = ::std::option::Option::Some(input.into());
self
}
/// <p>The date and time the image was created.</p>
pub fn set_creation_date(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.creation_date = input;
self
}
/// <p>The date and time the image was created.</p>
pub fn get_creation_date(&self) -> &::std::option::Option<::std::string::String> {
&self.creation_date
}
/// <p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>
pub fn public(mut self, input: bool) -> Self {
self.public = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>
pub fn set_public(mut self, input: ::std::option::Option<bool>) -> Self {
self.public = input;
self
}
/// <p>Indicates whether the image has public launch permissions. The value is <code>true</code> if this image has public launch permissions or <code>false</code> if it has only implicit and explicit launch permissions.</p>
pub fn get_public(&self) -> &::std::option::Option<bool> {
&self.public
}
/// Appends an item to `product_codes`.
///
/// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
///
/// <p>Any product codes associated with the AMI.</p>
pub fn product_codes(mut self, input: crate::types::ProductCode) -> Self {
let mut v = self.product_codes.unwrap_or_default();
v.push(input);
self.product_codes = ::std::option::Option::Some(v);
self
}
/// <p>Any product codes associated with the AMI.</p>
pub fn set_product_codes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>) -> Self {
self.product_codes = input;
self
}
/// <p>Any product codes associated with the AMI.</p>
pub fn get_product_codes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProductCode>> {
&self.product_codes
}
/// <p>The architecture of the image.</p>
pub fn architecture(mut self, input: crate::types::ArchitectureValues) -> Self {
self.architecture = ::std::option::Option::Some(input);
self
}
/// <p>The architecture of the image.</p>
pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::ArchitectureValues>) -> Self {
self.architecture = input;
self
}
/// <p>The architecture of the image.</p>
pub fn get_architecture(&self) -> &::std::option::Option<crate::types::ArchitectureValues> {
&self.architecture
}
/// <p>The type of image.</p>
pub fn image_type(mut self, input: crate::types::ImageTypeValues) -> Self {
self.image_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of image.</p>
pub fn set_image_type(mut self, input: ::std::option::Option<crate::types::ImageTypeValues>) -> Self {
self.image_type = input;
self
}
/// <p>The type of image.</p>
pub fn get_image_type(&self) -> &::std::option::Option<crate::types::ImageTypeValues> {
&self.image_type
}
/// <p>The kernel associated with the image, if any. Only applicable for machine images.</p>
pub fn kernel_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.kernel_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The kernel associated with the image, if any. Only applicable for machine images.</p>
pub fn set_kernel_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.kernel_id = input;
self
}
/// <p>The kernel associated with the image, if any. Only applicable for machine images.</p>
pub fn get_kernel_id(&self) -> &::std::option::Option<::std::string::String> {
&self.kernel_id
}
/// <p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>
pub fn ramdisk_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ramdisk_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>
pub fn set_ramdisk_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ramdisk_id = input;
self
}
/// <p>The RAM disk associated with the image, if any. Only applicable for machine images.</p>
pub fn get_ramdisk_id(&self) -> &::std::option::Option<::std::string::String> {
&self.ramdisk_id
}
/// <p>This value is set to <code>windows</code> for Windows AMIs; otherwise, it is blank.</p>
pub fn platform(mut self, input: crate::types::PlatformValues) -> Self {
self.platform = ::std::option::Option::Some(input);
self
}
/// <p>This value is set to <code>windows</code> for Windows AMIs; otherwise, it is blank.</p>
pub fn set_platform(mut self, input: ::std::option::Option<crate::types::PlatformValues>) -> Self {
self.platform = input;
self
}
/// <p>This value is set to <code>windows</code> for Windows AMIs; otherwise, it is blank.</p>
pub fn get_platform(&self) -> &::std::option::Option<crate::types::PlatformValues> {
&self.platform
}
/// Consumes the builder and constructs a [`Image`](crate::types::Image).
pub fn build(self) -> crate::types::Image {
crate::types::Image {
platform_details: self.platform_details,
usage_operation: self.usage_operation,
block_device_mappings: self.block_device_mappings,
description: self.description,
ena_support: self.ena_support,
hypervisor: self.hypervisor,
image_owner_alias: self.image_owner_alias,
name: self.name,
root_device_name: self.root_device_name,
root_device_type: self.root_device_type,
sriov_net_support: self.sriov_net_support,
state_reason: self.state_reason,
tags: self.tags,
virtualization_type: self.virtualization_type,
boot_mode: self.boot_mode,
tpm_support: self.tpm_support,
deprecation_time: self.deprecation_time,
imds_support: self.imds_support,
source_instance_id: self.source_instance_id,
deregistration_protection: self.deregistration_protection,
last_launched_time: self.last_launched_time,
image_allowed: self.image_allowed,
source_image_id: self.source_image_id,
source_image_region: self.source_image_region,
free_tier_eligible: self.free_tier_eligible,
image_id: self.image_id,
image_location: self.image_location,
state: self.state,
owner_id: self.owner_id,
creation_date: self.creation_date,
public: self.public,
product_codes: self.product_codes,
architecture: self.architecture,
image_type: self.image_type,
kernel_id: self.kernel_id,
ramdisk_id: self.ramdisk_id,
platform: self.platform,
}
}
}