1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`RegisterImage`](crate::operation::register_image::builders::RegisterImageFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`image_location(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::image_location) / [`set_image_location(Option<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_image_location):<br>required: **false**<br><p>The full path to your AMI manifest in Amazon S3 storage. The specified bucket must have the <code>aws-exec-read</code> canned access control list (ACL) to ensure that it can be accessed by Amazon EC2. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl">Canned ACLs</a> in the <i>Amazon S3 Service Developer Guide</i>.</p><br>
    ///   - [`architecture(ArchitectureValues)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::architecture) / [`set_architecture(Option<ArchitectureValues>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_architecture):<br>required: **false**<br><p>The architecture of the AMI.</p> <p>Default: For Amazon EBS-backed AMIs, <code>i386</code>. For instance store-backed AMIs, the architecture specified in the manifest file.</p><br>
    ///   - [`block_device_mappings(BlockDeviceMapping)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::block_device_mappings) / [`set_block_device_mappings(Option<Vec::<BlockDeviceMapping>>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_block_device_mappings):<br>required: **false**<br><p>The block device mapping entries.</p> <p>If you specify an Amazon EBS volume using the ID of an Amazon EBS snapshot, you can't specify the encryption state of the volume.</p> <p>If you create an AMI on an Outpost, then all backing snapshots must be on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that include local snapshots can be used to launch instances on the same Outpost only. For more information, <a href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#ami">Amazon EBS local snapshots on Outposts</a> in the <i>Amazon EBS User Guide</i>.</p><br>
    ///   - [`description(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_description):<br>required: **false**<br><p>A description for your AMI.</p><br>
    ///   - [`dry_run(bool)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_dry_run):<br>required: **false**<br><p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
    ///   - [`ena_support(bool)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::ena_support) / [`set_ena_support(Option<bool>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_ena_support):<br>required: **false**<br><p>Set to <code>true</code> to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI.</p> <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p><br>
    ///   - [`kernel_id(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::kernel_id) / [`set_kernel_id(Option<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_kernel_id):<br>required: **false**<br><p>The ID of the kernel.</p><br>
    ///   - [`name(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_name):<br>required: **true**<br><p>A name for your AMI.</p> <p>Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets (\[\]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)</p><br>
    ///   - [`billing_products(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::billing_products) / [`set_billing_products(Option<Vec::<String>>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_billing_products):<br>required: **false**<br><p>The billing product codes. Your account must be authorized to specify billing product codes.</p> <p>If your account is not authorized to specify billing product codes, you can publish AMIs that include billable software and list them on the Amazon Web Services Marketplace. You must first register as a seller on the Amazon Web Services Marketplace. For more information, see <a href="https://docs.aws.amazon.com/marketplace/latest/userguide/user-guide-for-sellers.html">Getting started as a seller</a> and <a href="https://docs.aws.amazon.com/marketplace/latest/userguide/ami-products.html">AMI-based products</a> in the <i>Amazon Web Services Marketplace Seller Guide</i>.</p><br>
    ///   - [`ramdisk_id(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::ramdisk_id) / [`set_ramdisk_id(Option<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_ramdisk_id):<br>required: **false**<br><p>The ID of the RAM disk.</p><br>
    ///   - [`root_device_name(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::root_device_name) / [`set_root_device_name(Option<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_root_device_name):<br>required: **false**<br><p>The device name of the root device volume (for example, <code>/dev/sda1</code>).</p><br>
    ///   - [`sriov_net_support(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::sriov_net_support) / [`set_sriov_net_support(Option<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_sriov_net_support):<br>required: **false**<br><p>Set to <code>simple</code> to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.</p> <p>There is no way to disable <code>sriovNetSupport</code> at this time.</p> <p>This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.</p><br>
    ///   - [`virtualization_type(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::virtualization_type) / [`set_virtualization_type(Option<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_virtualization_type):<br>required: **false**<br><p>The type of virtualization (<code>hvm</code> | <code>paravirtual</code>).</p> <p>Default: <code>paravirtual</code></p><br>
    ///   - [`boot_mode(BootModeValues)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::boot_mode) / [`set_boot_mode(Option<BootModeValues>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_boot_mode):<br>required: **false**<br><p>The boot mode of the AMI. A value of <code>uefi-preferred</code> indicates that the AMI supports both UEFI and Legacy BIOS.</p><note>  <p>The operating system contained in the AMI must be configured to support the specified boot mode.</p> </note> <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html">Boot modes</a> in the <i>Amazon EC2 User Guide</i>.</p><br>
    ///   - [`tpm_support(TpmSupportValues)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::tpm_support) / [`set_tpm_support(Option<TpmSupportValues>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_tpm_support):<br>required: **false**<br><p>Set to <code>v2.0</code> to enable Trusted Platform Module (TPM) support. 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><br>
    ///   - [`uefi_data(impl Into<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::uefi_data) / [`set_uefi_data(Option<String>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_uefi_data):<br>required: **false**<br><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</a> in the <i>Amazon EC2 User Guide</i>.</p><br>
    ///   - [`imds_support(ImdsSupportValues)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::imds_support) / [`set_imds_support(Option<ImdsSupportValues>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_imds_support):<br>required: **false**<br><p>Set to <code>v2.0</code> to indicate 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><note>  <p>If you set the value to <code>v2.0</code>, make sure that your AMI software can support IMDSv2.</p> </note><br>
    ///   - [`tag_specifications(TagSpecification)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::tag_specifications) / [`set_tag_specifications(Option<Vec::<TagSpecification>>)`](crate::operation::register_image::builders::RegisterImageFluentBuilder::set_tag_specifications):<br>required: **false**<br><p>The tags to apply to the AMI.</p> <p>To tag the AMI, the value for <code>ResourceType</code> must be <code>image</code>. If you specify another value for <code>ResourceType</code>, the request fails.</p> <p>To tag an AMI after it has been registered, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html">CreateTags</a>.</p><br>
    /// - On success, responds with [`RegisterImageOutput`](crate::operation::register_image::RegisterImageOutput) with field(s):
    ///   - [`image_id(Option<String>)`](crate::operation::register_image::RegisterImageOutput::image_id): <p>The ID of the newly registered AMI.</p>
    /// - On failure, responds with [`SdkError<RegisterImageError>`](crate::operation::register_image::RegisterImageError)
    pub fn register_image(&self) -> crate::operation::register_image::builders::RegisterImageFluentBuilder {
        crate::operation::register_image::builders::RegisterImageFluentBuilder::new(self.handle.clone())
    }
}