Skip to content

describe_users async

describe_users(
    *,
    config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
    user_name: Optional[UserName] = None,
    filters: Optional[FilterList] = None,
    max_results: Optional[IntegerOptional] = None,
    next_token: Optional[String] = None,
) -> DescribeUsersResponse

Returns a list of users.

Parameters:

  • user_name (Optional[UserName], default: None ) –

    The name of the user.

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

    Filter to determine the list of users to return.

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

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

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

    An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

Raises:

Source code in docs_src/capo_memorydb/_services/async_memory_db.py
async def describe_users(
    self,
    *,
    config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
    user_name: Optional["capo_memorydb.types.user_name.UserName"] = None,
    filters: Optional["capo_memorydb.types.filter_list.FilterList"] = None,
    max_results: Optional[
        "capo_memorydb.types.integer_optional.IntegerOptional"
    ] = None,
    next_token: Optional["capo_memorydb.types.string.String"] = None,
) -> "capo_memorydb.types.describe_users_response.DescribeUsersResponse":
    """<p>Returns a list of users.</p>

    Args:
        user_name: <p>The name of the user.</p>
        filters: <p>Filter to determine the list of users to return.</p>
        max_results: <p>The maximum number of records to include in the response. If more records exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.</p>
        next_token: <p>An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. </p>

    Raises:
        capo_memorydb.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>The specified parameter combination is not valid.</p>
        capo_memorydb.errors.user_not_found_fault.UserNotFoundFault: <p>The specified user does not exist.</p>
        capo_memorydb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_memorydb.types.describe_users_request.DescribeUsersRequest]",
    ) -> AsyncOperationResponse[
        "capo_memorydb.types.describe_users_response.DescribeUsersResponse"
    ]:
        import capo_memorydb._operations.amazon_memory_db.describe_users

        (
            output,
            http_response,
        ) = await capo_memorydb._operations.amazon_memory_db.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_memorydb.types.describe_users_request.DescribeUsersRequest = {}
    if user_name is not None:
        input_["user_name"] = user_name
    if filters is not None:
        input_["filters"] = filters
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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