Struct aws_sdk_ec2::input::AssociateAddressInput
source · #[non_exhaustive]pub struct AssociateAddressInput { /* private fields */ }
Implementations§
source§impl AssociateAddressInput
impl AssociateAddressInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<AssociateAddress, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<AssociateAddress, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<AssociateAddress
>
Examples found in repository?
9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::AssociateAddress,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::AssociateAddressError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::AssociateAddressOutput,
aws_smithy_http::result::SdkError<crate::error::AssociateAddressError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture AssociateAddressInput
.
source§impl AssociateAddressInput
impl AssociateAddressInput
sourcepub fn allocation_id(&self) -> Option<&str>
pub fn allocation_id(&self) -> Option<&str>
[EC2-VPC] The allocation ID. This is required for EC2-VPC.
sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
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.
sourcepub fn public_ip(&self) -> Option<&str>
pub fn public_ip(&self) -> Option<&str>
[EC2-Classic] The Elastic IP address to associate with the instance. This is required for EC2-Classic.
sourcepub fn allow_reassociation(&self) -> Option<bool>
pub fn allow_reassociation(&self) -> Option<bool>
[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.
sourcepub fn dry_run(&self) -> Option<bool>
pub fn dry_run(&self) -> Option<bool>
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 DryRunOperation
. Otherwise, it is UnauthorizedOperation
.
sourcepub fn network_interface_id(&self) -> Option<&str>
pub fn network_interface_id(&self) -> Option<&str>
[EC2-VPC] The ID of the network interface. If the instance has more than one network interface, you must specify a network interface ID.
For EC2-VPC, you can specify either the instance ID or the network interface ID, but not both.
sourcepub fn private_ip_address(&self) -> Option<&str>
pub fn private_ip_address(&self) -> Option<&str>
[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.
Trait Implementations§
source§impl Clone for AssociateAddressInput
impl Clone for AssociateAddressInput
source§fn clone(&self) -> AssociateAddressInput
fn clone(&self) -> AssociateAddressInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more