1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`AssociateAddress`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`allocation_id(impl Into<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::allocation_id) / [`set_allocation_id(Option<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::set_allocation_id): <p>[EC2-VPC] The allocation ID. This is required for EC2-VPC.</p>
    ///   - [`instance_id(impl Into<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::instance_id) / [`set_instance_id(Option<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::set_instance_id): <p>The ID of the instance. The instance must have exactly one attached network interface. For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. For EC2-Classic, you must specify an instance ID and the instance must be in the running state.</p>
    ///   - [`public_ip(impl Into<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::public_ip) / [`set_public_ip(Option<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::set_public_ip): <p>[EC2-Classic] The Elastic IP address to associate with the instance. This is required for EC2-Classic.</p>
    ///   - [`allow_reassociation(bool)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::allow_reassociation) / [`set_allow_reassociation(Option<bool>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::set_allow_reassociation): <p>[EC2-VPC] For a VPC in an EC2-Classic account, specify true to allow an Elastic IP address that is already associated with an instance or network interface to be reassociated with the specified instance or network interface. Otherwise, the operation fails. In a VPC in an EC2-VPC-only account, reassociation is automatic, therefore you can specify false to ensure the operation fails if the Elastic IP address is already associated with another resource.</p>
    ///   - [`dry_run(bool)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::set_dry_run): <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>
    ///   - [`network_interface_id(impl Into<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::network_interface_id) / [`set_network_interface_id(Option<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::set_network_interface_id): <p>[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.</p>  <p>For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both. </p>
    ///   - [`private_ip_address(impl Into<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::private_ip_address) / [`set_private_ip_address(Option<String>)`](crate::operation::associate_address::builders::AssociateAddressFluentBuilder::set_private_ip_address): <p>[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. If no private IP address is specified, the Elastic IP address is associated with the primary private IP address.</p>
    /// - On success, responds with [`AssociateAddressOutput`](crate::operation::associate_address::AssociateAddressOutput) with field(s):
    ///   - [`association_id(Option<String>)`](crate::operation::associate_address::AssociateAddressOutput::association_id): <p>[EC2-VPC] The ID that represents the association of the Elastic IP address with an instance.</p>
    /// - On failure, responds with [`SdkError<AssociateAddressError>`](crate::operation::associate_address::AssociateAddressError)
    pub fn associate_address(
        &self,
    ) -> crate::operation::associate_address::builders::AssociateAddressFluentBuilder {
        crate::operation::associate_address::builders::AssociateAddressFluentBuilder::new(
            self.handle.clone(),
        )
    }
}