IoT / Client / get_cardinality
get_cardinality#
- IoT.Client.get_cardinality(**kwargs)#
- Returns the approximate count of unique values that match the query. - Requires permission to access the GetCardinality action. - See also: AWS API Documentation - Request Syntax- response = client.get_cardinality( indexName='string', queryString='string', aggregationField='string', queryVersion='string' ) - Parameters:
- indexName (string) – The name of the index to search. 
- queryString (string) – - [REQUIRED] - The search query string. 
- aggregationField (string) – The field to aggregate. 
- queryVersion (string) – The query version. 
 
- Return type:
- dict 
- Returns:
- Response Syntax- { 'cardinality': 123 } - Response Structure- (dict) – - cardinality (integer) – - The approximate count of unique values that match the query. 
 
 
 - Exceptions- IoT.Client.exceptions.InvalidRequestException
- IoT.Client.exceptions.ThrottlingException
- IoT.Client.exceptions.UnauthorizedException
- IoT.Client.exceptions.ServiceUnavailableException
- IoT.Client.exceptions.InternalFailureException
- IoT.Client.exceptions.ResourceNotFoundException
- IoT.Client.exceptions.InvalidQueryException
- IoT.Client.exceptions.InvalidAggregationException
- IoT.Client.exceptions.IndexNotReadyException