Struct aws_sdk_ec2::input::ModifyCapacityReservationInput
source · #[non_exhaustive]pub struct ModifyCapacityReservationInput { /* private fields */ }
Implementations§
source§impl ModifyCapacityReservationInput
impl ModifyCapacityReservationInput
sourcepub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ModifyCapacityReservation, AwsResponseRetryClassifier>, BuildError>
pub async fn make_operation(
&self,
_config: &Config
) -> Result<Operation<ModifyCapacityReservation, AwsResponseRetryClassifier>, BuildError>
Consumes the builder and constructs an Operation<ModifyCapacityReservation
>
Examples found in repository?
62966 62967 62968 62969 62970 62971 62972 62973 62974 62975 62976 62977 62978 62979 62980 62981 62982 62983 62984 62985 62986 62987 62988 62989 62990 62991 62992 62993 62994 62995 62996 62997 62998 62999 63000 63001 63002 63003 63004 63005 63006 63007 63008
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::ModifyCapacityReservation,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::ModifyCapacityReservationError>,
> {
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::ModifyCapacityReservationOutput,
aws_smithy_http::result::SdkError<crate::error::ModifyCapacityReservationError>,
> {
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 ModifyCapacityReservationInput
.
source§impl ModifyCapacityReservationInput
impl ModifyCapacityReservationInput
sourcepub fn capacity_reservation_id(&self) -> Option<&str>
pub fn capacity_reservation_id(&self) -> Option<&str>
The ID of the Capacity Reservation.
sourcepub fn instance_count(&self) -> Option<i32>
pub fn instance_count(&self) -> Option<i32>
The number of instances for which to reserve capacity. The number of instances can't be increased or decreased by more than 1000
in a single request.
sourcepub fn end_date(&self) -> Option<&DateTime>
pub fn end_date(&self) -> Option<&DateTime>
The date and time at which the Capacity Reservation expires. When a Capacity Reservation expires, the reserved capacity is released and you can no longer launch instances into it. The Capacity Reservation's state changes to expired
when it reaches its end date and time.
The Capacity Reservation is cancelled within an hour from the specified time. For example, if you specify 5/31/2019, 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on 5/31/2019.
You must provide an EndDate
value if EndDateType
is limited
. Omit EndDate
if EndDateType
is unlimited
.
sourcepub fn end_date_type(&self) -> Option<&EndDateType>
pub fn end_date_type(&self) -> Option<&EndDateType>
Indicates the way in which the Capacity Reservation ends. A Capacity Reservation can have one of the following end types:
-
unlimited
- The Capacity Reservation remains active until you explicitly cancel it. Do not provide anEndDate
value ifEndDateType
isunlimited
. -
limited
- The Capacity Reservation expires automatically at a specified date and time. You must provide anEndDate
value ifEndDateType
islimited
.
sourcepub fn accept(&self) -> Option<bool>
pub fn accept(&self) -> Option<bool>
Reserved. Capacity Reservations you have created are accepted by default.
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 additional_info(&self) -> Option<&str>
pub fn additional_info(&self) -> Option<&str>
Reserved for future use.
Trait Implementations§
source§impl Clone for ModifyCapacityReservationInput
impl Clone for ModifyCapacityReservationInput
source§fn clone(&self) -> ModifyCapacityReservationInput
fn clone(&self) -> ModifyCapacityReservationInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more