1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetCapacityReservationUsage`](crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    /// - On success, responds with [`GetCapacityReservationUsageOutput`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput) with field(s):
    ///   - [`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>
    ///   - [`capacity_reservation_id(Option<String>)`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput::capacity_reservation_id): <p>The ID of the Capacity Reservation.</p>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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>
    ///   - [`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 Reservation is active and the capacity is available for your use.</p></li>  <li>   <p><code>expired</code> - The Capacity Reservation expired automatically at the date and time specified in your request. The reserved capacity is no longer available for your use.</p></li>  <li>   <p><code>cancelled</code> - The Capacity Reservation was cancelled. 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 might fail due to invalid request parameters, capacity constraints, or instance limit constraints. Failed requests are retained for 60 minutes.</p></li> </ul>
    ///   - [`instance_usages(Option<Vec::<InstanceUsage>>)`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageOutput::instance_usages): <p>Information about the Capacity Reservation usage.</p>
    /// - On failure, responds with [`SdkError<GetCapacityReservationUsageError>`](crate::operation::get_capacity_reservation_usage::GetCapacityReservationUsageError)
    pub fn get_capacity_reservation_usage(
        &self,
    ) -> crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder {
        crate::operation::get_capacity_reservation_usage::builders::GetCapacityReservationUsageFluentBuilder::new(self.handle.clone())
    }
}