aws_sdk_iot/client/
get_buckets_aggregation.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 [`GetBucketsAggregation`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`index_name(impl Into<String>)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::index_name) / [`set_index_name(Option<String>)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::set_index_name):<br>required: **false**<br><p>The name of the index to search.</p><br>
7    ///   - [`query_string(impl Into<String>)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::query_string) / [`set_query_string(Option<String>)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::set_query_string):<br>required: **true**<br><p>The search query string.</p><br>
8    ///   - [`aggregation_field(impl Into<String>)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::aggregation_field) / [`set_aggregation_field(Option<String>)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::set_aggregation_field):<br>required: **true**<br><p>The aggregation field.</p><br>
9    ///   - [`query_version(impl Into<String>)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::query_version) / [`set_query_version(Option<String>)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::set_query_version):<br>required: **false**<br><p>The version of the query.</p><br>
10    ///   - [`buckets_aggregation_type(BucketsAggregationType)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::buckets_aggregation_type) / [`set_buckets_aggregation_type(Option<BucketsAggregationType>)`](crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::set_buckets_aggregation_type):<br>required: **true**<br><p>The basic control of the response shape and the bucket aggregation type to perform.</p><br>
11    /// - On success, responds with [`GetBucketsAggregationOutput`](crate::operation::get_buckets_aggregation::GetBucketsAggregationOutput) with field(s):
12    ///   - [`total_count(i32)`](crate::operation::get_buckets_aggregation::GetBucketsAggregationOutput::total_count): <p>The total number of things that fit the query string criteria.</p>
13    ///   - [`buckets(Option<Vec::<Bucket>>)`](crate::operation::get_buckets_aggregation::GetBucketsAggregationOutput::buckets): <p>The main part of the response with a list of buckets. Each bucket contains a <code>keyValue</code> and a <code>count</code>.</p> <p><code>keyValue</code>: The aggregation field value counted for the particular bucket.</p> <p><code>count</code>: The number of documents that have that value.</p>
14    /// - On failure, responds with [`SdkError<GetBucketsAggregationError>`](crate::operation::get_buckets_aggregation::GetBucketsAggregationError)
15    pub fn get_buckets_aggregation(&self) -> crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder {
16        crate::operation::get_buckets_aggregation::builders::GetBucketsAggregationFluentBuilder::new(self.handle.clone())
17    }
18}