Struct aws_sdk_ec2::operation::modify_capacity_reservation::builders::ModifyCapacityReservationFluentBuilder
source · pub struct ModifyCapacityReservationFluentBuilder { /* 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 ModifyCapacityReservationFluentBuilder
impl ModifyCapacityReservationFluentBuilder
sourcepub fn as_input(&self) -> &ModifyCapacityReservationInputBuilder
pub fn as_input(&self) -> &ModifyCapacityReservationInputBuilder
Access the ModifyCapacityReservation as a reference.
sourcepub async fn send(
self
) -> Result<ModifyCapacityReservationOutput, SdkError<ModifyCapacityReservationError, HttpResponse>>
pub async fn send( self ) -> Result<ModifyCapacityReservationOutput, SdkError<ModifyCapacityReservationError, HttpResponse>>
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 customize(
self
) -> CustomizableOperation<ModifyCapacityReservationOutput, ModifyCapacityReservationError, Self>
pub fn customize( self ) -> CustomizableOperation<ModifyCapacityReservationOutput, ModifyCapacityReservationError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
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 get_capacity_reservation_id(&self) -> &Option<String>
pub fn get_capacity_reservation_id(&self) -> &Option<String>
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 get_instance_count(&self) -> &Option<i32>
pub fn get_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, 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 get_end_date(&self) -> &Option<DateTime>
pub fn get_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, 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 get_end_date_type(&self) -> &Option<EndDateType>
pub fn get_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, 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 get_accept(&self) -> &Option<bool>
pub fn get_accept(&self) -> &Option<bool>
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 get_dry_run(&self) -> &Option<bool>
pub fn get_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, 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.
sourcepub fn get_additional_info(&self) -> &Option<String>
pub fn get_additional_info(&self) -> &Option<String>
Reserved for future use.
Trait Implementations§
source§impl Clone for ModifyCapacityReservationFluentBuilder
impl Clone for ModifyCapacityReservationFluentBuilder
source§fn clone(&self) -> ModifyCapacityReservationFluentBuilder
fn clone(&self) -> ModifyCapacityReservationFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more