Struct aws_sdk_ec2::operation::modify_capacity_reservation::builders::ModifyCapacityReservationInputBuilder
source · #[non_exhaustive]pub struct ModifyCapacityReservationInputBuilder { /* private fields */ }
Expand description
A builder for ModifyCapacityReservationInput
.
Implementations§
source§impl ModifyCapacityReservationInputBuilder
impl ModifyCapacityReservationInputBuilder
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.
sourcepub fn build(self) -> Result<ModifyCapacityReservationInput, BuildError>
pub fn build(self) -> Result<ModifyCapacityReservationInput, BuildError>
Consumes the builder and constructs a ModifyCapacityReservationInput
.
source§impl ModifyCapacityReservationInputBuilder
impl ModifyCapacityReservationInputBuilder
sourcepub async fn send_with(
self,
client: &Client
) -> Result<ModifyCapacityReservationOutput, SdkError<ModifyCapacityReservationError, HttpResponse>>
pub async fn send_with( self, client: &Client ) -> Result<ModifyCapacityReservationOutput, SdkError<ModifyCapacityReservationError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for ModifyCapacityReservationInputBuilder
impl Clone for ModifyCapacityReservationInputBuilder
source§fn clone(&self) -> ModifyCapacityReservationInputBuilder
fn clone(&self) -> ModifyCapacityReservationInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for ModifyCapacityReservationInputBuilder
impl Default for ModifyCapacityReservationInputBuilder
source§fn default() -> ModifyCapacityReservationInputBuilder
fn default() -> ModifyCapacityReservationInputBuilder
source§impl PartialEq<ModifyCapacityReservationInputBuilder> for ModifyCapacityReservationInputBuilder
impl PartialEq<ModifyCapacityReservationInputBuilder> for ModifyCapacityReservationInputBuilder
source§fn eq(&self, other: &ModifyCapacityReservationInputBuilder) -> bool
fn eq(&self, other: &ModifyCapacityReservationInputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.