label-studio-sdk 1.0.20__py3-none-any.whl → 2.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of label-studio-sdk might be problematic. Click here for more details.
- label_studio_sdk/__init__.py +345 -180
- label_studio_sdk/actions/__init__.py +4 -0
- label_studio_sdk/actions/client.py +46 -10
- label_studio_sdk/actions/types/__init__.py +4 -0
- label_studio_sdk/actions/types/actions_create_request_filters.py +2 -2
- label_studio_sdk/actions/types/actions_create_request_filters_items_item.py +2 -2
- label_studio_sdk/actions/types/actions_create_request_id.py +7 -7
- label_studio_sdk/actions/types/actions_create_request_selected_items_excluded.py +2 -2
- label_studio_sdk/actions/types/actions_create_request_selected_items_included.py +2 -2
- label_studio_sdk/actions/types/actions_list_response_item.py +25 -0
- label_studio_sdk/actions/types/actions_list_response_item_dialog.py +22 -0
- label_studio_sdk/annotations/__init__.py +2 -2
- label_studio_sdk/annotations/client.py +379 -243
- label_studio_sdk/annotations/types/__init__.py +4 -2
- label_studio_sdk/annotations/types/annotation_bulk_serializer_with_selected_items_request_last_action.py +7 -0
- label_studio_sdk/annotations/types/annotations_create_bulk_response_item.py +8 -5
- label_studio_sdk/base_client.py +32 -24
- label_studio_sdk/billing/__init__.py +2 -0
- label_studio_sdk/billing/client.py +112 -0
- label_studio_sdk/comments/client.py +378 -140
- label_studio_sdk/converter/README.md +207 -0
- label_studio_sdk/converter/imports/coco.py +132 -23
- label_studio_sdk/core/__init__.py +4 -0
- label_studio_sdk/core/unchecked_base_model.py +305 -0
- label_studio_sdk/environment.py +1 -1
- label_studio_sdk/errors/__init__.py +10 -1
- label_studio_sdk/errors/forbidden_error.py +9 -0
- label_studio_sdk/errors/method_not_allowed_error.py +9 -0
- label_studio_sdk/export_storage/__init__.py +1 -24
- label_studio_sdk/export_storage/azure/__init__.py +0 -3
- label_studio_sdk/export_storage/azure/client.py +231 -273
- label_studio_sdk/export_storage/client.py +5 -5
- label_studio_sdk/export_storage/gcs/__init__.py +0 -3
- label_studio_sdk/export_storage/gcs/client.py +231 -273
- label_studio_sdk/export_storage/local/__init__.py +0 -3
- label_studio_sdk/export_storage/local/client.py +211 -253
- label_studio_sdk/export_storage/redis/__init__.py +0 -3
- label_studio_sdk/export_storage/redis/client.py +239 -281
- label_studio_sdk/export_storage/s3/__init__.py +0 -3
- label_studio_sdk/export_storage/s3/client.py +254 -296
- label_studio_sdk/export_storage/s3s/client.py +694 -210
- label_studio_sdk/export_storage/types/export_storage_list_types_response_item.py +2 -2
- label_studio_sdk/files/client.py +52 -71
- label_studio_sdk/import_storage/__init__.py +1 -24
- label_studio_sdk/import_storage/azure/__init__.py +0 -3
- label_studio_sdk/import_storage/azure/client.py +249 -299
- label_studio_sdk/import_storage/client.py +5 -5
- label_studio_sdk/import_storage/gcs/__init__.py +0 -3
- label_studio_sdk/import_storage/gcs/client.py +249 -299
- label_studio_sdk/import_storage/local/__init__.py +0 -3
- label_studio_sdk/import_storage/local/client.py +211 -257
- label_studio_sdk/import_storage/redis/__init__.py +0 -3
- label_studio_sdk/import_storage/redis/client.py +239 -285
- label_studio_sdk/import_storage/s3/__init__.py +0 -3
- label_studio_sdk/import_storage/s3/client.py +274 -324
- label_studio_sdk/import_storage/s3s/client.py +728 -434
- label_studio_sdk/import_storage/types/import_storage_list_types_response_item.py +2 -2
- label_studio_sdk/jwt_settings/client.py +56 -58
- label_studio_sdk/label_interface/control_tags.py +48 -8
- label_studio_sdk/label_interface/interface.py +261 -56
- label_studio_sdk/ml/__init__.py +2 -16
- label_studio_sdk/ml/client.py +196 -179
- label_studio_sdk/ml/types/__init__.py +2 -12
- label_studio_sdk/ml/types/ml_list_model_versions_response.py +20 -0
- label_studio_sdk/model_providers/__init__.py +3 -0
- label_studio_sdk/model_providers/client.py +280 -228
- label_studio_sdk/model_providers/types/__init__.py +5 -0
- label_studio_sdk/{prompts/types/prompts_batch_predictions_response.py → model_providers/types/model_providers_list_model_provider_choices_response.py} +3 -3
- label_studio_sdk/organizations/__init__.py +5 -0
- label_studio_sdk/organizations/client.py +331 -0
- label_studio_sdk/organizations/members/__init__.py +2 -0
- label_studio_sdk/organizations/members/client.py +636 -0
- label_studio_sdk/predictions/client.py +29 -77
- label_studio_sdk/projects/__init__.py +18 -9
- label_studio_sdk/projects/client.py +905 -414
- label_studio_sdk/projects/exports/__init__.py +2 -2
- label_studio_sdk/projects/exports/client.py +336 -396
- label_studio_sdk/projects/exports/client_ext.py +30 -30
- label_studio_sdk/projects/exports/types/__init__.py +1 -2
- label_studio_sdk/projects/exports/types/exports_convert_response.py +5 -9
- label_studio_sdk/projects/pauses/client.py +114 -105
- label_studio_sdk/projects/stats/__init__.py +5 -0
- label_studio_sdk/projects/stats/client.py +175 -0
- label_studio_sdk/projects/stats/types/__init__.py +8 -0
- label_studio_sdk/projects/stats/types/stats_iaa_response.py +44 -0
- label_studio_sdk/projects/stats/types/stats_iaa_response_common_tasks.py +7 -0
- label_studio_sdk/projects/stats/types/stats_iaa_response_iaa.py +5 -0
- label_studio_sdk/{types/base_task_file_upload.py → projects/stats/types/stats_iaa_response_std.py} +1 -1
- label_studio_sdk/projects/types/__init__.py +10 -6
- label_studio_sdk/projects/types/lse_project_create_request_sampling.py +7 -0
- label_studio_sdk/projects/types/lse_project_create_request_skip_queue.py +7 -0
- label_studio_sdk/projects/types/patched_lse_project_update_request_sampling.py +7 -0
- label_studio_sdk/projects/types/patched_lse_project_update_request_skip_queue.py +7 -0
- label_studio_sdk/{prompts/types/prompts_batch_failed_predictions_response.py → projects/types/projects_duplicate_response.py} +8 -5
- label_studio_sdk/projects/types/projects_import_tasks_response.py +2 -2
- label_studio_sdk/projects/types/projects_list_request_filter.py +1 -1
- label_studio_sdk/prompts/__init__.py +4 -10
- label_studio_sdk/prompts/client.py +511 -442
- label_studio_sdk/prompts/indicators/__init__.py +3 -0
- label_studio_sdk/prompts/indicators/client.py +47 -49
- label_studio_sdk/prompts/indicators/types/__init__.py +5 -0
- label_studio_sdk/{types/key_indicator_value.py → prompts/indicators/types/indicators_list_response_item.py} +3 -3
- label_studio_sdk/prompts/runs/client.py +113 -135
- label_studio_sdk/prompts/types/__init__.py +2 -12
- label_studio_sdk/prompts/types/prompts_compatible_projects_request_project_type.py +7 -0
- label_studio_sdk/prompts/versions/client.py +372 -312
- label_studio_sdk/tasks/__init__.py +2 -2
- label_studio_sdk/tasks/client.py +514 -213
- label_studio_sdk/tasks/types/__init__.py +1 -2
- label_studio_sdk/tokens/client.py +160 -152
- label_studio_sdk/tokens/client_ext.py +3 -3
- label_studio_sdk/types/__init__.py +276 -142
- label_studio_sdk/{webhooks/types/webhooks_update_request_actions_item.py → types/actions_enum.py} +4 -1
- label_studio_sdk/types/all_roles_project_list.py +197 -0
- label_studio_sdk/types/all_roles_project_list_sampling.py +7 -0
- label_studio_sdk/types/all_roles_project_list_skip_queue.py +7 -0
- label_studio_sdk/types/annotated_enum.py +5 -0
- label_studio_sdk/types/annotation.py +24 -10
- label_studio_sdk/types/annotation_last_action.py +3 -15
- label_studio_sdk/types/{annotations_dm_field.py → annotation_request.py} +21 -30
- label_studio_sdk/types/annotation_request_last_action.py +7 -0
- label_studio_sdk/types/assignment_settings.py +31 -0
- label_studio_sdk/types/assignment_settings_label_stream_task_distribution.py +7 -0
- label_studio_sdk/types/assignment_settings_request.py +32 -0
- label_studio_sdk/types/assignment_settings_request_label_stream_task_distribution.py +7 -0
- label_studio_sdk/types/associated_project.py +30 -0
- label_studio_sdk/types/auth_method_enum.py +5 -0
- label_studio_sdk/types/azure_blob_export_storage.py +8 -12
- label_studio_sdk/types/azure_blob_import_storage.py +8 -12
- label_studio_sdk/types/{prompt_associated_projects_item_id.py → batch_failed_predictions.py} +4 -4
- label_studio_sdk/types/{access_token_response.py → batch_predictions.py} +6 -8
- label_studio_sdk/types/billing_checks.py +39 -0
- label_studio_sdk/types/billing_flags.py +44 -0
- label_studio_sdk/types/billing_info_response.py +22 -0
- label_studio_sdk/types/blank_enum.py +5 -0
- label_studio_sdk/types/{key_indicators_item_extra_kpis_item.py → blueprint_list.py} +12 -6
- label_studio_sdk/types/budget_reset_period_enum.py +5 -0
- label_studio_sdk/types/child_filter.py +44 -0
- label_studio_sdk/types/comment.py +39 -14
- label_studio_sdk/types/comment_request.py +32 -0
- label_studio_sdk/types/comment_serializer_with_expanded_user.py +53 -0
- label_studio_sdk/types/converted_format.py +5 -5
- label_studio_sdk/types/{api_token_response.py → converted_format_request.py} +8 -15
- label_studio_sdk/types/count_limit.py +22 -0
- label_studio_sdk/types/custom_scripts_editable_by_enum.py +5 -0
- label_studio_sdk/types/default_role_enum.py +5 -0
- label_studio_sdk/types/edition_enum.py +5 -0
- label_studio_sdk/types/export.py +7 -7
- label_studio_sdk/types/file_upload.py +5 -5
- label_studio_sdk/types/filter.py +9 -6
- label_studio_sdk/types/filter_group.py +3 -3
- label_studio_sdk/types/finished_enum.py +5 -0
- label_studio_sdk/types/gcs_export_storage.py +8 -12
- label_studio_sdk/types/gcs_import_storage.py +8 -12
- label_studio_sdk/types/{rotate_token_response.py → hotkeys.py} +5 -8
- label_studio_sdk/types/{base_task.py → import_api_request.py} +11 -34
- label_studio_sdk/types/inference_run_cost_estimate.py +2 -2
- label_studio_sdk/types/label_stream_task_distribution_enum.py +5 -0
- label_studio_sdk/types/{annotations_dm_field_last_action.py → last_action_enum.py} +1 -1
- label_studio_sdk/types/local_files_export_storage.py +8 -12
- label_studio_sdk/types/local_files_import_storage.py +8 -12
- label_studio_sdk/types/{annotation_filter_options.py → lse_annotation_filter_options.py} +12 -2
- label_studio_sdk/types/lse_annotation_filter_options_request.py +42 -0
- label_studio_sdk/types/lse_annotation_filter_options_request_reviewed.py +7 -0
- label_studio_sdk/types/lse_annotation_filter_options_reviewed.py +7 -0
- label_studio_sdk/types/{export_snapshot.py → lse_export_create.py} +11 -11
- label_studio_sdk/types/lse_fields.py +49 -0
- label_studio_sdk/types/lse_fields_onboarding_state.py +8 -0
- label_studio_sdk/types/lse_fields_trial_role.py +8 -0
- label_studio_sdk/types/lse_key_indicator_value.py +35 -0
- label_studio_sdk/types/lse_organization.py +57 -0
- label_studio_sdk/types/lse_organization_custom_scripts_editable_by.py +7 -0
- label_studio_sdk/types/{key_indicators_item_additional_kpis_item.py → lse_organization_member_list.py} +12 -7
- label_studio_sdk/types/lse_project_create.py +196 -0
- label_studio_sdk/types/lse_project_create_sampling.py +7 -0
- label_studio_sdk/types/lse_project_create_skip_queue.py +7 -0
- label_studio_sdk/types/lse_project_update.py +215 -0
- label_studio_sdk/types/lse_project_update_sampling.py +7 -0
- label_studio_sdk/types/lse_project_update_skip_queue.py +7 -0
- label_studio_sdk/types/lse_s3export_storage.py +134 -0
- label_studio_sdk/{import_storage/s3/types/s3create_response.py → types/lse_s3export_storage_request.py} +47 -21
- label_studio_sdk/{import_storage/s3/types/s3update_response.py → types/lse_s3import_storage.py} +60 -21
- label_studio_sdk/types/{s3s_import_storage.py → lse_s3import_storage_request.py} +32 -21
- label_studio_sdk/types/lse_task.py +117 -0
- label_studio_sdk/types/{data_manager_task_serializer_drafts_item.py → lse_task_drafts_item.py} +2 -2
- label_studio_sdk/types/lse_task_filter_options.py +63 -0
- label_studio_sdk/types/lse_task_filter_options_annotated.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_finished.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_request.py +63 -0
- label_studio_sdk/types/lse_task_filter_options_request_annotated.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_request_finished.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_request_reviewed.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_request_skipped.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_reviewed.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_skipped.py +7 -0
- label_studio_sdk/types/{data_manager_task_serializer_predictions_item.py → lse_task_predictions_item.py} +4 -5
- label_studio_sdk/types/lse_task_serializer_for_annotators.py +54 -0
- label_studio_sdk/types/lse_task_serializer_for_annotators_drafts_item.py +22 -0
- label_studio_sdk/types/lse_task_serializer_for_annotators_predictions_item.py +28 -0
- label_studio_sdk/types/lse_task_serializer_for_reviewers.py +117 -0
- label_studio_sdk/types/lse_task_serializer_for_reviewers_drafts_item.py +22 -0
- label_studio_sdk/types/lse_task_serializer_for_reviewers_predictions_item.py +28 -0
- label_studio_sdk/types/lse_user.py +49 -0
- label_studio_sdk/types/{base_user.py → lse_user_api.py} +17 -6
- label_studio_sdk/types/lse_user_organization_member_list.py +48 -0
- label_studio_sdk/types/lseapi_token_create.py +21 -0
- label_studio_sdk/types/lseapi_token_list.py +21 -0
- label_studio_sdk/types/lsejwt_settings.py +32 -0
- label_studio_sdk/types/maybe_expanded_comment.py +7 -0
- label_studio_sdk/types/ml_backend.py +16 -17
- label_studio_sdk/types/mode_enum.py +5 -0
- label_studio_sdk/types/model_interface.py +44 -0
- label_studio_sdk/types/model_interface_request.py +40 -0
- label_studio_sdk/types/model_interface_serializer_get.py +45 -0
- label_studio_sdk/types/model_provider_connection.py +48 -17
- label_studio_sdk/types/model_provider_connection_budget_reset_period.py +3 -1
- label_studio_sdk/types/model_provider_connection_request.py +71 -0
- label_studio_sdk/types/model_run.py +40 -0
- label_studio_sdk/types/{inference_run_status.py → model_run_status_enum.py} +1 -1
- label_studio_sdk/types/null_enum.py +3 -0
- label_studio_sdk/types/onboarding_state_enum.py +7 -0
- label_studio_sdk/types/organization_billing.py +20 -0
- label_studio_sdk/types/organization_id.py +28 -0
- label_studio_sdk/types/organization_invite.py +20 -0
- label_studio_sdk/types/organization_member.py +37 -0
- label_studio_sdk/types/organization_membership.py +24 -0
- label_studio_sdk/{projects/types/projects_list_response.py → types/paginated_all_roles_project_list_list.py} +5 -5
- label_studio_sdk/types/paginated_lse_organization_member_list_list.py +23 -0
- label_studio_sdk/types/{jwt_settings_response.py → paginated_role_based_task_list.py} +11 -9
- label_studio_sdk/types/pause.py +55 -14
- label_studio_sdk/types/pause_request.py +41 -0
- label_studio_sdk/types/prediction.py +7 -11
- label_studio_sdk/types/prediction_request.py +56 -0
- label_studio_sdk/types/project.py +32 -39
- label_studio_sdk/types/project_import.py +12 -13
- label_studio_sdk/types/project_label_config.py +2 -2
- label_studio_sdk/types/project_label_config_request.py +22 -0
- label_studio_sdk/types/project_sampling.py +3 -3
- label_studio_sdk/types/project_skip_queue.py +3 -1
- label_studio_sdk/types/project_subset_enum.py +5 -0
- label_studio_sdk/types/prompts_status_enum.py +16 -0
- label_studio_sdk/types/{prompt_version_provider.py → provider_enum.py} +1 -1
- label_studio_sdk/types/reason_enum.py +7 -0
- label_studio_sdk/types/redis_export_storage.py +8 -12
- label_studio_sdk/types/redis_import_storage.py +8 -12
- label_studio_sdk/types/refined_prompt_response.py +5 -6
- label_studio_sdk/types/requeue_rejected_tasks_mode_enum.py +5 -0
- label_studio_sdk/types/review_criteria_enum.py +5 -0
- label_studio_sdk/types/review_settings.py +80 -0
- label_studio_sdk/types/review_settings_request.py +80 -0
- label_studio_sdk/types/review_settings_request_requeue_rejected_tasks_mode.py +8 -0
- label_studio_sdk/types/review_settings_request_review_criteria.py +7 -0
- label_studio_sdk/types/review_settings_requeue_rejected_tasks_mode.py +8 -0
- label_studio_sdk/types/review_settings_review_criteria.py +7 -0
- label_studio_sdk/types/reviewed_enum.py +5 -0
- label_studio_sdk/types/role9e7enum.py +5 -0
- label_studio_sdk/types/role_based_task.py +8 -0
- label_studio_sdk/types/s3export_storage.py +8 -12
- label_studio_sdk/types/s3import_storage.py +8 -12
- label_studio_sdk/types/sampling_enum.py +7 -0
- label_studio_sdk/types/scope_enum.py +5 -0
- label_studio_sdk/types/selected_items_request.py +23 -0
- label_studio_sdk/types/serialization_option.py +2 -6
- label_studio_sdk/types/serialization_option_request.py +22 -0
- label_studio_sdk/types/serialization_options.py +17 -5
- label_studio_sdk/types/serialization_options_request.py +47 -0
- label_studio_sdk/types/skill_name_enum.py +5 -0
- label_studio_sdk/types/skip_queue_enum.py +5 -0
- label_studio_sdk/types/skipped_enum.py +5 -0
- label_studio_sdk/types/state_enum.py +5 -0
- label_studio_sdk/types/status7bf_enum.py +5 -0
- label_studio_sdk/types/{azure_blob_import_storage_status.py → status_c5a_enum.py} +2 -2
- label_studio_sdk/types/third_party_model_version.py +65 -0
- label_studio_sdk/types/third_party_model_version_request.py +54 -0
- label_studio_sdk/types/token_refresh_response.py +19 -0
- label_studio_sdk/types/token_rotate_response.py +19 -0
- label_studio_sdk/types/trial_role_enum.py +16 -0
- label_studio_sdk/types/user_simple.py +8 -5
- label_studio_sdk/types/user_simple_request.py +28 -0
- label_studio_sdk/types/version_response.py +49 -0
- label_studio_sdk/types/view.py +8 -15
- label_studio_sdk/types/webhook.py +9 -13
- label_studio_sdk/types/webhook_serializer_for_update.py +15 -13
- label_studio_sdk/types/workspace.py +14 -34
- label_studio_sdk/types/workspace_member_create.py +27 -0
- label_studio_sdk/types/workspace_member_list.py +24 -0
- label_studio_sdk/users/client.py +604 -87
- label_studio_sdk/users/types/users_get_token_response.py +4 -11
- label_studio_sdk/users/types/users_reset_token_response.py +4 -11
- label_studio_sdk/versions/__init__.py +0 -3
- label_studio_sdk/versions/client.py +14 -14
- label_studio_sdk/views/client.py +227 -141
- label_studio_sdk/views/types/views_create_request_data.py +2 -2
- label_studio_sdk/views/types/views_create_request_data_filters.py +2 -2
- label_studio_sdk/views/types/views_create_request_data_filters_items_item.py +2 -2
- label_studio_sdk/views/types/views_update_request_data.py +2 -2
- label_studio_sdk/views/types/views_update_request_data_filters.py +2 -2
- label_studio_sdk/views/types/views_update_request_data_filters_items_item.py +2 -2
- label_studio_sdk/webhooks/__init__.py +36 -2
- label_studio_sdk/webhooks/client.py +173 -367
- label_studio_sdk/webhooks/types/__init__.py +34 -2
- label_studio_sdk/webhooks/types/webhooks_info_response.py +80 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_annotation_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_annotation_updated.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_annotations_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_annotations_deleted.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_deleted.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_updated.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_project_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_project_deleted.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_project_updated.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_review_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_review_updated.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_reviews_deleted.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_tasks_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_tasks_deleted.py +24 -0
- label_studio_sdk/workspaces/__init__.py +1 -2
- label_studio_sdk/workspaces/client.py +97 -117
- label_studio_sdk/workspaces/members/__init__.py +0 -3
- label_studio_sdk/workspaces/members/client.py +65 -81
- {label_studio_sdk-1.0.20.dist-info → label_studio_sdk-2.0.1.dist-info}/METADATA +73 -25
- label_studio_sdk-2.0.1.dist-info/RECORD +435 -0
- {label_studio_sdk-1.0.20.dist-info → label_studio_sdk-2.0.1.dist-info}/WHEEL +1 -1
- label_studio_sdk/annotations/types/annotations_create_bulk_request_selected_items.py +0 -34
- label_studio_sdk/export_storage/azure/types/__init__.py +0 -6
- label_studio_sdk/export_storage/azure/types/azure_create_response.py +0 -57
- label_studio_sdk/export_storage/azure/types/azure_update_response.py +0 -57
- label_studio_sdk/export_storage/gcs/types/__init__.py +0 -6
- label_studio_sdk/export_storage/gcs/types/gcs_create_response.py +0 -57
- label_studio_sdk/export_storage/gcs/types/gcs_update_response.py +0 -57
- label_studio_sdk/export_storage/local/types/__init__.py +0 -6
- label_studio_sdk/export_storage/local/types/local_create_response.py +0 -47
- label_studio_sdk/export_storage/local/types/local_update_response.py +0 -47
- label_studio_sdk/export_storage/redis/types/__init__.py +0 -6
- label_studio_sdk/export_storage/redis/types/redis_create_response.py +0 -62
- label_studio_sdk/export_storage/redis/types/redis_update_response.py +0 -62
- label_studio_sdk/export_storage/s3/types/__init__.py +0 -6
- label_studio_sdk/export_storage/s3/types/s3create_response.py +0 -81
- label_studio_sdk/export_storage/s3/types/s3update_response.py +0 -81
- label_studio_sdk/import_storage/azure/types/__init__.py +0 -6
- label_studio_sdk/import_storage/azure/types/azure_create_response.py +0 -72
- label_studio_sdk/import_storage/azure/types/azure_update_response.py +0 -72
- label_studio_sdk/import_storage/gcs/types/__init__.py +0 -6
- label_studio_sdk/import_storage/gcs/types/gcs_create_response.py +0 -72
- label_studio_sdk/import_storage/gcs/types/gcs_update_response.py +0 -72
- label_studio_sdk/import_storage/local/types/__init__.py +0 -6
- label_studio_sdk/import_storage/local/types/local_create_response.py +0 -47
- label_studio_sdk/import_storage/local/types/local_update_response.py +0 -47
- label_studio_sdk/import_storage/redis/types/__init__.py +0 -6
- label_studio_sdk/import_storage/redis/types/redis_create_response.py +0 -62
- label_studio_sdk/import_storage/redis/types/redis_update_response.py +0 -62
- label_studio_sdk/import_storage/s3/types/__init__.py +0 -6
- label_studio_sdk/ml/types/ml_create_response.py +0 -68
- label_studio_sdk/ml/types/ml_create_response_auth_method.py +0 -5
- label_studio_sdk/ml/types/ml_update_response.py +0 -68
- label_studio_sdk/ml/types/ml_update_response_auth_method.py +0 -5
- label_studio_sdk/projects/exports/types/exports_list_formats_response_item.py +0 -44
- label_studio_sdk/projects/types/projects_create_response.py +0 -91
- label_studio_sdk/projects/types/projects_update_response.py +0 -96
- label_studio_sdk/prompts/types/prompts_batch_failed_predictions_request_failed_predictions_item.py +0 -32
- label_studio_sdk/prompts/types/prompts_batch_predictions_request_results_item.py +0 -59
- label_studio_sdk/tasks/types/tasks_list_response.py +0 -38
- label_studio_sdk/types/annotation_completed_by.py +0 -6
- label_studio_sdk/types/azure_blob_export_storage_status.py +0 -7
- label_studio_sdk/types/base_task_updated_by.py +0 -7
- label_studio_sdk/types/comment_created_by.py +0 -5
- label_studio_sdk/types/converted_format_status.py +0 -5
- label_studio_sdk/types/data_manager_task_serializer.py +0 -118
- label_studio_sdk/types/data_manager_task_serializer_annotators_item.py +0 -5
- label_studio_sdk/types/data_manager_task_serializer_comment_authors_item.py +0 -5
- label_studio_sdk/types/data_manager_task_serializer_predictions_item_model_run.py +0 -5
- label_studio_sdk/types/export_format.py +0 -25
- label_studio_sdk/types/export_snapshot_status.py +0 -5
- label_studio_sdk/types/export_status.py +0 -5
- label_studio_sdk/types/gcs_export_storage_status.py +0 -7
- label_studio_sdk/types/gcs_import_storage_status.py +0 -7
- label_studio_sdk/types/inference_run.py +0 -34
- label_studio_sdk/types/inference_run_created_by.py +0 -5
- label_studio_sdk/types/inference_run_organization.py +0 -5
- label_studio_sdk/types/inference_run_project_subset.py +0 -5
- label_studio_sdk/types/key_indicators.py +0 -6
- label_studio_sdk/types/key_indicators_item.py +0 -41
- label_studio_sdk/types/local_files_export_storage_status.py +0 -7
- label_studio_sdk/types/local_files_import_storage_status.py +0 -7
- label_studio_sdk/types/ml_backend_auth_method.py +0 -5
- label_studio_sdk/types/ml_backend_state.py +0 -5
- label_studio_sdk/types/model_provider_connection_created_by.py +0 -5
- label_studio_sdk/types/model_provider_connection_organization.py +0 -5
- label_studio_sdk/types/model_provider_connection_provider.py +0 -7
- label_studio_sdk/types/model_provider_connection_scope.py +0 -5
- label_studio_sdk/types/pause_paused_by.py +0 -5
- label_studio_sdk/types/project_import_status.py +0 -5
- label_studio_sdk/types/prompt.py +0 -71
- label_studio_sdk/types/prompt_associated_projects_item.py +0 -6
- label_studio_sdk/types/prompt_created_by.py +0 -5
- label_studio_sdk/types/prompt_organization.py +0 -5
- label_studio_sdk/types/prompt_version.py +0 -32
- label_studio_sdk/types/prompt_version_created_by.py +0 -5
- label_studio_sdk/types/prompt_version_organization.py +0 -5
- label_studio_sdk/types/redis_export_storage_status.py +0 -7
- label_studio_sdk/types/redis_import_storage_status.py +0 -7
- label_studio_sdk/types/refined_prompt_response_refinement_status.py +0 -7
- label_studio_sdk/types/s3export_storage_status.py +0 -7
- label_studio_sdk/types/s3import_storage_status.py +0 -7
- label_studio_sdk/types/s3s_export_storage.py +0 -73
- label_studio_sdk/types/s3s_import_storage_status.py +0 -7
- label_studio_sdk/types/task.py +0 -156
- label_studio_sdk/types/task_annotators_item.py +0 -5
- label_studio_sdk/types/task_comment_authors_item.py +0 -5
- label_studio_sdk/types/task_filter_options.py +0 -39
- label_studio_sdk/types/webhook_actions_item.py +0 -21
- label_studio_sdk/types/webhook_serializer_for_update_actions_item.py +0 -21
- label_studio_sdk/versions/types/__init__.py +0 -6
- label_studio_sdk/versions/types/versions_get_response.py +0 -73
- label_studio_sdk/versions/types/versions_get_response_edition.py +0 -5
- label_studio_sdk/workspaces/members/types/__init__.py +0 -6
- label_studio_sdk/workspaces/members/types/members_create_response.py +0 -22
- label_studio_sdk/workspaces/members/types/members_list_response_item.py +0 -22
- label_studio_sdk-1.0.20.dist-info/RECORD +0 -374
- {label_studio_sdk-1.0.20.dist-info → label_studio_sdk-2.0.1.dist-info}/LICENSE +0 -0
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
from ...core.client_wrapper import SyncClientWrapper
|
|
5
5
|
from ...core.request_options import RequestOptions
|
|
6
|
-
from ...types.
|
|
7
|
-
from ...core.
|
|
6
|
+
from ...types.lse_s3export_storage import LseS3ExportStorage
|
|
7
|
+
from ...core.unchecked_base_model import construct_type
|
|
8
8
|
from json.decoder import JSONDecodeError
|
|
9
9
|
from ...core.api_error import ApiError
|
|
10
|
+
import datetime as dt
|
|
11
|
+
from ...types.status_c5a_enum import StatusC5AEnum
|
|
10
12
|
from ...core.jsonable_encoder import jsonable_encoder
|
|
11
13
|
from ...core.client_wrapper import AsyncClientWrapper
|
|
12
14
|
|
|
@@ -19,18 +21,20 @@ class S3SClient:
|
|
|
19
21
|
self._client_wrapper = client_wrapper
|
|
20
22
|
|
|
21
23
|
def list(
|
|
22
|
-
self,
|
|
23
|
-
|
|
24
|
+
self,
|
|
25
|
+
*,
|
|
26
|
+
ordering: typing.Optional[str] = None,
|
|
27
|
+
project: typing.Optional[int] = None,
|
|
28
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
29
|
+
) -> typing.List[LseS3ExportStorage]:
|
|
24
30
|
"""
|
|
25
|
-
|
|
26
|
-
You can connect your S3 bucket to Label Studio as a source storage or target storage. Use this API request to get a list of all S3 export (target) storage connections for a specific project.
|
|
27
|
-
|
|
28
|
-
The project ID can be found in the URL when viewing the project in Label Studio, or you can retrieve all project IDs using [List all projects](../projects/list).
|
|
29
|
-
|
|
30
|
-
For more information about working with external storage, see [Sync data from external storage](https://labelstud.io/guide/storage).
|
|
31
|
+
Get a list of all S3 export storage connections that were set up with IAM role access.
|
|
31
32
|
|
|
32
33
|
Parameters
|
|
33
34
|
----------
|
|
35
|
+
ordering : typing.Optional[str]
|
|
36
|
+
Which field to use when ordering the results.
|
|
37
|
+
|
|
34
38
|
project : typing.Optional[int]
|
|
35
39
|
Project ID
|
|
36
40
|
|
|
@@ -39,7 +43,7 @@ class S3SClient:
|
|
|
39
43
|
|
|
40
44
|
Returns
|
|
41
45
|
-------
|
|
42
|
-
typing.List[
|
|
46
|
+
typing.List[LseS3ExportStorage]
|
|
43
47
|
|
|
44
48
|
|
|
45
49
|
Examples
|
|
@@ -55,6 +59,7 @@ class S3SClient:
|
|
|
55
59
|
"api/storages/export/s3s",
|
|
56
60
|
method="GET",
|
|
57
61
|
params={
|
|
62
|
+
"ordering": ordering,
|
|
58
63
|
"project": project,
|
|
59
64
|
},
|
|
60
65
|
request_options=request_options,
|
|
@@ -62,9 +67,9 @@ class S3SClient:
|
|
|
62
67
|
try:
|
|
63
68
|
if 200 <= _response.status_code < 300:
|
|
64
69
|
return typing.cast(
|
|
65
|
-
typing.List[
|
|
66
|
-
|
|
67
|
-
type_=typing.List[
|
|
70
|
+
typing.List[LseS3ExportStorage],
|
|
71
|
+
construct_type(
|
|
72
|
+
type_=typing.List[LseS3ExportStorage], # type: ignore
|
|
68
73
|
object_=_response.json(),
|
|
69
74
|
),
|
|
70
75
|
)
|
|
@@ -76,37 +81,69 @@ class S3SClient:
|
|
|
76
81
|
def create(
|
|
77
82
|
self,
|
|
78
83
|
*,
|
|
79
|
-
|
|
84
|
+
role_arn: str,
|
|
85
|
+
project: int,
|
|
86
|
+
synchronizable: typing.Optional[bool] = OMIT,
|
|
87
|
+
last_sync: typing.Optional[dt.datetime] = OMIT,
|
|
88
|
+
last_sync_count: typing.Optional[int] = OMIT,
|
|
89
|
+
last_sync_job: typing.Optional[str] = OMIT,
|
|
90
|
+
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
91
|
+
traceback: typing.Optional[str] = OMIT,
|
|
92
|
+
meta: typing.Optional[typing.Optional[typing.Any]] = OMIT,
|
|
80
93
|
title: typing.Optional[str] = OMIT,
|
|
81
94
|
description: typing.Optional[str] = OMIT,
|
|
82
|
-
|
|
95
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
83
96
|
bucket: typing.Optional[str] = OMIT,
|
|
84
97
|
prefix: typing.Optional[str] = OMIT,
|
|
85
|
-
|
|
86
|
-
|
|
98
|
+
regex_filter: typing.Optional[str] = OMIT,
|
|
99
|
+
use_blob_urls: typing.Optional[bool] = OMIT,
|
|
100
|
+
aws_access_key_id: typing.Optional[str] = OMIT,
|
|
101
|
+
aws_secret_access_key: typing.Optional[str] = OMIT,
|
|
102
|
+
aws_session_token: typing.Optional[str] = OMIT,
|
|
103
|
+
aws_sse_kms_key_id: typing.Optional[str] = OMIT,
|
|
87
104
|
region_name: typing.Optional[str] = OMIT,
|
|
88
105
|
s3endpoint: typing.Optional[str] = OMIT,
|
|
106
|
+
external_id: typing.Optional[str] = OMIT,
|
|
107
|
+
legacy_auth: typing.Optional[bool] = OMIT,
|
|
89
108
|
request_options: typing.Optional[RequestOptions] = None,
|
|
90
|
-
) ->
|
|
109
|
+
) -> LseS3ExportStorage:
|
|
91
110
|
"""
|
|
92
|
-
|
|
93
|
-
Create a new target storage connection to a S3 bucket with IAM role access.
|
|
94
|
-
|
|
95
|
-
For information about the required fields and prerequisites, see [Amazon S3](https://docs.humansignal.com/guide/storage#Set-up-an-S3-connection-with-IAM-role-access) in the Label Studio documentation.
|
|
111
|
+
Create an S3 export storage connection with IAM role access to store annotations.
|
|
96
112
|
|
|
97
113
|
Parameters
|
|
98
114
|
----------
|
|
99
|
-
|
|
100
|
-
|
|
115
|
+
role_arn : str
|
|
116
|
+
AWS RoleArn
|
|
117
|
+
|
|
118
|
+
project : int
|
|
119
|
+
A unique integer value identifying this project.
|
|
120
|
+
|
|
121
|
+
synchronizable : typing.Optional[bool]
|
|
122
|
+
|
|
123
|
+
last_sync : typing.Optional[dt.datetime]
|
|
124
|
+
Last sync finished time
|
|
125
|
+
|
|
126
|
+
last_sync_count : typing.Optional[int]
|
|
127
|
+
Count of tasks synced last time
|
|
128
|
+
|
|
129
|
+
last_sync_job : typing.Optional[str]
|
|
130
|
+
Last sync job ID
|
|
131
|
+
|
|
132
|
+
status : typing.Optional[StatusC5AEnum]
|
|
133
|
+
|
|
134
|
+
traceback : typing.Optional[str]
|
|
135
|
+
Traceback report for the last failed sync
|
|
136
|
+
|
|
137
|
+
meta : typing.Optional[typing.Optional[typing.Any]]
|
|
101
138
|
|
|
102
139
|
title : typing.Optional[str]
|
|
103
|
-
|
|
140
|
+
Cloud storage title
|
|
104
141
|
|
|
105
142
|
description : typing.Optional[str]
|
|
106
|
-
|
|
143
|
+
Cloud storage description
|
|
107
144
|
|
|
108
|
-
|
|
109
|
-
|
|
145
|
+
can_delete_objects : typing.Optional[bool]
|
|
146
|
+
Deletion from storage enabled
|
|
110
147
|
|
|
111
148
|
bucket : typing.Optional[str]
|
|
112
149
|
S3 bucket name
|
|
@@ -114,11 +151,23 @@ class S3SClient:
|
|
|
114
151
|
prefix : typing.Optional[str]
|
|
115
152
|
S3 bucket prefix
|
|
116
153
|
|
|
117
|
-
|
|
118
|
-
|
|
154
|
+
regex_filter : typing.Optional[str]
|
|
155
|
+
Cloud storage regex for filtering objects
|
|
119
156
|
|
|
120
|
-
|
|
121
|
-
|
|
157
|
+
use_blob_urls : typing.Optional[bool]
|
|
158
|
+
Interpret objects as BLOBs and generate URLs
|
|
159
|
+
|
|
160
|
+
aws_access_key_id : typing.Optional[str]
|
|
161
|
+
AWS_ACCESS_KEY_ID
|
|
162
|
+
|
|
163
|
+
aws_secret_access_key : typing.Optional[str]
|
|
164
|
+
AWS_SECRET_ACCESS_KEY
|
|
165
|
+
|
|
166
|
+
aws_session_token : typing.Optional[str]
|
|
167
|
+
AWS_SESSION_TOKEN
|
|
168
|
+
|
|
169
|
+
aws_sse_kms_key_id : typing.Optional[str]
|
|
170
|
+
AWS SSE KMS Key ID
|
|
122
171
|
|
|
123
172
|
region_name : typing.Optional[str]
|
|
124
173
|
AWS Region
|
|
@@ -126,12 +175,17 @@ class S3SClient:
|
|
|
126
175
|
s3endpoint : typing.Optional[str]
|
|
127
176
|
S3 Endpoint
|
|
128
177
|
|
|
178
|
+
external_id : typing.Optional[str]
|
|
179
|
+
AWS ExternalId
|
|
180
|
+
|
|
181
|
+
legacy_auth : typing.Optional[bool]
|
|
182
|
+
|
|
129
183
|
request_options : typing.Optional[RequestOptions]
|
|
130
184
|
Request-specific configuration.
|
|
131
185
|
|
|
132
186
|
Returns
|
|
133
187
|
-------
|
|
134
|
-
|
|
188
|
+
LseS3ExportStorage
|
|
135
189
|
|
|
136
190
|
|
|
137
191
|
Examples
|
|
@@ -141,25 +195,39 @@ class S3SClient:
|
|
|
141
195
|
client = LabelStudio(
|
|
142
196
|
api_key="YOUR_API_KEY",
|
|
143
197
|
)
|
|
144
|
-
client.export_storage.s3s.create(
|
|
198
|
+
client.export_storage.s3s.create(
|
|
199
|
+
role_arn="role_arn",
|
|
200
|
+
project=1,
|
|
201
|
+
)
|
|
145
202
|
"""
|
|
146
203
|
_response = self._client_wrapper.httpx_client.request(
|
|
147
204
|
"api/storages/export/s3s",
|
|
148
205
|
method="POST",
|
|
149
206
|
json={
|
|
150
|
-
"
|
|
207
|
+
"synchronizable": synchronizable,
|
|
208
|
+
"last_sync": last_sync,
|
|
209
|
+
"last_sync_count": last_sync_count,
|
|
210
|
+
"last_sync_job": last_sync_job,
|
|
211
|
+
"status": status,
|
|
212
|
+
"traceback": traceback,
|
|
213
|
+
"meta": meta,
|
|
151
214
|
"title": title,
|
|
152
215
|
"description": description,
|
|
153
|
-
"
|
|
216
|
+
"can_delete_objects": can_delete_objects,
|
|
154
217
|
"bucket": bucket,
|
|
155
218
|
"prefix": prefix,
|
|
156
|
-
"
|
|
157
|
-
"
|
|
219
|
+
"regex_filter": regex_filter,
|
|
220
|
+
"use_blob_urls": use_blob_urls,
|
|
221
|
+
"aws_access_key_id": aws_access_key_id,
|
|
222
|
+
"aws_secret_access_key": aws_secret_access_key,
|
|
223
|
+
"aws_session_token": aws_session_token,
|
|
224
|
+
"aws_sse_kms_key_id": aws_sse_kms_key_id,
|
|
158
225
|
"region_name": region_name,
|
|
159
226
|
"s3_endpoint": s3endpoint,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
"
|
|
227
|
+
"external_id": external_id,
|
|
228
|
+
"role_arn": role_arn,
|
|
229
|
+
"legacy_auth": legacy_auth,
|
|
230
|
+
"project": project,
|
|
163
231
|
},
|
|
164
232
|
request_options=request_options,
|
|
165
233
|
omit=OMIT,
|
|
@@ -167,9 +235,9 @@ class S3SClient:
|
|
|
167
235
|
try:
|
|
168
236
|
if 200 <= _response.status_code < 300:
|
|
169
237
|
return typing.cast(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
type_=
|
|
238
|
+
LseS3ExportStorage,
|
|
239
|
+
construct_type(
|
|
240
|
+
type_=LseS3ExportStorage, # type: ignore
|
|
173
241
|
object_=_response.json(),
|
|
174
242
|
),
|
|
175
243
|
)
|
|
@@ -178,22 +246,20 @@ class S3SClient:
|
|
|
178
246
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
179
247
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
180
248
|
|
|
181
|
-
def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) ->
|
|
249
|
+
def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage:
|
|
182
250
|
"""
|
|
183
|
-
|
|
184
|
-
Get a specific S3 export storage connection. You will need to provide the export storage ID. You can find this using [List export storages](list).
|
|
251
|
+
Get a specific S3 export storage connection that was set up with IAM role access.
|
|
185
252
|
|
|
186
253
|
Parameters
|
|
187
254
|
----------
|
|
188
255
|
id : int
|
|
189
|
-
Export storage ID
|
|
190
256
|
|
|
191
257
|
request_options : typing.Optional[RequestOptions]
|
|
192
258
|
Request-specific configuration.
|
|
193
259
|
|
|
194
260
|
Returns
|
|
195
261
|
-------
|
|
196
|
-
|
|
262
|
+
LseS3ExportStorage
|
|
197
263
|
|
|
198
264
|
|
|
199
265
|
Examples
|
|
@@ -215,9 +281,9 @@ class S3SClient:
|
|
|
215
281
|
try:
|
|
216
282
|
if 200 <= _response.status_code < 300:
|
|
217
283
|
return typing.cast(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
type_=
|
|
284
|
+
LseS3ExportStorage,
|
|
285
|
+
construct_type(
|
|
286
|
+
type_=LseS3ExportStorage, # type: ignore
|
|
221
287
|
object_=_response.json(),
|
|
222
288
|
),
|
|
223
289
|
)
|
|
@@ -228,13 +294,11 @@ class S3SClient:
|
|
|
228
294
|
|
|
229
295
|
def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
230
296
|
"""
|
|
231
|
-
|
|
232
|
-
Delete a specific S3 export storage connection. You will need to provide the export storage ID. You can find this using [List export storages](list).
|
|
297
|
+
Delete a specific S3 export storage connection that was set up with IAM role access.
|
|
233
298
|
|
|
234
299
|
Parameters
|
|
235
300
|
----------
|
|
236
301
|
id : int
|
|
237
|
-
Export storage ID
|
|
238
302
|
|
|
239
303
|
request_options : typing.Optional[RequestOptions]
|
|
240
304
|
Request-specific configuration.
|
|
@@ -271,38 +335,65 @@ class S3SClient:
|
|
|
271
335
|
self,
|
|
272
336
|
id: int,
|
|
273
337
|
*,
|
|
274
|
-
|
|
338
|
+
synchronizable: typing.Optional[bool] = OMIT,
|
|
339
|
+
last_sync: typing.Optional[dt.datetime] = OMIT,
|
|
340
|
+
last_sync_count: typing.Optional[int] = OMIT,
|
|
341
|
+
last_sync_job: typing.Optional[str] = OMIT,
|
|
342
|
+
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
343
|
+
traceback: typing.Optional[str] = OMIT,
|
|
344
|
+
meta: typing.Optional[typing.Optional[typing.Any]] = OMIT,
|
|
275
345
|
title: typing.Optional[str] = OMIT,
|
|
276
346
|
description: typing.Optional[str] = OMIT,
|
|
277
|
-
|
|
347
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
278
348
|
bucket: typing.Optional[str] = OMIT,
|
|
279
349
|
prefix: typing.Optional[str] = OMIT,
|
|
280
|
-
|
|
281
|
-
|
|
350
|
+
regex_filter: typing.Optional[str] = OMIT,
|
|
351
|
+
use_blob_urls: typing.Optional[bool] = OMIT,
|
|
352
|
+
aws_access_key_id: typing.Optional[str] = OMIT,
|
|
353
|
+
aws_secret_access_key: typing.Optional[str] = OMIT,
|
|
354
|
+
aws_session_token: typing.Optional[str] = OMIT,
|
|
355
|
+
aws_sse_kms_key_id: typing.Optional[str] = OMIT,
|
|
282
356
|
region_name: typing.Optional[str] = OMIT,
|
|
283
357
|
s3endpoint: typing.Optional[str] = OMIT,
|
|
358
|
+
external_id: typing.Optional[str] = OMIT,
|
|
359
|
+
role_arn: typing.Optional[str] = OMIT,
|
|
360
|
+
legacy_auth: typing.Optional[bool] = OMIT,
|
|
361
|
+
project: typing.Optional[int] = OMIT,
|
|
284
362
|
request_options: typing.Optional[RequestOptions] = None,
|
|
285
|
-
) ->
|
|
363
|
+
) -> LseS3ExportStorage:
|
|
286
364
|
"""
|
|
287
|
-
|
|
288
|
-
Update a specific S3 export storage connection. You will need to provide the export storage ID. You can find this using [List export storages](list).
|
|
365
|
+
Update a specific S3 export storage connection that was set up with IAM role access.
|
|
289
366
|
|
|
290
367
|
Parameters
|
|
291
368
|
----------
|
|
292
369
|
id : int
|
|
293
|
-
Export storage ID
|
|
294
370
|
|
|
295
|
-
|
|
296
|
-
|
|
371
|
+
synchronizable : typing.Optional[bool]
|
|
372
|
+
|
|
373
|
+
last_sync : typing.Optional[dt.datetime]
|
|
374
|
+
Last sync finished time
|
|
375
|
+
|
|
376
|
+
last_sync_count : typing.Optional[int]
|
|
377
|
+
Count of tasks synced last time
|
|
378
|
+
|
|
379
|
+
last_sync_job : typing.Optional[str]
|
|
380
|
+
Last sync job ID
|
|
381
|
+
|
|
382
|
+
status : typing.Optional[StatusC5AEnum]
|
|
383
|
+
|
|
384
|
+
traceback : typing.Optional[str]
|
|
385
|
+
Traceback report for the last failed sync
|
|
386
|
+
|
|
387
|
+
meta : typing.Optional[typing.Optional[typing.Any]]
|
|
297
388
|
|
|
298
389
|
title : typing.Optional[str]
|
|
299
|
-
|
|
390
|
+
Cloud storage title
|
|
300
391
|
|
|
301
392
|
description : typing.Optional[str]
|
|
302
|
-
|
|
393
|
+
Cloud storage description
|
|
303
394
|
|
|
304
|
-
|
|
305
|
-
|
|
395
|
+
can_delete_objects : typing.Optional[bool]
|
|
396
|
+
Deletion from storage enabled
|
|
306
397
|
|
|
307
398
|
bucket : typing.Optional[str]
|
|
308
399
|
S3 bucket name
|
|
@@ -310,11 +401,23 @@ class S3SClient:
|
|
|
310
401
|
prefix : typing.Optional[str]
|
|
311
402
|
S3 bucket prefix
|
|
312
403
|
|
|
313
|
-
|
|
314
|
-
|
|
404
|
+
regex_filter : typing.Optional[str]
|
|
405
|
+
Cloud storage regex for filtering objects
|
|
315
406
|
|
|
316
|
-
|
|
317
|
-
|
|
407
|
+
use_blob_urls : typing.Optional[bool]
|
|
408
|
+
Interpret objects as BLOBs and generate URLs
|
|
409
|
+
|
|
410
|
+
aws_access_key_id : typing.Optional[str]
|
|
411
|
+
AWS_ACCESS_KEY_ID
|
|
412
|
+
|
|
413
|
+
aws_secret_access_key : typing.Optional[str]
|
|
414
|
+
AWS_SECRET_ACCESS_KEY
|
|
415
|
+
|
|
416
|
+
aws_session_token : typing.Optional[str]
|
|
417
|
+
AWS_SESSION_TOKEN
|
|
418
|
+
|
|
419
|
+
aws_sse_kms_key_id : typing.Optional[str]
|
|
420
|
+
AWS SSE KMS Key ID
|
|
318
421
|
|
|
319
422
|
region_name : typing.Optional[str]
|
|
320
423
|
AWS Region
|
|
@@ -322,12 +425,23 @@ class S3SClient:
|
|
|
322
425
|
s3endpoint : typing.Optional[str]
|
|
323
426
|
S3 Endpoint
|
|
324
427
|
|
|
428
|
+
external_id : typing.Optional[str]
|
|
429
|
+
AWS ExternalId
|
|
430
|
+
|
|
431
|
+
role_arn : typing.Optional[str]
|
|
432
|
+
AWS RoleArn
|
|
433
|
+
|
|
434
|
+
legacy_auth : typing.Optional[bool]
|
|
435
|
+
|
|
436
|
+
project : typing.Optional[int]
|
|
437
|
+
A unique integer value identifying this project.
|
|
438
|
+
|
|
325
439
|
request_options : typing.Optional[RequestOptions]
|
|
326
440
|
Request-specific configuration.
|
|
327
441
|
|
|
328
442
|
Returns
|
|
329
443
|
-------
|
|
330
|
-
|
|
444
|
+
LseS3ExportStorage
|
|
331
445
|
|
|
332
446
|
|
|
333
447
|
Examples
|
|
@@ -345,16 +459,30 @@ class S3SClient:
|
|
|
345
459
|
f"api/storages/export/s3s/{jsonable_encoder(id)}",
|
|
346
460
|
method="PATCH",
|
|
347
461
|
json={
|
|
348
|
-
"
|
|
462
|
+
"synchronizable": synchronizable,
|
|
463
|
+
"last_sync": last_sync,
|
|
464
|
+
"last_sync_count": last_sync_count,
|
|
465
|
+
"last_sync_job": last_sync_job,
|
|
466
|
+
"status": status,
|
|
467
|
+
"traceback": traceback,
|
|
468
|
+
"meta": meta,
|
|
349
469
|
"title": title,
|
|
350
470
|
"description": description,
|
|
351
|
-
"
|
|
471
|
+
"can_delete_objects": can_delete_objects,
|
|
352
472
|
"bucket": bucket,
|
|
353
473
|
"prefix": prefix,
|
|
354
|
-
"
|
|
355
|
-
"
|
|
474
|
+
"regex_filter": regex_filter,
|
|
475
|
+
"use_blob_urls": use_blob_urls,
|
|
476
|
+
"aws_access_key_id": aws_access_key_id,
|
|
477
|
+
"aws_secret_access_key": aws_secret_access_key,
|
|
478
|
+
"aws_session_token": aws_session_token,
|
|
479
|
+
"aws_sse_kms_key_id": aws_sse_kms_key_id,
|
|
356
480
|
"region_name": region_name,
|
|
357
481
|
"s3_endpoint": s3endpoint,
|
|
482
|
+
"external_id": external_id,
|
|
483
|
+
"role_arn": role_arn,
|
|
484
|
+
"legacy_auth": legacy_auth,
|
|
485
|
+
"project": project,
|
|
358
486
|
},
|
|
359
487
|
headers={
|
|
360
488
|
"content-type": "application/json",
|
|
@@ -365,9 +493,55 @@ class S3SClient:
|
|
|
365
493
|
try:
|
|
366
494
|
if 200 <= _response.status_code < 300:
|
|
367
495
|
return typing.cast(
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
type_=
|
|
496
|
+
LseS3ExportStorage,
|
|
497
|
+
construct_type(
|
|
498
|
+
type_=LseS3ExportStorage, # type: ignore
|
|
499
|
+
object_=_response.json(),
|
|
500
|
+
),
|
|
501
|
+
)
|
|
502
|
+
_response_json = _response.json()
|
|
503
|
+
except JSONDecodeError:
|
|
504
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
505
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
506
|
+
|
|
507
|
+
def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage:
|
|
508
|
+
"""
|
|
509
|
+
Sync tasks from an S3 export storage.
|
|
510
|
+
|
|
511
|
+
Parameters
|
|
512
|
+
----------
|
|
513
|
+
id : int
|
|
514
|
+
|
|
515
|
+
request_options : typing.Optional[RequestOptions]
|
|
516
|
+
Request-specific configuration.
|
|
517
|
+
|
|
518
|
+
Returns
|
|
519
|
+
-------
|
|
520
|
+
LseS3ExportStorage
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
Examples
|
|
524
|
+
--------
|
|
525
|
+
from label_studio_sdk import LabelStudio
|
|
526
|
+
|
|
527
|
+
client = LabelStudio(
|
|
528
|
+
api_key="YOUR_API_KEY",
|
|
529
|
+
)
|
|
530
|
+
client.export_storage.s3s.sync(
|
|
531
|
+
id=1,
|
|
532
|
+
)
|
|
533
|
+
"""
|
|
534
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
535
|
+
f"api/storages/export/s3s/{jsonable_encoder(id)}/sync",
|
|
536
|
+
method="POST",
|
|
537
|
+
request_options=request_options,
|
|
538
|
+
)
|
|
539
|
+
try:
|
|
540
|
+
if 200 <= _response.status_code < 300:
|
|
541
|
+
return typing.cast(
|
|
542
|
+
LseS3ExportStorage,
|
|
543
|
+
construct_type(
|
|
544
|
+
type_=LseS3ExportStorage, # type: ignore
|
|
371
545
|
object_=_response.json(),
|
|
372
546
|
),
|
|
373
547
|
)
|
|
@@ -379,35 +553,69 @@ class S3SClient:
|
|
|
379
553
|
def validate(
|
|
380
554
|
self,
|
|
381
555
|
*,
|
|
382
|
-
|
|
556
|
+
role_arn: str,
|
|
557
|
+
project: int,
|
|
558
|
+
synchronizable: typing.Optional[bool] = OMIT,
|
|
559
|
+
last_sync: typing.Optional[dt.datetime] = OMIT,
|
|
560
|
+
last_sync_count: typing.Optional[int] = OMIT,
|
|
561
|
+
last_sync_job: typing.Optional[str] = OMIT,
|
|
562
|
+
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
563
|
+
traceback: typing.Optional[str] = OMIT,
|
|
564
|
+
meta: typing.Optional[typing.Optional[typing.Any]] = OMIT,
|
|
383
565
|
title: typing.Optional[str] = OMIT,
|
|
384
566
|
description: typing.Optional[str] = OMIT,
|
|
385
|
-
|
|
567
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
386
568
|
bucket: typing.Optional[str] = OMIT,
|
|
387
569
|
prefix: typing.Optional[str] = OMIT,
|
|
388
|
-
|
|
389
|
-
|
|
570
|
+
regex_filter: typing.Optional[str] = OMIT,
|
|
571
|
+
use_blob_urls: typing.Optional[bool] = OMIT,
|
|
572
|
+
aws_access_key_id: typing.Optional[str] = OMIT,
|
|
573
|
+
aws_secret_access_key: typing.Optional[str] = OMIT,
|
|
574
|
+
aws_session_token: typing.Optional[str] = OMIT,
|
|
575
|
+
aws_sse_kms_key_id: typing.Optional[str] = OMIT,
|
|
390
576
|
region_name: typing.Optional[str] = OMIT,
|
|
391
577
|
s3endpoint: typing.Optional[str] = OMIT,
|
|
578
|
+
external_id: typing.Optional[str] = OMIT,
|
|
579
|
+
legacy_auth: typing.Optional[bool] = OMIT,
|
|
392
580
|
request_options: typing.Optional[RequestOptions] = None,
|
|
393
581
|
) -> None:
|
|
394
582
|
"""
|
|
395
|
-
|
|
396
|
-
Validate a specific S3 export storage connection. This is useful to ensure that the storage configuration settings are correct and operational before attempting to export data.
|
|
583
|
+
Validate a specific S3 export storage connection that was set up with IAM role access.
|
|
397
584
|
|
|
398
585
|
Parameters
|
|
399
586
|
----------
|
|
400
|
-
|
|
401
|
-
|
|
587
|
+
role_arn : str
|
|
588
|
+
AWS RoleArn
|
|
589
|
+
|
|
590
|
+
project : int
|
|
591
|
+
A unique integer value identifying this project.
|
|
592
|
+
|
|
593
|
+
synchronizable : typing.Optional[bool]
|
|
594
|
+
|
|
595
|
+
last_sync : typing.Optional[dt.datetime]
|
|
596
|
+
Last sync finished time
|
|
597
|
+
|
|
598
|
+
last_sync_count : typing.Optional[int]
|
|
599
|
+
Count of tasks synced last time
|
|
600
|
+
|
|
601
|
+
last_sync_job : typing.Optional[str]
|
|
602
|
+
Last sync job ID
|
|
603
|
+
|
|
604
|
+
status : typing.Optional[StatusC5AEnum]
|
|
605
|
+
|
|
606
|
+
traceback : typing.Optional[str]
|
|
607
|
+
Traceback report for the last failed sync
|
|
608
|
+
|
|
609
|
+
meta : typing.Optional[typing.Optional[typing.Any]]
|
|
402
610
|
|
|
403
611
|
title : typing.Optional[str]
|
|
404
|
-
|
|
612
|
+
Cloud storage title
|
|
405
613
|
|
|
406
614
|
description : typing.Optional[str]
|
|
407
|
-
|
|
615
|
+
Cloud storage description
|
|
408
616
|
|
|
409
|
-
|
|
410
|
-
|
|
617
|
+
can_delete_objects : typing.Optional[bool]
|
|
618
|
+
Deletion from storage enabled
|
|
411
619
|
|
|
412
620
|
bucket : typing.Optional[str]
|
|
413
621
|
S3 bucket name
|
|
@@ -415,11 +623,23 @@ class S3SClient:
|
|
|
415
623
|
prefix : typing.Optional[str]
|
|
416
624
|
S3 bucket prefix
|
|
417
625
|
|
|
418
|
-
|
|
419
|
-
|
|
626
|
+
regex_filter : typing.Optional[str]
|
|
627
|
+
Cloud storage regex for filtering objects
|
|
420
628
|
|
|
421
|
-
|
|
422
|
-
|
|
629
|
+
use_blob_urls : typing.Optional[bool]
|
|
630
|
+
Interpret objects as BLOBs and generate URLs
|
|
631
|
+
|
|
632
|
+
aws_access_key_id : typing.Optional[str]
|
|
633
|
+
AWS_ACCESS_KEY_ID
|
|
634
|
+
|
|
635
|
+
aws_secret_access_key : typing.Optional[str]
|
|
636
|
+
AWS_SECRET_ACCESS_KEY
|
|
637
|
+
|
|
638
|
+
aws_session_token : typing.Optional[str]
|
|
639
|
+
AWS_SESSION_TOKEN
|
|
640
|
+
|
|
641
|
+
aws_sse_kms_key_id : typing.Optional[str]
|
|
642
|
+
AWS SSE KMS Key ID
|
|
423
643
|
|
|
424
644
|
region_name : typing.Optional[str]
|
|
425
645
|
AWS Region
|
|
@@ -427,6 +647,11 @@ class S3SClient:
|
|
|
427
647
|
s3endpoint : typing.Optional[str]
|
|
428
648
|
S3 Endpoint
|
|
429
649
|
|
|
650
|
+
external_id : typing.Optional[str]
|
|
651
|
+
AWS ExternalId
|
|
652
|
+
|
|
653
|
+
legacy_auth : typing.Optional[bool]
|
|
654
|
+
|
|
430
655
|
request_options : typing.Optional[RequestOptions]
|
|
431
656
|
Request-specific configuration.
|
|
432
657
|
|
|
@@ -441,25 +666,39 @@ class S3SClient:
|
|
|
441
666
|
client = LabelStudio(
|
|
442
667
|
api_key="YOUR_API_KEY",
|
|
443
668
|
)
|
|
444
|
-
client.export_storage.s3s.validate(
|
|
669
|
+
client.export_storage.s3s.validate(
|
|
670
|
+
role_arn="role_arn",
|
|
671
|
+
project=1,
|
|
672
|
+
)
|
|
445
673
|
"""
|
|
446
674
|
_response = self._client_wrapper.httpx_client.request(
|
|
447
675
|
"api/storages/export/s3s/validate",
|
|
448
676
|
method="POST",
|
|
449
677
|
json={
|
|
450
|
-
"
|
|
678
|
+
"synchronizable": synchronizable,
|
|
679
|
+
"last_sync": last_sync,
|
|
680
|
+
"last_sync_count": last_sync_count,
|
|
681
|
+
"last_sync_job": last_sync_job,
|
|
682
|
+
"status": status,
|
|
683
|
+
"traceback": traceback,
|
|
684
|
+
"meta": meta,
|
|
451
685
|
"title": title,
|
|
452
686
|
"description": description,
|
|
453
|
-
"
|
|
687
|
+
"can_delete_objects": can_delete_objects,
|
|
454
688
|
"bucket": bucket,
|
|
455
689
|
"prefix": prefix,
|
|
456
|
-
"
|
|
457
|
-
"
|
|
690
|
+
"regex_filter": regex_filter,
|
|
691
|
+
"use_blob_urls": use_blob_urls,
|
|
692
|
+
"aws_access_key_id": aws_access_key_id,
|
|
693
|
+
"aws_secret_access_key": aws_secret_access_key,
|
|
694
|
+
"aws_session_token": aws_session_token,
|
|
695
|
+
"aws_sse_kms_key_id": aws_sse_kms_key_id,
|
|
458
696
|
"region_name": region_name,
|
|
459
697
|
"s3_endpoint": s3endpoint,
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
"
|
|
698
|
+
"external_id": external_id,
|
|
699
|
+
"role_arn": role_arn,
|
|
700
|
+
"legacy_auth": legacy_auth,
|
|
701
|
+
"project": project,
|
|
463
702
|
},
|
|
464
703
|
request_options=request_options,
|
|
465
704
|
omit=OMIT,
|
|
@@ -478,18 +717,20 @@ class AsyncS3SClient:
|
|
|
478
717
|
self._client_wrapper = client_wrapper
|
|
479
718
|
|
|
480
719
|
async def list(
|
|
481
|
-
self,
|
|
482
|
-
|
|
720
|
+
self,
|
|
721
|
+
*,
|
|
722
|
+
ordering: typing.Optional[str] = None,
|
|
723
|
+
project: typing.Optional[int] = None,
|
|
724
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
725
|
+
) -> typing.List[LseS3ExportStorage]:
|
|
483
726
|
"""
|
|
484
|
-
|
|
485
|
-
You can connect your S3 bucket to Label Studio as a source storage or target storage. Use this API request to get a list of all S3 export (target) storage connections for a specific project.
|
|
486
|
-
|
|
487
|
-
The project ID can be found in the URL when viewing the project in Label Studio, or you can retrieve all project IDs using [List all projects](../projects/list).
|
|
488
|
-
|
|
489
|
-
For more information about working with external storage, see [Sync data from external storage](https://labelstud.io/guide/storage).
|
|
727
|
+
Get a list of all S3 export storage connections that were set up with IAM role access.
|
|
490
728
|
|
|
491
729
|
Parameters
|
|
492
730
|
----------
|
|
731
|
+
ordering : typing.Optional[str]
|
|
732
|
+
Which field to use when ordering the results.
|
|
733
|
+
|
|
493
734
|
project : typing.Optional[int]
|
|
494
735
|
Project ID
|
|
495
736
|
|
|
@@ -498,7 +739,7 @@ class AsyncS3SClient:
|
|
|
498
739
|
|
|
499
740
|
Returns
|
|
500
741
|
-------
|
|
501
|
-
typing.List[
|
|
742
|
+
typing.List[LseS3ExportStorage]
|
|
502
743
|
|
|
503
744
|
|
|
504
745
|
Examples
|
|
@@ -522,6 +763,7 @@ class AsyncS3SClient:
|
|
|
522
763
|
"api/storages/export/s3s",
|
|
523
764
|
method="GET",
|
|
524
765
|
params={
|
|
766
|
+
"ordering": ordering,
|
|
525
767
|
"project": project,
|
|
526
768
|
},
|
|
527
769
|
request_options=request_options,
|
|
@@ -529,9 +771,9 @@ class AsyncS3SClient:
|
|
|
529
771
|
try:
|
|
530
772
|
if 200 <= _response.status_code < 300:
|
|
531
773
|
return typing.cast(
|
|
532
|
-
typing.List[
|
|
533
|
-
|
|
534
|
-
type_=typing.List[
|
|
774
|
+
typing.List[LseS3ExportStorage],
|
|
775
|
+
construct_type(
|
|
776
|
+
type_=typing.List[LseS3ExportStorage], # type: ignore
|
|
535
777
|
object_=_response.json(),
|
|
536
778
|
),
|
|
537
779
|
)
|
|
@@ -543,37 +785,69 @@ class AsyncS3SClient:
|
|
|
543
785
|
async def create(
|
|
544
786
|
self,
|
|
545
787
|
*,
|
|
546
|
-
|
|
788
|
+
role_arn: str,
|
|
789
|
+
project: int,
|
|
790
|
+
synchronizable: typing.Optional[bool] = OMIT,
|
|
791
|
+
last_sync: typing.Optional[dt.datetime] = OMIT,
|
|
792
|
+
last_sync_count: typing.Optional[int] = OMIT,
|
|
793
|
+
last_sync_job: typing.Optional[str] = OMIT,
|
|
794
|
+
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
795
|
+
traceback: typing.Optional[str] = OMIT,
|
|
796
|
+
meta: typing.Optional[typing.Optional[typing.Any]] = OMIT,
|
|
547
797
|
title: typing.Optional[str] = OMIT,
|
|
548
798
|
description: typing.Optional[str] = OMIT,
|
|
549
|
-
|
|
799
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
550
800
|
bucket: typing.Optional[str] = OMIT,
|
|
551
801
|
prefix: typing.Optional[str] = OMIT,
|
|
552
|
-
|
|
553
|
-
|
|
802
|
+
regex_filter: typing.Optional[str] = OMIT,
|
|
803
|
+
use_blob_urls: typing.Optional[bool] = OMIT,
|
|
804
|
+
aws_access_key_id: typing.Optional[str] = OMIT,
|
|
805
|
+
aws_secret_access_key: typing.Optional[str] = OMIT,
|
|
806
|
+
aws_session_token: typing.Optional[str] = OMIT,
|
|
807
|
+
aws_sse_kms_key_id: typing.Optional[str] = OMIT,
|
|
554
808
|
region_name: typing.Optional[str] = OMIT,
|
|
555
809
|
s3endpoint: typing.Optional[str] = OMIT,
|
|
810
|
+
external_id: typing.Optional[str] = OMIT,
|
|
811
|
+
legacy_auth: typing.Optional[bool] = OMIT,
|
|
556
812
|
request_options: typing.Optional[RequestOptions] = None,
|
|
557
|
-
) ->
|
|
813
|
+
) -> LseS3ExportStorage:
|
|
558
814
|
"""
|
|
559
|
-
|
|
560
|
-
Create a new target storage connection to a S3 bucket with IAM role access.
|
|
561
|
-
|
|
562
|
-
For information about the required fields and prerequisites, see [Amazon S3](https://docs.humansignal.com/guide/storage#Set-up-an-S3-connection-with-IAM-role-access) in the Label Studio documentation.
|
|
815
|
+
Create an S3 export storage connection with IAM role access to store annotations.
|
|
563
816
|
|
|
564
817
|
Parameters
|
|
565
818
|
----------
|
|
566
|
-
|
|
567
|
-
|
|
819
|
+
role_arn : str
|
|
820
|
+
AWS RoleArn
|
|
821
|
+
|
|
822
|
+
project : int
|
|
823
|
+
A unique integer value identifying this project.
|
|
824
|
+
|
|
825
|
+
synchronizable : typing.Optional[bool]
|
|
826
|
+
|
|
827
|
+
last_sync : typing.Optional[dt.datetime]
|
|
828
|
+
Last sync finished time
|
|
829
|
+
|
|
830
|
+
last_sync_count : typing.Optional[int]
|
|
831
|
+
Count of tasks synced last time
|
|
832
|
+
|
|
833
|
+
last_sync_job : typing.Optional[str]
|
|
834
|
+
Last sync job ID
|
|
835
|
+
|
|
836
|
+
status : typing.Optional[StatusC5AEnum]
|
|
837
|
+
|
|
838
|
+
traceback : typing.Optional[str]
|
|
839
|
+
Traceback report for the last failed sync
|
|
840
|
+
|
|
841
|
+
meta : typing.Optional[typing.Optional[typing.Any]]
|
|
568
842
|
|
|
569
843
|
title : typing.Optional[str]
|
|
570
|
-
|
|
844
|
+
Cloud storage title
|
|
571
845
|
|
|
572
846
|
description : typing.Optional[str]
|
|
573
|
-
|
|
847
|
+
Cloud storage description
|
|
574
848
|
|
|
575
|
-
|
|
576
|
-
|
|
849
|
+
can_delete_objects : typing.Optional[bool]
|
|
850
|
+
Deletion from storage enabled
|
|
577
851
|
|
|
578
852
|
bucket : typing.Optional[str]
|
|
579
853
|
S3 bucket name
|
|
@@ -581,11 +855,23 @@ class AsyncS3SClient:
|
|
|
581
855
|
prefix : typing.Optional[str]
|
|
582
856
|
S3 bucket prefix
|
|
583
857
|
|
|
584
|
-
|
|
585
|
-
|
|
858
|
+
regex_filter : typing.Optional[str]
|
|
859
|
+
Cloud storage regex for filtering objects
|
|
586
860
|
|
|
587
|
-
|
|
588
|
-
|
|
861
|
+
use_blob_urls : typing.Optional[bool]
|
|
862
|
+
Interpret objects as BLOBs and generate URLs
|
|
863
|
+
|
|
864
|
+
aws_access_key_id : typing.Optional[str]
|
|
865
|
+
AWS_ACCESS_KEY_ID
|
|
866
|
+
|
|
867
|
+
aws_secret_access_key : typing.Optional[str]
|
|
868
|
+
AWS_SECRET_ACCESS_KEY
|
|
869
|
+
|
|
870
|
+
aws_session_token : typing.Optional[str]
|
|
871
|
+
AWS_SESSION_TOKEN
|
|
872
|
+
|
|
873
|
+
aws_sse_kms_key_id : typing.Optional[str]
|
|
874
|
+
AWS SSE KMS Key ID
|
|
589
875
|
|
|
590
876
|
region_name : typing.Optional[str]
|
|
591
877
|
AWS Region
|
|
@@ -593,12 +879,17 @@ class AsyncS3SClient:
|
|
|
593
879
|
s3endpoint : typing.Optional[str]
|
|
594
880
|
S3 Endpoint
|
|
595
881
|
|
|
882
|
+
external_id : typing.Optional[str]
|
|
883
|
+
AWS ExternalId
|
|
884
|
+
|
|
885
|
+
legacy_auth : typing.Optional[bool]
|
|
886
|
+
|
|
596
887
|
request_options : typing.Optional[RequestOptions]
|
|
597
888
|
Request-specific configuration.
|
|
598
889
|
|
|
599
890
|
Returns
|
|
600
891
|
-------
|
|
601
|
-
|
|
892
|
+
LseS3ExportStorage
|
|
602
893
|
|
|
603
894
|
|
|
604
895
|
Examples
|
|
@@ -613,7 +904,10 @@ class AsyncS3SClient:
|
|
|
613
904
|
|
|
614
905
|
|
|
615
906
|
async def main() -> None:
|
|
616
|
-
await client.export_storage.s3s.create(
|
|
907
|
+
await client.export_storage.s3s.create(
|
|
908
|
+
role_arn="role_arn",
|
|
909
|
+
project=1,
|
|
910
|
+
)
|
|
617
911
|
|
|
618
912
|
|
|
619
913
|
asyncio.run(main())
|
|
@@ -622,19 +916,30 @@ class AsyncS3SClient:
|
|
|
622
916
|
"api/storages/export/s3s",
|
|
623
917
|
method="POST",
|
|
624
918
|
json={
|
|
625
|
-
"
|
|
919
|
+
"synchronizable": synchronizable,
|
|
920
|
+
"last_sync": last_sync,
|
|
921
|
+
"last_sync_count": last_sync_count,
|
|
922
|
+
"last_sync_job": last_sync_job,
|
|
923
|
+
"status": status,
|
|
924
|
+
"traceback": traceback,
|
|
925
|
+
"meta": meta,
|
|
626
926
|
"title": title,
|
|
627
927
|
"description": description,
|
|
628
|
-
"
|
|
928
|
+
"can_delete_objects": can_delete_objects,
|
|
629
929
|
"bucket": bucket,
|
|
630
930
|
"prefix": prefix,
|
|
631
|
-
"
|
|
632
|
-
"
|
|
931
|
+
"regex_filter": regex_filter,
|
|
932
|
+
"use_blob_urls": use_blob_urls,
|
|
933
|
+
"aws_access_key_id": aws_access_key_id,
|
|
934
|
+
"aws_secret_access_key": aws_secret_access_key,
|
|
935
|
+
"aws_session_token": aws_session_token,
|
|
936
|
+
"aws_sse_kms_key_id": aws_sse_kms_key_id,
|
|
633
937
|
"region_name": region_name,
|
|
634
938
|
"s3_endpoint": s3endpoint,
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
"
|
|
939
|
+
"external_id": external_id,
|
|
940
|
+
"role_arn": role_arn,
|
|
941
|
+
"legacy_auth": legacy_auth,
|
|
942
|
+
"project": project,
|
|
638
943
|
},
|
|
639
944
|
request_options=request_options,
|
|
640
945
|
omit=OMIT,
|
|
@@ -642,9 +947,9 @@ class AsyncS3SClient:
|
|
|
642
947
|
try:
|
|
643
948
|
if 200 <= _response.status_code < 300:
|
|
644
949
|
return typing.cast(
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
type_=
|
|
950
|
+
LseS3ExportStorage,
|
|
951
|
+
construct_type(
|
|
952
|
+
type_=LseS3ExportStorage, # type: ignore
|
|
648
953
|
object_=_response.json(),
|
|
649
954
|
),
|
|
650
955
|
)
|
|
@@ -653,22 +958,20 @@ class AsyncS3SClient:
|
|
|
653
958
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
654
959
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
655
960
|
|
|
656
|
-
async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) ->
|
|
961
|
+
async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage:
|
|
657
962
|
"""
|
|
658
|
-
|
|
659
|
-
Get a specific S3 export storage connection. You will need to provide the export storage ID. You can find this using [List export storages](list).
|
|
963
|
+
Get a specific S3 export storage connection that was set up with IAM role access.
|
|
660
964
|
|
|
661
965
|
Parameters
|
|
662
966
|
----------
|
|
663
967
|
id : int
|
|
664
|
-
Export storage ID
|
|
665
968
|
|
|
666
969
|
request_options : typing.Optional[RequestOptions]
|
|
667
970
|
Request-specific configuration.
|
|
668
971
|
|
|
669
972
|
Returns
|
|
670
973
|
-------
|
|
671
|
-
|
|
974
|
+
LseS3ExportStorage
|
|
672
975
|
|
|
673
976
|
|
|
674
977
|
Examples
|
|
@@ -698,9 +1001,9 @@ class AsyncS3SClient:
|
|
|
698
1001
|
try:
|
|
699
1002
|
if 200 <= _response.status_code < 300:
|
|
700
1003
|
return typing.cast(
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
type_=
|
|
1004
|
+
LseS3ExportStorage,
|
|
1005
|
+
construct_type(
|
|
1006
|
+
type_=LseS3ExportStorage, # type: ignore
|
|
704
1007
|
object_=_response.json(),
|
|
705
1008
|
),
|
|
706
1009
|
)
|
|
@@ -711,13 +1014,11 @@ class AsyncS3SClient:
|
|
|
711
1014
|
|
|
712
1015
|
async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
713
1016
|
"""
|
|
714
|
-
|
|
715
|
-
Delete a specific S3 export storage connection. You will need to provide the export storage ID. You can find this using [List export storages](list).
|
|
1017
|
+
Delete a specific S3 export storage connection that was set up with IAM role access.
|
|
716
1018
|
|
|
717
1019
|
Parameters
|
|
718
1020
|
----------
|
|
719
1021
|
id : int
|
|
720
|
-
Export storage ID
|
|
721
1022
|
|
|
722
1023
|
request_options : typing.Optional[RequestOptions]
|
|
723
1024
|
Request-specific configuration.
|
|
@@ -762,38 +1063,65 @@ class AsyncS3SClient:
|
|
|
762
1063
|
self,
|
|
763
1064
|
id: int,
|
|
764
1065
|
*,
|
|
765
|
-
|
|
1066
|
+
synchronizable: typing.Optional[bool] = OMIT,
|
|
1067
|
+
last_sync: typing.Optional[dt.datetime] = OMIT,
|
|
1068
|
+
last_sync_count: typing.Optional[int] = OMIT,
|
|
1069
|
+
last_sync_job: typing.Optional[str] = OMIT,
|
|
1070
|
+
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
1071
|
+
traceback: typing.Optional[str] = OMIT,
|
|
1072
|
+
meta: typing.Optional[typing.Optional[typing.Any]] = OMIT,
|
|
766
1073
|
title: typing.Optional[str] = OMIT,
|
|
767
1074
|
description: typing.Optional[str] = OMIT,
|
|
768
|
-
|
|
1075
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
769
1076
|
bucket: typing.Optional[str] = OMIT,
|
|
770
1077
|
prefix: typing.Optional[str] = OMIT,
|
|
771
|
-
|
|
772
|
-
|
|
1078
|
+
regex_filter: typing.Optional[str] = OMIT,
|
|
1079
|
+
use_blob_urls: typing.Optional[bool] = OMIT,
|
|
1080
|
+
aws_access_key_id: typing.Optional[str] = OMIT,
|
|
1081
|
+
aws_secret_access_key: typing.Optional[str] = OMIT,
|
|
1082
|
+
aws_session_token: typing.Optional[str] = OMIT,
|
|
1083
|
+
aws_sse_kms_key_id: typing.Optional[str] = OMIT,
|
|
773
1084
|
region_name: typing.Optional[str] = OMIT,
|
|
774
1085
|
s3endpoint: typing.Optional[str] = OMIT,
|
|
1086
|
+
external_id: typing.Optional[str] = OMIT,
|
|
1087
|
+
role_arn: typing.Optional[str] = OMIT,
|
|
1088
|
+
legacy_auth: typing.Optional[bool] = OMIT,
|
|
1089
|
+
project: typing.Optional[int] = OMIT,
|
|
775
1090
|
request_options: typing.Optional[RequestOptions] = None,
|
|
776
|
-
) ->
|
|
1091
|
+
) -> LseS3ExportStorage:
|
|
777
1092
|
"""
|
|
778
|
-
|
|
779
|
-
Update a specific S3 export storage connection. You will need to provide the export storage ID. You can find this using [List export storages](list).
|
|
1093
|
+
Update a specific S3 export storage connection that was set up with IAM role access.
|
|
780
1094
|
|
|
781
1095
|
Parameters
|
|
782
1096
|
----------
|
|
783
1097
|
id : int
|
|
784
|
-
Export storage ID
|
|
785
1098
|
|
|
786
|
-
|
|
787
|
-
|
|
1099
|
+
synchronizable : typing.Optional[bool]
|
|
1100
|
+
|
|
1101
|
+
last_sync : typing.Optional[dt.datetime]
|
|
1102
|
+
Last sync finished time
|
|
1103
|
+
|
|
1104
|
+
last_sync_count : typing.Optional[int]
|
|
1105
|
+
Count of tasks synced last time
|
|
1106
|
+
|
|
1107
|
+
last_sync_job : typing.Optional[str]
|
|
1108
|
+
Last sync job ID
|
|
1109
|
+
|
|
1110
|
+
status : typing.Optional[StatusC5AEnum]
|
|
1111
|
+
|
|
1112
|
+
traceback : typing.Optional[str]
|
|
1113
|
+
Traceback report for the last failed sync
|
|
1114
|
+
|
|
1115
|
+
meta : typing.Optional[typing.Optional[typing.Any]]
|
|
788
1116
|
|
|
789
1117
|
title : typing.Optional[str]
|
|
790
|
-
|
|
1118
|
+
Cloud storage title
|
|
791
1119
|
|
|
792
1120
|
description : typing.Optional[str]
|
|
793
|
-
|
|
1121
|
+
Cloud storage description
|
|
794
1122
|
|
|
795
|
-
|
|
796
|
-
|
|
1123
|
+
can_delete_objects : typing.Optional[bool]
|
|
1124
|
+
Deletion from storage enabled
|
|
797
1125
|
|
|
798
1126
|
bucket : typing.Optional[str]
|
|
799
1127
|
S3 bucket name
|
|
@@ -801,11 +1129,23 @@ class AsyncS3SClient:
|
|
|
801
1129
|
prefix : typing.Optional[str]
|
|
802
1130
|
S3 bucket prefix
|
|
803
1131
|
|
|
804
|
-
|
|
805
|
-
|
|
1132
|
+
regex_filter : typing.Optional[str]
|
|
1133
|
+
Cloud storage regex for filtering objects
|
|
806
1134
|
|
|
807
|
-
|
|
808
|
-
|
|
1135
|
+
use_blob_urls : typing.Optional[bool]
|
|
1136
|
+
Interpret objects as BLOBs and generate URLs
|
|
1137
|
+
|
|
1138
|
+
aws_access_key_id : typing.Optional[str]
|
|
1139
|
+
AWS_ACCESS_KEY_ID
|
|
1140
|
+
|
|
1141
|
+
aws_secret_access_key : typing.Optional[str]
|
|
1142
|
+
AWS_SECRET_ACCESS_KEY
|
|
1143
|
+
|
|
1144
|
+
aws_session_token : typing.Optional[str]
|
|
1145
|
+
AWS_SESSION_TOKEN
|
|
1146
|
+
|
|
1147
|
+
aws_sse_kms_key_id : typing.Optional[str]
|
|
1148
|
+
AWS SSE KMS Key ID
|
|
809
1149
|
|
|
810
1150
|
region_name : typing.Optional[str]
|
|
811
1151
|
AWS Region
|
|
@@ -813,12 +1153,23 @@ class AsyncS3SClient:
|
|
|
813
1153
|
s3endpoint : typing.Optional[str]
|
|
814
1154
|
S3 Endpoint
|
|
815
1155
|
|
|
1156
|
+
external_id : typing.Optional[str]
|
|
1157
|
+
AWS ExternalId
|
|
1158
|
+
|
|
1159
|
+
role_arn : typing.Optional[str]
|
|
1160
|
+
AWS RoleArn
|
|
1161
|
+
|
|
1162
|
+
legacy_auth : typing.Optional[bool]
|
|
1163
|
+
|
|
1164
|
+
project : typing.Optional[int]
|
|
1165
|
+
A unique integer value identifying this project.
|
|
1166
|
+
|
|
816
1167
|
request_options : typing.Optional[RequestOptions]
|
|
817
1168
|
Request-specific configuration.
|
|
818
1169
|
|
|
819
1170
|
Returns
|
|
820
1171
|
-------
|
|
821
|
-
|
|
1172
|
+
LseS3ExportStorage
|
|
822
1173
|
|
|
823
1174
|
|
|
824
1175
|
Examples
|
|
@@ -844,16 +1195,30 @@ class AsyncS3SClient:
|
|
|
844
1195
|
f"api/storages/export/s3s/{jsonable_encoder(id)}",
|
|
845
1196
|
method="PATCH",
|
|
846
1197
|
json={
|
|
847
|
-
"
|
|
1198
|
+
"synchronizable": synchronizable,
|
|
1199
|
+
"last_sync": last_sync,
|
|
1200
|
+
"last_sync_count": last_sync_count,
|
|
1201
|
+
"last_sync_job": last_sync_job,
|
|
1202
|
+
"status": status,
|
|
1203
|
+
"traceback": traceback,
|
|
1204
|
+
"meta": meta,
|
|
848
1205
|
"title": title,
|
|
849
1206
|
"description": description,
|
|
850
|
-
"
|
|
1207
|
+
"can_delete_objects": can_delete_objects,
|
|
851
1208
|
"bucket": bucket,
|
|
852
1209
|
"prefix": prefix,
|
|
853
|
-
"
|
|
854
|
-
"
|
|
1210
|
+
"regex_filter": regex_filter,
|
|
1211
|
+
"use_blob_urls": use_blob_urls,
|
|
1212
|
+
"aws_access_key_id": aws_access_key_id,
|
|
1213
|
+
"aws_secret_access_key": aws_secret_access_key,
|
|
1214
|
+
"aws_session_token": aws_session_token,
|
|
1215
|
+
"aws_sse_kms_key_id": aws_sse_kms_key_id,
|
|
855
1216
|
"region_name": region_name,
|
|
856
1217
|
"s3_endpoint": s3endpoint,
|
|
1218
|
+
"external_id": external_id,
|
|
1219
|
+
"role_arn": role_arn,
|
|
1220
|
+
"legacy_auth": legacy_auth,
|
|
1221
|
+
"project": project,
|
|
857
1222
|
},
|
|
858
1223
|
headers={
|
|
859
1224
|
"content-type": "application/json",
|
|
@@ -864,9 +1229,63 @@ class AsyncS3SClient:
|
|
|
864
1229
|
try:
|
|
865
1230
|
if 200 <= _response.status_code < 300:
|
|
866
1231
|
return typing.cast(
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
type_=
|
|
1232
|
+
LseS3ExportStorage,
|
|
1233
|
+
construct_type(
|
|
1234
|
+
type_=LseS3ExportStorage, # type: ignore
|
|
1235
|
+
object_=_response.json(),
|
|
1236
|
+
),
|
|
1237
|
+
)
|
|
1238
|
+
_response_json = _response.json()
|
|
1239
|
+
except JSONDecodeError:
|
|
1240
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1241
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1242
|
+
|
|
1243
|
+
async def sync(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> LseS3ExportStorage:
|
|
1244
|
+
"""
|
|
1245
|
+
Sync tasks from an S3 export storage.
|
|
1246
|
+
|
|
1247
|
+
Parameters
|
|
1248
|
+
----------
|
|
1249
|
+
id : int
|
|
1250
|
+
|
|
1251
|
+
request_options : typing.Optional[RequestOptions]
|
|
1252
|
+
Request-specific configuration.
|
|
1253
|
+
|
|
1254
|
+
Returns
|
|
1255
|
+
-------
|
|
1256
|
+
LseS3ExportStorage
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
Examples
|
|
1260
|
+
--------
|
|
1261
|
+
import asyncio
|
|
1262
|
+
|
|
1263
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
1264
|
+
|
|
1265
|
+
client = AsyncLabelStudio(
|
|
1266
|
+
api_key="YOUR_API_KEY",
|
|
1267
|
+
)
|
|
1268
|
+
|
|
1269
|
+
|
|
1270
|
+
async def main() -> None:
|
|
1271
|
+
await client.export_storage.s3s.sync(
|
|
1272
|
+
id=1,
|
|
1273
|
+
)
|
|
1274
|
+
|
|
1275
|
+
|
|
1276
|
+
asyncio.run(main())
|
|
1277
|
+
"""
|
|
1278
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1279
|
+
f"api/storages/export/s3s/{jsonable_encoder(id)}/sync",
|
|
1280
|
+
method="POST",
|
|
1281
|
+
request_options=request_options,
|
|
1282
|
+
)
|
|
1283
|
+
try:
|
|
1284
|
+
if 200 <= _response.status_code < 300:
|
|
1285
|
+
return typing.cast(
|
|
1286
|
+
LseS3ExportStorage,
|
|
1287
|
+
construct_type(
|
|
1288
|
+
type_=LseS3ExportStorage, # type: ignore
|
|
870
1289
|
object_=_response.json(),
|
|
871
1290
|
),
|
|
872
1291
|
)
|
|
@@ -878,35 +1297,69 @@ class AsyncS3SClient:
|
|
|
878
1297
|
async def validate(
|
|
879
1298
|
self,
|
|
880
1299
|
*,
|
|
881
|
-
|
|
1300
|
+
role_arn: str,
|
|
1301
|
+
project: int,
|
|
1302
|
+
synchronizable: typing.Optional[bool] = OMIT,
|
|
1303
|
+
last_sync: typing.Optional[dt.datetime] = OMIT,
|
|
1304
|
+
last_sync_count: typing.Optional[int] = OMIT,
|
|
1305
|
+
last_sync_job: typing.Optional[str] = OMIT,
|
|
1306
|
+
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
1307
|
+
traceback: typing.Optional[str] = OMIT,
|
|
1308
|
+
meta: typing.Optional[typing.Optional[typing.Any]] = OMIT,
|
|
882
1309
|
title: typing.Optional[str] = OMIT,
|
|
883
1310
|
description: typing.Optional[str] = OMIT,
|
|
884
|
-
|
|
1311
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
885
1312
|
bucket: typing.Optional[str] = OMIT,
|
|
886
1313
|
prefix: typing.Optional[str] = OMIT,
|
|
887
|
-
|
|
888
|
-
|
|
1314
|
+
regex_filter: typing.Optional[str] = OMIT,
|
|
1315
|
+
use_blob_urls: typing.Optional[bool] = OMIT,
|
|
1316
|
+
aws_access_key_id: typing.Optional[str] = OMIT,
|
|
1317
|
+
aws_secret_access_key: typing.Optional[str] = OMIT,
|
|
1318
|
+
aws_session_token: typing.Optional[str] = OMIT,
|
|
1319
|
+
aws_sse_kms_key_id: typing.Optional[str] = OMIT,
|
|
889
1320
|
region_name: typing.Optional[str] = OMIT,
|
|
890
1321
|
s3endpoint: typing.Optional[str] = OMIT,
|
|
1322
|
+
external_id: typing.Optional[str] = OMIT,
|
|
1323
|
+
legacy_auth: typing.Optional[bool] = OMIT,
|
|
891
1324
|
request_options: typing.Optional[RequestOptions] = None,
|
|
892
1325
|
) -> None:
|
|
893
1326
|
"""
|
|
894
|
-
|
|
895
|
-
Validate a specific S3 export storage connection. This is useful to ensure that the storage configuration settings are correct and operational before attempting to export data.
|
|
1327
|
+
Validate a specific S3 export storage connection that was set up with IAM role access.
|
|
896
1328
|
|
|
897
1329
|
Parameters
|
|
898
1330
|
----------
|
|
899
|
-
|
|
900
|
-
|
|
1331
|
+
role_arn : str
|
|
1332
|
+
AWS RoleArn
|
|
1333
|
+
|
|
1334
|
+
project : int
|
|
1335
|
+
A unique integer value identifying this project.
|
|
1336
|
+
|
|
1337
|
+
synchronizable : typing.Optional[bool]
|
|
1338
|
+
|
|
1339
|
+
last_sync : typing.Optional[dt.datetime]
|
|
1340
|
+
Last sync finished time
|
|
1341
|
+
|
|
1342
|
+
last_sync_count : typing.Optional[int]
|
|
1343
|
+
Count of tasks synced last time
|
|
1344
|
+
|
|
1345
|
+
last_sync_job : typing.Optional[str]
|
|
1346
|
+
Last sync job ID
|
|
1347
|
+
|
|
1348
|
+
status : typing.Optional[StatusC5AEnum]
|
|
1349
|
+
|
|
1350
|
+
traceback : typing.Optional[str]
|
|
1351
|
+
Traceback report for the last failed sync
|
|
1352
|
+
|
|
1353
|
+
meta : typing.Optional[typing.Optional[typing.Any]]
|
|
901
1354
|
|
|
902
1355
|
title : typing.Optional[str]
|
|
903
|
-
|
|
1356
|
+
Cloud storage title
|
|
904
1357
|
|
|
905
1358
|
description : typing.Optional[str]
|
|
906
|
-
|
|
1359
|
+
Cloud storage description
|
|
907
1360
|
|
|
908
|
-
|
|
909
|
-
|
|
1361
|
+
can_delete_objects : typing.Optional[bool]
|
|
1362
|
+
Deletion from storage enabled
|
|
910
1363
|
|
|
911
1364
|
bucket : typing.Optional[str]
|
|
912
1365
|
S3 bucket name
|
|
@@ -914,11 +1367,23 @@ class AsyncS3SClient:
|
|
|
914
1367
|
prefix : typing.Optional[str]
|
|
915
1368
|
S3 bucket prefix
|
|
916
1369
|
|
|
917
|
-
|
|
918
|
-
|
|
1370
|
+
regex_filter : typing.Optional[str]
|
|
1371
|
+
Cloud storage regex for filtering objects
|
|
919
1372
|
|
|
920
|
-
|
|
921
|
-
|
|
1373
|
+
use_blob_urls : typing.Optional[bool]
|
|
1374
|
+
Interpret objects as BLOBs and generate URLs
|
|
1375
|
+
|
|
1376
|
+
aws_access_key_id : typing.Optional[str]
|
|
1377
|
+
AWS_ACCESS_KEY_ID
|
|
1378
|
+
|
|
1379
|
+
aws_secret_access_key : typing.Optional[str]
|
|
1380
|
+
AWS_SECRET_ACCESS_KEY
|
|
1381
|
+
|
|
1382
|
+
aws_session_token : typing.Optional[str]
|
|
1383
|
+
AWS_SESSION_TOKEN
|
|
1384
|
+
|
|
1385
|
+
aws_sse_kms_key_id : typing.Optional[str]
|
|
1386
|
+
AWS SSE KMS Key ID
|
|
922
1387
|
|
|
923
1388
|
region_name : typing.Optional[str]
|
|
924
1389
|
AWS Region
|
|
@@ -926,6 +1391,11 @@ class AsyncS3SClient:
|
|
|
926
1391
|
s3endpoint : typing.Optional[str]
|
|
927
1392
|
S3 Endpoint
|
|
928
1393
|
|
|
1394
|
+
external_id : typing.Optional[str]
|
|
1395
|
+
AWS ExternalId
|
|
1396
|
+
|
|
1397
|
+
legacy_auth : typing.Optional[bool]
|
|
1398
|
+
|
|
929
1399
|
request_options : typing.Optional[RequestOptions]
|
|
930
1400
|
Request-specific configuration.
|
|
931
1401
|
|
|
@@ -945,7 +1415,10 @@ class AsyncS3SClient:
|
|
|
945
1415
|
|
|
946
1416
|
|
|
947
1417
|
async def main() -> None:
|
|
948
|
-
await client.export_storage.s3s.validate(
|
|
1418
|
+
await client.export_storage.s3s.validate(
|
|
1419
|
+
role_arn="role_arn",
|
|
1420
|
+
project=1,
|
|
1421
|
+
)
|
|
949
1422
|
|
|
950
1423
|
|
|
951
1424
|
asyncio.run(main())
|
|
@@ -954,19 +1427,30 @@ class AsyncS3SClient:
|
|
|
954
1427
|
"api/storages/export/s3s/validate",
|
|
955
1428
|
method="POST",
|
|
956
1429
|
json={
|
|
957
|
-
"
|
|
1430
|
+
"synchronizable": synchronizable,
|
|
1431
|
+
"last_sync": last_sync,
|
|
1432
|
+
"last_sync_count": last_sync_count,
|
|
1433
|
+
"last_sync_job": last_sync_job,
|
|
1434
|
+
"status": status,
|
|
1435
|
+
"traceback": traceback,
|
|
1436
|
+
"meta": meta,
|
|
958
1437
|
"title": title,
|
|
959
1438
|
"description": description,
|
|
960
|
-
"
|
|
1439
|
+
"can_delete_objects": can_delete_objects,
|
|
961
1440
|
"bucket": bucket,
|
|
962
1441
|
"prefix": prefix,
|
|
963
|
-
"
|
|
964
|
-
"
|
|
1442
|
+
"regex_filter": regex_filter,
|
|
1443
|
+
"use_blob_urls": use_blob_urls,
|
|
1444
|
+
"aws_access_key_id": aws_access_key_id,
|
|
1445
|
+
"aws_secret_access_key": aws_secret_access_key,
|
|
1446
|
+
"aws_session_token": aws_session_token,
|
|
1447
|
+
"aws_sse_kms_key_id": aws_sse_kms_key_id,
|
|
965
1448
|
"region_name": region_name,
|
|
966
1449
|
"s3_endpoint": s3endpoint,
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
"
|
|
1450
|
+
"external_id": external_id,
|
|
1451
|
+
"role_arn": role_arn,
|
|
1452
|
+
"legacy_auth": legacy_auth,
|
|
1453
|
+
"project": project,
|
|
970
1454
|
},
|
|
971
1455
|
request_options=request_options,
|
|
972
1456
|
omit=OMIT,
|