capo-redshift-data 0.7.0__tar.gz → 0.9.0__tar.gz
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.
- {capo_redshift_data-0.7.0/src/capo_redshift_data.egg-info → capo_redshift_data-0.9.0}/PKG-INFO +10 -2
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/README.md +5 -1
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/pyproject.toml +7 -1
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/__init__.py +12 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_auth/_providers.py +118 -19
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/batch_execute_statement_exception.py +3 -5
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/database_connection_exception.py +2 -2
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/execute_statement_exception.py +3 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/internal_server_exception.py +2 -2
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/resource_not_found_exception.py +3 -3
- capo_redshift_data-0.9.0/src/capo_redshift_data/types/_unknown.py +34 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/batch_execute_statement_input.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/cancel_statement_request.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/describe_statement_request.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/describe_statement_response.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/describe_table_request.py +4 -7
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/execute_statement_input.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/field.py +12 -1
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/get_statement_result_request.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/get_statement_result_response.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/get_statement_result_v2_request.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/get_statement_result_v2_response.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_databases_request.py +3 -4
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_schemas_request.py +4 -7
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_sessions_request.py +5 -4
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_sessions_response.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_statements_request.py +5 -4
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_statements_response.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_tables_request.py +4 -7
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/query_records.py +12 -2
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/session_data.py +5 -5
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/sql_parameter.py +2 -4
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/statement_data.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/sub_statement_data.py +1 -3
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0/src/capo_redshift_data.egg-info}/PKG-INFO +10 -2
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data.egg-info/SOURCES.txt +1 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/LICENSE +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/setup.cfg +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_async.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_auth/_identity.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_auth/_signers.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_auth/_sigv4.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_auth/_zapros_handler.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_aws.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_body.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_iter.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/batch_execute_statement.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/cancel_statement.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/describe_statement.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/describe_table.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/execute_statement.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/get_statement_result.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/get_statement_result_v2.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/list_databases.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/list_schemas.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/list_sessions.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/list_statements.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_operations/redshift_data/list_tables.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_pagination.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_protocol/__init__.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_protocol/errors.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_protocol/eventstream.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_protocol/serialize.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_protocol/xml.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_rule_engine/__init__.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_rule_engine/_aws_partition.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_rule_engine/_endpoint_rule_set.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_rule_engine/_endpoint_runtime.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_services/_aws_config.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_services/_pipeline.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_services/async_redshift_data.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_services/redshift_data.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/__init__.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/_base.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/active_sessions_exceeded_exception.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/active_statements_exceeded_exception.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/active_waiting_requests_exceeded_exception.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/query_timeout_exception.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/errors/validation_exception.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/py.typed +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/_prelude/blob.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/_prelude/timestamp.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/batch_execute_statement_output.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/blob.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/bool.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/boxed_boolean.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/boxed_double.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/boxed_long.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/cancel_statement_response.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/client_token.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/cluster_identifier_string.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/column_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/column_metadata.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/column_metadata_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/database_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/db_group_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/describe_table_response.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/execute_statement_output.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/execution_mode.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/field_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/formatted_sql_records.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/integer.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_databases_response.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_schemas_response.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_statements_limit.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/list_tables_response.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/long.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/page_size.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/parameter_name.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/parameter_value.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/result_format_string.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/schema_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/secret_arn.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/session_alive_seconds.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/session_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/session_status_string.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/sql_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/sql_parameters_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/sql_records.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/statement_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/statement_name_string.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/statement_status_string.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/statement_string.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/statement_string_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/status_string.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/string.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/sub_statement_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/table_list.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/table_member.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/uuid.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/wait_time_seconds.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/types/workgroup_name_string.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data.egg-info/dependency_links.txt +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data.egg-info/requires.txt +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data.egg-info/top_level.txt +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/tests/test_body.py +0 -0
- {capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/tests/test_sigv4.py +0 -0
{capo_redshift_data-0.7.0/src/capo_redshift_data.egg-info → capo_redshift_data-0.9.0}/PKG-INFO
RENAMED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: capo-redshift-data
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Python SDK for AWS Redshift Data.
|
|
5
|
+
Project-URL: Homepage, https://capo-sdk.dev/
|
|
6
|
+
Project-URL: Documentation, https://capo-sdk.dev/services/redshift-data/
|
|
7
|
+
Project-URL: Repository, https://github.com/kap-sh/capo/tree/main/services/redshift-data
|
|
8
|
+
Project-URL: Changelog, https://github.com/kap-sh/capo/blob/main/services/redshift-data/CHANGELOG.md
|
|
5
9
|
Classifier: Development Status :: 4 - Beta
|
|
6
10
|
Classifier: Intended Audience :: Developers
|
|
7
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -26,7 +30,11 @@ Requires-Dist: capo-sso-oidc>=0.2.0; extra == "sso"
|
|
|
26
30
|
Requires-Dist: capo-sts>=0.3.0; extra == "sso"
|
|
27
31
|
Dynamic: license-file
|
|
28
32
|
|
|
29
|
-
#
|
|
33
|
+
# capo-redshift-data: typed, async Python SDK for AWS Redshift Data
|
|
34
|
+
|
|
35
|
+
`capo-redshift-data` is a typed Python SDK for AWS Redshift Data. It has an async client, `AsyncRedshiftDataClient`, for asyncio and trio, and a sync client, `RedshiftDataClient`, with the same methods. Requests and responses are typed with TypedDicts, so your editor and type checker know every field.
|
|
36
|
+
|
|
37
|
+
It is part of [capo](https://capo-sdk.dev/), a community-driven alternative to boto3 and aioboto3, built on its own HTTP stack instead of botocore and generated from the official AWS Smithy models. Documentation: [https://capo-sdk.dev/services/redshift-data/](https://capo-sdk.dev/services/redshift-data/)
|
|
30
38
|
|
|
31
39
|
## Installation
|
|
32
40
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# capo-redshift-data: typed, async Python SDK for AWS Redshift Data
|
|
2
|
+
|
|
3
|
+
`capo-redshift-data` is a typed Python SDK for AWS Redshift Data. It has an async client, `AsyncRedshiftDataClient`, for asyncio and trio, and a sync client, `RedshiftDataClient`, with the same methods. Requests and responses are typed with TypedDicts, so your editor and type checker know every field.
|
|
4
|
+
|
|
5
|
+
It is part of [capo](https://capo-sdk.dev/), a community-driven alternative to boto3 and aioboto3, built on its own HTTP stack instead of botocore and generated from the official AWS Smithy models. Documentation: [https://capo-sdk.dev/services/redshift-data/](https://capo-sdk.dev/services/redshift-data/)
|
|
2
6
|
|
|
3
7
|
## Installation
|
|
4
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "capo-redshift-data"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.9.0"
|
|
4
4
|
description = "Python SDK for AWS Redshift Data."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -22,6 +22,12 @@ dependencies = [
|
|
|
22
22
|
"zapros>=0.21.0",
|
|
23
23
|
]
|
|
24
24
|
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://capo-sdk.dev/"
|
|
27
|
+
Documentation = "https://capo-sdk.dev/services/redshift-data/"
|
|
28
|
+
Repository = "https://github.com/kap-sh/capo/tree/main/services/redshift-data"
|
|
29
|
+
Changelog = "https://github.com/kap-sh/capo/blob/main/services/redshift-data/CHANGELOG.md"
|
|
30
|
+
|
|
25
31
|
[project.optional-dependencies]
|
|
26
32
|
# Async file request bodies via Body.async_from_path
|
|
27
33
|
anyio = ["anyio>=3.0"]
|
|
@@ -16,6 +16,9 @@ from ._auth._providers import (
|
|
|
16
16
|
from ._auth._providers import (
|
|
17
17
|
ChainedProvider as ChainedProvider,
|
|
18
18
|
)
|
|
19
|
+
from ._auth._providers import (
|
|
20
|
+
CredentialProcessError as CredentialProcessError,
|
|
21
|
+
)
|
|
19
22
|
from ._auth._providers import (
|
|
20
23
|
CredentialsProvider as CredentialsProvider,
|
|
21
24
|
)
|
|
@@ -31,6 +34,9 @@ from ._auth._providers import (
|
|
|
31
34
|
from ._auth._providers import (
|
|
32
35
|
MissingDependencyError as MissingDependencyError,
|
|
33
36
|
)
|
|
37
|
+
from ._auth._providers import (
|
|
38
|
+
ProcessCredentialsProvider as ProcessCredentialsProvider,
|
|
39
|
+
)
|
|
34
40
|
from ._auth._providers import (
|
|
35
41
|
ProfileCredentialsProvider as ProfileCredentialsProvider,
|
|
36
42
|
)
|
|
@@ -71,3 +77,9 @@ from ._services.async_redshift_data import (
|
|
|
71
77
|
AsyncRedshiftDataClient as AsyncRedshiftDataClient,
|
|
72
78
|
)
|
|
73
79
|
from ._services.redshift_data import RedshiftDataClient as RedshiftDataClient
|
|
80
|
+
from .types._unknown import (
|
|
81
|
+
UnknownEvent as UnknownEvent,
|
|
82
|
+
)
|
|
83
|
+
from .types._unknown import (
|
|
84
|
+
UnknownUnionMember as UnknownUnionMember,
|
|
85
|
+
)
|
{capo_redshift_data-0.7.0 → capo_redshift_data-0.9.0}/src/capo_redshift_data/_auth/_providers.py
RENAMED
|
@@ -4,6 +4,7 @@ import configparser
|
|
|
4
4
|
import hashlib
|
|
5
5
|
import json
|
|
6
6
|
import os
|
|
7
|
+
import subprocess
|
|
7
8
|
import time
|
|
8
9
|
from abc import abstractmethod
|
|
9
10
|
from dataclasses import dataclass
|
|
@@ -59,6 +60,10 @@ class IdentityNotFound(Exception):
|
|
|
59
60
|
"""Raised when a provider cannot resolve an identity. Chain continues."""
|
|
60
61
|
|
|
61
62
|
|
|
63
|
+
class CredentialProcessError(Exception):
|
|
64
|
+
"""Raised when a profile's `credential_process` fails or prints unusable output. Chain stops."""
|
|
65
|
+
|
|
66
|
+
|
|
62
67
|
class MissingDependencyError(Exception):
|
|
63
68
|
"""Raised when a provider needs the `sso` extra but it is not installed."""
|
|
64
69
|
|
|
@@ -186,13 +191,27 @@ class ProfileCredentialsProvider(CredentialsProvider):
|
|
|
186
191
|
self, credentials_file: Path | None = None, profile: str | None = None
|
|
187
192
|
) -> None:
|
|
188
193
|
self._profile = profile or active_profile()
|
|
189
|
-
self._cred_file = credentials_file or
|
|
190
|
-
os.environ.get("AWS_SHARED_CREDENTIALS_FILE")
|
|
191
|
-
or Path.home() / ".aws" / "credentials"
|
|
192
|
-
)
|
|
194
|
+
self._cred_file = credentials_file or _shared_credentials_file()
|
|
193
195
|
|
|
194
196
|
def resolve_identity(self) -> Credentials:
|
|
195
|
-
|
|
197
|
+
from_config, _ = _load_profile(self._profile)
|
|
198
|
+
from_credentials_file = _credentials_file_section(
|
|
199
|
+
self._profile, self._cred_file
|
|
200
|
+
)
|
|
201
|
+
section = {**from_config, **from_credentials_file}
|
|
202
|
+
if not section:
|
|
203
|
+
raise IdentityNotFound(
|
|
204
|
+
f"profile {self._profile!r} not found in credentials/config files"
|
|
205
|
+
)
|
|
206
|
+
# botocore's order: keys from the credentials file, then credential_process, then keys from the
|
|
207
|
+
# config file, so a profile with a process only takes its keys from the credentials file
|
|
208
|
+
if "credential_process" in section and not (
|
|
209
|
+
from_credentials_file.get("aws_access_key_id")
|
|
210
|
+
and from_credentials_file.get("aws_secret_access_key")
|
|
211
|
+
):
|
|
212
|
+
raise IdentityNotFound(
|
|
213
|
+
f"profile {self._profile!r}: credential_process comes before the keys in the config file"
|
|
214
|
+
)
|
|
196
215
|
ak = section.get("aws_access_key_id")
|
|
197
216
|
sk = section.get("aws_secret_access_key")
|
|
198
217
|
if not ak or not sk:
|
|
@@ -205,19 +224,94 @@ class ProfileCredentialsProvider(CredentialsProvider):
|
|
|
205
224
|
out["session_token"] = token
|
|
206
225
|
return out
|
|
207
226
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
227
|
+
|
|
228
|
+
class ProcessCredentialsProvider(CredentialsProvider):
|
|
229
|
+
"""Run the profile's ``credential_process`` command and read the credentials it prints.
|
|
230
|
+
|
|
231
|
+
This is how helpers such as ``aws-sso-cli`` hand out short-term credentials. The command
|
|
232
|
+
runs through the system shell, as in the Rust, Kotlin and Swift SDKs, so a quoted Windows path
|
|
233
|
+
works as written, and it must print the JSON document the AWS SDKs define (``Version`` 1).
|
|
234
|
+
The key is read from the credentials file as well as the config file. A profile without
|
|
235
|
+
``credential_process`` is skipped; a command that fails or outlives the timeout stops the chain.
|
|
236
|
+
"""
|
|
237
|
+
|
|
238
|
+
def __init__(
|
|
239
|
+
self,
|
|
240
|
+
credentials_file: Path | None = None,
|
|
241
|
+
profile: str | None = None,
|
|
242
|
+
timeout: float = 60.0,
|
|
243
|
+
) -> None:
|
|
244
|
+
self._profile = profile or active_profile()
|
|
245
|
+
self._cred_file = credentials_file or _shared_credentials_file()
|
|
246
|
+
self._timeout = timeout
|
|
247
|
+
|
|
248
|
+
def resolve_identity(self) -> Credentials:
|
|
249
|
+
section = _load_merged_profile(self._profile, self._cred_file)
|
|
250
|
+
command = section.get("credential_process")
|
|
251
|
+
if not command:
|
|
252
|
+
raise IdentityNotFound(f"profile {self._profile!r}: no credential_process")
|
|
253
|
+
try:
|
|
254
|
+
# the shell is sh -c on POSIX and cmd.exe /c on Windows, which parses the path natively
|
|
255
|
+
result = subprocess.run(
|
|
256
|
+
command,
|
|
257
|
+
shell=True,
|
|
258
|
+
capture_output=True,
|
|
259
|
+
text=True,
|
|
260
|
+
check=False,
|
|
261
|
+
timeout=self._timeout,
|
|
262
|
+
)
|
|
263
|
+
except subprocess.TimeoutExpired:
|
|
264
|
+
raise CredentialProcessError(
|
|
265
|
+
f"profile {self._profile!r}: credential_process did not finish within {self._timeout} seconds"
|
|
266
|
+
) from None
|
|
267
|
+
except OSError as e:
|
|
268
|
+
raise CredentialProcessError(f"profile {self._profile!r}: {e}") from e
|
|
269
|
+
# stdout carries the secret, so only stderr ever goes into an error message
|
|
270
|
+
if result.returncode != 0:
|
|
271
|
+
raise CredentialProcessError(
|
|
272
|
+
f"profile {self._profile!r}: credential_process exited with {result.returncode}: {result.stderr.strip()}"
|
|
273
|
+
)
|
|
274
|
+
try:
|
|
275
|
+
data = json.loads(result.stdout)
|
|
276
|
+
except ValueError:
|
|
277
|
+
raise CredentialProcessError(
|
|
278
|
+
f"profile {self._profile!r}: credential_process did not print JSON"
|
|
279
|
+
) from None
|
|
280
|
+
if not isinstance(data, dict) or data.get("Version") != 1:
|
|
281
|
+
raise CredentialProcessError(
|
|
282
|
+
f"profile {self._profile!r}: credential_process output must be a JSON object with Version 1"
|
|
219
283
|
)
|
|
220
|
-
|
|
284
|
+
try:
|
|
285
|
+
return _credentials_from_json(data, token_key="SessionToken")
|
|
286
|
+
except IdentityNotFound as e:
|
|
287
|
+
raise CredentialProcessError(f"profile {self._profile!r}: {e}") from None
|
|
288
|
+
except ValueError:
|
|
289
|
+
raise CredentialProcessError(
|
|
290
|
+
f"profile {self._profile!r}: credential_process printed an invalid Expiration"
|
|
291
|
+
) from None
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
def _shared_credentials_file() -> Path:
|
|
295
|
+
return Path(
|
|
296
|
+
os.environ.get("AWS_SHARED_CREDENTIALS_FILE")
|
|
297
|
+
or Path.home() / ".aws" / "credentials"
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def _load_merged_profile(profile: str, credentials_file: Path) -> dict[str, str]:
|
|
302
|
+
"""The profile's keys from the config file, overlaid by the credentials file, as the AWS SDKs merge them."""
|
|
303
|
+
# config-file profile reuses the loader from _services/_aws_config
|
|
304
|
+
merged, _ = _load_profile(profile)
|
|
305
|
+
merged.update(_credentials_file_section(profile, credentials_file))
|
|
306
|
+
return merged
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
def _credentials_file_section(profile: str, credentials_file: Path) -> dict[str, str]:
|
|
310
|
+
if not credentials_file.is_file():
|
|
311
|
+
return {}
|
|
312
|
+
cfg = configparser.ConfigParser(interpolation=None)
|
|
313
|
+
cfg.read(credentials_file)
|
|
314
|
+
return dict(cfg.items(profile)) if cfg.has_section(profile) else {}
|
|
221
315
|
|
|
222
316
|
|
|
223
317
|
class EcsContainerCredentialsProvider(CredentialsProvider):
|
|
@@ -721,6 +815,7 @@ class AssumeRoleCredentialsProvider(CredentialsProvider):
|
|
|
721
815
|
),
|
|
722
816
|
SsoCredentialsProvider(self._client, source_profile),
|
|
723
817
|
ProfileCredentialsProvider(profile=source_profile),
|
|
818
|
+
ProcessCredentialsProvider(profile=source_profile),
|
|
724
819
|
)
|
|
725
820
|
|
|
726
821
|
|
|
@@ -853,7 +948,10 @@ def _parse_iso8601(value: str) -> datetime:
|
|
|
853
948
|
return datetime.fromisoformat(value.replace("Z", "+00:00"))
|
|
854
949
|
|
|
855
950
|
|
|
856
|
-
def _credentials_from_json(
|
|
951
|
+
def _credentials_from_json(
|
|
952
|
+
data: dict[str, object], *, token_key: str = "Token"
|
|
953
|
+
) -> Credentials:
|
|
954
|
+
# ECS and IMDS name the session token Token; credential_process names it SessionToken
|
|
857
955
|
ak = data.get("AccessKeyId")
|
|
858
956
|
sk = data.get("SecretAccessKey")
|
|
859
957
|
if not isinstance(ak, str) or not isinstance(sk, str):
|
|
@@ -861,7 +959,7 @@ def _credentials_from_json(data: dict[str, object]) -> Credentials:
|
|
|
861
959
|
"credentials response missing AccessKeyId/SecretAccessKey"
|
|
862
960
|
)
|
|
863
961
|
out: Credentials = {"access_key": ak, "secret_key": sk}
|
|
864
|
-
token = data.get(
|
|
962
|
+
token = data.get(token_key)
|
|
865
963
|
if isinstance(token, str):
|
|
866
964
|
out["session_token"] = token
|
|
867
965
|
exp = data.get("Expiration")
|
|
@@ -880,6 +978,7 @@ def default_aws_credentials_chain(
|
|
|
880
978
|
WebIdentityCredentialsProvider(client),
|
|
881
979
|
SsoCredentialsProvider(client),
|
|
882
980
|
ProfileCredentialsProvider(),
|
|
981
|
+
ProcessCredentialsProvider(),
|
|
883
982
|
EcsContainerCredentialsProvider(client),
|
|
884
983
|
Ec2InstanceMetadataProvider(client),
|
|
885
984
|
)
|
|
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
|
|
|
5
5
|
import zapros
|
|
6
6
|
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
|
-
from capo_redshift_data.errors import
|
|
8
|
+
from capo_redshift_data.errors import ServiceError
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
import capo_redshift_data.types.string
|
|
@@ -30,13 +30,11 @@ def deserialize_aws_json_1_1(data: dict) -> BatchExecuteStatementException_:
|
|
|
30
30
|
if data.get("Message") is not None:
|
|
31
31
|
out["message"] = data["Message"]
|
|
32
32
|
else:
|
|
33
|
-
|
|
33
|
+
out["message"] = ""
|
|
34
34
|
if data.get("StatementId") is not None:
|
|
35
35
|
out["statement_id"] = data["StatementId"]
|
|
36
36
|
else:
|
|
37
|
-
|
|
38
|
-
"BatchExecuteStatementException_.statement_id required"
|
|
39
|
-
)
|
|
37
|
+
out["statement_id"] = ""
|
|
40
38
|
return out
|
|
41
39
|
|
|
42
40
|
|
|
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
|
|
|
5
5
|
import zapros
|
|
6
6
|
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
|
-
from capo_redshift_data.errors import
|
|
8
|
+
from capo_redshift_data.errors import ServiceError
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
import capo_redshift_data.types.string
|
|
@@ -27,7 +27,7 @@ def deserialize_aws_json_1_1(data: dict) -> DatabaseConnectionException_:
|
|
|
27
27
|
if data.get("Message") is not None:
|
|
28
28
|
out["message"] = data["Message"]
|
|
29
29
|
else:
|
|
30
|
-
|
|
30
|
+
out["message"] = ""
|
|
31
31
|
return out
|
|
32
32
|
|
|
33
33
|
|
|
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
|
|
|
5
5
|
import zapros
|
|
6
6
|
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
|
-
from capo_redshift_data.errors import
|
|
8
|
+
from capo_redshift_data.errors import ServiceError
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
import capo_redshift_data.types.string
|
|
@@ -31,11 +31,11 @@ def deserialize_aws_json_1_1(data: dict) -> ExecuteStatementException_:
|
|
|
31
31
|
if data.get("Message") is not None:
|
|
32
32
|
out["message"] = data["Message"]
|
|
33
33
|
else:
|
|
34
|
-
|
|
34
|
+
out["message"] = ""
|
|
35
35
|
if data.get("StatementId") is not None:
|
|
36
36
|
out["statement_id"] = data["StatementId"]
|
|
37
37
|
else:
|
|
38
|
-
|
|
38
|
+
out["statement_id"] = ""
|
|
39
39
|
return out
|
|
40
40
|
|
|
41
41
|
|
|
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
|
|
|
5
5
|
import zapros
|
|
6
6
|
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
|
-
from capo_redshift_data.errors import
|
|
8
|
+
from capo_redshift_data.errors import ServiceError
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
import capo_redshift_data.types.string
|
|
@@ -28,7 +28,7 @@ def deserialize_aws_json_1_1(data: dict) -> InternalServerException_:
|
|
|
28
28
|
if data.get("Message") is not None:
|
|
29
29
|
out["message"] = data["Message"]
|
|
30
30
|
else:
|
|
31
|
-
|
|
31
|
+
out["message"] = ""
|
|
32
32
|
return out
|
|
33
33
|
|
|
34
34
|
|
|
@@ -5,7 +5,7 @@ from typing import TYPE_CHECKING
|
|
|
5
5
|
import zapros
|
|
6
6
|
from typing_extensions import TypedDict
|
|
7
7
|
|
|
8
|
-
from capo_redshift_data.errors import
|
|
8
|
+
from capo_redshift_data.errors import ServiceError
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
11
|
import capo_redshift_data.types.string
|
|
@@ -31,11 +31,11 @@ def deserialize_aws_json_1_1(data: dict) -> ResourceNotFoundException_:
|
|
|
31
31
|
if data.get("Message") is not None:
|
|
32
32
|
out["message"] = data["Message"]
|
|
33
33
|
else:
|
|
34
|
-
|
|
34
|
+
out["message"] = ""
|
|
35
35
|
if data.get("ResourceId") is not None:
|
|
36
36
|
out["resource_id"] = data["ResourceId"]
|
|
37
37
|
else:
|
|
38
|
-
|
|
38
|
+
out["resource_id"] = ""
|
|
39
39
|
return out
|
|
40
40
|
|
|
41
41
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Stand-ins for union variants and events this client doesn't know about.
|
|
2
|
+
|
|
3
|
+
A service may add a union member or an event after the client was generated.
|
|
4
|
+
Smithy asks clients not to fail on those, so deserialization returns one of
|
|
5
|
+
these instead of raising.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from dataclasses import dataclass
|
|
11
|
+
|
|
12
|
+
from .._protocol.eventstream import Message
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclass(frozen=True)
|
|
16
|
+
class UnknownUnionMember:
|
|
17
|
+
"""A union variant the service sent that this client has no member for."""
|
|
18
|
+
|
|
19
|
+
name: str
|
|
20
|
+
"""The variant's name on the wire."""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@dataclass(frozen=True)
|
|
24
|
+
class UnknownEvent:
|
|
25
|
+
"""An event-stream event whose ``:event-type`` this client doesn't know."""
|
|
26
|
+
|
|
27
|
+
event_type: str
|
|
28
|
+
"""The event's ``:event-type`` header."""
|
|
29
|
+
|
|
30
|
+
message: Message
|
|
31
|
+
"""The raw message, headers and undecoded payload."""
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
__all__ = ["UnknownEvent", "UnknownUnionMember"]
|
|
@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import NotRequired, TypedDict
|
|
6
6
|
|
|
7
|
-
from capo_redshift_data.errors import DeserializationError
|
|
8
|
-
|
|
9
7
|
if TYPE_CHECKING:
|
|
10
8
|
import capo_redshift_data.types.client_token
|
|
11
9
|
import capo_redshift_data.types.cluster_identifier_string
|
|
@@ -123,7 +121,7 @@ def deserialize_aws_json_1_1(data: dict) -> BatchExecuteStatementInput:
|
|
|
123
121
|
data["Sqls"]
|
|
124
122
|
)
|
|
125
123
|
else:
|
|
126
|
-
|
|
124
|
+
out["sqls"] = []
|
|
127
125
|
if data.get("ClusterIdentifier") is not None:
|
|
128
126
|
out["cluster_identifier"] = data["ClusterIdentifier"]
|
|
129
127
|
if data.get("SecretArn") is not None:
|
|
@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import TypedDict
|
|
6
6
|
|
|
7
|
-
from capo_redshift_data.errors import DeserializationError
|
|
8
|
-
|
|
9
7
|
if TYPE_CHECKING:
|
|
10
8
|
import capo_redshift_data.types.uuid
|
|
11
9
|
|
|
@@ -27,5 +25,5 @@ def deserialize_aws_json_1_1(data: dict) -> CancelStatementRequest:
|
|
|
27
25
|
if data.get("Id") is not None:
|
|
28
26
|
out["id"] = data["Id"]
|
|
29
27
|
else:
|
|
30
|
-
|
|
28
|
+
out["id"] = ""
|
|
31
29
|
return out
|
|
@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import NotRequired, TypedDict
|
|
6
6
|
|
|
7
|
-
from capo_redshift_data.errors import DeserializationError
|
|
8
|
-
|
|
9
7
|
if TYPE_CHECKING:
|
|
10
8
|
import capo_redshift_data.types.uuid
|
|
11
9
|
import capo_redshift_data.types.wait_time_seconds
|
|
@@ -34,7 +32,7 @@ def deserialize_aws_json_1_1(data: dict) -> DescribeStatementRequest:
|
|
|
34
32
|
if data.get("Id") is not None:
|
|
35
33
|
out["id"] = data["Id"]
|
|
36
34
|
else:
|
|
37
|
-
|
|
35
|
+
out["id"] = ""
|
|
38
36
|
if data.get("WaitTimeSeconds") is not None:
|
|
39
37
|
out["wait_time_seconds"] = data["WaitTimeSeconds"]
|
|
40
38
|
return out
|
|
@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import NotRequired, TypedDict
|
|
6
6
|
|
|
7
|
-
from capo_redshift_data.errors import DeserializationError
|
|
8
|
-
|
|
9
7
|
if TYPE_CHECKING:
|
|
10
8
|
import datetime
|
|
11
9
|
|
|
@@ -152,7 +150,7 @@ def deserialize_aws_json_1_1(data: dict) -> DescribeStatementResponse:
|
|
|
152
150
|
if data.get("Id") is not None:
|
|
153
151
|
out["id"] = data["Id"]
|
|
154
152
|
else:
|
|
155
|
-
|
|
153
|
+
out["id"] = ""
|
|
156
154
|
if data.get("SecretArn") is not None:
|
|
157
155
|
out["secret_arn"] = data["SecretArn"]
|
|
158
156
|
if data.get("DbUser") is not None:
|
|
@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import NotRequired, TypedDict
|
|
6
6
|
|
|
7
|
-
from capo_redshift_data.errors import DeserializationError
|
|
8
|
-
|
|
9
7
|
if TYPE_CHECKING:
|
|
10
8
|
import capo_redshift_data.types.cluster_identifier_string
|
|
11
9
|
import capo_redshift_data.types.page_size
|
|
@@ -33,7 +31,7 @@ class DescribeTableRequest(TypedDict, closed=True):
|
|
|
33
31
|
"""<p>The table name. If no table is specified, then all tables for all matching schemas are returned. If no table and no schema is specified, then all tables for all schemas in the database are returned</p>"""
|
|
34
32
|
next_token: NotRequired["capo_redshift_data.types.string.String"]
|
|
35
33
|
"""<p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. </p>"""
|
|
36
|
-
max_results: "capo_redshift_data.types.page_size.PageSize"
|
|
34
|
+
max_results: NotRequired["capo_redshift_data.types.page_size.PageSize"]
|
|
37
35
|
"""<p>The maximum number of tables to return in the response. If more tables exist than fit in one response, then <code>NextToken</code> is returned to page through the results. </p>"""
|
|
38
36
|
workgroup_name: NotRequired[
|
|
39
37
|
"capo_redshift_data.types.workgroup_name_string.WorkgroupNameString"
|
|
@@ -59,7 +57,8 @@ def serialize_aws_json_1_1(value: DescribeTableRequest) -> dict:
|
|
|
59
57
|
out["Table"] = value["table"]
|
|
60
58
|
if "next_token" in value:
|
|
61
59
|
out["NextToken"] = value["next_token"]
|
|
62
|
-
|
|
60
|
+
if "max_results" in value:
|
|
61
|
+
out["MaxResults"] = value["max_results"]
|
|
63
62
|
if "workgroup_name" in value:
|
|
64
63
|
out["WorkgroupName"] = value["workgroup_name"]
|
|
65
64
|
return out
|
|
@@ -76,7 +75,7 @@ def deserialize_aws_json_1_1(data: dict) -> DescribeTableRequest:
|
|
|
76
75
|
if data.get("Database") is not None:
|
|
77
76
|
out["database"] = data["Database"]
|
|
78
77
|
else:
|
|
79
|
-
|
|
78
|
+
out["database"] = ""
|
|
80
79
|
if data.get("ConnectedDatabase") is not None:
|
|
81
80
|
out["connected_database"] = data["ConnectedDatabase"]
|
|
82
81
|
if data.get("Schema") is not None:
|
|
@@ -87,8 +86,6 @@ def deserialize_aws_json_1_1(data: dict) -> DescribeTableRequest:
|
|
|
87
86
|
out["next_token"] = data["NextToken"]
|
|
88
87
|
if data.get("MaxResults") is not None:
|
|
89
88
|
out["max_results"] = data["MaxResults"]
|
|
90
|
-
else:
|
|
91
|
-
out["max_results"] = 0
|
|
92
89
|
if data.get("WorkgroupName") is not None:
|
|
93
90
|
out["workgroup_name"] = data["WorkgroupName"]
|
|
94
91
|
return out
|
|
@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import NotRequired, TypedDict
|
|
6
6
|
|
|
7
|
-
from capo_redshift_data.errors import DeserializationError
|
|
8
|
-
|
|
9
7
|
if TYPE_CHECKING:
|
|
10
8
|
import capo_redshift_data.types.client_token
|
|
11
9
|
import capo_redshift_data.types.cluster_identifier_string
|
|
@@ -110,7 +108,7 @@ def deserialize_aws_json_1_1(data: dict) -> ExecuteStatementInput:
|
|
|
110
108
|
if data.get("Sql") is not None:
|
|
111
109
|
out["sql"] = data["Sql"]
|
|
112
110
|
else:
|
|
113
|
-
|
|
111
|
+
out["sql"] = ""
|
|
114
112
|
if data.get("ClusterIdentifier") is not None:
|
|
115
113
|
out["cluster_identifier"] = data["ClusterIdentifier"]
|
|
116
114
|
if data.get("SecretArn") is not None:
|
|
@@ -5,6 +5,7 @@ from typing import TYPE_CHECKING, TypeAlias
|
|
|
5
5
|
from typing_extensions import TypedDict
|
|
6
6
|
|
|
7
7
|
from capo_redshift_data.errors import DeserializationError, SerializationError
|
|
8
|
+
from capo_redshift_data.types._unknown import UnknownUnionMember
|
|
8
9
|
|
|
9
10
|
if TYPE_CHECKING:
|
|
10
11
|
import capo_redshift_data.types.blob
|
|
@@ -45,12 +46,17 @@ Field: TypeAlias = (
|
|
|
45
46
|
| _Field_doubleValue
|
|
46
47
|
| _Field_stringValue
|
|
47
48
|
| _Field_blobValue
|
|
49
|
+
| UnknownUnionMember
|
|
48
50
|
)
|
|
49
51
|
|
|
50
52
|
|
|
51
53
|
# --- awsJson1_1 ser/de ---
|
|
52
54
|
def serialize_aws_json_1_1(value: Field) -> dict:
|
|
53
|
-
if
|
|
55
|
+
if isinstance(value, UnknownUnionMember):
|
|
56
|
+
raise SerializationError(
|
|
57
|
+
f"Field: cannot serialize unknown variant {value.name!r}"
|
|
58
|
+
)
|
|
59
|
+
elif "isNull" in value:
|
|
54
60
|
return {"isNull": value["isNull"]}
|
|
55
61
|
elif "booleanValue" in value:
|
|
56
62
|
return {"booleanValue": value["booleanValue"]}
|
|
@@ -102,4 +108,9 @@ def deserialize_aws_json_1_1(data: dict) -> Field:
|
|
|
102
108
|
)
|
|
103
109
|
}
|
|
104
110
|
else:
|
|
111
|
+
name = next(
|
|
112
|
+
(k for k, v in data.items() if v is not None and k != "__type"), None
|
|
113
|
+
)
|
|
114
|
+
if name is not None:
|
|
115
|
+
return UnknownUnionMember(name)
|
|
105
116
|
raise DeserializationError("Field: no recognized variant key")
|
|
@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import NotRequired, TypedDict
|
|
6
6
|
|
|
7
|
-
from capo_redshift_data.errors import DeserializationError
|
|
8
|
-
|
|
9
7
|
if TYPE_CHECKING:
|
|
10
8
|
import capo_redshift_data.types.string
|
|
11
9
|
import capo_redshift_data.types.uuid
|
|
@@ -39,7 +37,7 @@ def deserialize_aws_json_1_1(data: dict) -> GetStatementResultRequest:
|
|
|
39
37
|
if data.get("Id") is not None:
|
|
40
38
|
out["id"] = data["Id"]
|
|
41
39
|
else:
|
|
42
|
-
|
|
40
|
+
out["id"] = ""
|
|
43
41
|
if data.get("NextToken") is not None:
|
|
44
42
|
out["next_token"] = data["NextToken"]
|
|
45
43
|
if data.get("WaitTimeSeconds") is not None:
|
|
@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import NotRequired, TypedDict
|
|
6
6
|
|
|
7
|
-
from capo_redshift_data.errors import DeserializationError
|
|
8
|
-
|
|
9
7
|
if TYPE_CHECKING:
|
|
10
8
|
import capo_redshift_data.types.column_metadata_list
|
|
11
9
|
import capo_redshift_data.types.long
|
|
@@ -57,7 +55,7 @@ def deserialize_aws_json_1_1(data: dict) -> GetStatementResultResponse:
|
|
|
57
55
|
data["Records"]
|
|
58
56
|
)
|
|
59
57
|
else:
|
|
60
|
-
|
|
58
|
+
out["records"] = []
|
|
61
59
|
if data.get("ColumnMetadata") is not None:
|
|
62
60
|
import capo_redshift_data.types.column_metadata_list
|
|
63
61
|
|
|
@@ -4,8 +4,6 @@ from typing import TYPE_CHECKING
|
|
|
4
4
|
|
|
5
5
|
from typing_extensions import NotRequired, TypedDict
|
|
6
6
|
|
|
7
|
-
from capo_redshift_data.errors import DeserializationError
|
|
8
|
-
|
|
9
7
|
if TYPE_CHECKING:
|
|
10
8
|
import capo_redshift_data.types.string
|
|
11
9
|
import capo_redshift_data.types.uuid
|
|
@@ -39,7 +37,7 @@ def deserialize_aws_json_1_1(data: dict) -> GetStatementResultV2Request:
|
|
|
39
37
|
if data.get("Id") is not None:
|
|
40
38
|
out["id"] = data["Id"]
|
|
41
39
|
else:
|
|
42
|
-
|
|
40
|
+
out["id"] = ""
|
|
43
41
|
if data.get("NextToken") is not None:
|
|
44
42
|
out["next_token"] = data["NextToken"]
|
|
45
43
|
if data.get("WaitTimeSeconds") is not None:
|