// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes an image attribute.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeImageAttributeOutput {
/// <p>A description for the AMI.</p>
pub description: ::std::option::Option<crate::types::AttributeValue>,
/// <p>The kernel ID.</p>
pub kernel_id: ::std::option::Option<crate::types::AttributeValue>,
/// <p>The RAM disk ID.</p>
pub ramdisk_id: ::std::option::Option<crate::types::AttributeValue>,
/// <p>Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
pub sriov_net_support: ::std::option::Option<crate::types::AttributeValue>,
/// <p>The boot mode.</p>
pub boot_mode: ::std::option::Option<crate::types::AttributeValue>,
/// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>.</p>
pub tpm_support: ::std::option::Option<crate::types::AttributeValue>,
/// <p>Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData">GetInstanceUefiData</a> command. You can inspect and modify the UEFI data by using the <a href="https://github.com/awslabs/python-uefivars">python-uefivars tool</a> on GitHub. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html">UEFI Secure Boot for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub uefi_data: ::std::option::Option<crate::types::AttributeValue>,
/// <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<crate::types::AttributeValue>,
/// <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::AttributeValue>,
/// <p>Indicates whether deregistration protection is enabled for the AMI.</p>
pub deregistration_protection: ::std::option::Option<crate::types::AttributeValue>,
/// <p>The ID of the AMI.</p>
pub image_id: ::std::option::Option<::std::string::String>,
/// <p>The launch permissions.</p>
pub launch_permissions: ::std::option::Option<::std::vec::Vec<crate::types::LaunchPermission>>,
/// <p>The product codes.</p>
pub product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>,
/// <p>The block device mapping entries.</p>
pub block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
_request_id: Option<String>,
}
impl DescribeImageAttributeOutput {
/// <p>A description for the AMI.</p>
pub fn description(&self) -> ::std::option::Option<&crate::types::AttributeValue> {
self.description.as_ref()
}
/// <p>The kernel ID.</p>
pub fn kernel_id(&self) -> ::std::option::Option<&crate::types::AttributeValue> {
self.kernel_id.as_ref()
}
/// <p>The RAM disk ID.</p>
pub fn ramdisk_id(&self) -> ::std::option::Option<&crate::types::AttributeValue> {
self.ramdisk_id.as_ref()
}
/// <p>Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
pub fn sriov_net_support(&self) -> ::std::option::Option<&crate::types::AttributeValue> {
self.sriov_net_support.as_ref()
}
/// <p>The boot mode.</p>
pub fn boot_mode(&self) -> ::std::option::Option<&crate::types::AttributeValue> {
self.boot_mode.as_ref()
}
/// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>.</p>
pub fn tpm_support(&self) -> ::std::option::Option<&crate::types::AttributeValue> {
self.tpm_support.as_ref()
}
/// <p>Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData">GetInstanceUefiData</a> command. You can inspect and modify the UEFI data by using the <a href="https://github.com/awslabs/python-uefivars">python-uefivars tool</a> on GitHub. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html">UEFI Secure Boot for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn uefi_data(&self) -> ::std::option::Option<&crate::types::AttributeValue> {
self.uefi_data.as_ref()
}
/// <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<&crate::types::AttributeValue> {
self.last_launched_time.as_ref()
}
/// <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::AttributeValue> {
self.imds_support.as_ref()
}
/// <p>Indicates whether deregistration protection is enabled for the AMI.</p>
pub fn deregistration_protection(&self) -> ::std::option::Option<&crate::types::AttributeValue> {
self.deregistration_protection.as_ref()
}
/// <p>The ID of the AMI.</p>
pub fn image_id(&self) -> ::std::option::Option<&str> {
self.image_id.as_deref()
}
/// <p>The launch permissions.</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 `.launch_permissions.is_none()`.
pub fn launch_permissions(&self) -> &[crate::types::LaunchPermission] {
self.launch_permissions.as_deref().unwrap_or_default()
}
/// <p>The product codes.</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 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()
}
}
impl ::aws_types::request_id::RequestId for DescribeImageAttributeOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeImageAttributeOutput {
/// Creates a new builder-style object to manufacture [`DescribeImageAttributeOutput`](crate::operation::describe_image_attribute::DescribeImageAttributeOutput).
pub fn builder() -> crate::operation::describe_image_attribute::builders::DescribeImageAttributeOutputBuilder {
crate::operation::describe_image_attribute::builders::DescribeImageAttributeOutputBuilder::default()
}
}
/// A builder for [`DescribeImageAttributeOutput`](crate::operation::describe_image_attribute::DescribeImageAttributeOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeImageAttributeOutputBuilder {
pub(crate) description: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) kernel_id: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) ramdisk_id: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) sriov_net_support: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) boot_mode: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) tpm_support: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) uefi_data: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) last_launched_time: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) imds_support: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) deregistration_protection: ::std::option::Option<crate::types::AttributeValue>,
pub(crate) image_id: ::std::option::Option<::std::string::String>,
pub(crate) launch_permissions: ::std::option::Option<::std::vec::Vec<crate::types::LaunchPermission>>,
pub(crate) product_codes: ::std::option::Option<::std::vec::Vec<crate::types::ProductCode>>,
pub(crate) block_device_mappings: ::std::option::Option<::std::vec::Vec<crate::types::BlockDeviceMapping>>,
_request_id: Option<String>,
}
impl DescribeImageAttributeOutputBuilder {
/// <p>A description for the AMI.</p>
pub fn description(mut self, input: crate::types::AttributeValue) -> Self {
self.description = ::std::option::Option::Some(input);
self
}
/// <p>A description for the AMI.</p>
pub fn set_description(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
self.description = input;
self
}
/// <p>A description for the AMI.</p>
pub fn get_description(&self) -> &::std::option::Option<crate::types::AttributeValue> {
&self.description
}
/// <p>The kernel ID.</p>
pub fn kernel_id(mut self, input: crate::types::AttributeValue) -> Self {
self.kernel_id = ::std::option::Option::Some(input);
self
}
/// <p>The kernel ID.</p>
pub fn set_kernel_id(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
self.kernel_id = input;
self
}
/// <p>The kernel ID.</p>
pub fn get_kernel_id(&self) -> &::std::option::Option<crate::types::AttributeValue> {
&self.kernel_id
}
/// <p>The RAM disk ID.</p>
pub fn ramdisk_id(mut self, input: crate::types::AttributeValue) -> Self {
self.ramdisk_id = ::std::option::Option::Some(input);
self
}
/// <p>The RAM disk ID.</p>
pub fn set_ramdisk_id(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
self.ramdisk_id = input;
self
}
/// <p>The RAM disk ID.</p>
pub fn get_ramdisk_id(&self) -> &::std::option::Option<crate::types::AttributeValue> {
&self.ramdisk_id
}
/// <p>Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
pub fn sriov_net_support(mut self, input: crate::types::AttributeValue) -> Self {
self.sriov_net_support = ::std::option::Option::Some(input);
self
}
/// <p>Indicates 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<crate::types::AttributeValue>) -> Self {
self.sriov_net_support = input;
self
}
/// <p>Indicates whether enhanced networking with the Intel 82599 Virtual Function interface is enabled.</p>
pub fn get_sriov_net_support(&self) -> &::std::option::Option<crate::types::AttributeValue> {
&self.sriov_net_support
}
/// <p>The boot mode.</p>
pub fn boot_mode(mut self, input: crate::types::AttributeValue) -> Self {
self.boot_mode = ::std::option::Option::Some(input);
self
}
/// <p>The boot mode.</p>
pub fn set_boot_mode(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
self.boot_mode = input;
self
}
/// <p>The boot mode.</p>
pub fn get_boot_mode(&self) -> &::std::option::Option<crate::types::AttributeValue> {
&self.boot_mode
}
/// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>.</p>
pub fn tpm_support(mut self, input: crate::types::AttributeValue) -> 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>.</p>
pub fn set_tpm_support(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
self.tpm_support = input;
self
}
/// <p>If the image is configured for NitroTPM support, the value is <code>v2.0</code>.</p>
pub fn get_tpm_support(&self) -> &::std::option::Option<crate::types::AttributeValue> {
&self.tpm_support
}
/// <p>Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData">GetInstanceUefiData</a> command. You can inspect and modify the UEFI data by using the <a href="https://github.com/awslabs/python-uefivars">python-uefivars tool</a> on GitHub. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html">UEFI Secure Boot for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn uefi_data(mut self, input: crate::types::AttributeValue) -> Self {
self.uefi_data = ::std::option::Option::Some(input);
self
}
/// <p>Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData">GetInstanceUefiData</a> command. You can inspect and modify the UEFI data by using the <a href="https://github.com/awslabs/python-uefivars">python-uefivars tool</a> on GitHub. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html">UEFI Secure Boot for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn set_uefi_data(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> Self {
self.uefi_data = input;
self
}
/// <p>Base64 representation of the non-volatile UEFI variable store. To retrieve the UEFI data, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData">GetInstanceUefiData</a> command. You can inspect and modify the UEFI data by using the <a href="https://github.com/awslabs/python-uefivars">python-uefivars tool</a> on GitHub. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html">UEFI Secure Boot for Amazon EC2 instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
pub fn get_uefi_data(&self) -> &::std::option::Option<crate::types::AttributeValue> {
&self.uefi_data
}
/// <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: crate::types::AttributeValue) -> Self {
self.last_launched_time = ::std::option::Option::Some(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 set_last_launched_time(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> 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<crate::types::AttributeValue> {
&self.last_launched_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::AttributeValue) -> 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::AttributeValue>) -> 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::AttributeValue> {
&self.imds_support
}
/// <p>Indicates whether deregistration protection is enabled for the AMI.</p>
pub fn deregistration_protection(mut self, input: crate::types::AttributeValue) -> Self {
self.deregistration_protection = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether deregistration protection is enabled for the AMI.</p>
pub fn set_deregistration_protection(mut self, input: ::std::option::Option<crate::types::AttributeValue>) -> 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<crate::types::AttributeValue> {
&self.deregistration_protection
}
/// <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
}
/// Appends an item to `launch_permissions`.
///
/// To override the contents of this collection use [`set_launch_permissions`](Self::set_launch_permissions).
///
/// <p>The launch permissions.</p>
pub fn launch_permissions(mut self, input: crate::types::LaunchPermission) -> Self {
let mut v = self.launch_permissions.unwrap_or_default();
v.push(input);
self.launch_permissions = ::std::option::Option::Some(v);
self
}
/// <p>The launch permissions.</p>
pub fn set_launch_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::LaunchPermission>>) -> Self {
self.launch_permissions = input;
self
}
/// <p>The launch permissions.</p>
pub fn get_launch_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::LaunchPermission>> {
&self.launch_permissions
}
/// Appends an item to `product_codes`.
///
/// To override the contents of this collection use [`set_product_codes`](Self::set_product_codes).
///
/// <p>The product codes.</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>The product codes.</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>The product codes.</p>
pub fn get_product_codes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProductCode>> {
&self.product_codes
}
/// 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>The 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>The 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>The 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
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`DescribeImageAttributeOutput`](crate::operation::describe_image_attribute::DescribeImageAttributeOutput).
pub fn build(self) -> crate::operation::describe_image_attribute::DescribeImageAttributeOutput {
crate::operation::describe_image_attribute::DescribeImageAttributeOutput {
description: self.description,
kernel_id: self.kernel_id,
ramdisk_id: self.ramdisk_id,
sriov_net_support: self.sriov_net_support,
boot_mode: self.boot_mode,
tpm_support: self.tpm_support,
uefi_data: self.uefi_data,
last_launched_time: self.last_launched_time,
imds_support: self.imds_support,
deregistration_protection: self.deregistration_protection,
image_id: self.image_id,
launch_permissions: self.launch_permissions,
product_codes: self.product_codes,
block_device_mappings: self.block_device_mappings,
_request_id: self._request_id,
}
}
}