You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2025/05/19 11:22:40 UTC
(airflow-client-python) branch main updated: Update Python Client to 3.0.0 (#128)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow-client-python.git
The following commit(s) were added to refs/heads/main by this push:
new 56c1242 Update Python Client to 3.0.0 (#128)
56c1242 is described below
commit 56c12428c78942a6aaa50d2270891078223c0374
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Mon May 19 16:52:35 2025 +0530
Update Python Client to 3.0.0 (#128)
This brings in the new Airflow API v2 to the Python client
As part of this change the following breaking changes have occurred:
- The API returns 422 status code instead of 400 for validation errors.
For instance when the request payload, path params, or query params are invalid.
- When listing a resource for instance on GET ``/dags``, ``fields`` parameter is not supported anymore to obtain a partial response.
The full objects will be returned by the endpoint. This feature might be added back in upcoming 3.x versions.
- Passing list in query parameters switched from ``form, non exploded`` to ``form, exploded``
i.e before ``?my_list=item1,item2`` now ``?my_list=item1&my_list=item2``
- ``execution_date`` was deprecated and has been removed. Any payload or parameter mentioning this field has been removed.
- Datetime format are RFC3339-compliant in FastAPI, more permissive than ISO8601,
meaning that the API returns zulu datetime for responses, more info here https://github.com/fastapi/fastapi/discussions/7693#discussioncomment-5143311.
Both ``Z`` and ``00+xx`` are supported for payload and params.
This is due FastAPI and pydantic v2 default behavior.
- PATCH on ``DagRun`` and ``TaskInstance`` are more generic and allow in addition to update the resource state and the note content.
Therefore the two legacy dedicated endpoints to update a ``DagRun`` note and ``TaskInstance`` note have been removed.
Same for the set task instance state, it is now handled by the broader PATCH on task instances.
- ``assets/queuedEvent`` endpoints have moved to ``assets/queuedEvents`` for consistency.
- dag_parsing endpoint now returns a 409 when the DagPriorityParsingRequest already exists. It was returning 201 before.
- ``clearTaskInstances`` endpoint default value for ``reset_dag_runs`` field has been updated from ``False`` to ``True``.
- Pool name can't be modified in the PATCH pool endpoint anymore. Pool name shouldn't be updated via pool PATCH API call.
- Logical date is now a nullable. In addition it is a nullable required payload field for Triggering a DagRun endpoint.
---
.github/workflows/ci.yml | 2 +-
CHANGELOG.md | 52 +
INSTALL | 2 +-
LICENSE | 1 -
README.md | 38 +-
airflow_client/client/__init__.py | 188 +-
airflow_client/client/api/__init__.py | 33 +-
airflow_client/client/api/asset_api.py | 4079 ++++++
airflow_client/client/api/backfill_api.py | 2023 +++
airflow_client/client/api/config_api.py | 863 +-
airflow_client/client/api/connection_api.py | 3104 ++--
airflow_client/client/api/dag_api.py | 4221 +++---
airflow_client/client/api/dag_parsing_api.py | 310 +
airflow_client/client/api/dag_report_api.py | 312 +
airflow_client/client/api/dag_run_api.py | 4118 ++++--
airflow_client/client/api/dag_source_api.py | 350 +
airflow_client/client/api/dag_stats_api.py | 432 +-
airflow_client/client/api/dag_version_api.py | 703 +
airflow_client/client/api/dag_warning_api.py | 520 +-
airflow_client/client/api/dataset_api.py | 1606 ---
airflow_client/client/api/event_log_api.py | 1127 +-
airflow_client/client/api/extra_links_api.py | 358 +
airflow_client/client/api/import_error_api.py | 855 +-
airflow_client/client/api/job_api.py | 538 +
airflow_client/client/api/login_api.py | 573 +
airflow_client/client/api/monitor_api.py | 278 +
airflow_client/client/api/monitoring_api.py | 275 -
airflow_client/client/api/permission_api.py | 175 -
airflow_client/client/api/plugin_api.py | 708 +-
airflow_client/client/api/pool_api.py | 2450 +++-
airflow_client/client/api/provider_api.py | 433 +-
airflow_client/client/api/role_api.py | 721 -
airflow_client/client/api/task_api.py | 623 +
airflow_client/client/api/task_instance_api.py | 10421 ++++++++++----
airflow_client/client/api/user_api.py | 722 -
airflow_client/client/api/variable_api.py | 2450 +++-
airflow_client/client/api/version_api.py | 281 +
airflow_client/client/api/x_com_api.py | 1803 ++-
airflow_client/client/api_client.py | 1218 +-
airflow_client/client/api_response.py | 21 +
airflow_client/client/apis/__init__.py | 35 -
airflow_client/client/configuration.py | 364 +-
airflow_client/client/exceptions.py | 120 +-
airflow_client/client/model/__init__.py | 5 -
airflow_client/client/model/action.py | 256 -
airflow_client/client/model/action_collection.py | 321 -
.../client/model/action_collection_all_of.py | 262 -
airflow_client/client/model/action_resource.py | 268 -
airflow_client/client/model/basic_dag_run.py | 295 -
airflow_client/client/model/class_reference.py | 262 -
airflow_client/client/model/clear_dag_run.py | 256 -
.../client/model/clear_task_instances.py | 311 -
airflow_client/client/model/collection_info.py | 256 -
airflow_client/client/model/color.py | 284 -
airflow_client/client/model/config.py | 262 -
airflow_client/client/model/config_option.py | 262 -
airflow_client/client/model/config_section.py | 267 -
airflow_client/client/model/connection.py | 347 -
airflow_client/client/model/connection_all_of.py | 260 -
.../client/model/connection_collection.py | 321 -
.../client/model/connection_collection_all_of.py | 262 -
.../client/model/connection_collection_item.py | 280 -
airflow_client/client/model/connection_test.py | 260 -
.../client/model/create_dataset_event.py | 266 -
airflow_client/client/model/cron_expression.py | 268 -
airflow_client/client/model/dag.py | 398 -
airflow_client/client/model/dag_collection.py | 321 -
.../client/model/dag_collection_all_of.py | 262 -
airflow_client/client/model/dag_detail.py | 521 -
airflow_client/client/model/dag_detail_all_of.py | 329 -
.../client/model/dag_processor_status.py | 267 -
airflow_client/client/model/dag_run.py | 326 -
airflow_client/client/model/dag_run_collection.py | 321 -
.../client/model/dag_run_collection_all_of.py | 262 -
.../client/model/dag_schedule_dataset_reference.py | 264 -
airflow_client/client/model/dag_state.py | 285 -
.../client/model/dag_stats_collection_item.py | 266 -
.../client/model/dag_stats_collection_schema.py | 321 -
.../model/dag_stats_collection_schema_all_of.py | 262 -
.../model/dag_stats_state_collection_item.py | 260 -
airflow_client/client/model/dag_warning.py | 272 -
.../client/model/dag_warning_collection.py | 321 -
.../client/model/dag_warning_collection_all_of.py | 262 -
airflow_client/client/model/dataset.py | 288 -
airflow_client/client/model/dataset_collection.py | 321 -
.../client/model/dataset_collection_all_of.py | 262 -
airflow_client/client/model/dataset_event.py | 294 -
.../client/model/dataset_event_collection.py | 321 -
.../model/dataset_event_collection_all_of.py | 262 -
airflow_client/client/model/error.py | 282 -
airflow_client/client/model/event_log.py | 307 -
.../client/model/event_log_collection.py | 321 -
.../client/model/event_log_collection_all_of.py | 262 -
airflow_client/client/model/extra_link.py | 272 -
.../client/model/extra_link_collection.py | 262 -
airflow_client/client/model/health_info.py | 280 -
airflow_client/client/model/health_status.py | 284 -
airflow_client/client/model/import_error.py | 272 -
.../client/model/import_error_collection.py | 321 -
.../client/model/import_error_collection_all_of.py | 262 -
airflow_client/client/model/inline_response200.py | 256 -
airflow_client/client/model/inline_response2001.py | 260 -
airflow_client/client/model/job.py | 292 -
airflow_client/client/model/list_dag_runs_form.py | 302 -
.../client/model/list_task_instance_form.py | 318 -
airflow_client/client/model/metadatabase_status.py | 262 -
airflow_client/client/model/plugin_collection.py | 321 -
.../client/model/plugin_collection_all_of.py | 262 -
.../client/model/plugin_collection_item.py | 304 -
airflow_client/client/model/pool.py | 298 -
airflow_client/client/model/pool_collection.py | 321 -
.../client/model/pool_collection_all_of.py | 262 -
airflow_client/client/model/provider.py | 264 -
airflow_client/client/model/provider_collection.py | 262 -
airflow_client/client/model/queued_event.py | 264 -
.../client/model/queued_event_collection.py | 321 -
.../client/model/queued_event_collection_all_of.py | 262 -
airflow_client/client/model/relative_delta.py | 352 -
airflow_client/client/model/resource.py | 256 -
airflow_client/client/model/role.py | 269 -
airflow_client/client/model/role_collection.py | 321 -
.../client/model/role_collection_all_of.py | 262 -
airflow_client/client/model/schedule_interval.py | 389 -
airflow_client/client/model/scheduler_status.py | 267 -
airflow_client/client/model/set_dag_run_note.py | 256 -
.../client/model/set_task_instance_note.py | 262 -
airflow_client/client/model/sla_miss.py | 281 -
airflow_client/client/model/tag.py | 256 -
airflow_client/client/model/task.py | 397 -
airflow_client/client/model/task_collection.py | 262 -
airflow_client/client/model/task_extra_links.py | 262 -
.../client/model/task_failed_dependency.py | 260 -
airflow_client/client/model/task_instance.py | 380 -
.../client/model/task_instance_collection.py | 321 -
.../model/task_instance_collection_all_of.py | 262 -
.../model/task_instance_dependency_collection.py | 262 -
.../client/model/task_instance_reference.py | 272 -
.../model/task_instance_reference_collection.py | 262 -
.../client/model/task_outlet_dataset_reference.py | 268 -
airflow_client/client/model/task_state.py | 296 -
airflow_client/client/model/time_delta.py | 280 -
airflow_client/client/model/trigger.py | 272 -
airflow_client/client/model/trigger_rule.py | 295 -
airflow_client/client/model/triggerer_status.py | 267 -
.../client/model/update_dag_run_state.py | 261 -
.../client/model/update_task_instance.py | 266 -
.../client/model/update_task_instances_state.py | 294 -
airflow_client/client/model/update_task_state.py | 284 -
airflow_client/client/model/user.py | 373 -
airflow_client/client/model/user_all_of.py | 256 -
airflow_client/client/model/user_collection.py | 321 -
.../client/model/user_collection_all_of.py | 262 -
.../client/model/user_collection_item.py | 314 -
.../client/model/user_collection_item_roles.py | 256 -
airflow_client/client/model/variable.py | 323 -
airflow_client/client/model/variable_all_of.py | 256 -
airflow_client/client/model/variable_collection.py | 321 -
.../client/model/variable_collection_all_of.py | 262 -
.../client/model/variable_collection_item.py | 260 -
airflow_client/client/model/version_info.py | 260 -
airflow_client/client/model/weight_rule.py | 284 -
airflow_client/client/model/x_com.py | 339 -
airflow_client/client/model/x_com_all_of.py | 256 -
airflow_client/client/model/x_com_collection.py | 321 -
.../client/model/x_com_collection_all_of.py | 262 -
.../client/model/x_com_collection_item.py | 276 -
airflow_client/client/model_utils.py | 2038 ---
airflow_client/client/models/__init__.py | 277 +-
.../models/app_builder_menu_item_response.py | 91 +
.../client/models/app_builder_view_response.py | 93 +
.../models/asset_alias_collection_response.py | 97 +
.../client/models/asset_alias_response.py | 91 +
.../client/models/asset_collection_response.py | 97 +
.../models/asset_event_collection_response.py | 97 +
.../client/models/asset_event_response.py | 118 +
airflow_client/client/models/asset_response.py | 136 +
.../client/models/backfill_collection_response.py | 97 +
airflow_client/client/models/backfill_post_body.py | 114 +
airflow_client/client/models/backfill_response.py | 112 +
airflow_client/client/models/base_info_response.py | 87 +
airflow_client/client/models/bulk_action.py | 38 +
.../client/models/bulk_action_not_on_existence.py | 37 +
.../client/models/bulk_action_on_existence.py | 38 +
.../client/models/bulk_action_response.py | 89 +
.../client/models/bulk_body_connection_body.py | 95 +
.../bulk_body_connection_body_actions_inner.py | 151 +
.../client/models/bulk_body_pool_body.py | 95 +
.../models/bulk_body_pool_body_actions_inner.py | 151 +
.../client/models/bulk_body_variable_body.py | 95 +
.../bulk_body_variable_body_actions_inner.py | 151 +
.../models/bulk_create_action_connection_body.py | 101 +
.../client/models/bulk_create_action_pool_body.py | 101 +
.../models/bulk_create_action_variable_body.py | 101 +
.../models/bulk_delete_action_connection_body.py | 93 +
.../client/models/bulk_delete_action_pool_body.py | 93 +
.../models/bulk_delete_action_variable_body.py | 93 +
airflow_client/client/models/bulk_response.py | 101 +
.../models/bulk_update_action_connection_body.py | 101 +
.../client/models/bulk_update_action_pool_body.py | 101 +
.../models/bulk_update_action_variable_body.py | 101 +
.../client/models/clear_task_instances_body.py | 118 +
.../clear_task_instances_body_task_ids_inner.py | 139 +
airflow_client/client/models/config.py | 95 +
airflow_client/client/models/config_option.py | 93 +
airflow_client/client/models/config_section.py | 97 +
airflow_client/client/models/connection_body.py | 111 +
.../models/connection_collection_response.py | 97 +
.../client/models/connection_response.py | 103 +
.../client/models/connection_test_response.py | 89 +
airflow_client/client/models/content.py | 139 +
.../client/models/create_asset_events_body.py | 102 +
.../client/models/dag_collection_response.py | 97 +
.../client/models/dag_details_response.py | 184 +
airflow_client/client/models/dag_patch_body.py | 87 +
.../client/models/dag_processor_info_response.py | 89 +
airflow_client/client/models/dag_response.py | 146 +
.../client/models/dag_run_asset_reference.py | 102 +
airflow_client/client/models/dag_run_clear_body.py | 89 +
.../client/models/dag_run_collection_response.py | 97 +
airflow_client/client/models/dag_run_patch_body.py | 91 +
.../client/models/dag_run_patch_states.py | 38 +
airflow_client/client/models/dag_run_response.py | 133 +
airflow_client/client/models/dag_run_state.py | 39 +
.../client/models/dag_run_triggered_by_type.py | 43 +
airflow_client/client/models/dag_run_type.py | 39 +
.../client/models/dag_runs_batch_body.py | 114 +
.../client/models/dag_schedule_asset_reference.py | 92 +
.../client/models/dag_source_response.py | 93 +
.../client/models/dag_stats_collection_response.py | 97 +
airflow_client/client/models/dag_stats_response.py | 97 +
.../client/models/dag_stats_state_response.py | 90 +
.../client/models/dag_tag_collection_response.py | 89 +
airflow_client/client/models/dag_tag_response.py | 89 +
.../models/dag_version_collection_response.py | 97 +
.../client/models/dag_version_response.py | 102 +
.../models/dag_warning_collection_response.py | 97 +
.../client/models/dag_warning_response.py | 95 +
airflow_client/client/models/dag_warning_type.py | 37 +
airflow_client/client/models/detail.py | 138 +
.../models/dry_run_backfill_collection_response.py | 97 +
.../client/models/dry_run_backfill_response.py | 88 +
.../client/models/event_log_collection_response.py | 97 +
airflow_client/client/models/event_log_response.py | 110 +
.../client/models/external_log_url_response.py | 87 +
.../models/extra_link_collection_response.py | 89 +
.../client/models/fast_api_app_response.py | 91 +
.../models/fast_api_root_middleware_response.py | 89 +
.../client/models/health_info_response.py | 109 +
.../client/models/http_exception_response.py | 91 +
.../client/models/http_validation_error.py | 95 +
.../models/import_error_collection_response.py | 97 +
.../client/models/import_error_response.py | 96 +
.../client/models/job_collection_response.py | 97 +
airflow_client/client/models/job_response.py | 108 +
.../client/models/last_asset_event_response.py | 91 +
.../client/models/patch_task_instance_body.py | 99 +
.../client/models/plugin_collection_response.py | 97 +
.../plugin_import_error_collection_response.py | 97 +
.../client/models/plugin_import_error_response.py | 89 +
airflow_client/client/models/plugin_response.py | 141 +
airflow_client/client/models/pool_body.py | 94 +
.../client/models/pool_collection_response.py | 97 +
airflow_client/client/models/pool_patch_body.py | 93 +
airflow_client/client/models/pool_response.py | 105 +
.../client/models/provider_collection_response.py | 97 +
airflow_client/client/models/provider_response.py | 91 +
.../models/queued_event_collection_response.py | 97 +
.../client/models/queued_event_response.py | 94 +
airflow_client/client/models/reprocess_behavior.py | 38 +
.../client/models/response_clear_dag_run.py | 134 +
.../client/models/response_get_xcom_entry.py | 134 +
.../client/models/scheduler_info_response.py | 89 +
.../client/models/structured_log_message.py | 90 +
.../client/models/task_collection_response.py | 97 +
.../models/task_dependency_collection_response.py | 95 +
.../client/models/task_dependency_response.py | 89 +
.../models/task_instance_collection_response.py | 97 +
.../task_instance_history_collection_response.py | 97 +
.../models/task_instance_history_response.py | 141 +
.../client/models/task_instance_response.py | 165 +
.../client/models/task_instance_state.py | 47 +
.../client/models/task_instances_batch_body.py | 128 +
.../client/models/task_instances_log_response.py | 93 +
.../client/models/task_outlet_asset_reference.py | 94 +
airflow_client/client/models/task_response.py | 147 +
airflow_client/client/models/time_delta.py | 93 +
.../client/models/trigger_dag_run_post_body.py | 80 +
airflow_client/client/models/trigger_response.py | 96 +
.../client/models/triggerer_info_response.py | 89 +
airflow_client/client/models/validation_error.py | 99 +
.../client/models/validation_error_loc_inner.py | 138 +
airflow_client/client/models/value.py | 139 +
airflow_client/client/models/variable_body.py | 97 +
.../client/models/variable_collection_response.py | 97 +
airflow_client/client/models/variable_response.py | 93 +
airflow_client/client/models/version_info.py | 89 +
.../client/models/x_com_collection_response.py | 97 +
airflow_client/client/models/x_com_create_body.py | 96 +
airflow_client/client/models/x_com_response.py | 102 +
.../client/models/x_com_response_native.py | 109 +
.../client/models/x_com_response_string.py | 104 +
airflow_client/client/models/x_com_update_body.py | 94 +
airflow_client/client/py.typed | 0
airflow_client/client/rest.py | 375 +-
docs/Action.md | 13 -
docs/ActionCollection.md | 14 -
docs/ActionCollectionAllOf.md | 12 -
docs/ActionResource.md | 14 -
docs/AppBuilderMenuItemResponse.md | 32 +
docs/AppBuilderViewResponse.md | 33 +
docs/AssetAliasCollectionResponse.md | 31 +
docs/AssetAliasResponse.md | 32 +
docs/AssetApi.md | 1092 ++
docs/AssetCollectionResponse.md | 31 +
docs/AssetEventCollectionResponse.md | 31 +
docs/AssetEventResponse.md | 41 +
docs/AssetResponse.md | 40 +
docs/BackfillApi.md | 566 +
docs/BackfillCollectionResponse.md | 31 +
docs/BackfillPostBody.md | 36 +
docs/BackfillResponse.md | 41 +
docs/BaseInfoResponse.md | 30 +
docs/BasicDAGRun.md | 19 -
docs/BulkAction.md | 15 +
docs/BulkActionNotOnExistence.md | 13 +
docs/BulkActionOnExistence.md | 15 +
docs/BulkActionResponse.md | 31 +
docs/BulkBodyConnectionBody.md | 29 +
docs/BulkBodyConnectionBodyActionsInner.md | 32 +
docs/BulkBodyPoolBody.md | 29 +
docs/BulkBodyPoolBodyActionsInner.md | 32 +
docs/BulkBodyVariableBody.md | 29 +
docs/BulkBodyVariableBodyActionsInner.md | 32 +
docs/BulkCreateActionConnectionBody.md | 31 +
docs/BulkCreateActionPoolBody.md | 31 +
docs/BulkCreateActionVariableBody.md | 31 +
docs/BulkDeleteActionConnectionBody.md | 31 +
docs/BulkDeleteActionPoolBody.md | 31 +
docs/BulkDeleteActionVariableBody.md | 31 +
docs/BulkResponse.md | 32 +
docs/BulkUpdateActionConnectionBody.md | 31 +
docs/BulkUpdateActionPoolBody.md | 31 +
docs/BulkUpdateActionVariableBody.md | 31 +
docs/ClassReference.md | 14 -
docs/ClearDagRun.md | 12 -
docs/ClearTaskInstances.md | 25 -
docs/ClearTaskInstancesBody.md | 41 +
docs/ClearTaskInstancesBodyTaskIdsInner.md | 28 +
docs/CollectionInfo.md | 13 -
docs/Color.md | 12 -
docs/Config.md | 23 +-
docs/ConfigApi.md | 123 +-
docs/ConfigOption.md | 25 +-
docs/ConfigSection.md | 25 +-
docs/Connection.md | 21 -
docs/ConnectionAllOf.md | 13 -
docs/ConnectionApi.md | 524 +-
docs/ConnectionBody.md | 38 +
docs/ConnectionCollection.md | 14 -
docs/ConnectionCollectionAllOf.md | 12 -
docs/ConnectionCollectionItem.md | 19 -
docs/ConnectionCollectionResponse.md | 31 +
docs/ConnectionResponse.md | 38 +
docs/ConnectionTest.md | 14 -
docs/ConnectionTestResponse.md | 31 +
docs/Content.md | 28 +
docs/CreateAssetEventsBody.md | 31 +
docs/CreateDatasetEvent.md | 13 -
docs/CronExpression.md | 14 -
docs/DAG.md | 40 -
docs/DAGApi.md | 1009 +-
docs/DAGCollection.md | 14 -
docs/DAGCollectionAllOf.md | 12 -
docs/DAGCollectionResponse.md | 31 +
docs/DAGDetail.md | 54 -
docs/DAGDetailAllOf.md | 26 -
docs/DAGDetailsResponse.md | 70 +
docs/DAGParsingApi.md | 87 +
docs/DAGPatchBody.md | 30 +
docs/DAGResponse.md | 54 +
docs/DAGRun.md | 25 -
docs/DAGRunApi.md | 731 +-
docs/DAGRunClearBody.md | 31 +
docs/DAGRunCollection.md | 14 -
docs/DAGRunCollectionAllOf.md | 12 -
docs/DAGRunCollectionResponse.md | 31 +
docs/DAGRunPatchBody.md | 31 +
docs/DAGRunPatchStates.md | 15 +
docs/DAGRunResponse.md | 47 +
docs/DAGRunsBatchBody.md | 42 +
docs/DAGSourceResponse.md | 33 +
docs/DAGTagCollectionResponse.md | 31 +
docs/DAGVersionCollectionResponse.md | 31 +
docs/DAGWarningCollectionResponse.md | 31 +
docs/DAGWarningResponse.md | 33 +
docs/DagProcessorInfoResponse.md | 31 +
docs/DagProcessorStatus.md | 14 -
docs/DagReportApi.md | 87 +
docs/DagRunAssetReference.md | 37 +
docs/DagRunState.md | 17 +
docs/DagRunTriggeredByType.md | 25 +
docs/DagRunType.md | 17 +
docs/DagScheduleAssetReference.md | 32 +
docs/DagScheduleDatasetReference.md | 15 -
docs/DagSourceApi.md | 94 +
docs/DagState.md | 12 -
docs/DagStatsApi.md | 59 +-
docs/DagStatsCollectionItem.md | 14 -
docs/DagStatsCollectionResponse.md | 31 +
docs/DagStatsCollectionSchema.md | 14 -
docs/DagStatsCollectionSchemaAllOf.md | 12 -
docs/DagStatsResponse.md | 31 +
docs/DagStatsStateCollectionItem.md | 14 -
docs/DagStatsStateResponse.md | 31 +
docs/DagTagResponse.md | 31 +
docs/DagVersionApi.md | 184 +
docs/DagVersionResponse.md | 37 +
docs/DagWarning.md | 15 -
docs/DagWarningApi.md | 81 +-
docs/DagWarningCollection.md | 14 -
docs/DagWarningCollectionAllOf.md | 12 -
docs/DagWarningType.md | 13 +
docs/Dataset.md | 19 -
docs/DatasetApi.md | 1013 --
docs/DatasetCollection.md | 14 -
docs/DatasetCollectionAllOf.md | 12 -
docs/DatasetEvent.md | 21 -
docs/DatasetEventCollection.md | 14 -
docs/DatasetEventCollectionAllOf.md | 12 -
docs/Detail.md | 28 +
docs/DryRunBackfillCollectionResponse.md | 31 +
docs/DryRunBackfillResponse.md | 30 +
docs/Error.md | 17 -
docs/EventLog.md | 23 -
docs/EventLogApi.md | 165 +-
docs/EventLogCollection.md | 14 -
docs/EventLogCollectionAllOf.md | 12 -
docs/EventLogCollectionResponse.md | 31 +
docs/EventLogResponse.md | 41 +
docs/ExternalLogUrlResponse.md | 30 +
docs/ExtraLink.md | 15 -
docs/ExtraLinkCollection.md | 13 -
docs/ExtraLinkCollectionResponse.md | 31 +
docs/ExtraLinksApi.md | 94 +
docs/FastAPIAppResponse.md | 32 +
docs/FastAPIRootMiddlewareResponse.md | 31 +
docs/HTTPExceptionResponse.md | 30 +
docs/HTTPValidationError.md | 29 +
docs/HealthInfo.md | 16 -
docs/HealthInfoResponse.md | 33 +
docs/HealthStatus.md | 12 -
docs/ImportError.md | 15 -
docs/ImportErrorApi.md | 119 +-
docs/ImportErrorCollection.md | 14 -
docs/ImportErrorCollectionAllOf.md | 12 -
docs/ImportErrorCollectionResponse.md | 31 +
docs/ImportErrorResponse.md | 34 +
docs/InlineResponse200.md | 12 -
docs/InlineResponse2001.md | 13 -
docs/Job.md | 21 -
docs/JobApi.md | 110 +
docs/JobCollectionResponse.md | 31 +
docs/JobResponse.md | 40 +
docs/LastAssetEventResponse.md | 31 +
docs/ListDagRunsForm.md | 22 -
docs/ListTaskInstanceForm.md | 26 -
docs/LoginApi.md | 148 +
docs/MetadatabaseStatus.md | 13 -
docs/MonitorApi.md | 71 +
docs/MonitoringApi.md | 156 -
docs/PatchTaskInstanceBody.md | 35 +
docs/PermissionApi.md | 93 -
docs/PluginApi.md | 131 +-
docs/PluginCollection.md | 14 -
docs/PluginCollectionAllOf.md | 12 -
docs/PluginCollectionItem.md | 25 -
docs/PluginCollectionResponse.md | 31 +
docs/PluginImportErrorCollectionResponse.md | 31 +
docs/PluginImportErrorResponse.md | 31 +
docs/PluginResponse.md | 41 +
docs/Pool.md | 22 -
docs/PoolApi.md | 404 +-
docs/PoolBody.md | 33 +
docs/PoolCollection.md | 14 -
docs/PoolCollectionAllOf.md | 12 -
docs/PoolCollectionResponse.md | 31 +
docs/PoolPatchBody.md | 33 +
docs/PoolResponse.md | 39 +
docs/Provider.md | 15 -
docs/ProviderApi.md | 62 +-
docs/ProviderCollection.md | 13 -
docs/ProviderCollectionResponse.md | 31 +
docs/ProviderResponse.md | 32 +
docs/QueuedEvent.md | 14 -
docs/QueuedEventCollection.md | 14 -
docs/QueuedEventCollectionAllOf.md | 12 -
docs/QueuedEventCollectionResponse.md | 31 +
docs/QueuedEventResponse.md | 33 +
docs/RelativeDelta.md | 28 -
docs/ReprocessBehavior.md | 15 +
docs/Resource.md | 13 -
docs/ResponseClearDagRun.md | 48 +
docs/ResponseGetXcomEntry.md | 37 +
docs/Role.md | 14 -
docs/RoleApi.md | 466 -
docs/RoleCollection.md | 14 -
docs/RoleCollectionAllOf.md | 12 -
docs/SLAMiss.md | 18 -
docs/ScheduleInterval.md | 29 -
docs/SchedulerInfoResponse.md | 31 +
docs/SchedulerStatus.md | 14 -
docs/SetDagRunNote.md | 12 -
docs/SetTaskInstanceNote.md | 12 -
docs/StructuredLogMessage.md | 31 +
docs/Tag.md | 13 -
docs/Task.md | 39 -
docs/TaskApi.md | 174 +
docs/TaskCollection.md | 13 -
docs/TaskCollectionResponse.md | 31 +
docs/TaskDependencyCollectionResponse.md | 30 +
docs/TaskDependencyResponse.md | 31 +
docs/TaskExtraLinks.md | 12 -
docs/TaskFailedDependency.md | 13 -
docs/TaskInstance.md | 40 -
docs/TaskInstanceApi.md | 1775 +--
docs/TaskInstanceCollection.md | 14 -
docs/TaskInstanceCollectionAllOf.md | 12 -
docs/TaskInstanceCollectionResponse.md | 31 +
docs/TaskInstanceDependencyCollection.md | 12 -
docs/TaskInstanceHistoryCollectionResponse.md | 31 +
docs/TaskInstanceHistoryResponse.md | 54 +
docs/TaskInstanceReference.md | 15 -
docs/TaskInstanceReferenceCollection.md | 12 -
docs/TaskInstanceResponse.md | 62 +
docs/TaskInstanceState.md | 33 +
docs/TaskInstancesBatchBody.md | 49 +
docs/TaskInstancesLogResponse.md | 31 +
docs/TaskOutletAssetReference.md | 33 +
docs/TaskOutletDatasetReference.md | 16 -
docs/TaskResponse.md | 56 +
docs/TaskState.md | 12 -
docs/TimeDelta.md | 23 +-
docs/Trigger.md | 16 -
docs/TriggerDAGRunPostBody.md | 36 +
docs/TriggerResponse.md | 34 +
docs/TriggerRule.md | 12 -
docs/TriggererInfoResponse.md | 31 +
docs/TriggererStatus.md | 14 -
docs/UpdateDagRunState.md | 13 -
docs/UpdateTaskInstance.md | 13 -
docs/UpdateTaskInstancesState.md | 20 -
docs/UpdateTaskState.md | 12 -
docs/User.md | 24 -
docs/UserAllOf.md | 12 -
docs/UserApi.md | 444 -
docs/UserCollection.md | 14 -
docs/UserCollectionAllOf.md | 12 -
docs/UserCollectionItem.md | 23 -
docs/UserCollectionItemRoles.md | 12 -
docs/ValidationError.md | 31 +
docs/ValidationErrorLocInner.md | 28 +
docs/Value.md | 28 +
docs/Variable.md | 15 -
docs/VariableAllOf.md | 12 -
docs/VariableApi.md | 391 +-
docs/VariableBody.md | 32 +
docs/VariableCollection.md | 14 -
docs/VariableCollectionAllOf.md | 12 -
docs/VariableCollectionItem.md | 14 -
docs/VariableCollectionResponse.md | 31 +
docs/VariableResponse.md | 33 +
docs/VersionApi.md | 73 +
docs/VersionInfo.md | 25 +-
docs/WeightRule.md | 12 -
docs/XCom.md | 19 -
docs/XComAllOf.md | 12 -
docs/XComApi.md | 359 +-
docs/XComCollection.md | 14 -
docs/XComCollectionAllOf.md | 12 -
docs/XComCollectionItem.md | 18 -
docs/XComCollectionResponse.md | 31 +
docs/XComCreateBody.md | 32 +
docs/XComResponse.md | 37 +
docs/XComResponseNative.md | 38 +
docs/XComResponseString.md | 38 +
docs/XComUpdateBody.md | 31 +
pyproject.toml | 8 +-
spec/v1.yaml | 14111 ++++++++++++-------
test/test_action.py | 36 -
test/test_action_collection.py | 42 -
test/test_action_collection_all_of.py | 38 -
test/test_action_resource.py | 40 -
test/test_app_builder_menu_item_response.py | 54 +
test/test_app_builder_view_response.py | 54 +
test/test_asset_alias_collection_response.py | 64 +
test/test_asset_alias_response.py | 56 +
test/test_asset_api.py | 122 +
test/test_asset_collection_response.py | 116 +
test/test_asset_event_collection_response.py | 102 +
test/test_asset_event_response.py | 87 +
test/test_asset_response.py | 104 +
test/test_backfill_api.py | 80 +
test/test_backfill_collection_response.py | 82 +
test/test_backfill_post_body.py | 60 +
test/test_backfill_response.py | 73 +
test/test_base_info_response.py | 51 +
test/test_basic_dag_run.py | 38 -
test/test_bulk_action.py | 33 +
test/test_bulk_action_not_on_existence.py | 33 +
test/test_bulk_action_on_existence.py | 33 +
test/test_bulk_action_response.py | 56 +
test/test_bulk_body_connection_body.py | 56 +
...test_bulk_body_connection_body_actions_inner.py | 60 +
test/test_bulk_body_pool_body.py | 56 +
test/test_bulk_body_pool_body_actions_inner.py | 60 +
test/test_bulk_body_variable_body.py | 56 +
test/test_bulk_body_variable_body_actions_inner.py | 60 +
test/test_bulk_create_action_connection_body.py | 77 +
test/test_bulk_create_action_pool_body.py | 67 +
test/test_bulk_create_action_variable_body.py | 65 +
test/test_bulk_delete_action_connection_body.py | 59 +
test/test_bulk_delete_action_pool_body.py | 59 +
test/test_bulk_delete_action_variable_body.py | 59 +
test/test_bulk_response.py | 71 +
test/test_bulk_update_action_connection_body.py | 77 +
test/test_bulk_update_action_pool_body.py | 67 +
test/test_bulk_update_action_variable_body.py | 65 +
test/test_class_reference.py | 36 -
test/test_clear_dag_run.py | 36 -
test/test_clear_task_instances.py | 36 -
test/test_clear_task_instances_body.py | 64 +
...est_clear_task_instances_body_task_ids_inner.py | 50 +
test/test_collection_info.py | 36 -
test/test_color.py | 36 -
test/test_config.py | 62 +-
test/test_config_api.py | 34 +-
test/test_config_option.py | 46 +-
test/test_config_section.py | 56 +-
test/test_connection.py | 40 -
test/test_connection_all_of.py | 36 -
test/test_connection_api.py | 62 +-
test/test_connection_body.py | 61 +
test/test_connection_collection.py | 42 -
test/test_connection_collection_all_of.py | 38 -
test/test_connection_collection_item.py | 36 -
test/test_connection_collection_response.py | 76 +
test/test_connection_response.py | 61 +
test/test_connection_test.py | 36 -
test/test_connection_test_response.py | 54 +
test/test_content.py | 50 +
test/test_create_asset_events_body.py | 53 +
test/test_create_dataset_event.py | 36 -
test/test_cron_expression.py | 36 -
test/test_dag.py | 40 -
test/test_dag_api.py | 89 +-
test/test_dag_collection.py | 42 -
test/test_dag_collection_all_of.py | 38 -
test/test_dag_collection_response.py | 120 +
test/test_dag_detail.py | 46 -
test/test_dag_detail_all_of.py | 38 -
test/test_dag_details_response.py | 130 +
test/test_dag_parsing_api.py | 38 +
test/test_dag_patch_body.py | 52 +
test/test_dag_processor_info_response.py | 52 +
test/test_dag_processor_status.py | 38 -
test/test_dag_report_api.py | 38 +
test/test_dag_response.py | 99 +
test/test_dag_run.py | 38 -
test/test_dag_run_api.py | 75 +-
test/test_dag_run_asset_reference.py | 62 +
test/test_dag_run_clear_body.py | 52 +
test/test_dag_run_collection.py | 42 -
test/test_dag_run_collection_all_of.py | 38 -
test/test_dag_run_collection_response.py | 114 +
test/test_dag_run_patch_body.py | 52 +
test/test_dag_run_patch_states.py | 33 +
test/test_dag_run_response.py | 96 +
test/test_dag_run_state.py | 33 +
test/test_dag_run_triggered_by_type.py | 33 +
test/test_dag_run_type.py | 33 +
test/test_dag_runs_batch_body.py | 67 +
test/test_dag_schedule_asset_reference.py | 56 +
test/test_dag_schedule_dataset_reference.py | 36 -
test/test_dag_source_api.py | 38 +
test/test_dag_source_response.py | 56 +
test/test_dag_state.py | 36 -
test/test_dag_stats_api.py | 28 +-
test/test_dag_stats_collection_item.py | 38 -
test/test_dag_stats_collection_response.py | 70 +
test/test_dag_stats_collection_schema.py | 42 -
test/test_dag_stats_collection_schema_all_of.py | 38 -
test/test_dag_stats_response.py | 62 +
test/test_dag_stats_state_collection_item.py | 36 -
test/test_dag_stats_state_response.py | 54 +
test/test_dag_tag_collection_response.py | 58 +
test/test_dag_tag_response.py | 54 +
test/test_dag_version_api.py | 45 +
test/test_dag_version_collection_response.py | 74 +
test/test_dag_version_response.py | 63 +
test/test_dag_warning.py | 36 -
test/test_dag_warning_api.py | 30 +-
test/test_dag_warning_collection.py | 42 -
test/test_dag_warning_collection_all_of.py | 38 -
test/test_dag_warning_collection_response.py | 66 +
test/test_dag_warning_response.py | 58 +
test/test_dag_warning_type.py | 33 +
test/test_dataset.py | 40 -
test/test_dataset_api.py | 106 -
test/test_dataset_collection.py | 42 -
test/test_dataset_collection_all_of.py | 38 -
test/test_dataset_event.py | 38 -
test/test_dataset_event_collection.py | 42 -
test/test_dataset_event_collection_all_of.py | 38 -
test/test_detail.py | 50 +
test/test_dry_run_backfill_collection_response.py | 60 +
test/test_dry_run_backfill_response.py | 52 +
test/test_error.py | 36 -
test/test_event_log.py | 36 -
test/test_event_log_api.py | 32 +-
test/test_event_log_collection.py | 42 -
test/test_event_log_collection_all_of.py | 38 -
test/test_event_log_collection_response.py | 82 +
test/test_event_log_response.py | 65 +
test/test_external_log_url_response.py | 52 +
test/test_extra_link.py | 38 -
test/test_extra_link_collection.py | 38 -
test/test_extra_link_collection_response.py | 58 +
test/test_extra_links_api.py | 38 +
test/test_fast_api_app_response.py | 56 +
test/test_fast_api_root_middleware_response.py | 54 +
test/test_health_info.py | 44 -
test/test_health_info_response.py | 69 +
test/test_health_status.py | 36 -
test/test_http_exception_response.py | 52 +
test/test_http_validation_error.py | 58 +
test/test_import_error.py | 36 -
test/test_import_error_api.py | 32 +-
test/test_import_error_collection.py | 42 -
test/test_import_error_collection_all_of.py | 38 -
test/test_import_error_collection_response.py | 68 +
test/test_import_error_response.py | 59 +
test/test_inline_response200.py | 36 -
test/test_inline_response2001.py | 36 -
test/test_job.py | 36 -
test/test_job_api.py | 38 +
test/test_job_collection_response.py | 80 +
test/test_job_response.py | 62 +
test/test_last_asset_event_response.py | 52 +
test/test_list_dag_runs_form.py | 36 -
test/test_list_task_instance_form.py | 38 -
test/test_login_api.py | 45 +
test/test_metadatabase_status.py | 38 -
test/test_monitor_api.py | 38 +
test/test_monitoring_api.py | 43 -
test/test_patch_task_instance_body.py | 56 +
test/test_permission_api.py | 36 -
test/test_plugin_api.py | 35 +-
test/test_plugin_collection.py | 42 -
test/test_plugin_collection_all_of.py | 38 -
test/test_plugin_collection_item.py | 36 -
test/test_plugin_collection_response.py | 146 +
...test_plugin_import_error_collection_response.py | 62 +
test/test_plugin_import_error_response.py | 54 +
test/test_plugin_response.py | 138 +
test/test_pool.py | 36 -
test/test_pool_api.py | 51 +-
test/test_pool_body.py | 56 +
test/test_pool_collection.py | 42 -
test/test_pool_collection_all_of.py | 38 -
test/test_pool_collection_response.py | 78 +
test/test_pool_patch_body.py | 54 +
test/test_pool_response.py | 69 +
test/test_provider.py | 36 -
test/test_provider_api.py | 28 +-
test/test_provider_collection.py | 38 -
test/test_provider_collection_response.py | 64 +
test/test_provider_response.py | 56 +
test/test_queued_event.py | 36 -
test/test_queued_event_collection.py | 42 -
test/test_queued_event_collection_all_of.py | 38 -
test/test_queued_event_collection_response.py | 66 +
test/test_queued_event_response.py | 58 +
test/test_relative_delta.py | 36 -
test/test_reprocess_behavior.py | 33 +
test/test_resource.py | 36 -
test/test_response_clear_dag_run.py | 216 +
test/test_response_get_xcom_entry.py | 67 +
test/test_role.py | 38 -
test/test_role_api.py | 64 -
test/test_role_collection.py | 42 -
test/test_role_collection_all_of.py | 38 -
test/test_schedule_interval.py | 42 -
test/test_scheduler_info_response.py | 52 +
test/test_scheduler_status.py | 38 -
test/test_set_dag_run_note.py | 36 -
test/test_set_task_instance_note.py | 36 -
test/test_sla_miss.py | 36 -
test/test_structured_log_message.py | 53 +
test/test_tag.py | 36 -
test/test_task.py | 50 -
test/test_task_api.py | 45 +
test/test_task_collection.py | 38 -
test/test_task_collection_response.py | 140 +
test/test_task_dependency_collection_response.py | 60 +
test/test_task_dependency_response.py | 54 +
test/test_task_extra_links.py | 38 -
test/test_task_failed_dependency.py | 36 -
test/test_task_instance.py | 44 -
test/test_task_instance_api.py | 129 +-
test/test_task_instance_collection.py | 42 -
test/test_task_instance_collection_all_of.py | 38 -
test/test_task_instance_collection_response.py | 170 +
test/test_task_instance_dependency_collection.py | 38 -
...st_task_instance_history_collection_response.py | 124 +
test/test_task_instance_history_response.py | 94 +
test/test_task_instance_reference.py | 36 -
test/test_task_instance_reference_collection.py | 38 -
test/test_task_instance_response.py | 120 +
test/test_task_instance_state.py | 33 +
test/test_task_instances_batch_body.py | 84 +
test/test_task_instances_log_response.py | 53 +
test/test_task_outlet_asset_reference.py | 58 +
test/test_task_outlet_dataset_reference.py | 36 -
test/test_task_response.py | 97 +
test/test_task_state.py | 36 -
test/test_time_delta.py | 49 +-
test/test_trigger.py | 36 -
test/test_trigger_dag_run_post_body.py | 57 +
test/test_trigger_response.py | 59 +
test/test_trigger_rule.py | 36 -
test/test_triggerer_info_response.py | 52 +
test/test_triggerer_status.py | 38 -
test/test_update_dag_run_state.py | 36 -
test/test_update_task_instance.py | 38 -
test/test_update_task_instances_state.py | 38 -
test/test_update_task_state.py | 36 -
test/test_user.py | 42 -
test/test_user_all_of.py | 36 -
test/test_user_api.py | 64 -
test/test_user_collection.py | 42 -
test/test_user_collection_all_of.py | 38 -
test/test_user_collection_item.py | 38 -
test/test_user_collection_item_roles.py | 36 -
test/test_validation_error.py | 60 +
test/test_validation_error_loc_inner.py | 50 +
test/test_value.py | 50 +
test/test_variable.py | 40 -
test/test_variable_all_of.py | 36 -
test/test_variable_api.py | 53 +-
test/test_variable_body.py | 55 +
test/test_variable_collection.py | 42 -
test/test_variable_collection_all_of.py | 38 -
test/test_variable_collection_item.py | 36 -
test/test_variable_collection_response.py | 66 +
test/test_variable_response.py | 57 +
test/test_version_api.py | 38 +
test/test_version_info.py | 45 +-
test/test_weight_rule.py | 36 -
test/test_x_com.py | 40 -
test/test_x_com_all_of.py | 36 -
test/test_x_com_api.py | 46 +-
test/test_x_com_collection.py | 42 -
test/test_x_com_collection_all_of.py | 38 -
test/test_x_com_collection_item.py | 36 -
test/test_x_com_collection_response.py | 74 +
test/test_x_com_create_body.py | 55 +
test/test_x_com_response.py | 65 +
test/test_x_com_response_native.py | 67 +
test/test_x_com_response_string.py | 66 +
test/test_x_com_update_body.py | 53 +
test_python_client.py | 165 +-
uv.lock | 47 +
version.txt | 2 +-
873 files changed, 77611 insertions(+), 69438 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7d2fcd4..0684071 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: 3.8
+ python-version: 3.9
cache: 'pip'
- name: Install hatch
run: |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6a25402..d44d7d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,58 @@
under the License.
-->
+# v3.0.0
+
+This is the first release of the **Airflow 3.0.0** Python client. It introduces compatibility with the new [Airflow 3.0 REST API](https://airflow.apache.org/docs/apache-airflow/3.0.0/stable-rest-api-ref.html), and includes several **breaking changes** and behavior updates.
+
+Below is a list of important changes. Refer to individual endpoint documentation for full details.
+
+- API v1 (`/api/v1`) has been dropped and replaced with API v2(`/api/v2`).
+
+- **422 Validation Errors (instead of 400)**
+
+ The API now returns `422 Unprocessable Entity` for validation errors (e.g. bad payload, path params, or query params), instead of `400 Bad Request`.
+
+- **Partial response support removed (`fields` parameter)**
+
+ Endpoints like `GET /dags` no longer support the `fields` query param for partial responses. Full objects are returned by default. This feature may return in a future 3.x release.
+
+- Passing list in query parameters switched from ``form, non exploded`` to ``form, exploded`` i.e before ``?my_list=item1,item2`` now ``?my_list=item1&my_list=item2``
+
+- **`execution_date` has been removed**
+
+ The previously deprecated `execution_date` parameter and fields are now fully removed. Use `logical_date` instead.
+
+- **Datetime format updated to RFC3339-compliant**
+
+ Datetimes returned are now in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) format (e.g. `2024-10-01T13:00:00Z`). Both `Z` and `+00:00` forms are accepted in inputs.
+ → This change comes from FastAPI & Pydantic v2 behavior.
+ [More info](https://github.com/fastapi/fastapi/discussions/7693#discussioncomment-5143311)
+
+- PATCH on ``DagRun`` and ``TaskInstance`` are more generic and allow in addition to update the resource state and the note content.
+
+ Therefore, the two legacy dedicated endpoints to update a ``DagRun`` note and ``TaskInstance`` note have been removed.
+
+ Same for the set task instance state, it is now handled by the broader PATCH on task instances.
+
+- ``assets/queuedEvent`` endpoints have moved to ``assets/queuedEvents`` for consistency.
+
+- **`dag_parsing` returns 409 for duplicates**
+
+ If a `DagPriorityParsingRequest` already exists, `POST /dag_parsing` now returns `409 Conflict` instead of `201 Created`.
+
+- **Default value change in `clearTaskInstances`**
+
+ The `reset_dag_runs` field now defaults to `true` instead of `false`.
+
+- **Pool name is no longer editable**
+
+ `PATCH /pools/{pool_name}` can no longer be used to rename a pool. Pool names are immutable via the API.
+
+- **`logical_date` is now a required nullable field**
+
+ When triggering a DAG run (`POST /dags/{dag_id}/dagRuns`), `logical_date` is now required but can explicitly be set to `null`.
+
# v2.10.0
## Major changes:
diff --git a/INSTALL b/INSTALL
index edf1a74..a596d47 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,6 @@
# INSTALL / BUILD instructions for Apache Airflow Python Client
-This ia a generic installation method that requires a number of dependencies to be installed.
+This is a generic installation method that requires a number of dependencies to be installed.
Depending on your system you might need different prerequisites, but the Python3.6 or above is a must.
diff --git a/LICENSE b/LICENSE
index b83a80d..2e3f579 100644
--- a/LICENSE
+++ b/LICENSE
@@ -247,7 +247,6 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
(BSD 3 License) d3 v5.16.0 (https://d3js.org)
(BSD 3 License) d3-shape v2.1.0 (https://github.com/d3/d3-shape)
- (BSD 3 License) cgroupspy 0.2.1 (https://github.com/cloudsigma/cgroupspy)
========================================================================
See licenses/LICENSES-ui.txt for packages used in `/airflow/www`
diff --git a/README.md b/README.md
index ac221dd..0fa2895 100644
--- a/README.md
+++ b/README.md
@@ -182,7 +182,7 @@ If you want to check which auth backend is currently set, you can use
```bash
$ airflow config get-value api auth_backends
-airflow.api.auth.backend.basic_auth
+airflow.providers.fab.auth_manager.api.auth.backend.basic_auth
```
The default is to deny all requests.
@@ -248,7 +248,7 @@ For more information, please visit [https://airflow.apache.org](https://airflow.
## Requirements.
-Python >=3.8
+Python >=3.9
## Installation & Usage
@@ -282,7 +282,7 @@ Please follow the [installation procedure](#installation--usage) and then run th
```python
import time
-from airflow_client import client
+import airflow_client.client
from pprint import pprint
from airflow_client.client.api import config_api
from airflow_client.client.model.config import Config
@@ -343,15 +343,15 @@ Class | Method | HTTP request | Description
*DAGRunApi* | [**get_dag_run**](docs/DAGRunApi.md#get_dag_run) | **GET** /dags/{dag_id}/dagRuns/{dag_run_id} | Get a DAG run
*DAGRunApi* | [**get_dag_runs**](docs/DAGRunApi.md#get_dag_runs) | **GET** /dags/{dag_id}/dagRuns | List DAG runs
*DAGRunApi* | [**get_dag_runs_batch**](docs/DAGRunApi.md#get_dag_runs_batch) | **POST** /dags/~/dagRuns/list | List DAG runs (batch)
-*DAGRunApi* | [**get_upstream_dataset_events**](docs/DAGRunApi.md#get_upstream_dataset_events) | **GET** /dags/{dag_id}/dagRuns/{dag_run_id}/upstreamDatasetEvents | Get dataset events for a DAG run
+*DAGRunApi* | [**get_upstream_asset_events**](docs/DAGRunApi.md#get_upstream_asset_events) | **GET** /dags/{dag_id}/dagRuns/{dag_run_id}/upstreamAssetEvents | Get asset events for a DAG run
*DAGRunApi* | [**post_dag_run**](docs/DAGRunApi.md#post_dag_run) | **POST** /dags/{dag_id}/dagRuns | Trigger a new DAG run
*DAGRunApi* | [**set_dag_run_note**](docs/DAGRunApi.md#set_dag_run_note) | **PATCH** /dags/{dag_id}/dagRuns/{dag_run_id}/setNote | Update the DagRun note.
*DAGRunApi* | [**update_dag_run_state**](docs/DAGRunApi.md#update_dag_run_state) | **PATCH** /dags/{dag_id}/dagRuns/{dag_run_id} | Modify a DAG run
*DagWarningApi* | [**get_dag_warnings**](docs/DagWarningApi.md#get_dag_warnings) | **GET** /dagWarnings | List dag warnings
-*DatasetApi* | [**get_dataset**](docs/DatasetApi.md#get_dataset) | **GET** /datasets/{uri} | Get a dataset
-*DatasetApi* | [**get_dataset_events**](docs/DatasetApi.md#get_dataset_events) | **GET** /datasets/events | Get dataset events
-*DatasetApi* | [**get_datasets**](docs/DatasetApi.md#get_datasets) | **GET** /datasets | List datasets
-*DatasetApi* | [**get_upstream_dataset_events**](docs/DatasetApi.md#get_upstream_dataset_events) | **GET** /dags/{dag_id}/dagRuns/{dag_run_id}/upstreamDatasetEvents | Get dataset events for a DAG run
+*AssetApi* | [**get_asset**](docs/DatasetApi.md#get_asset) | **GET** /assets/{uri} | Get an asset
+*AssetApi* | [**get_asset_events**](docs/DatasetApi.md#get_asset_events) | **GET** /assets/events | Get asset events
+*DatasetApi* | [**get_assets**](docs/DatasetApi.md#get_assets) | **GET** /assets | List assets
+*DatasetApi* | [**get_upstream_asset_events**](docs/DatasetApi.md#get_upstream_asset_events) | **GET** /dags/{dag_id}/dagRuns/{dag_run_id}/upstreamAssetEvents | Get dataset events for a DAG run
*EventLogApi* | [**get_event_log**](docs/EventLogApi.md#get_event_log) | **GET** /eventLogs/{event_log_id} | Get a log entry
*EventLogApi* | [**get_event_logs**](docs/EventLogApi.md#get_event_logs) | **GET** /eventLogs | List log entries
*ImportErrorApi* | [**get_import_error**](docs/ImportErrorApi.md#get_import_error) | **GET** /importErrors/{import_error_id} | Get an import error
@@ -402,6 +402,11 @@ Class | Method | HTTP request | Description
- [ActionCollection](docs/ActionCollection.md)
- [ActionCollectionAllOf](docs/ActionCollectionAllOf.md)
- [ActionResource](docs/ActionResource.md)
+ - [AssetCollection](docs/AssetCollection.md)
+ - [AssetCollectionAllOf](docs/AssetCollectionAllOf.md)
+ - [AssetEvent](docs/AssetEvent.md)
+ - [AssetEventCollection](docs/AssetEventCollection.md)
+ - [AssetEventCollectionAllOf](docs/AssetEventCollectionAllOf.md)
- [BasicDAGRun](docs/BasicDAGRun.md)
- [ClassReference](docs/ClassReference.md)
- [ClearDagRun](docs/ClearDagRun.md)
@@ -426,17 +431,12 @@ Class | Method | HTTP request | Description
- [DAGRun](docs/DAGRun.md)
- [DAGRunCollection](docs/DAGRunCollection.md)
- [DAGRunCollectionAllOf](docs/DAGRunCollectionAllOf.md)
- - [DagScheduleDatasetReference](docs/DagScheduleDatasetReference.md)
+ - [DagScheduleAssetReference](docs/DagScheduleAssetReference.md)
- [DagState](docs/DagState.md)
- [DagWarning](docs/DagWarning.md)
- [DagWarningCollection](docs/DagWarningCollection.md)
- [DagWarningCollectionAllOf](docs/DagWarningCollectionAllOf.md)
- [Dataset](docs/Dataset.md)
- - [DatasetCollection](docs/DatasetCollection.md)
- - [DatasetCollectionAllOf](docs/DatasetCollectionAllOf.md)
- - [DatasetEvent](docs/DatasetEvent.md)
- - [DatasetEventCollection](docs/DatasetEventCollection.md)
- - [DatasetEventCollectionAllOf](docs/DatasetEventCollectionAllOf.md)
- [Error](docs/Error.md)
- [EventLog](docs/EventLog.md)
- [EventLogCollection](docs/EventLogCollection.md)
@@ -481,7 +481,7 @@ Class | Method | HTTP request | Description
- [TaskInstanceCollectionAllOf](docs/TaskInstanceCollectionAllOf.md)
- [TaskInstanceReference](docs/TaskInstanceReference.md)
- [TaskInstanceReferenceCollection](docs/TaskInstanceReferenceCollection.md)
- - [TaskOutletDatasetReference](docs/TaskOutletDatasetReference.md)
+ - [TaskOutletAssetReference](docs/TaskOutletAssetReference.md)
- [TaskState](docs/TaskState.md)
- [TimeDelta](docs/TimeDelta.md)
- [Trigger](docs/Trigger.md)
@@ -534,11 +534,11 @@ that uses the API to run the tests. To do that, you need to:
```ini
[api]
-auth_backend = airflow.api.auth.backend.session,airflow.api.auth.backend.basic_auth
+auth_backend = airflow.providers.fab.auth_manager.api.auth.backend.session,airflow.providers.fab.auth_manager.api.auth.backend.basic_auth
```
You can also set it by env variable:
-`export AIRFLOW__API__AUTH_BACKENDS=airflow.api.auth.backend.session,airflow.api.auth.backend.basic_auth`
+`export AIRFLOW__API__AUTH_BACKENDS=airflow.providers.fab.auth_manager.api.auth.backend.session,airflow.providers.fab.auth_manager.api.auth.backend.basic_auth`
* configure your airflow webserver to load example dags
In the `[core]` section of your `airflow.cfg` set:
@@ -555,11 +555,11 @@ You can also set it by env variable: `export AIRFLOW__CORE__LOAD_EXAMPLES=True`
In the `[webserver]` section of your `airflow.cfg` set:
```ini
-[webserver]
+[api]
expose_config = True
```
-You can also set it by env variable: `export AIRFLOW__WEBSERVER__EXPOSE_CONFIG=True`
+You can also set it by env variable: `export AIRFLOW__API__EXPOSE_CONFIG=True`
* Configure your host/ip/user/password in the `test_python_client.py` file
diff --git a/airflow_client/client/__init__.py b/airflow_client/client/__init__.py
index 6d4e9db..60bb94a 100644
--- a/airflow_client/client/__init__.py
+++ b/airflow_client/client/__init__.py
@@ -1,28 +1,192 @@
+# coding: utf-8
+
# flake8: noqa
"""
- Airflow API (Stable)
+ Airflow API
- # Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means that you must usually add the following headers to your request: ``` Content-type: application/json Accept: application/json ``` ## Resources The term `resource` refers to a single type of object in th [...]
+ 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.
- The version of the OpenAPI document: 2.10.0
- Contact: dev@airflow.apache.org
- Generated by: https://openapi-generator.tech
-"""
+ The version of the OpenAPI document: 2
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
+
+ Do not edit the class manually.
+""" # noqa: E501
-__version__ = ""2.10.0""
+__version__ = ""3.0.0""
+
+# import apis into sdk package
+from airflow_client.client.api.asset_api import AssetApi
+from airflow_client.client.api.backfill_api import BackfillApi
+from airflow_client.client.api.config_api import ConfigApi
+from airflow_client.client.api.connection_api import ConnectionApi
+from airflow_client.client.api.dag_api import DAGApi
+from airflow_client.client.api.dag_parsing_api import DAGParsingApi
+from airflow_client.client.api.dag_report_api import DagReportApi
+from airflow_client.client.api.dag_run_api import DagRunApi
+from airflow_client.client.api.dag_source_api import DagSourceApi
+from airflow_client.client.api.dag_stats_api import DagStatsApi
+from airflow_client.client.api.dag_version_api import DagVersionApi
+from airflow_client.client.api.dag_warning_api import DagWarningApi
+from airflow_client.client.api.event_log_api import EventLogApi
+from airflow_client.client.api.extra_links_api import ExtraLinksApi
+from airflow_client.client.api.import_error_api import ImportErrorApi
+from airflow_client.client.api.job_api import JobApi
+from airflow_client.client.api.login_api import LoginApi
+from airflow_client.client.api.monitor_api import MonitorApi
+from airflow_client.client.api.plugin_api import PluginApi
+from airflow_client.client.api.pool_api import PoolApi
+from airflow_client.client.api.provider_api import ProviderApi
+from airflow_client.client.api.task_api import TaskApi
+from airflow_client.client.api.task_instance_api import TaskInstanceApi
+from airflow_client.client.api.variable_api import VariableApi
+from airflow_client.client.api.version_api import VersionApi
+from airflow_client.client.api.x_com_api import XComApi
# import ApiClient
+from airflow_client.client.api_response import ApiResponse
from airflow_client.client.api_client import ApiClient
-
-# import Configuration
from airflow_client.client.configuration import Configuration
-
-# import exceptions
from airflow_client.client.exceptions import OpenApiException
-from airflow_client.client.exceptions import ApiAttributeError
from airflow_client.client.exceptions import ApiTypeError
from airflow_client.client.exceptions import ApiValueError
from airflow_client.client.exceptions import ApiKeyError
+from airflow_client.client.exceptions import ApiAttributeError
from airflow_client.client.exceptions import ApiException
+
+# import models into sdk package
+from airflow_client.client.models.app_builder_menu_item_response import AppBuilderMenuItemResponse
+from airflow_client.client.models.app_builder_view_response import AppBuilderViewResponse
+from airflow_client.client.models.asset_alias_collection_response import AssetAliasCollectionResponse
+from airflow_client.client.models.asset_alias_response import AssetAliasResponse
+from airflow_client.client.models.asset_collection_response import AssetCollectionResponse
+from airflow_client.client.models.asset_event_collection_response import AssetEventCollectionResponse
+from airflow_client.client.models.asset_event_response import AssetEventResponse
+from airflow_client.client.models.asset_response import AssetResponse
+from airflow_client.client.models.backfill_collection_response import BackfillCollectionResponse
+from airflow_client.client.models.backfill_post_body import BackfillPostBody
+from airflow_client.client.models.backfill_response import BackfillResponse
+from airflow_client.client.models.base_info_response import BaseInfoResponse
+from airflow_client.client.models.bulk_action import BulkAction
+from airflow_client.client.models.bulk_action_not_on_existence import BulkActionNotOnExistence
+from airflow_client.client.models.bulk_action_on_existence import BulkActionOnExistence
+from airflow_client.client.models.bulk_action_response import BulkActionResponse
+from airflow_client.client.models.bulk_body_connection_body import BulkBodyConnectionBody
+from airflow_client.client.models.bulk_body_connection_body_actions_inner import BulkBodyConnectionBodyActionsInner
+from airflow_client.client.models.bulk_body_pool_body import BulkBodyPoolBody
+from airflow_client.client.models.bulk_body_pool_body_actions_inner import BulkBodyPoolBodyActionsInner
+from airflow_client.client.models.bulk_body_variable_body import BulkBodyVariableBody
+from airflow_client.client.models.bulk_body_variable_body_actions_inner import BulkBodyVariableBodyActionsInner
+from airflow_client.client.models.bulk_create_action_connection_body import BulkCreateActionConnectionBody
+from airflow_client.client.models.bulk_create_action_pool_body import BulkCreateActionPoolBody
+from airflow_client.client.models.bulk_create_action_variable_body import BulkCreateActionVariableBody
+from airflow_client.client.models.bulk_delete_action_connection_body import BulkDeleteActionConnectionBody
+from airflow_client.client.models.bulk_delete_action_pool_body import BulkDeleteActionPoolBody
+from airflow_client.client.models.bulk_delete_action_variable_body import BulkDeleteActionVariableBody
+from airflow_client.client.models.bulk_response import BulkResponse
+from airflow_client.client.models.bulk_update_action_connection_body import BulkUpdateActionConnectionBody
+from airflow_client.client.models.bulk_update_action_pool_body import BulkUpdateActionPoolBody
+from airflow_client.client.models.bulk_update_action_variable_body import BulkUpdateActionVariableBody
+from airflow_client.client.models.clear_task_instances_body import ClearTaskInstancesBody
+from airflow_client.client.models.clear_task_instances_body_task_ids_inner import ClearTaskInstancesBodyTaskIdsInner
+from airflow_client.client.models.config import Config
+from airflow_client.client.models.config_option import ConfigOption
+from airflow_client.client.models.config_section import ConfigSection
+from airflow_client.client.models.connection_body import ConnectionBody
+from airflow_client.client.models.connection_collection_response import ConnectionCollectionResponse
+from airflow_client.client.models.connection_response import ConnectionResponse
+from airflow_client.client.models.connection_test_response import ConnectionTestResponse
+from airflow_client.client.models.content import Content
+from airflow_client.client.models.create_asset_events_body import CreateAssetEventsBody
+from airflow_client.client.models.dag_collection_response import DAGCollectionResponse
+from airflow_client.client.models.dag_details_response import DAGDetailsResponse
+from airflow_client.client.models.dag_patch_body import DAGPatchBody
+from airflow_client.client.models.dag_response import DAGResponse
+from airflow_client.client.models.dag_run_clear_body import DAGRunClearBody
+from airflow_client.client.models.dag_run_collection_response import DAGRunCollectionResponse
+from airflow_client.client.models.dag_run_patch_body import DAGRunPatchBody
+from airflow_client.client.models.dag_run_patch_states import DAGRunPatchStates
+from airflow_client.client.models.dag_run_response import DAGRunResponse
+from airflow_client.client.models.dag_runs_batch_body import DAGRunsBatchBody
+from airflow_client.client.models.dag_source_response import DAGSourceResponse
+from airflow_client.client.models.dag_tag_collection_response import DAGTagCollectionResponse
+from airflow_client.client.models.dag_version_collection_response import DAGVersionCollectionResponse
+from airflow_client.client.models.dag_warning_collection_response import DAGWarningCollectionResponse
+from airflow_client.client.models.dag_warning_response import DAGWarningResponse
+from airflow_client.client.models.dag_processor_info_response import DagProcessorInfoResponse
+from airflow_client.client.models.dag_run_asset_reference import DagRunAssetReference
+from airflow_client.client.models.dag_run_state import DagRunState
+from airflow_client.client.models.dag_run_triggered_by_type import DagRunTriggeredByType
+from airflow_client.client.models.dag_run_type import DagRunType
+from airflow_client.client.models.dag_schedule_asset_reference import DagScheduleAssetReference
+from airflow_client.client.models.dag_stats_collection_response import DagStatsCollectionResponse
+from airflow_client.client.models.dag_stats_response import DagStatsResponse
+from airflow_client.client.models.dag_stats_state_response import DagStatsStateResponse
+from airflow_client.client.models.dag_tag_response import DagTagResponse
+from airflow_client.client.models.dag_version_response import DagVersionResponse
+from airflow_client.client.models.dag_warning_type import DagWarningType
+from airflow_client.client.models.detail import Detail
+from airflow_client.client.models.dry_run_backfill_collection_response import DryRunBackfillCollectionResponse
+from airflow_client.client.models.dry_run_backfill_response import DryRunBackfillResponse
+from airflow_client.client.models.event_log_collection_response import EventLogCollectionResponse
+from airflow_client.client.models.event_log_response import EventLogResponse
+from airflow_client.client.models.external_log_url_response import ExternalLogUrlResponse
+from airflow_client.client.models.extra_link_collection_response import ExtraLinkCollectionResponse
+from airflow_client.client.models.fast_api_app_response import FastAPIAppResponse
+from airflow_client.client.models.fast_api_root_middleware_response import FastAPIRootMiddlewareResponse
+from airflow_client.client.models.http_exception_response import HTTPExceptionResponse
+from airflow_client.client.models.http_validation_error import HTTPValidationError
+from airflow_client.client.models.health_info_response import HealthInfoResponse
+from airflow_client.client.models.import_error_collection_response import ImportErrorCollectionResponse
+from airflow_client.client.models.import_error_response import ImportErrorResponse
+from airflow_client.client.models.job_collection_response import JobCollectionResponse
+from airflow_client.client.models.job_response import JobResponse
+from airflow_client.client.models.last_asset_event_response import LastAssetEventResponse
+from airflow_client.client.models.patch_task_instance_body import PatchTaskInstanceBody
+from airflow_client.client.models.plugin_collection_response import PluginCollectionResponse
+from airflow_client.client.models.plugin_import_error_collection_response import PluginImportErrorCollectionResponse
+from airflow_client.client.models.plugin_import_error_response import PluginImportErrorResponse
+from airflow_client.client.models.plugin_response import PluginResponse
+from airflow_client.client.models.pool_body import PoolBody
+from airflow_client.client.models.pool_collection_response import PoolCollectionResponse
+from airflow_client.client.models.pool_patch_body import PoolPatchBody
+from airflow_client.client.models.pool_response import PoolResponse
+from airflow_client.client.models.provider_collection_response import ProviderCollectionResponse
+from airflow_client.client.models.provider_response import ProviderResponse
+from airflow_client.client.models.queued_event_collection_response import QueuedEventCollectionResponse
+from airflow_client.client.models.queued_event_response import QueuedEventResponse
+from airflow_client.client.models.reprocess_behavior import ReprocessBehavior
+from airflow_client.client.models.response_clear_dag_run import ResponseClearDagRun
+from airflow_client.client.models.response_get_xcom_entry import ResponseGetXcomEntry
+from airflow_client.client.models.scheduler_info_response import SchedulerInfoResponse
+from airflow_client.client.models.structured_log_message import StructuredLogMessage
+from airflow_client.client.models.task_collection_response import TaskCollectionResponse
+from airflow_client.client.models.task_dependency_collection_response import TaskDependencyCollectionResponse
+from airflow_client.client.models.task_dependency_response import TaskDependencyResponse
+from airflow_client.client.models.task_instance_collection_response import TaskInstanceCollectionResponse
+from airflow_client.client.models.task_instance_history_collection_response import TaskInstanceHistoryCollectionResponse
+from airflow_client.client.models.task_instance_history_response import TaskInstanceHistoryResponse
+from airflow_client.client.models.task_instance_response import TaskInstanceResponse
+from airflow_client.client.models.task_instance_state import TaskInstanceState
+from airflow_client.client.models.task_instances_batch_body import TaskInstancesBatchBody
+from airflow_client.client.models.task_instances_log_response import TaskInstancesLogResponse
+from airflow_client.client.models.task_outlet_asset_reference import TaskOutletAssetReference
+from airflow_client.client.models.task_response import TaskResponse
+from airflow_client.client.models.time_delta import TimeDelta
+from airflow_client.client.models.trigger_dag_run_post_body import TriggerDAGRunPostBody
+from airflow_client.client.models.trigger_response import TriggerResponse
+from airflow_client.client.models.triggerer_info_response import TriggererInfoResponse
+from airflow_client.client.models.validation_error import ValidationError
+from airflow_client.client.models.validation_error_loc_inner import ValidationErrorLocInner
+from airflow_client.client.models.value import Value
+from airflow_client.client.models.variable_body import VariableBody
+from airflow_client.client.models.variable_collection_response import VariableCollectionResponse
+from airflow_client.client.models.variable_response import VariableResponse
+from airflow_client.client.models.version_info import VersionInfo
+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 import XComResponse
+from airflow_client.client.models.x_com_response_native import XComResponseNative
+from airflow_client.client.models.x_com_response_string import XComResponseString
+from airflow_client.client.models.x_com_update_body import XComUpdateBody
diff --git a/airflow_client/client/api/__init__.py b/airflow_client/client/api/__init__.py
index 10c6e18..b776754 100644
--- a/airflow_client/client/api/__init__.py
+++ b/airflow_client/client/api/__init__.py
@@ -1,3 +1,30 @@
-# do not import all apis into this module because that uses a lot of memory and stack frames
-# if you need the ability to import all apis from one package, import them with
-# from airflow_client.client.apis import ConfigApi
+# flake8: noqa
+
+# import apis into api package
+from airflow_client.client.api.asset_api import AssetApi
+from airflow_client.client.api.backfill_api import BackfillApi
+from airflow_client.client.api.config_api import ConfigApi
+from airflow_client.client.api.connection_api import ConnectionApi
+from airflow_client.client.api.dag_api import DAGApi
+from airflow_client.client.api.dag_parsing_api import DAGParsingApi
+from airflow_client.client.api.dag_report_api import DagReportApi
+from airflow_client.client.api.dag_run_api import DagRunApi
+from airflow_client.client.api.dag_source_api import DagSourceApi
+from airflow_client.client.api.dag_stats_api import DagStatsApi
+from airflow_client.client.api.dag_version_api import DagVersionApi
+from airflow_client.client.api.dag_warning_api import DagWarningApi
+from airflow_client.client.api.event_log_api import EventLogApi
+from airflow_client.client.api.extra_links_api import ExtraLinksApi
+from airflow_client.client.api.import_error_api import ImportErrorApi
+from airflow_client.client.api.job_api import JobApi
+from airflow_client.client.api.login_api import LoginApi
+from airflow_client.client.api.monitor_api import MonitorApi
+from airflow_client.client.api.plugin_api import PluginApi
+from airflow_client.client.api.pool_api import PoolApi
+from airflow_client.client.api.provider_api import ProviderApi
+from airflow_client.client.api.task_api import TaskApi
+from airflow_client.client.api.task_instance_api import TaskInstanceApi
+from airflow_client.client.api.variable_api import VariableApi
+from airflow_client.client.api.version_api import VersionApi
+from airflow_client.client.api.x_com_api import XComApi
+
diff --git a/airflow_client/client/api/asset_api.py b/airflow_client/client/api/asset_api.py
new file mode 100644
index 0000000..680b730
--- /dev/null
+++ b/airflow_client/client/api/asset_api.py
@@ -0,0 +1,4079 @@
+# coding: utf-8
+
+"""
+ 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.
+
+ 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 Any, List, Optional
+from typing_extensions import Annotated
+from airflow_client.client.models.asset_alias_collection_response import AssetAliasCollectionResponse
+from airflow_client.client.models.asset_collection_response import AssetCollectionResponse
+from airflow_client.client.models.asset_event_collection_response import AssetEventCollectionResponse
+from airflow_client.client.models.asset_event_response import AssetEventResponse
+from airflow_client.client.models.asset_response import AssetResponse
+from airflow_client.client.models.create_asset_events_body import CreateAssetEventsBody
+from airflow_client.client.models.dag_run_response import DAGRunResponse
+from airflow_client.client.models.queued_event_collection_response import QueuedEventCollectionResponse
+from airflow_client.client.models.queued_event_response import QueuedEventResponse
+
+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 AssetApi:
+ """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_asset_event(
+ self,
+ create_asset_events_body: CreateAssetEventsBody,
+ _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,
+ ) -> AssetEventResponse:
+ """Create Asset Event
+
+ Create asset events.
+
+ :param create_asset_events_body: (required)
+ :type create_asset_events_body: CreateAssetEventsBody
+ :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_asset_event_serialize(
+ create_asset_events_body=create_asset_events_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AssetEventResponse",
+ '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 create_asset_event_with_http_info(
+ self,
+ create_asset_events_body: CreateAssetEventsBody,
+ _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[AssetEventResponse]:
+ """Create Asset Event
+
+ Create asset events.
+
+ :param create_asset_events_body: (required)
+ :type create_asset_events_body: CreateAssetEventsBody
+ :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_asset_event_serialize(
+ create_asset_events_body=create_asset_events_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AssetEventResponse",
+ '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 create_asset_event_without_preload_content(
+ self,
+ create_asset_events_body: CreateAssetEventsBody,
+ _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 Asset Event
+
+ Create asset events.
+
+ :param create_asset_events_body: (required)
+ :type create_asset_events_body: CreateAssetEventsBody
+ :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_asset_event_serialize(
+ create_asset_events_body=create_asset_events_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AssetEventResponse",
+ '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 _create_asset_event_serialize(
+ self,
+ create_asset_events_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
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if create_asset_events_body is not None:
+ _body_params = create_asset_events_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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/api/v2/assets/events',
+ 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_asset_queued_events(
+ self,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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 Asset Queued Events
+
+ Delete queued asset events for an asset.
+
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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._delete_asset_queued_events_serialize(
+ asset_id=asset_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '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_asset_queued_events_with_http_info(
+ self,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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 Asset Queued Events
+
+ Delete queued asset events for an asset.
+
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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._delete_asset_queued_events_serialize(
+ asset_id=asset_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '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_asset_queued_events_without_preload_content(
+ self,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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 Asset Queued Events
+
+ Delete queued asset events for an asset.
+
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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._delete_asset_queued_events_serialize(
+ asset_id=asset_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '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_asset_queued_events_serialize(
+ self,
+ asset_id,
+ before,
+ _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 asset_id is not None:
+ _path_params['asset_id'] = asset_id
+ # process the query parameters
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/api/v2/assets/{asset_id}/queuedEvents',
+ 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_dag_asset_queued_event(
+ self,
+ dag_id: StrictStr,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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 Dag Asset Queued Event
+
+ Delete a queued asset event for a DAG.
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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._delete_dag_asset_queued_event_serialize(
+ dag_id=dag_id,
+ asset_id=asset_id,
+ before=before,
+ _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_dag_asset_queued_event_with_http_info(
+ self,
+ dag_id: StrictStr,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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 Dag Asset Queued Event
+
+ Delete a queued asset event for a DAG.
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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._delete_dag_asset_queued_event_serialize(
+ dag_id=dag_id,
+ asset_id=asset_id,
+ before=before,
+ _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_dag_asset_queued_event_without_preload_content(
+ self,
+ dag_id: StrictStr,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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 Dag Asset Queued Event
+
+ Delete a queued asset event for a DAG.
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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._delete_dag_asset_queued_event_serialize(
+ dag_id=dag_id,
+ asset_id=asset_id,
+ before=before,
+ _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_dag_asset_queued_event_serialize(
+ self,
+ dag_id,
+ asset_id,
+ before,
+ _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 asset_id is not None:
+ _path_params['asset_id'] = asset_id
+ # process the query parameters
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/api/v2/dags/{dag_id}/assets/{asset_id}/queuedEvents',
+ 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_dag_asset_queued_events(
+ self,
+ dag_id: StrictStr,
+ before: Optional[StrictStr] = 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 Dag Asset Queued Events
+
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param before:
+ :type before: 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._delete_dag_asset_queued_events_serialize(
+ dag_id=dag_id,
+ before=before,
+ _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_dag_asset_queued_events_with_http_info(
+ self,
+ dag_id: StrictStr,
+ before: Optional[StrictStr] = 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 Dag Asset Queued Events
+
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param before:
+ :type before: 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._delete_dag_asset_queued_events_serialize(
+ dag_id=dag_id,
+ before=before,
+ _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_dag_asset_queued_events_without_preload_content(
+ self,
+ dag_id: StrictStr,
+ before: Optional[StrictStr] = 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 Dag Asset Queued Events
+
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param before:
+ :type before: 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._delete_dag_asset_queued_events_serialize(
+ dag_id=dag_id,
+ before=before,
+ _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_dag_asset_queued_events_serialize(
+ self,
+ dag_id,
+ before,
+ _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
+ # process the query parameters
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/api/v2/dags/{dag_id}/assets/queuedEvents',
+ 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_asset(
+ self,
+ asset_id: StrictInt,
+ _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,
+ ) -> AssetResponse:
+ """Get Asset
+
+ Get an asset.
+
+ :param asset_id: (required)
+ :type asset_id: 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._get_asset_serialize(
+ asset_id=asset_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AssetResponse",
+ '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_asset_with_http_info(
+ self,
+ asset_id: StrictInt,
+ _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[AssetResponse]:
+ """Get Asset
+
+ Get an asset.
+
+ :param asset_id: (required)
+ :type asset_id: 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._get_asset_serialize(
+ asset_id=asset_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AssetResponse",
+ '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_asset_without_preload_content(
+ self,
+ asset_id: StrictInt,
+ _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 Asset
+
+ Get an asset.
+
+ :param asset_id: (required)
+ :type asset_id: 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._get_asset_serialize(
+ asset_id=asset_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AssetResponse",
+ '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_asset_serialize(
+ self,
+ asset_id,
+ _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 asset_id is not None:
+ _path_params['asset_id'] = asset_id
+ # process the query parameters
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/assets/{asset_id}',
+ 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_asset_alias(
+ self,
+ asset_alias_id: StrictInt,
+ _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,
+ ) -> object:
+ """Get Asset Alias
+
+ Get an asset alias.
+
+ :param asset_alias_id: (required)
+ :type asset_alias_id: 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._get_asset_alias_serialize(
+ asset_alias_id=asset_alias_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "object",
+ '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_asset_alias_with_http_info(
+ self,
+ asset_alias_id: StrictInt,
+ _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[object]:
+ """Get Asset Alias
+
+ Get an asset alias.
+
+ :param asset_alias_id: (required)
+ :type asset_alias_id: 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._get_asset_alias_serialize(
+ asset_alias_id=asset_alias_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "object",
+ '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_asset_alias_without_preload_content(
+ self,
+ asset_alias_id: StrictInt,
+ _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 Asset Alias
+
+ Get an asset alias.
+
+ :param asset_alias_id: (required)
+ :type asset_alias_id: 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._get_asset_alias_serialize(
+ asset_alias_id=asset_alias_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "object",
+ '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_asset_alias_serialize(
+ self,
+ asset_alias_id,
+ _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 asset_alias_id is not None:
+ _path_params['asset_alias_id'] = asset_alias_id
+ # process the query parameters
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/assets/aliases/{asset_alias_id}',
+ 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_asset_aliases(
+ self,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ name_pattern: Annotated[Optional[StrictStr], Field(description="SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.")] = None,
+ order_by: Optional[StrictStr] = 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,
+ ) -> AssetAliasCollectionResponse:
+ """Get Asset Aliases
+
+ Get asset aliases.
+
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param name_pattern: SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.
+ :type name_pattern: str
+ :param order_by:
+ :type order_by: 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_asset_aliases_serialize(
+ limit=limit,
+ offset=offset,
+ name_pattern=name_pattern,
+ 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': "AssetAliasCollectionResponse",
+ '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_asset_aliases_with_http_info(
+ self,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ name_pattern: Annotated[Optional[StrictStr], Field(description="SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.")] = None,
+ order_by: Optional[StrictStr] = 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[AssetAliasCollectionResponse]:
+ """Get Asset Aliases
+
+ Get asset aliases.
+
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param name_pattern: SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.
+ :type name_pattern: str
+ :param order_by:
+ :type order_by: 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_asset_aliases_serialize(
+ limit=limit,
+ offset=offset,
+ name_pattern=name_pattern,
+ 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': "AssetAliasCollectionResponse",
+ '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_asset_aliases_without_preload_content(
+ self,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ name_pattern: Annotated[Optional[StrictStr], Field(description="SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.")] = None,
+ order_by: Optional[StrictStr] = 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 Asset Aliases
+
+ Get asset aliases.
+
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param name_pattern: SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.
+ :type name_pattern: str
+ :param order_by:
+ :type order_by: 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_asset_aliases_serialize(
+ limit=limit,
+ offset=offset,
+ name_pattern=name_pattern,
+ 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': "AssetAliasCollectionResponse",
+ '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_asset_aliases_serialize(
+ self,
+ limit,
+ offset,
+ name_pattern,
+ order_by,
+ _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
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if offset is not None:
+
+ _query_params.append(('offset', offset))
+
+ if name_pattern is not None:
+
+ _query_params.append(('name_pattern', name_pattern))
+
+ 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/assets/aliases',
+ 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_asset_events(
+ self,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ order_by: Optional[StrictStr] = None,
+ asset_id: Optional[StrictInt] = None,
+ source_dag_id: Optional[StrictStr] = None,
+ source_task_id: Optional[StrictStr] = None,
+ source_run_id: Optional[StrictStr] = None,
+ source_map_index: Optional[StrictInt] = None,
+ timestamp_gte: Optional[datetime] = None,
+ timestamp_lte: Optional[datetime] = 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,
+ ) -> AssetEventCollectionResponse:
+ """Get Asset Events
+
+ Get asset events.
+
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param order_by:
+ :type order_by: str
+ :param asset_id:
+ :type asset_id: int
+ :param source_dag_id:
+ :type source_dag_id: str
+ :param source_task_id:
+ :type source_task_id: str
+ :param source_run_id:
+ :type source_run_id: str
+ :param source_map_index:
+ :type source_map_index: int
+ :param timestamp_gte:
+ :type timestamp_gte: datetime
+ :param timestamp_lte:
+ :type timestamp_lte: datetime
+ :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_asset_events_serialize(
+ limit=limit,
+ offset=offset,
+ order_by=order_by,
+ asset_id=asset_id,
+ source_dag_id=source_dag_id,
+ source_task_id=source_task_id,
+ source_run_id=source_run_id,
+ source_map_index=source_map_index,
+ timestamp_gte=timestamp_gte,
+ timestamp_lte=timestamp_lte,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AssetEventCollectionResponse",
+ '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_asset_events_with_http_info(
+ self,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ order_by: Optional[StrictStr] = None,
+ asset_id: Optional[StrictInt] = None,
+ source_dag_id: Optional[StrictStr] = None,
+ source_task_id: Optional[StrictStr] = None,
+ source_run_id: Optional[StrictStr] = None,
+ source_map_index: Optional[StrictInt] = None,
+ timestamp_gte: Optional[datetime] = None,
+ timestamp_lte: Optional[datetime] = 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[AssetEventCollectionResponse]:
+ """Get Asset Events
+
+ Get asset events.
+
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param order_by:
+ :type order_by: str
+ :param asset_id:
+ :type asset_id: int
+ :param source_dag_id:
+ :type source_dag_id: str
+ :param source_task_id:
+ :type source_task_id: str
+ :param source_run_id:
+ :type source_run_id: str
+ :param source_map_index:
+ :type source_map_index: int
+ :param timestamp_gte:
+ :type timestamp_gte: datetime
+ :param timestamp_lte:
+ :type timestamp_lte: datetime
+ :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_asset_events_serialize(
+ limit=limit,
+ offset=offset,
+ order_by=order_by,
+ asset_id=asset_id,
+ source_dag_id=source_dag_id,
+ source_task_id=source_task_id,
+ source_run_id=source_run_id,
+ source_map_index=source_map_index,
+ timestamp_gte=timestamp_gte,
+ timestamp_lte=timestamp_lte,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AssetEventCollectionResponse",
+ '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_asset_events_without_preload_content(
+ self,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ order_by: Optional[StrictStr] = None,
+ asset_id: Optional[StrictInt] = None,
+ source_dag_id: Optional[StrictStr] = None,
+ source_task_id: Optional[StrictStr] = None,
+ source_run_id: Optional[StrictStr] = None,
+ source_map_index: Optional[StrictInt] = None,
+ timestamp_gte: Optional[datetime] = None,
+ timestamp_lte: Optional[datetime] = 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 Asset Events
+
+ Get asset events.
+
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param order_by:
+ :type order_by: str
+ :param asset_id:
+ :type asset_id: int
+ :param source_dag_id:
+ :type source_dag_id: str
+ :param source_task_id:
+ :type source_task_id: str
+ :param source_run_id:
+ :type source_run_id: str
+ :param source_map_index:
+ :type source_map_index: int
+ :param timestamp_gte:
+ :type timestamp_gte: datetime
+ :param timestamp_lte:
+ :type timestamp_lte: datetime
+ :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_asset_events_serialize(
+ limit=limit,
+ offset=offset,
+ order_by=order_by,
+ asset_id=asset_id,
+ source_dag_id=source_dag_id,
+ source_task_id=source_task_id,
+ source_run_id=source_run_id,
+ source_map_index=source_map_index,
+ timestamp_gte=timestamp_gte,
+ timestamp_lte=timestamp_lte,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "AssetEventCollectionResponse",
+ '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_asset_events_serialize(
+ self,
+ limit,
+ offset,
+ order_by,
+ asset_id,
+ source_dag_id,
+ source_task_id,
+ source_run_id,
+ source_map_index,
+ timestamp_gte,
+ timestamp_lte,
+ _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
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if offset is not None:
+
+ _query_params.append(('offset', offset))
+
+ if order_by is not None:
+
+ _query_params.append(('order_by', order_by))
+
+ if asset_id is not None:
+
+ _query_params.append(('asset_id', asset_id))
+
+ if source_dag_id is not None:
+
+ _query_params.append(('source_dag_id', source_dag_id))
+
+ if source_task_id is not None:
+
+ _query_params.append(('source_task_id', source_task_id))
+
+ if source_run_id is not None:
+
+ _query_params.append(('source_run_id', source_run_id))
+
+ if source_map_index is not None:
+
+ _query_params.append(('source_map_index', source_map_index))
+
+ if timestamp_gte is not None:
+ if isinstance(timestamp_gte, datetime):
+ _query_params.append(
+ (
+ 'timestamp_gte',
+ timestamp_gte.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('timestamp_gte', timestamp_gte))
+
+ if timestamp_lte is not None:
+ if isinstance(timestamp_lte, datetime):
+ _query_params.append(
+ (
+ 'timestamp_lte',
+ timestamp_lte.strftime(
+ self.api_client.configuration.datetime_format
+ )
+ )
+ )
+ else:
+ _query_params.append(('timestamp_lte', timestamp_lte))
+
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/assets/events',
+ 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_asset_queued_events(
+ self,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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,
+ ) -> QueuedEventCollectionResponse:
+ """Get Asset Queued Events
+
+ Get queued asset events for an asset.
+
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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_asset_queued_events_serialize(
+ asset_id=asset_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "QueuedEventCollectionResponse",
+ '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_asset_queued_events_with_http_info(
+ self,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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[QueuedEventCollectionResponse]:
+ """Get Asset Queued Events
+
+ Get queued asset events for an asset.
+
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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_asset_queued_events_serialize(
+ asset_id=asset_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "QueuedEventCollectionResponse",
+ '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_asset_queued_events_without_preload_content(
+ self,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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 Asset Queued Events
+
+ Get queued asset events for an asset.
+
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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_asset_queued_events_serialize(
+ asset_id=asset_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "QueuedEventCollectionResponse",
+ '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_asset_queued_events_serialize(
+ self,
+ asset_id,
+ before,
+ _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 asset_id is not None:
+ _path_params['asset_id'] = asset_id
+ # process the query parameters
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/assets/{asset_id}/queuedEvents',
+ 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_assets(
+ self,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ name_pattern: Annotated[Optional[StrictStr], Field(description="SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.")] = None,
+ uri_pattern: Annotated[Optional[StrictStr], Field(description="SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.")] = None,
+ dag_ids: Optional[List[StrictStr]] = None,
+ only_active: Optional[StrictBool] = None,
+ order_by: Optional[StrictStr] = 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,
+ ) -> AssetCollectionResponse:
+ """Get Assets
+
+ Get assets.
+
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param name_pattern: SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.
+ :type name_pattern: str
+ :param uri_pattern: SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.
+ :type uri_pattern: str
+ :param dag_ids:
+ :type dag_ids: List[str]
+ :param only_active:
+ :type only_active: bool
+ :param order_by:
+ :type order_by: 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_assets_serialize(
+ limit=limit,
+ offset=offset,
+ name_pattern=name_pattern,
+ uri_pattern=uri_pattern,
+ dag_ids=dag_ids,
+ only_active=only_active,
+ 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': "AssetCollectionResponse",
+ '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_assets_with_http_info(
+ self,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ name_pattern: Annotated[Optional[StrictStr], Field(description="SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.")] = None,
+ uri_pattern: Annotated[Optional[StrictStr], Field(description="SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.")] = None,
+ dag_ids: Optional[List[StrictStr]] = None,
+ only_active: Optional[StrictBool] = None,
+ order_by: Optional[StrictStr] = 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[AssetCollectionResponse]:
+ """Get Assets
+
+ Get assets.
+
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param name_pattern: SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.
+ :type name_pattern: str
+ :param uri_pattern: SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.
+ :type uri_pattern: str
+ :param dag_ids:
+ :type dag_ids: List[str]
+ :param only_active:
+ :type only_active: bool
+ :param order_by:
+ :type order_by: 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_assets_serialize(
+ limit=limit,
+ offset=offset,
+ name_pattern=name_pattern,
+ uri_pattern=uri_pattern,
+ dag_ids=dag_ids,
+ only_active=only_active,
+ 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': "AssetCollectionResponse",
+ '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_assets_without_preload_content(
+ self,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ name_pattern: Annotated[Optional[StrictStr], Field(description="SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.")] = None,
+ uri_pattern: Annotated[Optional[StrictStr], Field(description="SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.")] = None,
+ dag_ids: Optional[List[StrictStr]] = None,
+ only_active: Optional[StrictBool] = None,
+ order_by: Optional[StrictStr] = 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 Assets
+
+ Get assets.
+
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param name_pattern: SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.
+ :type name_pattern: str
+ :param uri_pattern: SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported.
+ :type uri_pattern: str
+ :param dag_ids:
+ :type dag_ids: List[str]
+ :param only_active:
+ :type only_active: bool
+ :param order_by:
+ :type order_by: 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_assets_serialize(
+ limit=limit,
+ offset=offset,
+ name_pattern=name_pattern,
+ uri_pattern=uri_pattern,
+ dag_ids=dag_ids,
+ only_active=only_active,
+ 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': "AssetCollectionResponse",
+ '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_assets_serialize(
+ self,
+ limit,
+ offset,
+ name_pattern,
+ uri_pattern,
+ dag_ids,
+ only_active,
+ order_by,
+ _request_auth,
+ _content_type,
+ _headers,
+ _host_index,
+ ) -> RequestSerialized:
+
+ _host = None
+
+ _collection_formats: Dict[str, str] = {
+ 'dag_ids': '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
+ # process the query parameters
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if offset is not None:
+
+ _query_params.append(('offset', offset))
+
+ if name_pattern is not None:
+
+ _query_params.append(('name_pattern', name_pattern))
+
+ if uri_pattern is not None:
+
+ _query_params.append(('uri_pattern', uri_pattern))
+
+ if dag_ids is not None:
+
+ _query_params.append(('dag_ids', dag_ids))
+
+ if only_active is not None:
+
+ _query_params.append(('only_active', only_active))
+
+ 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/assets',
+ 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_dag_asset_queued_event(
+ self,
+ dag_id: StrictStr,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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,
+ ) -> QueuedEventResponse:
+ """Get Dag Asset Queued Event
+
+ Get a queued asset event for a DAG.
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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_dag_asset_queued_event_serialize(
+ dag_id=dag_id,
+ asset_id=asset_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "QueuedEventResponse",
+ '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_dag_asset_queued_event_with_http_info(
+ self,
+ dag_id: StrictStr,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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[QueuedEventResponse]:
+ """Get Dag Asset Queued Event
+
+ Get a queued asset event for a DAG.
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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_dag_asset_queued_event_serialize(
+ dag_id=dag_id,
+ asset_id=asset_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "QueuedEventResponse",
+ '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_dag_asset_queued_event_without_preload_content(
+ self,
+ dag_id: StrictStr,
+ asset_id: StrictInt,
+ before: Optional[StrictStr] = 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 Dag Asset Queued Event
+
+ Get a queued asset event for a DAG.
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param asset_id: (required)
+ :type asset_id: int
+ :param before:
+ :type before: 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_dag_asset_queued_event_serialize(
+ dag_id=dag_id,
+ asset_id=asset_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "QueuedEventResponse",
+ '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_dag_asset_queued_event_serialize(
+ self,
+ dag_id,
+ asset_id,
+ before,
+ _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 asset_id is not None:
+ _path_params['asset_id'] = asset_id
+ # process the query parameters
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/dags/{dag_id}/assets/{asset_id}/queuedEvents',
+ 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_dag_asset_queued_events(
+ self,
+ dag_id: StrictStr,
+ before: Optional[StrictStr] = 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,
+ ) -> QueuedEventCollectionResponse:
+ """Get Dag Asset Queued Events
+
+ Get queued asset events for a DAG.
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param before:
+ :type before: 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_dag_asset_queued_events_serialize(
+ dag_id=dag_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "QueuedEventCollectionResponse",
+ '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_dag_asset_queued_events_with_http_info(
+ self,
+ dag_id: StrictStr,
+ before: Optional[StrictStr] = 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[QueuedEventCollectionResponse]:
+ """Get Dag Asset Queued Events
+
+ Get queued asset events for a DAG.
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param before:
+ :type before: 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_dag_asset_queued_events_serialize(
+ dag_id=dag_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "QueuedEventCollectionResponse",
+ '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_dag_asset_queued_events_without_preload_content(
+ self,
+ dag_id: StrictStr,
+ before: Optional[StrictStr] = 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 Dag Asset Queued Events
+
+ Get queued asset events for a DAG.
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param before:
+ :type before: 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_dag_asset_queued_events_serialize(
+ dag_id=dag_id,
+ before=before,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "QueuedEventCollectionResponse",
+ '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_dag_asset_queued_events_serialize(
+ self,
+ dag_id,
+ before,
+ _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
+ # process the query parameters
+ if before is not None:
+
+ _query_params.append(('before', before))
+
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/dags/{dag_id}/assets/queuedEvents',
+ 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 materialize_asset(
+ self,
+ asset_id: StrictInt,
+ _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,
+ ) -> DAGRunResponse:
+ """Materialize Asset
+
+ Materialize an asset by triggering a DAG run that produces it.
+
+ :param asset_id: (required)
+ :type asset_id: 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._materialize_asset_serialize(
+ asset_id=asset_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "DAGRunResponse",
+ '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 materialize_asset_with_http_info(
+ self,
+ asset_id: StrictInt,
+ _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[DAGRunResponse]:
+ """Materialize Asset
+
+ Materialize an asset by triggering a DAG run that produces it.
+
+ :param asset_id: (required)
+ :type asset_id: 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._materialize_asset_serialize(
+ asset_id=asset_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "DAGRunResponse",
+ '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 materialize_asset_without_preload_content(
+ self,
+ asset_id: StrictInt,
+ _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:
+ """Materialize Asset
+
+ Materialize an asset by triggering a DAG run that produces it.
+
+ :param asset_id: (required)
+ :type asset_id: 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._materialize_asset_serialize(
+ asset_id=asset_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "DAGRunResponse",
+ '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 _materialize_asset_serialize(
+ self,
+ asset_id,
+ _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 asset_id is not None:
+ _path_params['asset_id'] = asset_id
+ # process the query parameters
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/api/v2/assets/{asset_id}/materialize',
+ 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
+ )
+
+
diff --git a/airflow_client/client/api/backfill_api.py b/airflow_client/client/api/backfill_api.py
new file mode 100644
index 0000000..3086458
--- /dev/null
+++ b/airflow_client/client/api/backfill_api.py
@@ -0,0 +1,2023 @@
+# coding: utf-8
+
+"""
+ 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.
+
+ 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 pydantic import Field, StrictStr
+from typing import Optional
+from typing_extensions import Annotated
+from airflow_client.client.models.backfill_collection_response import BackfillCollectionResponse
+from airflow_client.client.models.backfill_post_body import BackfillPostBody
+from airflow_client.client.models.backfill_response import BackfillResponse
+from airflow_client.client.models.dry_run_backfill_collection_response import DryRunBackfillCollectionResponse
+
+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 BackfillApi:
+ """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 cancel_backfill(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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,
+ ) -> BackfillResponse:
+ """Cancel Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._cancel_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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 cancel_backfill_with_http_info(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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[BackfillResponse]:
+ """Cancel Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._cancel_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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 cancel_backfill_without_preload_content(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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:
+ """Cancel Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._cancel_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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 _cancel_backfill_serialize(
+ self,
+ backfill_id,
+ _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 backfill_id is not None:
+ _path_params['backfill_id'] = backfill_id
+ # process the query parameters
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/api/v2/backfills/{backfill_id}/cancel',
+ 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 create_backfill(
+ self,
+ backfill_post_body: BackfillPostBody,
+ _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,
+ ) -> BackfillResponse:
+ """Create Backfill
+
+
+ :param backfill_post_body: (required)
+ :type backfill_post_body: BackfillPostBody
+ :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_backfill_serialize(
+ backfill_post_body=backfill_post_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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_backfill_with_http_info(
+ self,
+ backfill_post_body: BackfillPostBody,
+ _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[BackfillResponse]:
+ """Create Backfill
+
+
+ :param backfill_post_body: (required)
+ :type backfill_post_body: BackfillPostBody
+ :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_backfill_serialize(
+ backfill_post_body=backfill_post_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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_backfill_without_preload_content(
+ self,
+ backfill_post_body: BackfillPostBody,
+ _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 Backfill
+
+
+ :param backfill_post_body: (required)
+ :type backfill_post_body: BackfillPostBody
+ :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_backfill_serialize(
+ backfill_post_body=backfill_post_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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_backfill_serialize(
+ self,
+ backfill_post_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
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if backfill_post_body is not None:
+ _body_params = backfill_post_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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/api/v2/backfills',
+ 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 create_backfill_dry_run(
+ self,
+ backfill_post_body: BackfillPostBody,
+ _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,
+ ) -> DryRunBackfillCollectionResponse:
+ """Create Backfill Dry Run
+
+
+ :param backfill_post_body: (required)
+ :type backfill_post_body: BackfillPostBody
+ :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_backfill_dry_run_serialize(
+ backfill_post_body=backfill_post_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "DryRunBackfillCollectionResponse",
+ '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_backfill_dry_run_with_http_info(
+ self,
+ backfill_post_body: BackfillPostBody,
+ _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[DryRunBackfillCollectionResponse]:
+ """Create Backfill Dry Run
+
+
+ :param backfill_post_body: (required)
+ :type backfill_post_body: BackfillPostBody
+ :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_backfill_dry_run_serialize(
+ backfill_post_body=backfill_post_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "DryRunBackfillCollectionResponse",
+ '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_backfill_dry_run_without_preload_content(
+ self,
+ backfill_post_body: BackfillPostBody,
+ _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 Backfill Dry Run
+
+
+ :param backfill_post_body: (required)
+ :type backfill_post_body: BackfillPostBody
+ :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_backfill_dry_run_serialize(
+ backfill_post_body=backfill_post_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "DryRunBackfillCollectionResponse",
+ '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_backfill_dry_run_serialize(
+ self,
+ backfill_post_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
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if backfill_post_body is not None:
+ _body_params = backfill_post_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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/api/v2/backfills/dry_run',
+ 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_backfill(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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,
+ ) -> BackfillResponse:
+ """Get Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._get_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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_backfill_with_http_info(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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[BackfillResponse]:
+ """Get Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._get_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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_backfill_without_preload_content(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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 Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._get_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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_backfill_serialize(
+ self,
+ backfill_id,
+ _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 backfill_id is not None:
+ _path_params['backfill_id'] = backfill_id
+ # process the query parameters
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/backfills/{backfill_id}',
+ 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 list_backfills(
+ self,
+ dag_id: StrictStr,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ order_by: Optional[StrictStr] = 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,
+ ) -> BackfillCollectionResponse:
+ """List Backfills
+
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param order_by:
+ :type order_by: 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._list_backfills_serialize(
+ dag_id=dag_id,
+ limit=limit,
+ offset=offset,
+ 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': "BackfillCollectionResponse",
+ '401': "HTTPExceptionResponse",
+ '403': "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 list_backfills_with_http_info(
+ self,
+ dag_id: StrictStr,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ order_by: Optional[StrictStr] = 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[BackfillCollectionResponse]:
+ """List Backfills
+
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param order_by:
+ :type order_by: 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._list_backfills_serialize(
+ dag_id=dag_id,
+ limit=limit,
+ offset=offset,
+ 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': "BackfillCollectionResponse",
+ '401': "HTTPExceptionResponse",
+ '403': "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 list_backfills_without_preload_content(
+ self,
+ dag_id: StrictStr,
+ limit: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ offset: Optional[Annotated[int, Field(strict=True, ge=0)]] = None,
+ order_by: Optional[StrictStr] = 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:
+ """List Backfills
+
+
+ :param dag_id: (required)
+ :type dag_id: str
+ :param limit:
+ :type limit: int
+ :param offset:
+ :type offset: int
+ :param order_by:
+ :type order_by: 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._list_backfills_serialize(
+ dag_id=dag_id,
+ limit=limit,
+ offset=offset,
+ 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': "BackfillCollectionResponse",
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ '422': "HTTPValidationError",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _list_backfills_serialize(
+ self,
+ dag_id,
+ limit,
+ offset,
+ order_by,
+ _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
+ # process the query parameters
+ if dag_id is not None:
+
+ _query_params.append(('dag_id', dag_id))
+
+ if limit is not None:
+
+ _query_params.append(('limit', limit))
+
+ if offset is not None:
+
+ _query_params.append(('offset', offset))
+
+ 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/backfills',
+ 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 pause_backfill(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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,
+ ) -> BackfillResponse:
+ """Pause Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._pause_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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 pause_backfill_with_http_info(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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[BackfillResponse]:
+ """Pause Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._pause_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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 pause_backfill_without_preload_content(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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:
+ """Pause Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._pause_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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 _pause_backfill_serialize(
+ self,
+ backfill_id,
+ _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 backfill_id is not None:
+ _path_params['backfill_id'] = backfill_id
+ # process the query parameters
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/api/v2/backfills/{backfill_id}/pause',
+ 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 unpause_backfill(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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,
+ ) -> BackfillResponse:
+ """Unpause Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._unpause_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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 unpause_backfill_with_http_info(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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[BackfillResponse]:
+ """Unpause Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._unpause_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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 unpause_backfill_without_preload_content(
+ self,
+ backfill_id: Annotated[int, Field(strict=True, ge=0)],
+ _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:
+ """Unpause Backfill
+
+
+ :param backfill_id: (required)
+ :type backfill_id: 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._unpause_backfill_serialize(
+ backfill_id=backfill_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BackfillResponse",
+ '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 _unpause_backfill_serialize(
+ self,
+ backfill_id,
+ _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 backfill_id is not None:
+ _path_params['backfill_id'] = backfill_id
+ # process the query parameters
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PUT',
+ resource_path='/api/v2/backfills/{backfill_id}/unpause',
+ 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
+ )
+
+
diff --git a/airflow_client/client/api/config_api.py b/airflow_client/client/api/config_api.py
index 9d9492a..728cbee 100644
--- a/airflow_client/client/api/config_api.py
+++ b/airflow_client/client/api/config_api.py
@@ -1,304 +1,633 @@
+# coding: utf-8
+
"""
- Airflow API (Stable)
+ Airflow API
- # Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means that you must usually add the following headers to your request: ``` Content-type: application/json Accept: application/json ``` ## Resources The term `resource` refers to a single type of object in th [...]
+ 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.
- The version of the OpenAPI document: 2.10.0
- Contact: dev@airflow.apache.org
- Generated by: https://openapi-generator.tech
-"""
+ 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
-import re # noqa: F401
-import sys # noqa: F401
+from pydantic import StrictStr, field_validator
+from typing import Optional
+from airflow_client.client.models.config import Config
-from airflow_client.client.api_client import ApiClient, Endpoint as _Endpoint
-from airflow_client.client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from airflow_client.client.model.config import Config
-from airflow_client.client.model.error import Error
+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 ConfigApi(object):
+class ConfigApi:
"""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):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.get_config_endpoint = _Endpoint(
- settings={
- 'response_type': (Config,),
- 'auth': [
- 'Basic',
- 'Kerberos'
- ],
- 'endpoint_path': '/config',
- 'operation_id': 'get_config',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'section',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'section':
- (str,),
- },
- 'attribute_map': {
- 'section': 'section',
- },
- 'location_map': {
- 'section': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_value_endpoint = _Endpoint(
- settings={
- 'response_type': (Config,),
- 'auth': [
- 'Basic',
- 'Kerberos'
- ],
- 'endpoint_path': '/config/section/{section}/option/{option}',
- 'operation_id': 'get_value',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'section',
- 'option',
- ],
- 'required': [
- 'section',
- 'option',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'section':
- (str,),
- 'option':
- (str,),
- },
- 'attribute_map': {
- 'section': 'section',
- 'option': 'option',
- },
- 'location_map': {
- 'section': 'path',
- 'option': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json',
- 'text/plain'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
+
+ @validate_call
def get_config(
self,
- **kwargs
- ):
- """Get current configuration # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_config(async_req=True)
- >>> result = thread.get()
-
-
- Keyword Args:
- section (str): If given, only return config of this section.. [optional]
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- Config
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ section: Optional[StrictStr] = None,
+ accept: Optional[StrictStr] = 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,
+ ) -> Config:
+ """Get Config
+
+
+ :param section:
+ :type section: str
+ :param accept:
+ :type accept: 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_config_serialize(
+ section=section,
+ accept=accept,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Config",
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ '404': "HTTPExceptionResponse",
+ '406': "HTTPExceptionResponse",
+ '422': "HTTPValidationError",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_config_with_http_info(
+ self,
+ section: Optional[StrictStr] = None,
+ accept: Optional[StrictStr] = 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[Config]:
+ """Get Config
+
+
+ :param section:
+ :type section: str
+ :param accept:
+ :type accept: 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_config_serialize(
+ section=section,
+ accept=accept,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Config",
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ '404': "HTTPExceptionResponse",
+ '406': "HTTPExceptionResponse",
+ '422': "HTTPValidationError",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+
+ @validate_call
+ def get_config_without_preload_content(
+ self,
+ section: Optional[StrictStr] = None,
+ accept: Optional[StrictStr] = 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 Config
+
+
+ :param section:
+ :type section: str
+ :param accept:
+ :type accept: 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_config_serialize(
+ section=section,
+ accept=accept,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Config",
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ '404': "HTTPExceptionResponse",
+ '406': "HTTPExceptionResponse",
+ '422': "HTTPValidationError",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- return self.get_config_endpoint.call_with_http_info(**kwargs)
+ return response_data.response
+
- def get_value(
+ def _get_config_serialize(
self,
section,
- option,
- **kwargs
- ):
- """Get a option from configuration # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_value(section, option, async_req=True)
- >>> result = thread.get()
-
- Args:
- section (str):
- option (str):
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- Config
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
+ accept,
+ _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
+ # process the query parameters
+ if section is not None:
+
+ _query_params.append(('section', section))
+
+ # process the header parameters
+ if accept is not None:
+ _header_params['accept'] = accept
+ # 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',
+ 'text/plain'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2PasswordBearer'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/config',
+ 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
)
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
+
+
+
+
+ @validate_call
+ def get_config_value(
+ self,
+ section: StrictStr,
+ option: StrictStr,
+ accept: Optional[StrictStr] = 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,
+ ) -> Config:
+ """Get Config Value
+
+
+ :param section: (required)
+ :type section: str
+ :param option: (required)
+ :type option: str
+ :param accept:
+ :type accept: 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_config_value_serialize(
+ section=section,
+ option=option,
+ accept=accept,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Config",
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ '404': "HTTPExceptionResponse",
+ '406': "HTTPExceptionResponse",
+ '422': "HTTPValidationError",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
+ response_data.read()
+ return self.api_client.response_deserialize(
+ response_data=response_data,
+ response_types_map=_response_types_map,
+ ).data
+
+
+ @validate_call
+ def get_config_value_with_http_info(
+ self,
+ section: StrictStr,
+ option: StrictStr,
+ accept: Optional[StrictStr] = 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[Config]:
+ """Get Config Value
+
+
+ :param section: (required)
+ :type section: str
+ :param option: (required)
+ :type option: str
+ :param accept:
+ :type accept: 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_config_value_serialize(
+ section=section,
+ option=option,
+ accept=accept,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Config",
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ '404': "HTTPExceptionResponse",
+ '406': "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,
)
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
+
+
+ @validate_call
+ def get_config_value_without_preload_content(
+ self,
+ section: StrictStr,
+ option: StrictStr,
+ accept: Optional[StrictStr] = 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 Config Value
+
+
+ :param section: (required)
+ :type section: str
+ :param option: (required)
+ :type option: str
+ :param accept:
+ :type accept: 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_config_value_serialize(
+ section=section,
+ option=option,
+ accept=accept,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
)
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "Config",
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ '404': "HTTPExceptionResponse",
+ '406': "HTTPExceptionResponse",
+ '422': "HTTPValidationError",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
)
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
+ return response_data.response
+
+
+ def _get_config_value_serialize(
+ self,
+ section,
+ option,
+ accept,
+ _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 section is not None:
+ _path_params['section'] = section
+ if option is not None:
+ _path_params['option'] = option
+ # process the query parameters
+ # process the header parameters
+ if accept is not None:
+ _header_params['accept'] = accept
+ # 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',
+ 'text/plain'
+ ]
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2PasswordBearer'
+ ]
+
+ return self.api_client.param_serialize(
+ method='GET',
+ resource_path='/api/v2/config/section/{section}/option/{option}',
+ 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
)
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['section'] = \
- section
- kwargs['option'] = \
- option
- return self.get_value_endpoint.call_with_http_info(**kwargs)
+
diff --git a/airflow_client/client/api/connection_api.py b/airflow_client/client/api/connection_api.py
index 57ed6f8..1864d1a 100644
--- a/airflow_client/client/api/connection_api.py
+++ b/airflow_client/client/api/connection_api.py
@@ -1,848 +1,2342 @@
+# coding: utf-8
+
"""
- Airflow API (Stable)
+ Airflow API
- # Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means that you must usually add the following headers to your request: ``` Content-type: application/json Accept: application/json ``` ## Resources The term `resource` refers to a single type of object in th [...]
+ 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.
- The version of the OpenAPI document: 2.10.0
- Contact: dev@airflow.apache.org
- Generated by: https://openapi-generator.tech
-"""
+ 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
-import re # noqa: F401
-import sys # noqa: F401
+from pydantic import Field, StrictStr
+from typing import List, Optional
+from typing_extensions import Annotated
+from airflow_client.client.models.bulk_body_connection_body import BulkBodyConnectionBody
+from airflow_client.client.models.bulk_response import BulkResponse
+from airflow_client.client.models.connection_body import ConnectionBody
+from airflow_client.client.models.connection_collection_response import ConnectionCollectionResponse
+from airflow_client.client.models.connection_response import ConnectionResponse
+from airflow_client.client.models.connection_test_response import ConnectionTestResponse
-from airflow_client.client.api_client import ApiClient, Endpoint as _Endpoint
-from airflow_client.client.model_utils import ( # noqa: F401
- check_allowed_values,
- check_validations,
- date,
- datetime,
- file_type,
- none_type,
- validate_and_convert_types
-)
-from airflow_client.client.model.connection import Connection
-from airflow_client.client.model.connection_collection import ConnectionCollection
-from airflow_client.client.model.connection_test import ConnectionTest
-from airflow_client.client.model.error import Error
+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 ConnectionApi(object):
+class ConnectionApi:
"""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):
+ def __init__(self, api_client=None) -> None:
if api_client is None:
- api_client = ApiClient()
+ api_client = ApiClient.get_default()
self.api_client = api_client
- self.delete_connection_endpoint = _Endpoint(
- settings={
- 'response_type': None,
- 'auth': [
- 'Basic',
- 'Kerberos'
- ],
- 'endpoint_path': '/connections/{connection_id}',
- 'operation_id': 'delete_connection',
- 'http_method': 'DELETE',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'connection_id',
- ],
- 'required': [
- 'connection_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'connection_id':
- (str,),
- },
- 'attribute_map': {
- 'connection_id': 'connection_id',
- },
- 'location_map': {
- 'connection_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_connection_endpoint = _Endpoint(
- settings={
- 'response_type': (Connection,),
- 'auth': [
- 'Basic',
- 'Kerberos'
- ],
- 'endpoint_path': '/connections/{connection_id}',
- 'operation_id': 'get_connection',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'connection_id',
- ],
- 'required': [
- 'connection_id',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'connection_id':
- (str,),
- },
- 'attribute_map': {
- 'connection_id': 'connection_id',
- },
- 'location_map': {
- 'connection_id': 'path',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.get_connections_endpoint = _Endpoint(
- settings={
- 'response_type': (ConnectionCollection,),
- 'auth': [
- 'Basic',
- 'Kerberos'
- ],
- 'endpoint_path': '/connections',
- 'operation_id': 'get_connections',
- 'http_method': 'GET',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'limit',
- 'offset',
- 'order_by',
- ],
- 'required': [],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- 'offset',
- ]
- },
- root_map={
- 'validations': {
- ('offset',): {
-
- 'inclusive_minimum': 0,
- },
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'limit':
- (int,),
- 'offset':
- (int,),
- 'order_by':
- (str,),
- },
- 'attribute_map': {
- 'limit': 'limit',
- 'offset': 'offset',
- 'order_by': 'order_by',
- },
- 'location_map': {
- 'limit': 'query',
- 'offset': 'query',
- 'order_by': 'query',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [],
- },
- api_client=api_client
- )
- self.patch_connection_endpoint = _Endpoint(
- settings={
- 'response_type': (Connection,),
- 'auth': [
- 'Basic',
- 'Kerberos'
- ],
- 'endpoint_path': '/connections/{connection_id}',
- 'operation_id': 'patch_connection',
- 'http_method': 'PATCH',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'connection_id',
- 'connection',
- 'update_mask',
- ],
- 'required': [
- 'connection_id',
- 'connection',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'connection_id':
- (str,),
- 'connection':
- (Connection,),
- 'update_mask':
- ([str],),
- },
- 'attribute_map': {
- 'connection_id': 'connection_id',
- 'update_mask': 'update_mask',
- },
- 'location_map': {
- 'connection_id': 'path',
- 'connection': 'body',
- 'update_mask': 'query',
- },
- 'collection_format_map': {
- 'update_mask': 'csv',
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
- 'application/json'
- ]
- },
- api_client=api_client
- )
- self.post_connection_endpoint = _Endpoint(
- settings={
- 'response_type': (Connection,),
- 'auth': [
- 'Basic',
- 'Kerberos'
- ],
- 'endpoint_path': '/connections',
- 'operation_id': 'post_connection',
- 'http_method': 'POST',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'connection',
- ],
- 'required': [
- 'connection',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'connection':
- (Connection,),
- },
- 'attribute_map': {
- },
- 'location_map': {
- 'connection': 'body',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
+
+
+ @validate_call
+ def bulk_connections(
+ self,
+ bulk_body_connection_body: BulkBodyConnectionBody,
+ _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,
+ ) -> BulkResponse:
+ """Bulk Connections
+
+ Bulk create, update, and delete connections.
+
+ :param bulk_body_connection_body: (required)
+ :type bulk_body_connection_body: BulkBodyConnectionBody
+ :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._bulk_connections_serialize(
+ bulk_body_connection_body=bulk_body_connection_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BulkResponse",
+ '401': "HTTPExceptionResponse",
+ '403': "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 bulk_connections_with_http_info(
+ self,
+ bulk_body_connection_body: BulkBodyConnectionBody,
+ _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[BulkResponse]:
+ """Bulk Connections
+
+ Bulk create, update, and delete connections.
+
+ :param bulk_body_connection_body: (required)
+ :type bulk_body_connection_body: BulkBodyConnectionBody
+ :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._bulk_connections_serialize(
+ bulk_body_connection_body=bulk_body_connection_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BulkResponse",
+ '401': "HTTPExceptionResponse",
+ '403': "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 bulk_connections_without_preload_content(
+ self,
+ bulk_body_connection_body: BulkBodyConnectionBody,
+ _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:
+ """Bulk Connections
+
+ Bulk create, update, and delete connections.
+
+ :param bulk_body_connection_body: (required)
+ :type bulk_body_connection_body: BulkBodyConnectionBody
+ :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._bulk_connections_serialize(
+ bulk_body_connection_body=bulk_body_connection_body,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "BulkResponse",
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ '422': "HTTPValidationError",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _bulk_connections_serialize(
+ self,
+ bulk_body_connection_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
+ # process the query parameters
+ # process the header parameters
+ # process the form parameters
+ # process the body parameter
+ if bulk_body_connection_body is not None:
+ _body_params = bulk_body_connection_body
+
+
+ # set the HTTP header `Accept`
+ if 'Accept' not in _header_params:
+ _header_params['Accept'] = self.api_client.select_header_accept(
+ [
'application/json'
]
- },
- api_client=api_client
- )
- self.test_connection_endpoint = _Endpoint(
- settings={
- 'response_type': (ConnectionTest,),
- 'auth': [
- 'Basic',
- 'Kerberos'
- ],
- 'endpoint_path': '/connections/test',
- 'operation_id': 'test_connection',
- 'http_method': 'POST',
- 'servers': None,
- },
- params_map={
- 'all': [
- 'connection',
- ],
- 'required': [
- 'connection',
- ],
- 'nullable': [
- ],
- 'enum': [
- ],
- 'validation': [
- ]
- },
- root_map={
- 'validations': {
- },
- 'allowed_values': {
- },
- 'openapi_types': {
- 'connection':
- (Connection,),
- },
- 'attribute_map': {
- },
- 'location_map': {
- 'connection': 'body',
- },
- 'collection_format_map': {
- }
- },
- headers_map={
- 'accept': [
- 'application/json'
- ],
- 'content_type': [
+ )
+
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='PATCH',
+ resource_path='/api/v2/connections',
+ 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 create_default_connections(
+ self,
+ _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:
+ """Create Default Connections
+
+ Create default connections.
+
+ :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_default_connections_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ }
+ 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_default_connections_with_http_info(
+ self,
+ _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]:
+ """Create Default Connections
+
+ Create default connections.
+
+ :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_default_connections_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ }
+ 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_default_connections_without_preload_content(
+ self,
+ _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 Default Connections
+
+ Create default connections.
+
+ :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_default_connections_serialize(
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '401': "HTTPExceptionResponse",
+ '403': "HTTPExceptionResponse",
+ }
+ response_data = self.api_client.call_api(
+ *_param,
+ _request_timeout=_request_timeout
+ )
+ return response_data.response
+
+
+ def _create_default_connections_serialize(
+ self,
+ _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
+ # process the query parameters
+ # 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'
]
- },
- api_client=api_client
+ )
+
+
+ # authentication setting
+ _auth_settings: List[str] = [
+ 'OAuth2PasswordBearer'
+ ]
+
+ return self.api_client.param_serialize(
+ method='POST',
+ resource_path='/api/v2/connections/defaults',
+ 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_connection(
+ self,
+ connection_id: StrictStr,
+ _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 Connection
+
+ Delete a connection entry.
+
+ :param connection_id: (required)
+ :type connection_id: 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._delete_connection_serialize(
+ connection_id=connection_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '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_connection_with_http_info(
+ self,
+ connection_id: StrictStr,
+ _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 Connection
+
+ Delete a connection entry.
+
+ :param connection_id: (required)
+ :type connection_id: 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._delete_connection_serialize(
+ connection_id=connection_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '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_connection_without_preload_content(
+ self,
+ connection_id: StrictStr,
+ _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 Connection
+
+ Delete a connection entry.
+
+ :param connection_id: (required)
+ :type connection_id: 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._delete_connection_serialize(
+ connection_id=connection_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '204': None,
+ '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_connection_serialize(
self,
connection_id,
- **kwargs
- ):
- """Delete a connection # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.delete_connection(connection_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- connection_id (str): The connection ID.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- None
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['connection_id'] = \
- connection_id
- return self.delete_connection_endpoint.call_with_http_info(**kwargs)
+ _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 connection_id is not None:
+ _path_params['connection_id'] = connection_id
+ # process the query parameters
+ # 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'
+ ]
+
+ return self.api_client.param_serialize(
+ method='DELETE',
+ resource_path='/api/v2/connections/{connection_id}',
+ 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_connection(
+ self,
+ connection_id: StrictStr,
+ _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,
+ ) -> ConnectionResponse:
+ """Get Connection
+
+ Get a connection entry.
+
+ :param connection_id: (required)
+ :type connection_id: 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_connection_serialize(
+ connection_id=connection_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ConnectionResponse",
+ '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_connection_with_http_info(
+ self,
+ connection_id: StrictStr,
+ _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[ConnectionResponse]:
+ """Get Connection
+
+ Get a connection entry.
+
+ :param connection_id: (required)
+ :type connection_id: 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_connection_serialize(
+ connection_id=connection_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ConnectionResponse",
+ '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_connection_without_preload_content(
+ self,
+ connection_id: StrictStr,
+ _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 Connection
+
+ Get a connection entry.
+
+ :param connection_id: (required)
+ :type connection_id: 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_connection_serialize(
+ connection_id=connection_id,
+ _request_auth=_request_auth,
+ _content_type=_content_type,
+ _headers=_headers,
+ _host_index=_host_index
+ )
+
+ _response_types_map: Dict[str, Optional[str]] = {
+ '200': "ConnectionResponse",
+ '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_connection_serialize(
self,
connection_id,
- **kwargs
- ):
- """Get a connection # noqa: E501
-
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
-
- >>> thread = api.get_connection(connection_id, async_req=True)
- >>> result = thread.get()
-
- Args:
- connection_id (str): The connection ID.
-
- Keyword Args:
- _return_http_data_only (bool): response data without head status
- code and headers. Default is True.
- _preload_content (bool): if False, the urllib3.HTTPResponse object
- will be returned without reading/decoding response data.
- Default is True.
- _request_timeout (int/float/tuple): 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.
- Default is None.
- _check_input_type (bool): specifies if type checking
- should be done one the data sent to the server.
- Default is True.
- _check_return_type (bool): specifies if type checking
- should be done one the data received from the server.
- Default is True.
- _spec_property_naming (bool): True if the variable names in the input data
- are serialized names, as specified in the OpenAPI document.
- False if the variable names in the input data
- are pythonic names, e.g. snake case (default)
- _content_type (str/None): force body content-type.
- Default is None and content-type will be predicted by allowed
- content-types and body.
- _host_index (int/None): specifies the index of the server
- that we want to use.
- Default is read from the configuration.
- async_req (bool): execute request asynchronously
-
- Returns:
- Connection
- If the method is called asynchronously, returns the request
- thread.
- """
- kwargs['async_req'] = kwargs.get(
- 'async_req', False
- )
- kwargs['_return_http_data_only'] = kwargs.get(
- '_return_http_data_only', True
- )
- kwargs['_preload_content'] = kwargs.get(
- '_preload_content', True
- )
- kwargs['_request_timeout'] = kwargs.get(
- '_request_timeout', None
- )
- kwargs['_check_input_type'] = kwargs.get(
- '_check_input_type', True
- )
- kwargs['_check_return_type'] = kwargs.get(
- '_check_return_type', True
- )
- kwargs['_spec_property_naming'] = kwargs.get(
- '_spec_property_naming', False
- )
- kwargs['_content_type'] = kwargs.get(
- '_content_type')
- kwargs['_host_index'] = kwargs.get('_host_index')
- kwargs['connection_id'] = \
- connection_id
- return self.get_connection_endpoint.call_with_http_info(**kwargs)
+ _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]] = []
... 149376 lines suppressed ...