async def update_settings(
        self,
        *,
        error_trace: t.Optional[bool] = None,
        filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
        human: t.Optional[bool] = None,
        master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
        pretty: t.Optional[bool] = None,
        security: t.Optional[t.Mapping[str, t.Any]] = None,
        security_profile: t.Optional[t.Mapping[str, t.Any]] = None,
        security_tokens: t.Optional[t.Mapping[str, t.Any]] = None,
        timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
        body: t.Optional[t.Dict[str, t.Any]] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        .. raw:: html

          <p>Update security index settings.</p>
          <p>Update the user-configurable settings for the security internal index (<code>.security</code> and associated indices). Only a subset of settings are allowed to be modified. This includes <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
          <p>NOTE: If <code>index.auto_expand_replicas</code> is set, <code>index.number_of_replicas</code> will be ignored during updates.</p>
          <p>If a specific index is not in use on the system and settings are provided for it, the request will be rejected.
          This API does not yet support configuring the settings for indices before they are in use.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-settings>`_

        :param master_timeout: The period to wait for a connection to the master node.
            If no response is received before the timeout expires, the request fails
            and returns an error.
        :param security: Settings for the index used for most security configuration,
            including native realm users and roles configured with the API.
        :param security_profile: Settings for the index used to store profile information.
        :param security_tokens: Settings for the index used to store tokens.
        :param timeout: The period to wait for a response. If no response is received
            before the timeout expires, the request fails and returns an error.
        """
        __path_parts: t.Dict[str, str] = {}
        __path = "/_security/settings"
        __query: t.Dict[str, t.Any] = {}
        __body: t.Dict[str, t.Any] = body if body is not None else {}
        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 master_timeout is not None:
            __query["master_timeout"] = master_timeout
        if pretty is not None:
            __query["pretty"] = pretty
        if timeout is not None:
            __query["timeout"] = timeout
        if not __body:
            if security is not None:
                __body["security"] = security
            if security_profile is not None:
                __body["security-profile"] = security_profile
            if security_tokens is not None:
                __body["security-tokens"] = security_tokens
        __headers = {"accept": "application/json", "content-type": "application/json"}
        return await self.perform_request(  # type: ignore[return-value]
            "PUT",
            __path,
            params=__query,
            headers=__headers,
            body=__body,
            endpoint_id="security.update_settings",
            path_parts=__path_parts,
        )

        .. raw:: html

          <p>Update security index settings.</p>
          <p>Update the user-configurable settings for the security internal index (<code>.security</code> and associated indices). Only a subset of settings are allowed to be modified. This includes <code>index.auto_expand_replicas</code> and <code>index.number_of_replicas</code>.</p>
          <p>NOTE: If <code>index.auto_expand_replicas</code> is set, <code>index.number_of_replicas</code> will be ignored during updates.</p>
          <p>If a specific index is not in use on the system and settings are provided for it, the request will be rejected.
          This API does not yet support configuring the settings for indices before they are in use.</p>


        `<https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-settings>`_

        :param master_timeout: The period to wait for a connection to the master node.
            If no response is received before the timeout expires, the request fails
            and returns an error.
        :param security: Settings for the index used for most security configuration,
            including native realm users and roles configured with the API.
        :param security_profile: Settings for the index used to store profile information.
        :param security_tokens: Settings for the index used to store tokens.
        :param timeout: The period to wait for a response. If no response is received
            before the timeout expires, the request fails and returns an error.
        
elasticsearch/_async/client/security.py