pub struct ModifyCapacityReservation { /* private fields */ }
Expand description
Fluent builder constructing a request to ModifyCapacityReservation
.
Modifies a Capacity Reservation's capacity and the conditions under which it is to be released. You cannot change a Capacity Reservation's instance type, EBS optimization, instance store settings, platform, Availability Zone, or instance eligibility. If you need to modify any of these attributes, we recommend that you cancel the Capacity Reservation, and then create a new one with the required attributes.
Implementations§
source§impl ModifyCapacityReservation
impl ModifyCapacityReservation
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<ModifyCapacityReservation, AwsResponseRetryClassifier>, SdkError<ModifyCapacityReservationError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<ModifyCapacityReservation, AwsResponseRetryClassifier>, SdkError<ModifyCapacityReservationError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<ModifyCapacityReservationOutput, SdkError<ModifyCapacityReservationError>>
pub async fn send(
self
) -> Result<ModifyCapacityReservationOutput, SdkError<ModifyCapacityReservationError>>
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, which can be set when configuring the client.
sourcepub fn capacity_reservation_id(self, input: impl Into<String>) -> Self
pub fn capacity_reservation_id(self, input: impl Into<String>) -> Self
The ID of the Capacity Reservation.
sourcepub fn set_capacity_reservation_id(self, input: Option<String>) -> Self
pub fn set_capacity_reservation_id(self, input: Option<String>) -> Self
The ID of the Capacity Reservation.
sourcepub fn instance_count(self, input: i32) -> Self
pub fn instance_count(self, input: i32) -> Self
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 set_instance_count(self, input: Option<i32>) -> Self
pub fn set_instance_count(self, input: Option<i32>) -> Self
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, input: DateTime) -> Self
pub fn end_date(self, input: DateTime) -> Self
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 set_end_date(self, input: Option<DateTime>) -> Self
pub fn set_end_date(self, input: Option<DateTime>) -> Self
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, input: EndDateType) -> Self
pub fn end_date_type(self, input: EndDateType) -> Self
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 set_end_date_type(self, input: Option<EndDateType>) -> Self
pub fn set_end_date_type(self, input: Option<EndDateType>) -> Self
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, input: bool) -> Self
pub fn accept(self, input: bool) -> Self
Reserved. Capacity Reservations you have created are accepted by default.
sourcepub fn set_accept(self, input: Option<bool>) -> Self
pub fn set_accept(self, input: Option<bool>) -> Self
Reserved. Capacity Reservations you have created are accepted by default.
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 additional_info(self, input: impl Into<String>) -> Self
pub fn additional_info(self, input: impl Into<String>) -> Self
Reserved for future use.
sourcepub fn set_additional_info(self, input: Option<String>) -> Self
pub fn set_additional_info(self, input: Option<String>) -> Self
Reserved for future use.
Trait Implementations§
source§impl Clone for ModifyCapacityReservation
impl Clone for ModifyCapacityReservation
source§fn clone(&self) -> ModifyCapacityReservation
fn clone(&self) -> ModifyCapacityReservation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more