| """ | |
| Airflow API | |
| Airflow API. All endpoints located under ``/api/v2`` can be used safely, are stable and backward compatible. Endpoints located under ``/ui`` are dedicated to the UI and are subject to breaking change depending on the need of the frontend. Users should not rely on those but use the public ones instead. **Filtering with pattern parameters.** Many list endpoints accept ``*_pattern`` and ``*_prefix_pattern`` query parameters. Unless a parameter's own description says otherwise, ``*_pattern`` is a case-insensitive substring match (SQL ``ILIKE '%term%'``) where ``%`` matches any sequence and ``_`` matches any single character (e.g. ``%customer_%``) — convenient, but it cannot use B-tree indexes, so it is slow on large tables. ``*_prefix_pattern`` matches the start of the value, is case-sensitive and index-friendly (prefer it at scale); there ``%`` and ``_`` are literal and trailing non-alphanumeric characters are stripped so the range scan stays index-compatible under locale-aware collations (e.g. ``test_`` matches values starting with ``test``, and ``s3://`` matches ``s3``). In both, ``|`` means OR (e.g. ``dag1|dag2``) and ``~`` matches everything. Regular expressions are not supported by these parameters; regex-capable endpoints expose a separate parameter. | |
| The version of the OpenAPI document: 2 | |
| Generated by OpenAPI Generator (https://openapi-generator.tech) | |
| Do not edit the class manually. | |
| """ # noqa: E501 | |
| import warnings | |
| from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt | |
| from typing import Any, Dict, List, Optional, Tuple, Union | |
| from typing_extensions import Annotated | |
| from datetime import datetime | |
| from pydantic import Field, StrictBool, StrictInt, StrictStr | |
| from typing import List, Optional | |
| from typing_extensions import Annotated | |
| from airflow_client.client.models.response_get_xcom_entry import ResponseGetXcomEntry | |
| from airflow_client.client.models.x_com_collection_response import XComCollectionResponse | |
| from airflow_client.client.models.x_com_create_body import XComCreateBody | |
| from airflow_client.client.models.x_com_response_native import XComResponseNative | |
| from airflow_client.client.models.x_com_update_body import XComUpdateBody | |
| from airflow_client.client.api_client import ApiClient, RequestSerialized | |
| from airflow_client.client.api_response import ApiResponse | |
| from airflow_client.client.rest import RESTResponseType | |
| class XComApi: | |
| """NOTE: This class is auto generated by OpenAPI Generator | |
| Ref: https://openapi-generator.tech | |
| Do not edit the class manually. | |
| """ | |
| def __init__(self, api_client=None) -> None: | |
| if api_client is None: | |
| api_client = ApiClient.get_default() | |
| self.api_client = api_client | |
| @validate_call | |
| def create_xcom_entry( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| x_com_create_body: XComCreateBody, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> XComResponseNative: | |
| """Create Xcom Entry | |
| Create an XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param x_com_create_body: (required) | |
| :type x_com_create_body: XComCreateBody | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._create_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| x_com_create_body=x_com_create_body, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '201': "XComResponseNative", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '409': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ).data | |
| @validate_call | |
| def create_xcom_entry_with_http_info( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| x_com_create_body: XComCreateBody, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> ApiResponse[XComResponseNative]: | |
| """Create Xcom Entry | |
| Create an XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param x_com_create_body: (required) | |
| :type x_com_create_body: XComCreateBody | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._create_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| x_com_create_body=x_com_create_body, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '201': "XComResponseNative", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '409': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ) | |
| @validate_call | |
| def create_xcom_entry_without_preload_content( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| x_com_create_body: XComCreateBody, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> RESTResponseType: | |
| """Create Xcom Entry | |
| Create an XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param x_com_create_body: (required) | |
| :type x_com_create_body: XComCreateBody | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._create_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| x_com_create_body=x_com_create_body, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '201': "XComResponseNative", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '409': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| return response_data.response | |
| def _create_xcom_entry_serialize( | |
| self, | |
| dag_id, | |
| task_id, | |
| dag_run_id, | |
| x_com_create_body, | |
| _request_auth, | |
| _content_type, | |
| _headers, | |
| _host_index, | |
| ) -> RequestSerialized: | |
| _host = None | |
| _collection_formats: Dict[str, str] = { | |
| } | |
| _path_params: Dict[str, str] = {} | |
| _query_params: List[Tuple[str, str]] = [] | |
| _header_params: Dict[str, Optional[str]] = _headers or {} | |
| _form_params: List[Tuple[str, str]] = [] | |
| _files: Dict[ | |
| str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] | |
| ] = {} | |
| _body_params: Optional[bytes] = None | |
| # process the path parameters | |
| if dag_id is not None: | |
| _path_params['dag_id'] = dag_id | |
| if task_id is not None: | |
| _path_params['task_id'] = task_id | |
| if dag_run_id is not None: | |
| _path_params['dag_run_id'] = dag_run_id | |
| # process the query parameters | |
| # process the header parameters | |
| # process the form parameters | |
| # process the body parameter | |
| if x_com_create_body is not None: | |
| _body_params = x_com_create_body | |
| # set the HTTP header `Accept` | |
| if 'Accept' not in _header_params: | |
| _header_params['Accept'] = self.api_client.select_header_accept( | |
| [ | |
| 'application/json' | |
| ] | |
| ) | |
| # set the HTTP header `Content-Type` | |
| if _content_type: | |
| _header_params['Content-Type'] = _content_type | |
| else: | |
| _default_content_type = ( | |
| self.api_client.select_header_content_type( | |
| [ | |
| 'application/json' | |
| ] | |
| ) | |
| ) | |
| if _default_content_type is not None: | |
| _header_params['Content-Type'] = _default_content_type | |
| # authentication setting | |
| _auth_settings: List[str] = [ | |
| 'OAuth2PasswordBearer', | |
| 'HTTPBearer' | |
| ] | |
| return self.api_client.param_serialize( | |
| method='POST', | |
| resource_path='/api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries', | |
| path_params=_path_params, | |
| query_params=_query_params, | |
| header_params=_header_params, | |
| body=_body_params, | |
| post_params=_form_params, | |
| files=_files, | |
| auth_settings=_auth_settings, | |
| collection_formats=_collection_formats, | |
| _host=_host, | |
| _request_auth=_request_auth | |
| ) | |
| @validate_call | |
| def delete_xcom_entry( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| xcom_key: StrictStr, | |
| map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> None: | |
| """Delete Xcom Entry | |
| Delete an XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param xcom_key: (required) | |
| :type xcom_key: str | |
| :param map_index: | |
| :type map_index: int | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._delete_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| xcom_key=xcom_key, | |
| map_index=map_index, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '204': None, | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ).data | |
| @validate_call | |
| def delete_xcom_entry_with_http_info( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| xcom_key: StrictStr, | |
| map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> ApiResponse[None]: | |
| """Delete Xcom Entry | |
| Delete an XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param xcom_key: (required) | |
| :type xcom_key: str | |
| :param map_index: | |
| :type map_index: int | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._delete_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| xcom_key=xcom_key, | |
| map_index=map_index, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '204': None, | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ) | |
| @validate_call | |
| def delete_xcom_entry_without_preload_content( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| xcom_key: StrictStr, | |
| map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> RESTResponseType: | |
| """Delete Xcom Entry | |
| Delete an XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param xcom_key: (required) | |
| :type xcom_key: str | |
| :param map_index: | |
| :type map_index: int | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._delete_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| xcom_key=xcom_key, | |
| map_index=map_index, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '204': None, | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| return response_data.response | |
| def _delete_xcom_entry_serialize( | |
| self, | |
| dag_id, | |
| task_id, | |
| dag_run_id, | |
| xcom_key, | |
| map_index, | |
| _request_auth, | |
| _content_type, | |
| _headers, | |
| _host_index, | |
| ) -> RequestSerialized: | |
| _host = None | |
| _collection_formats: Dict[str, str] = { | |
| } | |
| _path_params: Dict[str, str] = {} | |
| _query_params: List[Tuple[str, str]] = [] | |
| _header_params: Dict[str, Optional[str]] = _headers or {} | |
| _form_params: List[Tuple[str, str]] = [] | |
| _files: Dict[ | |
| str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] | |
| ] = {} | |
| _body_params: Optional[bytes] = None | |
| # process the path parameters | |
| if dag_id is not None: | |
| _path_params['dag_id'] = dag_id | |
| if task_id is not None: | |
| _path_params['task_id'] = task_id | |
| if dag_run_id is not None: | |
| _path_params['dag_run_id'] = dag_run_id | |
| if xcom_key is not None: | |
| _path_params['xcom_key'] = xcom_key | |
| # process the query parameters | |
| if map_index is not None: | |
| _query_params.append(('map_index', map_index)) | |
| # process the header parameters | |
| # process the form parameters | |
| # process the body parameter | |
| # set the HTTP header `Accept` | |
| if 'Accept' not in _header_params: | |
| _header_params['Accept'] = self.api_client.select_header_accept( | |
| [ | |
| 'application/json' | |
| ] | |
| ) | |
| # authentication setting | |
| _auth_settings: List[str] = [ | |
| 'OAuth2PasswordBearer', | |
| 'HTTPBearer' | |
| ] | |
| return self.api_client.param_serialize( | |
| method='DELETE', | |
| resource_path='/api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}', | |
| path_params=_path_params, | |
| query_params=_query_params, | |
| header_params=_header_params, | |
| body=_body_params, | |
| post_params=_form_params, | |
| files=_files, | |
| auth_settings=_auth_settings, | |
| collection_formats=_collection_formats, | |
| _host=_host, | |
| _request_auth=_request_auth | |
| ) | |
| @validate_call | |
| def get_xcom_entries( | |
| self, | |
| dag_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| task_id: StrictStr, | |
| xcom_key: Optional[StrictStr] = None, | |
| map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, | |
| limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, | |
| offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, | |
| xcom_key_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| xcom_key_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| dag_display_name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `dag_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| dag_display_name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| run_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| run_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| task_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| task_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| map_index_filter: Optional[StrictInt] = None, | |
| logical_date_gte: Optional[datetime] = None, | |
| logical_date_gt: Optional[datetime] = None, | |
| logical_date_lte: Optional[datetime] = None, | |
| logical_date_lt: Optional[datetime] = None, | |
| run_after_gte: Optional[datetime] = None, | |
| run_after_gt: Optional[datetime] = None, | |
| run_after_lte: Optional[datetime] = None, | |
| run_after_lt: Optional[datetime] = None, | |
| order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after`")] = None, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> XComCollectionResponse: | |
| """Get Xcom Entries | |
| Get all XCom entries. This endpoint allows specifying `~` as the dag_id, dag_run_id, task_id to retrieve XCom entries for all Dags. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param xcom_key: | |
| :type xcom_key: str | |
| :param map_index: | |
| :type map_index: int | |
| :param limit: | |
| :type limit: int | |
| :param offset: | |
| :type offset: int | |
| :param xcom_key_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type xcom_key_pattern: str | |
| :param xcom_key_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type xcom_key_prefix_pattern: str | |
| :param dag_display_name_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `dag_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type dag_display_name_pattern: str | |
| :param dag_display_name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type dag_display_name_prefix_pattern: str | |
| :param run_id_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type run_id_pattern: str | |
| :param run_id_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type run_id_prefix_pattern: str | |
| :param task_id_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type task_id_pattern: str | |
| :param task_id_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type task_id_prefix_pattern: str | |
| :param map_index_filter: | |
| :type map_index_filter: int | |
| :param logical_date_gte: | |
| :type logical_date_gte: datetime | |
| :param logical_date_gt: | |
| :type logical_date_gt: datetime | |
| :param logical_date_lte: | |
| :type logical_date_lte: datetime | |
| :param logical_date_lt: | |
| :type logical_date_lt: datetime | |
| :param run_after_gte: | |
| :type run_after_gte: datetime | |
| :param run_after_gt: | |
| :type run_after_gt: datetime | |
| :param run_after_lte: | |
| :type run_after_lte: datetime | |
| :param run_after_lt: | |
| :type run_after_lt: datetime | |
| :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after` | |
| :type order_by: List[str] | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._get_xcom_entries_serialize( | |
| dag_id=dag_id, | |
| dag_run_id=dag_run_id, | |
| task_id=task_id, | |
| xcom_key=xcom_key, | |
| map_index=map_index, | |
| limit=limit, | |
| offset=offset, | |
| xcom_key_pattern=xcom_key_pattern, | |
| xcom_key_prefix_pattern=xcom_key_prefix_pattern, | |
| dag_display_name_pattern=dag_display_name_pattern, | |
| dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, | |
| run_id_pattern=run_id_pattern, | |
| run_id_prefix_pattern=run_id_prefix_pattern, | |
| task_id_pattern=task_id_pattern, | |
| task_id_prefix_pattern=task_id_prefix_pattern, | |
| map_index_filter=map_index_filter, | |
| logical_date_gte=logical_date_gte, | |
| logical_date_gt=logical_date_gt, | |
| logical_date_lte=logical_date_lte, | |
| logical_date_lt=logical_date_lt, | |
| run_after_gte=run_after_gte, | |
| run_after_gt=run_after_gt, | |
| run_after_lte=run_after_lte, | |
| run_after_lt=run_after_lt, | |
| order_by=order_by, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '200': "XComCollectionResponse", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ).data | |
| @validate_call | |
| def get_xcom_entries_with_http_info( | |
| self, | |
| dag_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| task_id: StrictStr, | |
| xcom_key: Optional[StrictStr] = None, | |
| map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, | |
| limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, | |
| offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, | |
| xcom_key_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| xcom_key_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| dag_display_name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `dag_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| dag_display_name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| run_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| run_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| task_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| task_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| map_index_filter: Optional[StrictInt] = None, | |
| logical_date_gte: Optional[datetime] = None, | |
| logical_date_gt: Optional[datetime] = None, | |
| logical_date_lte: Optional[datetime] = None, | |
| logical_date_lt: Optional[datetime] = None, | |
| run_after_gte: Optional[datetime] = None, | |
| run_after_gt: Optional[datetime] = None, | |
| run_after_lte: Optional[datetime] = None, | |
| run_after_lt: Optional[datetime] = None, | |
| order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after`")] = None, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> ApiResponse[XComCollectionResponse]: | |
| """Get Xcom Entries | |
| Get all XCom entries. This endpoint allows specifying `~` as the dag_id, dag_run_id, task_id to retrieve XCom entries for all Dags. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param xcom_key: | |
| :type xcom_key: str | |
| :param map_index: | |
| :type map_index: int | |
| :param limit: | |
| :type limit: int | |
| :param offset: | |
| :type offset: int | |
| :param xcom_key_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type xcom_key_pattern: str | |
| :param xcom_key_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type xcom_key_prefix_pattern: str | |
| :param dag_display_name_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `dag_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type dag_display_name_pattern: str | |
| :param dag_display_name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type dag_display_name_prefix_pattern: str | |
| :param run_id_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type run_id_pattern: str | |
| :param run_id_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type run_id_prefix_pattern: str | |
| :param task_id_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type task_id_pattern: str | |
| :param task_id_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type task_id_prefix_pattern: str | |
| :param map_index_filter: | |
| :type map_index_filter: int | |
| :param logical_date_gte: | |
| :type logical_date_gte: datetime | |
| :param logical_date_gt: | |
| :type logical_date_gt: datetime | |
| :param logical_date_lte: | |
| :type logical_date_lte: datetime | |
| :param logical_date_lt: | |
| :type logical_date_lt: datetime | |
| :param run_after_gte: | |
| :type run_after_gte: datetime | |
| :param run_after_gt: | |
| :type run_after_gt: datetime | |
| :param run_after_lte: | |
| :type run_after_lte: datetime | |
| :param run_after_lt: | |
| :type run_after_lt: datetime | |
| :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after` | |
| :type order_by: List[str] | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._get_xcom_entries_serialize( | |
| dag_id=dag_id, | |
| dag_run_id=dag_run_id, | |
| task_id=task_id, | |
| xcom_key=xcom_key, | |
| map_index=map_index, | |
| limit=limit, | |
| offset=offset, | |
| xcom_key_pattern=xcom_key_pattern, | |
| xcom_key_prefix_pattern=xcom_key_prefix_pattern, | |
| dag_display_name_pattern=dag_display_name_pattern, | |
| dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, | |
| run_id_pattern=run_id_pattern, | |
| run_id_prefix_pattern=run_id_prefix_pattern, | |
| task_id_pattern=task_id_pattern, | |
| task_id_prefix_pattern=task_id_prefix_pattern, | |
| map_index_filter=map_index_filter, | |
| logical_date_gte=logical_date_gte, | |
| logical_date_gt=logical_date_gt, | |
| logical_date_lte=logical_date_lte, | |
| logical_date_lt=logical_date_lt, | |
| run_after_gte=run_after_gte, | |
| run_after_gt=run_after_gt, | |
| run_after_lte=run_after_lte, | |
| run_after_lt=run_after_lt, | |
| order_by=order_by, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '200': "XComCollectionResponse", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ) | |
| @validate_call | |
| def get_xcom_entries_without_preload_content( | |
| self, | |
| dag_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| task_id: StrictStr, | |
| xcom_key: Optional[StrictStr] = None, | |
| map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, | |
| limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, | |
| offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None, | |
| xcom_key_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| xcom_key_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| dag_display_name_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `dag_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| dag_display_name_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| run_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| run_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| task_id_pattern: Annotated[Optional[StrictStr], Field(description="Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\".")] = None, | |
| task_id_prefix_pattern: Annotated[Optional[StrictStr], Field(description="Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\".")] = None, | |
| map_index_filter: Optional[StrictInt] = None, | |
| logical_date_gte: Optional[datetime] = None, | |
| logical_date_gt: Optional[datetime] = None, | |
| logical_date_lte: Optional[datetime] = None, | |
| logical_date_lt: Optional[datetime] = None, | |
| run_after_gte: Optional[datetime] = None, | |
| run_after_gt: Optional[datetime] = None, | |
| run_after_lte: Optional[datetime] = None, | |
| run_after_lt: Optional[datetime] = None, | |
| order_by: Annotated[Optional[List[StrictStr]], Field(description="Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after`")] = None, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> RESTResponseType: | |
| """Get Xcom Entries | |
| Get all XCom entries. This endpoint allows specifying `~` as the dag_id, dag_run_id, task_id to retrieve XCom entries for all Dags. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param xcom_key: | |
| :type xcom_key: str | |
| :param map_index: | |
| :type map_index: int | |
| :param limit: | |
| :type limit: int | |
| :param offset: | |
| :type offset: int | |
| :param xcom_key_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `xcom_key_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type xcom_key_pattern: str | |
| :param xcom_key_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type xcom_key_prefix_pattern: str | |
| :param dag_display_name_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `dag_display_name_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type dag_display_name_pattern: str | |
| :param dag_display_name_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type dag_display_name_prefix_pattern: str | |
| :param run_id_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `run_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type run_id_pattern: str | |
| :param run_id_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type run_id_prefix_pattern: str | |
| :param task_id_pattern: Case-insensitive substring match (SQL `ILIKE`). Slower than `task_id_prefix_pattern` on large tables — see \"Filtering with pattern parameters\". | |
| :type task_id_pattern: str | |
| :param task_id_prefix_pattern: Case-sensitive, index-friendly prefix match. See \"Filtering with pattern parameters\". | |
| :type task_id_prefix_pattern: str | |
| :param map_index_filter: | |
| :type map_index_filter: int | |
| :param logical_date_gte: | |
| :type logical_date_gte: datetime | |
| :param logical_date_gt: | |
| :type logical_date_gt: datetime | |
| :param logical_date_lte: | |
| :type logical_date_lte: datetime | |
| :param logical_date_lt: | |
| :type logical_date_lt: datetime | |
| :param run_after_gte: | |
| :type run_after_gte: datetime | |
| :param run_after_gt: | |
| :type run_after_gt: datetime | |
| :param run_after_lte: | |
| :type run_after_lte: datetime | |
| :param run_after_lt: | |
| :type run_after_lt: datetime | |
| :param order_by: Attributes to order by, multi criteria sort is supported. Prefix with `-` for descending order. Supported attributes: `key, dag_id, run_id, task_id, map_index, timestamp, run_after` | |
| :type order_by: List[str] | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._get_xcom_entries_serialize( | |
| dag_id=dag_id, | |
| dag_run_id=dag_run_id, | |
| task_id=task_id, | |
| xcom_key=xcom_key, | |
| map_index=map_index, | |
| limit=limit, | |
| offset=offset, | |
| xcom_key_pattern=xcom_key_pattern, | |
| xcom_key_prefix_pattern=xcom_key_prefix_pattern, | |
| dag_display_name_pattern=dag_display_name_pattern, | |
| dag_display_name_prefix_pattern=dag_display_name_prefix_pattern, | |
| run_id_pattern=run_id_pattern, | |
| run_id_prefix_pattern=run_id_prefix_pattern, | |
| task_id_pattern=task_id_pattern, | |
| task_id_prefix_pattern=task_id_prefix_pattern, | |
| map_index_filter=map_index_filter, | |
| logical_date_gte=logical_date_gte, | |
| logical_date_gt=logical_date_gt, | |
| logical_date_lte=logical_date_lte, | |
| logical_date_lt=logical_date_lt, | |
| run_after_gte=run_after_gte, | |
| run_after_gt=run_after_gt, | |
| run_after_lte=run_after_lte, | |
| run_after_lt=run_after_lt, | |
| order_by=order_by, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '200': "XComCollectionResponse", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| return response_data.response | |
| def _get_xcom_entries_serialize( | |
| self, | |
| dag_id, | |
| dag_run_id, | |
| task_id, | |
| xcom_key, | |
| map_index, | |
| limit, | |
| offset, | |
| xcom_key_pattern, | |
| xcom_key_prefix_pattern, | |
| dag_display_name_pattern, | |
| dag_display_name_prefix_pattern, | |
| run_id_pattern, | |
| run_id_prefix_pattern, | |
| task_id_pattern, | |
| task_id_prefix_pattern, | |
| map_index_filter, | |
| logical_date_gte, | |
| logical_date_gt, | |
| logical_date_lte, | |
| logical_date_lt, | |
| run_after_gte, | |
| run_after_gt, | |
| run_after_lte, | |
| run_after_lt, | |
| order_by, | |
| _request_auth, | |
| _content_type, | |
| _headers, | |
| _host_index, | |
| ) -> RequestSerialized: | |
| _host = None | |
| _collection_formats: Dict[str, str] = { | |
| 'order_by': 'multi', | |
| } | |
| _path_params: Dict[str, str] = {} | |
| _query_params: List[Tuple[str, str]] = [] | |
| _header_params: Dict[str, Optional[str]] = _headers or {} | |
| _form_params: List[Tuple[str, str]] = [] | |
| _files: Dict[ | |
| str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] | |
| ] = {} | |
| _body_params: Optional[bytes] = None | |
| # process the path parameters | |
| if dag_id is not None: | |
| _path_params['dag_id'] = dag_id | |
| if dag_run_id is not None: | |
| _path_params['dag_run_id'] = dag_run_id | |
| if task_id is not None: | |
| _path_params['task_id'] = task_id | |
| # process the query parameters | |
| if xcom_key is not None: | |
| _query_params.append(('xcom_key', xcom_key)) | |
| if map_index is not None: | |
| _query_params.append(('map_index', map_index)) | |
| if limit is not None: | |
| _query_params.append(('limit', limit)) | |
| if offset is not None: | |
| _query_params.append(('offset', offset)) | |
| if xcom_key_pattern is not None: | |
| _query_params.append(('xcom_key_pattern', xcom_key_pattern)) | |
| if xcom_key_prefix_pattern is not None: | |
| _query_params.append(('xcom_key_prefix_pattern', xcom_key_prefix_pattern)) | |
| if dag_display_name_pattern is not None: | |
| _query_params.append(('dag_display_name_pattern', dag_display_name_pattern)) | |
| if dag_display_name_prefix_pattern is not None: | |
| _query_params.append(('dag_display_name_prefix_pattern', dag_display_name_prefix_pattern)) | |
| if run_id_pattern is not None: | |
| _query_params.append(('run_id_pattern', run_id_pattern)) | |
| if run_id_prefix_pattern is not None: | |
| _query_params.append(('run_id_prefix_pattern', run_id_prefix_pattern)) | |
| if task_id_pattern is not None: | |
| _query_params.append(('task_id_pattern', task_id_pattern)) | |
| if task_id_prefix_pattern is not None: | |
| _query_params.append(('task_id_prefix_pattern', task_id_prefix_pattern)) | |
| if map_index_filter is not None: | |
| _query_params.append(('map_index_filter', map_index_filter)) | |
| if logical_date_gte is not None: | |
| if isinstance(logical_date_gte, datetime): | |
| _query_params.append( | |
| ( | |
| 'logical_date_gte', | |
| logical_date_gte.strftime( | |
| self.api_client.configuration.datetime_format | |
| ) | |
| ) | |
| ) | |
| else: | |
| _query_params.append(('logical_date_gte', logical_date_gte)) | |
| if logical_date_gt is not None: | |
| if isinstance(logical_date_gt, datetime): | |
| _query_params.append( | |
| ( | |
| 'logical_date_gt', | |
| logical_date_gt.strftime( | |
| self.api_client.configuration.datetime_format | |
| ) | |
| ) | |
| ) | |
| else: | |
| _query_params.append(('logical_date_gt', logical_date_gt)) | |
| if logical_date_lte is not None: | |
| if isinstance(logical_date_lte, datetime): | |
| _query_params.append( | |
| ( | |
| 'logical_date_lte', | |
| logical_date_lte.strftime( | |
| self.api_client.configuration.datetime_format | |
| ) | |
| ) | |
| ) | |
| else: | |
| _query_params.append(('logical_date_lte', logical_date_lte)) | |
| if logical_date_lt is not None: | |
| if isinstance(logical_date_lt, datetime): | |
| _query_params.append( | |
| ( | |
| 'logical_date_lt', | |
| logical_date_lt.strftime( | |
| self.api_client.configuration.datetime_format | |
| ) | |
| ) | |
| ) | |
| else: | |
| _query_params.append(('logical_date_lt', logical_date_lt)) | |
| if run_after_gte is not None: | |
| if isinstance(run_after_gte, datetime): | |
| _query_params.append( | |
| ( | |
| 'run_after_gte', | |
| run_after_gte.strftime( | |
| self.api_client.configuration.datetime_format | |
| ) | |
| ) | |
| ) | |
| else: | |
| _query_params.append(('run_after_gte', run_after_gte)) | |
| if run_after_gt is not None: | |
| if isinstance(run_after_gt, datetime): | |
| _query_params.append( | |
| ( | |
| 'run_after_gt', | |
| run_after_gt.strftime( | |
| self.api_client.configuration.datetime_format | |
| ) | |
| ) | |
| ) | |
| else: | |
| _query_params.append(('run_after_gt', run_after_gt)) | |
| if run_after_lte is not None: | |
| if isinstance(run_after_lte, datetime): | |
| _query_params.append( | |
| ( | |
| 'run_after_lte', | |
| run_after_lte.strftime( | |
| self.api_client.configuration.datetime_format | |
| ) | |
| ) | |
| ) | |
| else: | |
| _query_params.append(('run_after_lte', run_after_lte)) | |
| if run_after_lt is not None: | |
| if isinstance(run_after_lt, datetime): | |
| _query_params.append( | |
| ( | |
| 'run_after_lt', | |
| run_after_lt.strftime( | |
| self.api_client.configuration.datetime_format | |
| ) | |
| ) | |
| ) | |
| else: | |
| _query_params.append(('run_after_lt', run_after_lt)) | |
| if order_by is not None: | |
| _query_params.append(('order_by', order_by)) | |
| # process the header parameters | |
| # process the form parameters | |
| # process the body parameter | |
| # set the HTTP header `Accept` | |
| if 'Accept' not in _header_params: | |
| _header_params['Accept'] = self.api_client.select_header_accept( | |
| [ | |
| 'application/json' | |
| ] | |
| ) | |
| # authentication setting | |
| _auth_settings: List[str] = [ | |
| 'OAuth2PasswordBearer', | |
| 'HTTPBearer' | |
| ] | |
| return self.api_client.param_serialize( | |
| method='GET', | |
| resource_path='/api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries', | |
| path_params=_path_params, | |
| query_params=_query_params, | |
| header_params=_header_params, | |
| body=_body_params, | |
| post_params=_form_params, | |
| files=_files, | |
| auth_settings=_auth_settings, | |
| collection_formats=_collection_formats, | |
| _host=_host, | |
| _request_auth=_request_auth | |
| ) | |
| @validate_call | |
| def get_xcom_entry( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| xcom_key: StrictStr, | |
| map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, | |
| deserialize: Optional[StrictBool] = None, | |
| stringify: Optional[StrictBool] = None, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> ResponseGetXcomEntry: | |
| """Get Xcom Entry | |
| Get an XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param xcom_key: (required) | |
| :type xcom_key: str | |
| :param map_index: | |
| :type map_index: int | |
| :param deserialize: | |
| :type deserialize: bool | |
| :param stringify: | |
| :type stringify: bool | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._get_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| xcom_key=xcom_key, | |
| map_index=map_index, | |
| deserialize=deserialize, | |
| stringify=stringify, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '200': "ResponseGetXcomEntry", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ).data | |
| @validate_call | |
| def get_xcom_entry_with_http_info( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| xcom_key: StrictStr, | |
| map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, | |
| deserialize: Optional[StrictBool] = None, | |
| stringify: Optional[StrictBool] = None, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> ApiResponse[ResponseGetXcomEntry]: | |
| """Get Xcom Entry | |
| Get an XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param xcom_key: (required) | |
| :type xcom_key: str | |
| :param map_index: | |
| :type map_index: int | |
| :param deserialize: | |
| :type deserialize: bool | |
| :param stringify: | |
| :type stringify: bool | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._get_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| xcom_key=xcom_key, | |
| map_index=map_index, | |
| deserialize=deserialize, | |
| stringify=stringify, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '200': "ResponseGetXcomEntry", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ) | |
| @validate_call | |
| def get_xcom_entry_without_preload_content( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| xcom_key: StrictStr, | |
| map_index: Optional[Annotated[int, Field(strict=True, ge=-1)]] = None, | |
| deserialize: Optional[StrictBool] = None, | |
| stringify: Optional[StrictBool] = None, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> RESTResponseType: | |
| """Get Xcom Entry | |
| Get an XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param xcom_key: (required) | |
| :type xcom_key: str | |
| :param map_index: | |
| :type map_index: int | |
| :param deserialize: | |
| :type deserialize: bool | |
| :param stringify: | |
| :type stringify: bool | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._get_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| xcom_key=xcom_key, | |
| map_index=map_index, | |
| deserialize=deserialize, | |
| stringify=stringify, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '200': "ResponseGetXcomEntry", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| return response_data.response | |
| def _get_xcom_entry_serialize( | |
| self, | |
| dag_id, | |
| task_id, | |
| dag_run_id, | |
| xcom_key, | |
| map_index, | |
| deserialize, | |
| stringify, | |
| _request_auth, | |
| _content_type, | |
| _headers, | |
| _host_index, | |
| ) -> RequestSerialized: | |
| _host = None | |
| _collection_formats: Dict[str, str] = { | |
| } | |
| _path_params: Dict[str, str] = {} | |
| _query_params: List[Tuple[str, str]] = [] | |
| _header_params: Dict[str, Optional[str]] = _headers or {} | |
| _form_params: List[Tuple[str, str]] = [] | |
| _files: Dict[ | |
| str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] | |
| ] = {} | |
| _body_params: Optional[bytes] = None | |
| # process the path parameters | |
| if dag_id is not None: | |
| _path_params['dag_id'] = dag_id | |
| if task_id is not None: | |
| _path_params['task_id'] = task_id | |
| if dag_run_id is not None: | |
| _path_params['dag_run_id'] = dag_run_id | |
| if xcom_key is not None: | |
| _path_params['xcom_key'] = xcom_key | |
| # process the query parameters | |
| if map_index is not None: | |
| _query_params.append(('map_index', map_index)) | |
| if deserialize is not None: | |
| _query_params.append(('deserialize', deserialize)) | |
| if stringify is not None: | |
| _query_params.append(('stringify', stringify)) | |
| # process the header parameters | |
| # process the form parameters | |
| # process the body parameter | |
| # set the HTTP header `Accept` | |
| if 'Accept' not in _header_params: | |
| _header_params['Accept'] = self.api_client.select_header_accept( | |
| [ | |
| 'application/json' | |
| ] | |
| ) | |
| # authentication setting | |
| _auth_settings: List[str] = [ | |
| 'OAuth2PasswordBearer', | |
| 'HTTPBearer' | |
| ] | |
| return self.api_client.param_serialize( | |
| method='GET', | |
| resource_path='/api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}', | |
| path_params=_path_params, | |
| query_params=_query_params, | |
| header_params=_header_params, | |
| body=_body_params, | |
| post_params=_form_params, | |
| files=_files, | |
| auth_settings=_auth_settings, | |
| collection_formats=_collection_formats, | |
| _host=_host, | |
| _request_auth=_request_auth | |
| ) | |
| @validate_call | |
| def update_xcom_entry( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| xcom_key: StrictStr, | |
| x_com_update_body: XComUpdateBody, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> XComResponseNative: | |
| """Update Xcom Entry | |
| Update an existing XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param xcom_key: (required) | |
| :type xcom_key: str | |
| :param x_com_update_body: (required) | |
| :type x_com_update_body: XComUpdateBody | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._update_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| xcom_key=xcom_key, | |
| x_com_update_body=x_com_update_body, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '200': "XComResponseNative", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ).data | |
| @validate_call | |
| def update_xcom_entry_with_http_info( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| xcom_key: StrictStr, | |
| x_com_update_body: XComUpdateBody, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> ApiResponse[XComResponseNative]: | |
| """Update Xcom Entry | |
| Update an existing XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param xcom_key: (required) | |
| :type xcom_key: str | |
| :param x_com_update_body: (required) | |
| :type x_com_update_body: XComUpdateBody | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._update_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| xcom_key=xcom_key, | |
| x_com_update_body=x_com_update_body, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '200': "XComResponseNative", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| response_data.read() | |
| return self.api_client.response_deserialize( | |
| response_data=response_data, | |
| response_types_map=_response_types_map, | |
| ) | |
| @validate_call | |
| def update_xcom_entry_without_preload_content( | |
| self, | |
| dag_id: StrictStr, | |
| task_id: StrictStr, | |
| dag_run_id: StrictStr, | |
| xcom_key: StrictStr, | |
| x_com_update_body: XComUpdateBody, | |
| _request_timeout: Union[ | |
| None, | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Tuple[ | |
| Annotated[StrictFloat, Field(gt=0)], | |
| Annotated[StrictFloat, Field(gt=0)] | |
| ] | |
| ] = None, | |
| _request_auth: Optional[Dict[StrictStr, Any]] = None, | |
| _content_type: Optional[StrictStr] = None, | |
| _headers: Optional[Dict[StrictStr, Any]] = None, | |
| _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, | |
| ) -> RESTResponseType: | |
| """Update Xcom Entry | |
| Update an existing XCom entry. | |
| :param dag_id: (required) | |
| :type dag_id: str | |
| :param task_id: (required) | |
| :type task_id: str | |
| :param dag_run_id: (required) | |
| :type dag_run_id: str | |
| :param xcom_key: (required) | |
| :type xcom_key: str | |
| :param x_com_update_body: (required) | |
| :type x_com_update_body: XComUpdateBody | |
| :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. | |
| :type _request_timeout: int, tuple(int, int), optional | |
| :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 | |
| :param _content_type: force content-type for the request. | |
| :type _content_type: str, Optional | |
| :param _headers: set to override the headers for a single | |
| request; this effectively ignores the headers | |
| in the spec for a single request. | |
| :type _headers: dict, optional | |
| :param _host_index: set to override the host_index for a single | |
| request; this effectively ignores the host_index | |
| in the spec for a single request. | |
| :type _host_index: int, optional | |
| :return: Returns the result object. | |
| """ # noqa: E501 | |
| _param = self._update_xcom_entry_serialize( | |
| dag_id=dag_id, | |
| task_id=task_id, | |
| dag_run_id=dag_run_id, | |
| xcom_key=xcom_key, | |
| x_com_update_body=x_com_update_body, | |
| _request_auth=_request_auth, | |
| _content_type=_content_type, | |
| _headers=_headers, | |
| _host_index=_host_index | |
| ) | |
| _response_types_map: Dict[str, Optional[str]] = { | |
| '200': "XComResponseNative", | |
| '400': "HTTPExceptionResponse", | |
| '401': "HTTPExceptionResponse", | |
| '403': "HTTPExceptionResponse", | |
| '404': "HTTPExceptionResponse", | |
| '422': "HTTPValidationError", | |
| } | |
| response_data = self.api_client.call_api( | |
| *_param, | |
| _request_timeout=_request_timeout | |
| ) | |
| return response_data.response | |
| def _update_xcom_entry_serialize( | |
| self, | |
| dag_id, | |
| task_id, | |
| dag_run_id, | |
| xcom_key, | |
| x_com_update_body, | |
| _request_auth, | |
| _content_type, | |
| _headers, | |
| _host_index, | |
| ) -> RequestSerialized: | |
| _host = None | |
| _collection_formats: Dict[str, str] = { | |
| } | |
| _path_params: Dict[str, str] = {} | |
| _query_params: List[Tuple[str, str]] = [] | |
| _header_params: Dict[str, Optional[str]] = _headers or {} | |
| _form_params: List[Tuple[str, str]] = [] | |
| _files: Dict[ | |
| str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] | |
| ] = {} | |
| _body_params: Optional[bytes] = None | |
| # process the path parameters | |
| if dag_id is not None: | |
| _path_params['dag_id'] = dag_id | |
| if task_id is not None: | |
| _path_params['task_id'] = task_id | |
| if dag_run_id is not None: | |
| _path_params['dag_run_id'] = dag_run_id | |
| if xcom_key is not None: | |
| _path_params['xcom_key'] = xcom_key | |
| # process the query parameters | |
| # process the header parameters | |
| # process the form parameters | |
| # process the body parameter | |
| if x_com_update_body is not None: | |
| _body_params = x_com_update_body | |
| # set the HTTP header `Accept` | |
| if 'Accept' not in _header_params: | |
| _header_params['Accept'] = self.api_client.select_header_accept( | |
| [ | |
| 'application/json' | |
| ] | |
| ) | |
| # set the HTTP header `Content-Type` | |
| if _content_type: | |
| _header_params['Content-Type'] = _content_type | |
| else: | |
| _default_content_type = ( | |
| self.api_client.select_header_content_type( | |
| [ | |
| 'application/json' | |
| ] | |
| ) | |
| ) | |
| if _default_content_type is not None: | |
| _header_params['Content-Type'] = _default_content_type | |
| # authentication setting | |
| _auth_settings: List[str] = [ | |
| 'OAuth2PasswordBearer', | |
| 'HTTPBearer' | |
| ] | |
| return self.api_client.param_serialize( | |
| method='PATCH', | |
| resource_path='/api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}/xcomEntries/{xcom_key}', | |
| path_params=_path_params, | |
| query_params=_query_params, | |
| header_params=_header_params, | |
| body=_body_params, | |
| post_params=_form_params, | |
| files=_files, | |
| auth_settings=_auth_settings, | |
| collection_formats=_collection_formats, | |
| _host=_host, | |
| _request_auth=_request_auth | |
| ) | |