aws_sdk_ec2/client/get_capacity_reservation_usage.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 [`GetCapacityReservationUsage`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`capacity_reservation_id(impl Into<String>)`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::capacity_reservation_id) / [`set_capacity_reservation_id(Option<String>)`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::set_capacity_reservation_id):<br>required: **true**<br><p>The ID of the Capacity Reservation.</p><br>
7 /// - [`next_token(impl Into<String>)`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::set_next_token):<br>required: **false**<br><p>The token to use to retrieve the next page of results.</p><br>
8 /// - [`max_results(i32)`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::set_max_results):<br>required: **false**<br><p>The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination">Pagination</a>.</p><br>
9 /// - [`dry_run(bool)`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::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>
10 /// - On success, responds with [`GetCapacityReservationUsageOutput`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput) with field(s):
11 /// - [`next_token(Option<String>)`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput::next_token): <p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>
12 /// - [`capacity_reservation_id(Option<String>)`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput::capacity_reservation_id): <p>The ID of the Capacity Reservation.</p>
13 /// - [`instance_type(Option<String>)`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput::instance_type): <p>The type of instance for which the Capacity Reservation reserves capacity.</p>
14 /// - [`total_instance_count(Option<i32>)`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput::total_instance_count): <p>The number of instances for which the Capacity Reservation reserves capacity.</p>
15 /// - [`available_instance_count(Option<i32>)`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput::available_instance_count): <p>The remaining capacity. Indicates the number of instances that can be launched in the Capacity Reservation.</p>
16 /// - [`state(Option<CapacityReservationState>)`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput::state): <p>The current state of the Capacity Reservation. A Capacity Reservation can be in one of the following states:</p> <ul> <li> <p><code>active</code> - The capacity is available for use.</p></li> <li> <p><code>expired</code> - The Capacity Reservation expired automatically at the date and time specified in your reservation request. The reserved capacity is no longer available for your use.</p></li> <li> <p><code>cancelled</code> - The Capacity Reservation was canceled. The reserved capacity is no longer available for your use.</p></li> <li> <p><code>pending</code> - The Capacity Reservation request was successful but the capacity provisioning is still pending.</p></li> <li> <p><code>failed</code> - The Capacity Reservation request has failed. A request can fail due to request parameters that are not valid, capacity constraints, or instance limit constraints. You can view a failed request for 60 minutes.</p></li> <li> <p><code>scheduled</code> - (<i>Future-dated Capacity Reservations</i>) The future-dated Capacity Reservation request was approved and the Capacity Reservation is scheduled for delivery on the requested start date.</p></li> <li> <p><code>payment-pending</code> - (<i>Capacity Blocks</i>) The upfront payment has not been processed yet.</p></li> <li> <p><code>payment-failed</code> - (<i>Capacity Blocks</i>) The upfront payment was not processed in the 12-hour time frame. Your Capacity Block was released.</p></li> <li> <p><code>assessing</code> - (<i>Future-dated Capacity Reservations</i>) Amazon EC2 is assessing your request for a future-dated Capacity Reservation.</p></li> <li> <p><code>delayed</code> - (<i>Future-dated Capacity Reservations</i>) Amazon EC2 encountered a delay in provisioning the requested future-dated Capacity Reservation. Amazon EC2 is unable to deliver the requested capacity by the requested start date and time.</p></li> <li> <p><code>unsupported</code> - (<i>Future-dated Capacity Reservations</i>) Amazon EC2 can't support the future-dated Capacity Reservation request due to capacity constraints. You can view unsupported requests for 30 days. The Capacity Reservation will not be delivered.</p></li> </ul>
17 /// - [`instance_usages(Option<Vec::<InstanceUsage>>)`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput::instance_usages): <p>Information about the Capacity Reservation usage.</p>
18 /// - On failure, responds with [`SdkError<GetCapacityReservationUsageError>`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageError)
19 pub fn get_capacity_reservation_usage(
20 &self,
21 ) -> crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder {
22 crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::new(self.handle.clone())
23 }
24}