| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.IoT.GetBucketsAggregation
Description
Aggregates on indexed data with search queries pertaining to particular fields.
Requires permission to access the GetBucketsAggregation action.
Synopsis
- data GetBucketsAggregation = GetBucketsAggregation' {}
- newGetBucketsAggregation :: Text -> Text -> BucketsAggregationType -> GetBucketsAggregation
- getBucketsAggregation_indexName :: Lens' GetBucketsAggregation (Maybe Text)
- getBucketsAggregation_queryVersion :: Lens' GetBucketsAggregation (Maybe Text)
- getBucketsAggregation_queryString :: Lens' GetBucketsAggregation Text
- getBucketsAggregation_aggregationField :: Lens' GetBucketsAggregation Text
- getBucketsAggregation_bucketsAggregationType :: Lens' GetBucketsAggregation BucketsAggregationType
- data GetBucketsAggregationResponse = GetBucketsAggregationResponse' {
- buckets :: Maybe [Bucket]
- totalCount :: Maybe Int
- httpStatus :: Int
- newGetBucketsAggregationResponse :: Int -> GetBucketsAggregationResponse
- getBucketsAggregationResponse_buckets :: Lens' GetBucketsAggregationResponse (Maybe [Bucket])
- getBucketsAggregationResponse_totalCount :: Lens' GetBucketsAggregationResponse (Maybe Int)
- getBucketsAggregationResponse_httpStatus :: Lens' GetBucketsAggregationResponse Int
Creating a Request
data GetBucketsAggregation Source #
See: newGetBucketsAggregation smart constructor.
Constructors
| GetBucketsAggregation' | |
Fields
| |
Instances
newGetBucketsAggregation Source #
Arguments
| :: Text | |
| -> Text | |
| -> BucketsAggregationType | |
| -> GetBucketsAggregation |
Create a value of GetBucketsAggregation with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:indexName:GetBucketsAggregation', getBucketsAggregation_indexName - The name of the index to search.
$sel:queryVersion:GetBucketsAggregation', getBucketsAggregation_queryVersion - The version of the query.
GetBucketsAggregation, getBucketsAggregation_queryString - The search query string.
$sel:aggregationField:GetBucketsAggregation', getBucketsAggregation_aggregationField - The aggregation field.
$sel:bucketsAggregationType:GetBucketsAggregation', getBucketsAggregation_bucketsAggregationType - The basic control of the response shape and the bucket aggregation type
to perform.
Request Lenses
getBucketsAggregation_indexName :: Lens' GetBucketsAggregation (Maybe Text) Source #
The name of the index to search.
getBucketsAggregation_queryVersion :: Lens' GetBucketsAggregation (Maybe Text) Source #
The version of the query.
getBucketsAggregation_queryString :: Lens' GetBucketsAggregation Text Source #
The search query string.
getBucketsAggregation_aggregationField :: Lens' GetBucketsAggregation Text Source #
The aggregation field.
getBucketsAggregation_bucketsAggregationType :: Lens' GetBucketsAggregation BucketsAggregationType Source #
The basic control of the response shape and the bucket aggregation type to perform.
Destructuring the Response
data GetBucketsAggregationResponse Source #
See: newGetBucketsAggregationResponse smart constructor.
Constructors
| GetBucketsAggregationResponse' | |
Fields
| |
Instances
newGetBucketsAggregationResponse Source #
Create a value of GetBucketsAggregationResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:buckets:GetBucketsAggregationResponse', getBucketsAggregationResponse_buckets - The main part of the response with a list of buckets. Each bucket
contains a keyValue and a count.
keyValue: The aggregation field value counted for the particular
bucket.
count: The number of documents that have that value.
$sel:totalCount:GetBucketsAggregationResponse', getBucketsAggregationResponse_totalCount - The total number of things that fit the query string criteria.
$sel:httpStatus:GetBucketsAggregationResponse', getBucketsAggregationResponse_httpStatus - The response's http status code.
Response Lenses
getBucketsAggregationResponse_buckets :: Lens' GetBucketsAggregationResponse (Maybe [Bucket]) Source #
The main part of the response with a list of buckets. Each bucket
contains a keyValue and a count.
keyValue: The aggregation field value counted for the particular
bucket.
count: The number of documents that have that value.
getBucketsAggregationResponse_totalCount :: Lens' GetBucketsAggregationResponse (Maybe Int) Source #
The total number of things that fit the query string criteria.
getBucketsAggregationResponse_httpStatus :: Lens' GetBucketsAggregationResponse Int Source #
The response's http status code.