snowflake.core.cortex.search_service.CortexSearchServiceApi¶

class snowflake.core.cortex.search_service.CortexSearchServiceApi(root, resource_class, sproc_client)¶

Bases: object

NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech.

Do not edit the class manually.

Attributes

api_client¶

Methods

create_cortex_search_service(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], cortex_search_service: CortexSearchService, create_mode: Annotated[Annotated[str, Strict(strict=True)] | None, FieldInfo(annotation=NoneType, required=True, description='Query parameter allowing support for different modes of resource creation. Possible values include: - `errorIfExists`: Throws an error if you try to create a resource that already exists. - `orReplace`: Automatically replaces the existing resource with the current one. - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource.')] = None, **kwargs) → SuccessResponse¶

Create a cortex search service # noqa: E501.

Create a cortex search service, with standard create modifiers as query parameters. See the Cortex Search Service component definition for what is required to be provided in the request body. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_cortex_search_service(database, var_schema, cortex_search_service, create_mode, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param cortex_search_service: (required)
:type cortex_search_service: CortexSearchService
:param create_mode: Query parameter allowing support for different modes of resource creation. Possible values include: - `errorIfExists`: Throws an error if you try to create a resource that already exists. - `orReplace`: Automatically replaces the existing resource with the current one. - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource.
:type create_mode: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: SuccessResponse
Copy
create_cortex_search_service_with_http_info(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], cortex_search_service: CortexSearchService, create_mode: Annotated[Annotated[str, Strict(strict=True)] | None, FieldInfo(annotation=NoneType, required=True, description='Query parameter allowing support for different modes of resource creation. Possible values include: - `errorIfExists`: Throws an error if you try to create a resource that already exists. - `orReplace`: Automatically replaces the existing resource with the current one. - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource.')] = None, **kwargs)¶

Create a cortex search service # noqa: E501.

Create a cortex search service, with standard create modifiers as query parameters. See the Cortex Search Service component definition for what is required to be provided in the request body. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.create_cortex_search_service_with_http_info(database, var_schema, cortex_search_service, create_mode, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param cortex_search_service: (required)
:type cortex_search_service: CortexSearchService
:param create_mode: Query parameter allowing support for different modes of resource creation. Possible values include: - `errorIfExists`: Throws an error if you try to create a resource that already exists. - `orReplace`: Automatically replaces the existing resource with the current one. - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource.
:type create_mode: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
                               and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
                      request; this effectively ignores the authentication
                      in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: tuple(SuccessResponse, status_code(int), headers(HTTPHeaderDict))
Copy
fetch_cortex_search_service(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], name: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the resource.', metadata=[Strict(strict=True)])], **kwargs) → CortexSearchService¶

Fetch a cortex search service. # noqa: E501.

Fetch a Cortex Search Service. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.fetch_cortex_search_service(database, var_schema, name, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param name: Identifier (i.e. name) for the resource. (required)
:type name: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: CortexSearchService
Copy
fetch_cortex_search_service_with_http_info(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], name: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the resource.', metadata=[Strict(strict=True)])], **kwargs)¶

Fetch a cortex search service. # noqa: E501.

Fetch a Cortex Search Service. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.fetch_cortex_search_service_with_http_info(database, var_schema, name, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param name: Identifier (i.e. name) for the resource. (required)
:type name: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
                               and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
                      request; this effectively ignores the authentication
                      in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: tuple(CortexSearchService, status_code(int), headers(HTTPHeaderDict))
Copy
list_cortex_search_services(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], like: Annotated[Annotated[str, Strict(strict=True)] | None, FieldInfo(annotation=NoneType, required=True, description='Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters.')] = None, from_name: Annotated[Annotated[str, Strict(strict=True)] | None, FieldInfo(annotation=NoneType, required=True, description='Query parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name.')] = None, show_limit: Annotated[Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True), Ge(ge=1), Le(le=10000)])] | None, FieldInfo(annotation=NoneType, required=True, description='Query parameter to limit the maximum number of rows returned by a command.')] = None, **kwargs) → Iterable[CortexSearchService]¶

List cortex search services # noqa: E501.

Lists the cortex search services under the database and schema. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_cortex_search_services(database, var_schema, like, from_name, show_limit, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param like: Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters.
:type like: str
:param from_name: Query parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name.
:type from_name: str
:param show_limit: Query parameter to limit the maximum number of rows returned by a command.
:type show_limit: int
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: Iterable[CortexSearchService]
Copy
list_cortex_search_services_with_http_info(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], like: Annotated[Annotated[str, Strict(strict=True)] | None, FieldInfo(annotation=NoneType, required=True, description='Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters.')] = None, from_name: Annotated[Annotated[str, Strict(strict=True)] | None, FieldInfo(annotation=NoneType, required=True, description='Query parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name.')] = None, show_limit: Annotated[Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True), Ge(ge=1), Le(le=10000)])] | None, FieldInfo(annotation=NoneType, required=True, description='Query parameter to limit the maximum number of rows returned by a command.')] = None, **kwargs)¶

List cortex search services # noqa: E501.

Lists the cortex search services under the database and schema. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.list_cortex_search_services_with_http_info(database, var_schema, like, from_name, show_limit, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param like: Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters.
:type like: str
:param from_name: Query parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name.
:type from_name: str
:param show_limit: Query parameter to limit the maximum number of rows returned by a command.
:type show_limit: int
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
                               and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
                      request; this effectively ignores the authentication
                      in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: tuple(Iterable[CortexSearchService], status_code(int), headers(HTTPHeaderDict))
Copy
query_cortex_search_service(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], service_name: Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='The name of the Cortex Search Service.')], query_request: QueryRequest | None = None, **kwargs) → QueryResponse¶

Query a Cortex Search Service. # noqa: E501.

Query a Cortex Search Service to get search results. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.query_cortex_search_service(database, var_schema, service_name, query_request, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param service_name: The name of the Cortex Search Service. (required)
:type service_name: str
:param query_request:
:type query_request: QueryRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: QueryResponse
Copy
query_cortex_search_service_with_http_info(database: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases.', metadata=[Strict(strict=True)])], var_schema: Annotated[str, FieldInfo(annotation=NoneType, required=True, description='Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database.', metadata=[Strict(strict=True)])], service_name: Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='The name of the Cortex Search Service.')], query_request: QueryRequest | None = None, **kwargs)¶

Query a Cortex Search Service. # noqa: E501.

Query a Cortex Search Service to get search results. # noqa: E501

This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True

>>> thread = api.query_cortex_search_service_with_http_info(database, var_schema, service_name, query_request, async_req=True)
>>> result = thread.get()
:param database: Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (required)
:type database: str
:param var_schema: Identifier (i.e. name) for the schema to which the resource belongs. You can use the `/api/v2/databases/{database}/schemas` GET request to get a list of available schemas for the specified database. (required)
:type var_schema: str
:param service_name: The name of the Cortex Search Service. (required)
:type service_name: str
:param query_request:
:type query_request: QueryRequest
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
                               and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
                         be returned without reading/decoding response
                         data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
                         number provided, it will be total request
                         timeout. It can also be a pair (tuple) of
                         (connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
                      request; this effectively ignores the authentication
                      in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
         If the method is called asynchronously,
         returns the request thread.
:rtype: tuple(QueryResponse, status_code(int), headers(HTTPHeaderDict))
Copy