pub struct Builder { /* private fields */ }
Expand description
A builder for ModifyInstanceCapacityReservationAttributesInput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn instance_id(self, input: impl Into<String>) -> Self
pub fn instance_id(self, input: impl Into<String>) -> Self
The ID of the instance to be modified.
sourcepub fn set_instance_id(self, input: Option<String>) -> Self
pub fn set_instance_id(self, input: Option<String>) -> Self
The ID of the instance to be modified.
sourcepub fn capacity_reservation_specification(
self,
input: CapacityReservationSpecification
) -> Self
pub fn capacity_reservation_specification(
self,
input: CapacityReservationSpecification
) -> Self
Information about the Capacity Reservation targeting option.
sourcepub fn set_capacity_reservation_specification(
self,
input: Option<CapacityReservationSpecification>
) -> Self
pub fn set_capacity_reservation_specification(
self,
input: Option<CapacityReservationSpecification>
) -> Self
Information about the Capacity Reservation targeting option.
sourcepub fn dry_run(self, input: bool) -> Self
pub fn dry_run(self, input: bool) -> Self
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 set_dry_run(self, input: Option<bool>) -> Self
pub fn set_dry_run(self, input: Option<bool>) -> Self
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 build(
self
) -> Result<ModifyInstanceCapacityReservationAttributesInput, BuildError>
pub fn build(
self
) -> Result<ModifyInstanceCapacityReservationAttributesInput, BuildError>
Consumes the builder and constructs a ModifyInstanceCapacityReservationAttributesInput
.
Examples found in repository?
64939 64940 64941 64942 64943 64944 64945 64946 64947 64948 64949 64950 64951 64952 64953 64954 64955 64956 64957 64958 64959 64960 64961 64962 64963 64964 64965 64966 64967 64968 64969 64970 64971 64972 64973 64974 64975 64976 64977 64978 64979 64980 64981 64982 64983 64984 64985
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ModifyInstanceCapacityReservationAttributes,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<
crate::error::ModifyInstanceCapacityReservationAttributesError,
>,
> {
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::ModifyInstanceCapacityReservationAttributesOutput,
aws_smithy_http::result::SdkError<
crate::error::ModifyInstanceCapacityReservationAttributesError,
>,
> {
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
}