get_cardinality
async
¶
get_cardinality(
query_string: QueryString,
*,
config_overrides: Optional[AsyncIoTClientConfig] = None,
index_name: Optional[IndexName] = None,
aggregation_field: Optional[AggregationField] = None,
query_version: Optional[QueryVersion] = None,
) -> GetCardinalityResponse
Returns the approximate count of unique values that match the query.
Requires permission to access the GetCardinality action.
Parameters:
-
index_name(Optional[IndexName], default:None) –The name of the index to search.
-
query_string(QueryString) –The search query string.
-
aggregation_field(Optional[AggregationField], default:None) –The field to aggregate.
-
query_version(Optional[QueryVersion], default:None) –The query version.
Raises:
-
IndexNotReadyException–The index is not ready.
-
InternalFailureException–An unexpected error has occurred.
-
InvalidAggregationException–The aggregation is invalid.
-
InvalidQueryException–The query is invalid.
-
InvalidRequestException–The request is not valid.
-
ResourceNotFoundException–The specified resource does not exist.
-
ServiceUnavailableException–The service is temporarily unavailable.
-
ThrottlingException–The rate exceeds the limit.
-
UnauthorizedException–You are not authorized to perform this operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iot/_services/async_io_t.py
8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 | |