elastic_enterprise_search/_async/client/app_search.py [1523:1561]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self,
        *,
        name: str,
        type: t.Union["t.Literal['admin', 'private', 'search']", str],
        access_all_engines: t.Optional[bool] = None,
        engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None,
        read: t.Optional[bool] = None,
        write: t.Optional[bool] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        Creates an App Search API key

        `<https://www.elastic.co/guide/en/app-search/current/credentials.html#credentials-create>`_

        :param name:
        :param type:
        :param access_all_engines:
        :param engines:
        :param read:
        :param write:
        """
        if name is None:
            raise ValueError("Empty value passed for parameter 'name'")
        if type is None:
            raise ValueError("Empty value passed for parameter 'type'")
        __body: t.Dict[str, t.Any] = {}
        if name is not None:
            __body["name"] = name
        if type is not None:
            __body["type"] = type
        if access_all_engines is not None:
            __body["access_all_engines"] = access_all_engines
        if engines is not None:
            __body["engines"] = engines
        if read is not None:
            __body["read"] = read
        if write is not None:
            __body["write"] = write
        __headers = {"accept": "application/json", "content-type": "application/json"}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



elastic_enterprise_search/_sync/client/app_search.py [1523:1561]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self,
        *,
        name: str,
        type: t.Union["t.Literal['admin', 'private', 'search']", str],
        access_all_engines: t.Optional[bool] = None,
        engines: t.Optional[t.Union[t.List[str], t.Tuple[str, ...]]] = None,
        read: t.Optional[bool] = None,
        write: t.Optional[bool] = None,
    ) -> ObjectApiResponse[t.Any]:
        """
        Creates an App Search API key

        `<https://www.elastic.co/guide/en/app-search/current/credentials.html#credentials-create>`_

        :param name:
        :param type:
        :param access_all_engines:
        :param engines:
        :param read:
        :param write:
        """
        if name is None:
            raise ValueError("Empty value passed for parameter 'name'")
        if type is None:
            raise ValueError("Empty value passed for parameter 'type'")
        __body: t.Dict[str, t.Any] = {}
        if name is not None:
            __body["name"] = name
        if type is not None:
            __body["type"] = type
        if access_all_engines is not None:
            __body["access_all_engines"] = access_all_engines
        if engines is not None:
            __body["engines"] = engines
        if read is not None:
            __body["read"] = read
        if write is not None:
            __body["write"] = write
        __headers = {"accept": "application/json", "content-type": "application/json"}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



