Skip to content

describe_users async

describe_users(
    *,
    config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
    engine: Optional[EngineType] = None,
    user_id: Optional[UserId] = None,
    filters: Optional[FilterList] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> DescribeUsersResult

Returns a list of users.

Parameters:

  • engine (Optional[EngineType], default: None ) –

    The engine.

  • user_id (Optional[UserId], default: None ) –

    The ID of the user.

  • filters (Optional[FilterList], default: None ) –

    Filter to determine the list of User IDs to return.

  • max_records (Optional[IntegerOptional], default: None ) –

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.

  • marker (Optional[String], default: None ) –

    An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. >

Raises:

Source code in docs_src/capo_elasticache/_services/async_elasti_cache.py
async def describe_users(
    self,
    *,
    config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
    engine: Optional["capo_elasticache.types.engine_type.EngineType"] = None,
    user_id: Optional["capo_elasticache.types.user_id.UserId"] = None,
    filters: Optional["capo_elasticache.types.filter_list.FilterList"] = None,
    max_records: Optional[
        "capo_elasticache.types.integer_optional.IntegerOptional"
    ] = None,
    marker: Optional["capo_elasticache.types.string.String"] = None,
) -> "capo_elasticache.types.describe_users_result.DescribeUsersResult":
    """<p>Returns a list of users.</p>

    Args:
        engine: <p>The engine. </p>
        user_id: <p>The ID of the user.</p>
        filters: <p>Filter to determine the list of User IDs to return.</p>
        max_records: <p>The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved. </p>
        marker: <p>An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. ></p>

    Raises:
        capo_elasticache.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Two or more incompatible parameters were specified.</p>
        capo_elasticache.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The specified service linked role (SLR) was not found.</p>
        capo_elasticache.errors.user_not_found_fault.UserNotFoundFault: <p>The user does not exist or could not be found.</p>
        capo_elasticache.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elasticache.types.describe_users_message.DescribeUsersMessage]",
    ) -> AsyncOperationResponse[
        "capo_elasticache.types.describe_users_result.DescribeUsersResult"
    ]:
        import capo_elasticache._operations.amazon_elasti_cache_v9.describe_users

        (
            output,
            http_response,
        ) = await capo_elasticache._operations.amazon_elasti_cache_v9.describe_users.async_describe_users(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeUsers")
    )
    input_: capo_elasticache.types.describe_users_message.DescribeUsersMessage = {}
    if engine is not None:
        input_["engine"] = engine
    if user_id is not None:
        input_["user_id"] = user_id
    if filters is not None:
        input_["filters"] = filters
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output