aws_sdk_ec2/client/cancel_capacity_reservation.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CancelCapacityReservation`](crate::operation::cancel_capacity_reservation::builders::CancelCapacityReservationFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`capacity_reservation_id(impl Into<String>)`](crate::operation::cancel_capacity_reservation::builders::CancelCapacityReservationFluentBuilder::capacity_reservation_id) / [`set_capacity_reservation_id(Option<String>)`](crate::operation::cancel_capacity_reservation::builders::CancelCapacityReservationFluentBuilder::set_capacity_reservation_id):<br>required: **true**<br><p>The ID of the Capacity Reservation to be cancelled.</p><br>
7 /// - [`dry_run(bool)`](crate::operation::cancel_capacity_reservation::builders::CancelCapacityReservationFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::cancel_capacity_reservation::builders::CancelCapacityReservationFluentBuilder::set_dry_run):<br>required: **false**<br><p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p><br>
8 /// - On success, responds with [`CancelCapacityReservationOutput`](crate::operation::cancel_capacity_reservation::CancelCapacityReservationOutput) with field(s):
9 /// - [`r#return(Option<bool>)`](crate::operation::cancel_capacity_reservation::CancelCapacityReservationOutput::return): <p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>
10 /// - On failure, responds with [`SdkError<CancelCapacityReservationError>`](crate::operation::cancel_capacity_reservation::CancelCapacityReservationError)
11 pub fn cancel_capacity_reservation(&self) -> crate::operation::cancel_capacity_reservation::builders::CancelCapacityReservationFluentBuilder {
12 crate::operation::cancel_capacity_reservation::builders::CancelCapacityReservationFluentBuilder::new(self.handle.clone())
13 }
14}