elastic_enterprise_search/_async/client/app_search.py [615:657]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self,
        *,
        engine_name: str,
        domain_id: str,
        order: int,
        pattern: str,
        policy: t.Union["t.Literal['allow', 'deny']", str],
        rule: t.Union["t.Literal['begins', 'contains', 'ends', 'regex']", str],
    ) -> ObjectApiResponse[t.Any]:
        """
        Creates a crawl rule for a given engine and domain

        `<https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawl-rules>`_

        :param engine_name: Name of the engine
        :param domain_id: Crawler Domain ID
        :param order:
        :param pattern:
        :param policy:
        :param rule:
        """
        if engine_name in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'engine_name'")
        if domain_id in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'domain_id'")
        if order is None:
            raise ValueError("Empty value passed for parameter 'order'")
        if pattern is None:
            raise ValueError("Empty value passed for parameter 'pattern'")
        if policy is None:
            raise ValueError("Empty value passed for parameter 'policy'")
        if rule is None:
            raise ValueError("Empty value passed for parameter 'rule'")
        __body: t.Dict[str, t.Any] = {}
        if order is not None:
            __body["order"] = order
        if pattern is not None:
            __body["pattern"] = pattern
        if policy is not None:
            __body["policy"] = policy
        if rule is not None:
            __body["rule"] = rule
        __headers = {"accept": "application/json", "content-type": "application/json"}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



elastic_enterprise_search/_sync/client/app_search.py [615:657]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        self,
        *,
        engine_name: str,
        domain_id: str,
        order: int,
        pattern: str,
        policy: t.Union["t.Literal['allow', 'deny']", str],
        rule: t.Union["t.Literal['begins', 'contains', 'ends', 'regex']", str],
    ) -> ObjectApiResponse[t.Any]:
        """
        Creates a crawl rule for a given engine and domain

        `<https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawl-rules>`_

        :param engine_name: Name of the engine
        :param domain_id: Crawler Domain ID
        :param order:
        :param pattern:
        :param policy:
        :param rule:
        """
        if engine_name in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'engine_name'")
        if domain_id in SKIP_IN_PATH:
            raise ValueError("Empty value passed for parameter 'domain_id'")
        if order is None:
            raise ValueError("Empty value passed for parameter 'order'")
        if pattern is None:
            raise ValueError("Empty value passed for parameter 'pattern'")
        if policy is None:
            raise ValueError("Empty value passed for parameter 'policy'")
        if rule is None:
            raise ValueError("Empty value passed for parameter 'rule'")
        __body: t.Dict[str, t.Any] = {}
        if order is not None:
            __body["order"] = order
        if pattern is not None:
            __body["pattern"] = pattern
        if policy is not None:
            __body["policy"] = policy
        if rule is not None:
            __body["rule"] = rule
        __headers = {"accept": "application/json", "content-type": "application/json"}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



