aws_sdk_ec2/client/
describe_capacity_blocks.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 [`DescribeCapacityBlocks`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder) operation.
4    /// This operation supports pagination; See [`into_paginator()`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::into_paginator).
5    ///
6    /// - The fluent builder is configurable:
7    ///   - [`capacity_block_ids(impl Into<String>)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::capacity_block_ids) / [`set_capacity_block_ids(Option<Vec::<String>>)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::set_capacity_block_ids):<br>required: **false**<br><p>The IDs of the Capacity Blocks.</p><br>
8    ///   - [`next_token(impl Into<String>)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::set_next_token):<br>required: **false**<br><p>The token to use to retrieve the next page of results.</p><br>
9    ///   - [`max_results(i32)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::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>
10    ///   - [`filters(Filter)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::filters) / [`set_filters(Option<Vec::<Filter>>)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::set_filters):<br>required: **false**<br><p>One or more filters.</p> <ul>  <li>   <p><code>capacity-block-id</code> - The ID of the Capacity Block.</p></li>  <li>   <p><code>ultraserver-type</code> - The Capacity Block type. The type can be <code>instances</code> or <code>ultraservers</code>.</p></li>  <li>   <p><code>availability-zone</code> - The Availability Zone of the Capacity Block.</p></li>  <li>   <p><code>start-date</code> - The date and time at which the Capacity Block was started.</p></li>  <li>   <p><code>end-date</code> - The date and time at which the Capacity Block expires. When a Capacity Block expires, all instances in the Capacity Block are terminated.</p></li>  <li>   <p><code>create-date</code> - The date and time at which the Capacity Block was created.</p></li>  <li>   <p><code>state</code> - The state of the Capacity Block (<code>active</code> | <code>expired</code> | <code>unavailable</code> | <code>cancelled</code> | <code>failed</code> | <code>scheduled</code> | <code>payment-pending</code> | <code>payment-failed</code>).</p></li>  <li>   <p><code>tags</code> - The tags assigned to the Capacity Block.</p></li> </ul><br>
11    ///   - [`dry_run(bool)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::dry_run) / [`set_dry_run(Option<bool>)`](crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::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>
12    /// - On success, responds with [`DescribeCapacityBlocksOutput`](crate::operation::describe_capacity_blocks::DescribeCapacityBlocksOutput) with field(s):
13    ///   - [`capacity_blocks(Option<Vec::<CapacityBlock>>)`](crate::operation::describe_capacity_blocks::DescribeCapacityBlocksOutput::capacity_blocks): <p>The Capacity Blocks.</p>
14    ///   - [`next_token(Option<String>)`](crate::operation::describe_capacity_blocks::DescribeCapacityBlocksOutput::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>
15    /// - On failure, responds with [`SdkError<DescribeCapacityBlocksError>`](crate::operation::describe_capacity_blocks::DescribeCapacityBlocksError)
16    pub fn describe_capacity_blocks(&self) -> crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder {
17        crate::operation::describe_capacity_blocks::builders::DescribeCapacityBlocksFluentBuilder::new(self.handle.clone())
18    }
19}