async def clear_cached_service_tokens(
        self,
        *,
        namespace: str,
        service: str,
        name: t.Union[str, t.Sequence[str]],
        error_trace: t.Optional[bool] = None,
        filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        human: t.Optional[bool] = None,
        pretty: t.Optional[bool] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        .. raw:: html

          <p>Clear service account token caches.</p>
          <p>Evict a subset of all entries from the service account token caches.
          Two separate caches exist for service account tokens: one cache for tokens backed by the <code>service_tokens</code> file, and another for tokens backed by the <code>.security</code> index.
          This API clears matching entries from both caches.</p>
          <p>The cache for service account tokens backed by the <code>.security</code> index is cleared automatically on state changes of the security index.
          The cache for tokens backed by the <code>service_tokens</code> file is cleared automatically on file changes.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-service-tokens>`_

        :param namespace: The namespace, which is a top-level grouping of service accounts.
        :param service: The name of the service, which must be unique within its namespace.
        :param name: A comma-separated list of token names to evict from the service
            account token caches. Use a wildcard (`*`) to evict all tokens that belong
            to a service account. It does not support other wildcard patterns.
        """
        if namespace in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'namespace'")
        if service in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'service'")
        if name in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'name'")
        __path_parts: t.Dict[str, str] = {
            "namespace": _quote(namespace),
            "service": _quote(service),
            "name": _quote(name),
        }
        __path = f'/_security/service/{__path_parts["namespace"]}/{__path_parts["service"]}/credential/token/{__path_parts["name"]}/_clear_cache'
        __query: t.Dict[str, t.Any] = {}
        if error_trace is not None:
            __query["error_trace"] = error_trace
        if filter_path is not None:
            __query["filter_path"] = filter_path
        if human is not None:
            __query["human"] = human
        if pretty is not None:
            __query["pretty"] = pretty
        __headers = {"accept": "application/json"}
        return await self.perform_request(  # type: ignore[return-value]
            "POST",
            __path,
            params=__query,
            headers=__headers,
            endpoint_id="security.clear_cached_service_tokens",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Clear service account token caches.</p>
          <p>Evict a subset of all entries from the service account token caches.
          Two separate caches exist for service account tokens: one cache for tokens backed by the <code>service_tokens</code> file, and another for tokens backed by the <code>.security</code> index.
          This API clears matching entries from both caches.</p>
          <p>The cache for service account tokens backed by the <code>.security</code> index is cleared automatically on state changes of the security index.
          The cache for tokens backed by the <code>service_tokens</code> file is cleared automatically on file changes.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-service-tokens>`_

        :param namespace: The namespace, which is a top-level grouping of service accounts.
        :param service: The name of the service, which must be unique within its namespace.
        :param name: A comma-separated list of token names to evict from the service
            account token caches. Use a wildcard (`*`) to evict all tokens that belong
            to a service account. It does not support other wildcard patterns.
        
elasticsearch/_async/client/security.py