capo-s3 0.1.0__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.
- capo_s3/__init__.py +52 -0
- capo_s3/_async.py +25 -0
- capo_s3/_auth/_identity.py +16 -0
- capo_s3/_auth/_providers.py +318 -0
- capo_s3/_auth/_signers.py +84 -0
- capo_s3/_auth/_sigv4.py +382 -0
- capo_s3/_auth/_zapros_handler.py +62 -0
- capo_s3/_iter.py +113 -0
- capo_s3/_operations/amazon_s3/abort_multipart_upload.py +160 -0
- capo_s3/_operations/amazon_s3/complete_multipart_upload.py +245 -0
- capo_s3/_operations/amazon_s3/copy_object.py +348 -0
- capo_s3/_operations/amazon_s3/create_bucket.py +180 -0
- capo_s3/_operations/amazon_s3/create_bucket_metadata_configuration.py +129 -0
- capo_s3/_operations/amazon_s3/create_bucket_metadata_table_configuration.py +131 -0
- capo_s3/_operations/amazon_s3/create_multipart_upload.py +317 -0
- capo_s3/_operations/amazon_s3/create_session.py +194 -0
- capo_s3/_operations/amazon_s3/delete_bucket.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_analytics_configuration.py +117 -0
- capo_s3/_operations/amazon_s3/delete_bucket_cors.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_encryption.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_intelligent_tiering_configuration.py +117 -0
- capo_s3/_operations/amazon_s3/delete_bucket_inventory_configuration.py +117 -0
- capo_s3/_operations/amazon_s3/delete_bucket_lifecycle.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_metadata_configuration.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_metadata_table_configuration.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_metrics_configuration.py +117 -0
- capo_s3/_operations/amazon_s3/delete_bucket_ownership_controls.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_policy.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_replication.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_tagging.py +115 -0
- capo_s3/_operations/amazon_s3/delete_bucket_website.py +115 -0
- capo_s3/_operations/amazon_s3/delete_object.py +169 -0
- capo_s3/_operations/amazon_s3/delete_object_tagging.py +144 -0
- capo_s3/_operations/amazon_s3/delete_objects.py +166 -0
- capo_s3/_operations/amazon_s3/delete_public_access_block.py +115 -0
- capo_s3/_operations/amazon_s3/get_bucket_abac.py +139 -0
- capo_s3/_operations/amazon_s3/get_bucket_accelerate_configuration.py +153 -0
- capo_s3/_operations/amazon_s3/get_bucket_acl.py +138 -0
- capo_s3/_operations/amazon_s3/get_bucket_analytics_configuration.py +150 -0
- capo_s3/_operations/amazon_s3/get_bucket_cors.py +139 -0
- capo_s3/_operations/amazon_s3/get_bucket_encryption.py +145 -0
- capo_s3/_operations/amazon_s3/get_bucket_intelligent_tiering_configuration.py +150 -0
- capo_s3/_operations/amazon_s3/get_bucket_inventory_configuration.py +150 -0
- capo_s3/_operations/amazon_s3/get_bucket_lifecycle_configuration.py +154 -0
- capo_s3/_operations/amazon_s3/get_bucket_location.py +143 -0
- capo_s3/_operations/amazon_s3/get_bucket_logging.py +143 -0
- capo_s3/_operations/amazon_s3/get_bucket_metadata_configuration.py +145 -0
- capo_s3/_operations/amazon_s3/get_bucket_metadata_table_configuration.py +145 -0
- capo_s3/_operations/amazon_s3/get_bucket_metrics_configuration.py +150 -0
- capo_s3/_operations/amazon_s3/get_bucket_notification_configuration.py +146 -0
- capo_s3/_operations/amazon_s3/get_bucket_ownership_controls.py +149 -0
- capo_s3/_operations/amazon_s3/get_bucket_policy.py +138 -0
- capo_s3/_operations/amazon_s3/get_bucket_policy_status.py +145 -0
- capo_s3/_operations/amazon_s3/get_bucket_replication.py +145 -0
- capo_s3/_operations/amazon_s3/get_bucket_request_payment.py +141 -0
- capo_s3/_operations/amazon_s3/get_bucket_tagging.py +143 -0
- capo_s3/_operations/amazon_s3/get_bucket_versioning.py +146 -0
- capo_s3/_operations/amazon_s3/get_bucket_website.py +146 -0
- capo_s3/_operations/amazon_s3/get_object.py +431 -0
- capo_s3/_operations/amazon_s3/get_object_acl.py +157 -0
- capo_s3/_operations/amazon_s3/get_object_attributes.py +199 -0
- capo_s3/_operations/amazon_s3/get_object_legal_hold.py +150 -0
- capo_s3/_operations/amazon_s3/get_object_lock_configuration.py +149 -0
- capo_s3/_operations/amazon_s3/get_object_retention.py +150 -0
- capo_s3/_operations/amazon_s3/get_object_tagging.py +154 -0
- capo_s3/_operations/amazon_s3/get_object_torrent.py +155 -0
- capo_s3/_operations/amazon_s3/get_public_access_block.py +145 -0
- capo_s3/_operations/amazon_s3/head_bucket.py +166 -0
- capo_s3/_operations/amazon_s3/head_object.py +435 -0
- capo_s3/_operations/amazon_s3/list_bucket_analytics_configurations.py +146 -0
- capo_s3/_operations/amazon_s3/list_bucket_intelligent_tiering_configurations.py +146 -0
- capo_s3/_operations/amazon_s3/list_bucket_inventory_configurations.py +146 -0
- capo_s3/_operations/amazon_s3/list_bucket_metrics_configurations.py +146 -0
- capo_s3/_operations/amazon_s3/list_buckets.py +142 -0
- capo_s3/_operations/amazon_s3/list_directory_buckets.py +145 -0
- capo_s3/_operations/amazon_s3/list_multipart_uploads.py +171 -0
- capo_s3/_operations/amazon_s3/list_object_versions.py +175 -0
- capo_s3/_operations/amazon_s3/list_objects.py +169 -0
- capo_s3/_operations/amazon_s3/list_objects_v2.py +175 -0
- capo_s3/_operations/amazon_s3/list_parts.py +183 -0
- capo_s3/_operations/amazon_s3/put_bucket_abac.py +129 -0
- capo_s3/_operations/amazon_s3/put_bucket_accelerate_configuration.py +127 -0
- capo_s3/_operations/amazon_s3/put_bucket_acl.py +142 -0
- capo_s3/_operations/amazon_s3/put_bucket_analytics_configuration.py +126 -0
- capo_s3/_operations/amazon_s3/put_bucket_cors.py +129 -0
- capo_s3/_operations/amazon_s3/put_bucket_encryption.py +131 -0
- capo_s3/_operations/amazon_s3/put_bucket_intelligent_tiering_configuration.py +128 -0
- capo_s3/_operations/amazon_s3/put_bucket_inventory_configuration.py +126 -0
- capo_s3/_operations/amazon_s3/put_bucket_lifecycle_configuration.py +165 -0
- capo_s3/_operations/amazon_s3/put_bucket_logging.py +129 -0
- capo_s3/_operations/amazon_s3/put_bucket_metrics_configuration.py +126 -0
- capo_s3/_operations/amazon_s3/put_bucket_notification_configuration.py +130 -0
- capo_s3/_operations/amazon_s3/put_bucket_ownership_controls.py +129 -0
- capo_s3/_operations/amazon_s3/put_bucket_policy.py +126 -0
- capo_s3/_operations/amazon_s3/put_bucket_replication.py +133 -0
- capo_s3/_operations/amazon_s3/put_bucket_request_payment.py +131 -0
- capo_s3/_operations/amazon_s3/put_bucket_tagging.py +127 -0
- capo_s3/_operations/amazon_s3/put_bucket_versioning.py +131 -0
- capo_s3/_operations/amazon_s3/put_bucket_website.py +129 -0
- capo_s3/_operations/amazon_s3/put_object.py +389 -0
- capo_s3/_operations/amazon_s3/put_object_acl.py +176 -0
- capo_s3/_operations/amazon_s3/put_object_legal_hold.py +164 -0
- capo_s3/_operations/amazon_s3/put_object_lock_configuration.py +168 -0
- capo_s3/_operations/amazon_s3/put_object_retention.py +168 -0
- capo_s3/_operations/amazon_s3/put_object_tagging.py +157 -0
- capo_s3/_operations/amazon_s3/put_public_access_block.py +131 -0
- capo_s3/_operations/amazon_s3/rename_object.py +165 -0
- capo_s3/_operations/amazon_s3/restore_object.py +167 -0
- capo_s3/_operations/amazon_s3/select_object_content.py +201 -0
- capo_s3/_operations/amazon_s3/update_bucket_metadata_inventory_table_configuration.py +131 -0
- capo_s3/_operations/amazon_s3/update_bucket_metadata_journal_table_configuration.py +131 -0
- capo_s3/_operations/amazon_s3/update_object_encryption.py +175 -0
- capo_s3/_operations/amazon_s3/upload_part.py +285 -0
- capo_s3/_operations/amazon_s3/upload_part_copy.py +260 -0
- capo_s3/_operations/amazon_s3/write_get_object_response.py +251 -0
- capo_s3/_pagination.py +21 -0
- capo_s3/_protocol/__init__.py +1 -0
- capo_s3/_protocol/errors.py +59 -0
- capo_s3/_protocol/eventstream.py +238 -0
- capo_s3/_protocol/xml.py +27 -0
- capo_s3/_rule_engine/__init__.py +0 -0
- capo_s3/_rule_engine/_aws_partition.py +160 -0
- capo_s3/_rule_engine/_endpoint_rule_set.py +8040 -0
- capo_s3/_rule_engine/_endpoint_runtime.py +389 -0
- capo_s3/_services/_aws_config.py +152 -0
- capo_s3/_services/_pipeline.py +224 -0
- capo_s3/_services/async_s3.py +9065 -0
- capo_s3/_services/s3.py +8931 -0
- capo_s3/errors/__init__.py +46 -0
- capo_s3/errors/_base.py +94 -0
- capo_s3/errors/access_denied.py +36 -0
- capo_s3/errors/bucket_already_exists.py +39 -0
- capo_s3/errors/bucket_already_owned_by_you.py +39 -0
- capo_s3/errors/encryption_type_mismatch.py +39 -0
- capo_s3/errors/idempotency_parameter_mismatch.py +41 -0
- capo_s3/errors/invalid_object_state.py +76 -0
- capo_s3/errors/invalid_request.py +39 -0
- capo_s3/errors/invalid_write_offset.py +39 -0
- capo_s3/errors/no_such_bucket.py +36 -0
- capo_s3/errors/no_such_key.py +36 -0
- capo_s3/errors/no_such_upload.py +36 -0
- capo_s3/errors/not_found.py +36 -0
- capo_s3/errors/object_already_in_active_tier_error.py +41 -0
- capo_s3/errors/object_not_in_active_tier_error.py +41 -0
- capo_s3/errors/too_many_parts.py +36 -0
- capo_s3/py.typed +0 -0
- capo_s3/types/_prelude/blob.py +22 -0
- capo_s3/types/_prelude/timestamp.py +22 -0
- capo_s3/types/abac_status.py +34 -0
- capo_s3/types/abort_date.py +25 -0
- capo_s3/types/abort_incomplete_multipart_upload.py +34 -0
- capo_s3/types/abort_multipart_upload_output.py +24 -0
- capo_s3/types/abort_multipart_upload_request.py +43 -0
- capo_s3/types/abort_rule_id.py +5 -0
- capo_s3/types/accelerate_configuration.py +38 -0
- capo_s3/types/accept_ranges.py +5 -0
- capo_s3/types/access_control_policy.py +46 -0
- capo_s3/types/access_control_translation.py +36 -0
- capo_s3/types/access_key_id_value.py +5 -0
- capo_s3/types/access_point_alias.py +5 -0
- capo_s3/types/access_point_arn.py +5 -0
- capo_s3/types/account_id.py +5 -0
- capo_s3/types/allow_quoted_record_delimiter.py +5 -0
- capo_s3/types/allowed_header.py +5 -0
- capo_s3/types/allowed_headers.py +37 -0
- capo_s3/types/allowed_method.py +5 -0
- capo_s3/types/allowed_methods.py +37 -0
- capo_s3/types/allowed_origin.py +5 -0
- capo_s3/types/allowed_origins.py +37 -0
- capo_s3/types/analytics_and_operator.py +41 -0
- capo_s3/types/analytics_configuration.py +65 -0
- capo_s3/types/analytics_configuration_list.py +49 -0
- capo_s3/types/analytics_export_destination.py +46 -0
- capo_s3/types/analytics_filter.py +62 -0
- capo_s3/types/analytics_id.py +5 -0
- capo_s3/types/analytics_s3_bucket_destination.py +67 -0
- capo_s3/types/analytics_s3_export_file_format.py +26 -0
- capo_s3/types/archive_status.py +27 -0
- capo_s3/types/blocked_encryption_types.py +41 -0
- capo_s3/types/body.py +25 -0
- capo_s3/types/bucket.py +64 -0
- capo_s3/types/bucket_abac_status.py +27 -0
- capo_s3/types/bucket_accelerate_status.py +27 -0
- capo_s3/types/bucket_canned_acl.py +29 -0
- capo_s3/types/bucket_info.py +50 -0
- capo_s3/types/bucket_key_enabled.py +5 -0
- capo_s3/types/bucket_lifecycle_configuration.py +37 -0
- capo_s3/types/bucket_location_constraint.py +63 -0
- capo_s3/types/bucket_location_name.py +5 -0
- capo_s3/types/bucket_logging_status.py +37 -0
- capo_s3/types/bucket_logs_permission.py +28 -0
- capo_s3/types/bucket_name.py +5 -0
- capo_s3/types/bucket_namespace.py +27 -0
- capo_s3/types/bucket_region.py +5 -0
- capo_s3/types/bucket_type.py +24 -0
- capo_s3/types/bucket_versioning_status.py +27 -0
- capo_s3/types/buckets.py +45 -0
- capo_s3/types/bypass_governance_retention.py +5 -0
- capo_s3/types/bytes_processed.py +5 -0
- capo_s3/types/bytes_returned.py +5 -0
- capo_s3/types/bytes_scanned.py +5 -0
- capo_s3/types/cache_control.py +5 -0
- capo_s3/types/checksum.py +122 -0
- capo_s3/types/checksum_algorithm.py +35 -0
- capo_s3/types/checksum_algorithm_list.py +47 -0
- capo_s3/types/checksum_crc32.py +5 -0
- capo_s3/types/checksum_crc32_c.py +5 -0
- capo_s3/types/checksum_crc64_nvme.py +5 -0
- capo_s3/types/checksum_md5.py +5 -0
- capo_s3/types/checksum_mode.py +24 -0
- capo_s3/types/checksum_sha1.py +5 -0
- capo_s3/types/checksum_sha256.py +5 -0
- capo_s3/types/checksum_sha512.py +5 -0
- capo_s3/types/checksum_type.py +27 -0
- capo_s3/types/checksum_xxhash128.py +5 -0
- capo_s3/types/checksum_xxhash3.py +5 -0
- capo_s3/types/checksum_xxhash64.py +5 -0
- capo_s3/types/client_token.py +5 -0
- capo_s3/types/code.py +5 -0
- capo_s3/types/comments.py +5 -0
- capo_s3/types/common_prefix.py +30 -0
- capo_s3/types/common_prefix_list.py +45 -0
- capo_s3/types/complete_multipart_upload_output.py +175 -0
- capo_s3/types/complete_multipart_upload_request.py +117 -0
- capo_s3/types/completed_multipart_upload.py +35 -0
- capo_s3/types/completed_part.py +122 -0
- capo_s3/types/completed_part_list.py +45 -0
- capo_s3/types/compression_type.py +28 -0
- capo_s3/types/condition.py +44 -0
- capo_s3/types/confirm_remove_self_bucket_access.py +5 -0
- capo_s3/types/content_disposition.py +5 -0
- capo_s3/types/content_encoding.py +5 -0
- capo_s3/types/content_language.py +5 -0
- capo_s3/types/content_length.py +5 -0
- capo_s3/types/content_md5.py +5 -0
- capo_s3/types/content_range.py +5 -0
- capo_s3/types/content_type.py +5 -0
- capo_s3/types/continuation_event.py +33 -0
- capo_s3/types/copy_object_output.py +77 -0
- capo_s3/types/copy_object_request.py +183 -0
- capo_s3/types/copy_object_result.py +146 -0
- capo_s3/types/copy_part_result.py +130 -0
- capo_s3/types/copy_source.py +5 -0
- capo_s3/types/copy_source_if_match.py +5 -0
- capo_s3/types/copy_source_if_modified_since.py +25 -0
- capo_s3/types/copy_source_if_none_match.py +5 -0
- capo_s3/types/copy_source_if_unmodified_since.py +27 -0
- capo_s3/types/copy_source_range.py +5 -0
- capo_s3/types/copy_source_sse_customer_algorithm.py +5 -0
- capo_s3/types/copy_source_sse_customer_key.py +5 -0
- capo_s3/types/copy_source_sse_customer_key_md5.py +5 -0
- capo_s3/types/copy_source_version_id.py +5 -0
- capo_s3/types/cors_configuration.py +37 -0
- capo_s3/types/cors_rule.py +101 -0
- capo_s3/types/cors_rules.py +45 -0
- capo_s3/types/create_bucket_configuration.py +78 -0
- capo_s3/types/create_bucket_metadata_configuration_request.py +60 -0
- capo_s3/types/create_bucket_metadata_table_configuration_request.py +62 -0
- capo_s3/types/create_bucket_output.py +30 -0
- capo_s3/types/create_bucket_request.py +73 -0
- capo_s3/types/create_multipart_upload_output.py +90 -0
- capo_s3/types/create_multipart_upload_request.py +134 -0
- capo_s3/types/create_session_output.py +56 -0
- capo_s3/types/create_session_request.py +44 -0
- capo_s3/types/creation_date.py +25 -0
- capo_s3/types/csv_input.py +96 -0
- capo_s3/types/csv_output.py +74 -0
- capo_s3/types/data_redundancy.py +27 -0
- capo_s3/types/date.py +25 -0
- capo_s3/types/days.py +5 -0
- capo_s3/types/days_after_initiation.py +5 -0
- capo_s3/types/default_retention.py +56 -0
- capo_s3/types/delete.py +47 -0
- capo_s3/types/delete_bucket_analytics_configuration_request.py +33 -0
- capo_s3/types/delete_bucket_cors_request.py +28 -0
- capo_s3/types/delete_bucket_encryption_request.py +30 -0
- capo_s3/types/delete_bucket_intelligent_tiering_configuration_request.py +33 -0
- capo_s3/types/delete_bucket_inventory_configuration_request.py +33 -0
- capo_s3/types/delete_bucket_lifecycle_request.py +30 -0
- capo_s3/types/delete_bucket_metadata_configuration_request.py +30 -0
- capo_s3/types/delete_bucket_metadata_table_configuration_request.py +30 -0
- capo_s3/types/delete_bucket_metrics_configuration_request.py +33 -0
- capo_s3/types/delete_bucket_ownership_controls_request.py +30 -0
- capo_s3/types/delete_bucket_policy_request.py +28 -0
- capo_s3/types/delete_bucket_replication_request.py +30 -0
- capo_s3/types/delete_bucket_request.py +28 -0
- capo_s3/types/delete_bucket_tagging_request.py +28 -0
- capo_s3/types/delete_bucket_website_request.py +28 -0
- capo_s3/types/delete_marker.py +5 -0
- capo_s3/types/delete_marker_entry.py +74 -0
- capo_s3/types/delete_marker_replication.py +40 -0
- capo_s3/types/delete_marker_replication_status.py +29 -0
- capo_s3/types/delete_marker_version_id.py +5 -0
- capo_s3/types/delete_markers.py +45 -0
- capo_s3/types/delete_object_output.py +30 -0
- capo_s3/types/delete_object_request.py +55 -0
- capo_s3/types/delete_object_tagging_output.py +25 -0
- capo_s3/types/delete_object_tagging_request.py +34 -0
- capo_s3/types/delete_objects_output.py +50 -0
- capo_s3/types/delete_objects_request.py +57 -0
- capo_s3/types/delete_public_access_block_request.py +30 -0
- capo_s3/types/deleted_object.py +60 -0
- capo_s3/types/deleted_objects.py +45 -0
- capo_s3/types/delimiter.py +5 -0
- capo_s3/types/description.py +5 -0
- capo_s3/types/destination.py +124 -0
- capo_s3/types/destination_result.py +58 -0
- capo_s3/types/directory_bucket_token.py +5 -0
- capo_s3/types/display_name.py +5 -0
- capo_s3/types/e_tag.py +5 -0
- capo_s3/types/email_address.py +5 -0
- capo_s3/types/enable_request_progress.py +5 -0
- capo_s3/types/encoding_type.py +25 -0
- capo_s3/types/encryption.py +56 -0
- capo_s3/types/encryption_configuration.py +30 -0
- capo_s3/types/encryption_type.py +27 -0
- capo_s3/types/encryption_type_list.py +45 -0
- capo_s3/types/end.py +5 -0
- capo_s3/types/end_event.py +33 -0
- capo_s3/types/error.py +54 -0
- capo_s3/types/error_code.py +5 -0
- capo_s3/types/error_details.py +38 -0
- capo_s3/types/error_document.py +32 -0
- capo_s3/types/error_message.py +5 -0
- capo_s3/types/errors.py +45 -0
- capo_s3/types/event.py +53 -0
- capo_s3/types/event_bridge_configuration.py +19 -0
- capo_s3/types/event_list.py +45 -0
- capo_s3/types/existing_object_replication.py +42 -0
- capo_s3/types/existing_object_replication_status.py +29 -0
- capo_s3/types/expiration.py +5 -0
- capo_s3/types/expiration_state.py +27 -0
- capo_s3/types/expiration_status.py +27 -0
- capo_s3/types/expired_object_delete_marker.py +5 -0
- capo_s3/types/expires.py +5 -0
- capo_s3/types/expose_header.py +5 -0
- capo_s3/types/expose_headers.py +37 -0
- capo_s3/types/expression.py +5 -0
- capo_s3/types/expression_type.py +24 -0
- capo_s3/types/fetch_owner.py +5 -0
- capo_s3/types/field_delimiter.py +5 -0
- capo_s3/types/file_header_info.py +28 -0
- capo_s3/types/filter_rule.py +42 -0
- capo_s3/types/filter_rule_list.py +45 -0
- capo_s3/types/filter_rule_name.py +27 -0
- capo_s3/types/filter_rule_value.py +5 -0
- capo_s3/types/get_bucket_abac_output.py +36 -0
- capo_s3/types/get_bucket_abac_request.py +28 -0
- capo_s3/types/get_bucket_accelerate_configuration_output.py +42 -0
- capo_s3/types/get_bucket_accelerate_configuration_request.py +32 -0
- capo_s3/types/get_bucket_acl_output.py +46 -0
- capo_s3/types/get_bucket_acl_request.py +28 -0
- capo_s3/types/get_bucket_analytics_configuration_output.py +44 -0
- capo_s3/types/get_bucket_analytics_configuration_request.py +33 -0
- capo_s3/types/get_bucket_cors_output.py +35 -0
- capo_s3/types/get_bucket_cors_request.py +28 -0
- capo_s3/types/get_bucket_encryption_output.py +45 -0
- capo_s3/types/get_bucket_encryption_request.py +28 -0
- capo_s3/types/get_bucket_intelligent_tiering_configuration_output.py +46 -0
- capo_s3/types/get_bucket_intelligent_tiering_configuration_request.py +33 -0
- capo_s3/types/get_bucket_inventory_configuration_output.py +44 -0
- capo_s3/types/get_bucket_inventory_configuration_request.py +33 -0
- capo_s3/types/get_bucket_lifecycle_configuration_output.py +40 -0
- capo_s3/types/get_bucket_lifecycle_configuration_request.py +30 -0
- capo_s3/types/get_bucket_location_output.py +42 -0
- capo_s3/types/get_bucket_location_request.py +28 -0
- capo_s3/types/get_bucket_logging_output.py +37 -0
- capo_s3/types/get_bucket_logging_request.py +28 -0
- capo_s3/types/get_bucket_metadata_configuration_output.py +48 -0
- capo_s3/types/get_bucket_metadata_configuration_request.py +30 -0
- capo_s3/types/get_bucket_metadata_configuration_result.py +48 -0
- capo_s3/types/get_bucket_metadata_table_configuration_output.py +48 -0
- capo_s3/types/get_bucket_metadata_table_configuration_request.py +30 -0
- capo_s3/types/get_bucket_metadata_table_configuration_result.py +73 -0
- capo_s3/types/get_bucket_metrics_configuration_output.py +44 -0
- capo_s3/types/get_bucket_metrics_configuration_request.py +33 -0
- capo_s3/types/get_bucket_notification_configuration_request.py +30 -0
- capo_s3/types/get_bucket_ownership_controls_output.py +42 -0
- capo_s3/types/get_bucket_ownership_controls_request.py +30 -0
- capo_s3/types/get_bucket_policy_output.py +30 -0
- capo_s3/types/get_bucket_policy_request.py +28 -0
- capo_s3/types/get_bucket_policy_status_output.py +40 -0
- capo_s3/types/get_bucket_policy_status_request.py +30 -0
- capo_s3/types/get_bucket_replication_output.py +41 -0
- capo_s3/types/get_bucket_replication_request.py +30 -0
- capo_s3/types/get_bucket_request_payment_output.py +36 -0
- capo_s3/types/get_bucket_request_payment_request.py +30 -0
- capo_s3/types/get_bucket_tagging_output.py +36 -0
- capo_s3/types/get_bucket_tagging_request.py +28 -0
- capo_s3/types/get_bucket_versioning_output.py +54 -0
- capo_s3/types/get_bucket_versioning_request.py +28 -0
- capo_s3/types/get_bucket_website_output.py +90 -0
- capo_s3/types/get_bucket_website_request.py +28 -0
- capo_s3/types/get_object_acl_output.py +48 -0
- capo_s3/types/get_object_acl_request.py +36 -0
- capo_s3/types/get_object_attributes_output.py +95 -0
- capo_s3/types/get_object_attributes_parts.py +79 -0
- capo_s3/types/get_object_attributes_request.py +58 -0
- capo_s3/types/get_object_legal_hold_output.py +38 -0
- capo_s3/types/get_object_legal_hold_request.py +36 -0
- capo_s3/types/get_object_lock_configuration_output.py +44 -0
- capo_s3/types/get_object_lock_configuration_request.py +30 -0
- capo_s3/types/get_object_output.py +158 -0
- capo_s3/types/get_object_request.py +100 -0
- capo_s3/types/get_object_response_status_code.py +5 -0
- capo_s3/types/get_object_retention_output.py +38 -0
- capo_s3/types/get_object_retention_request.py +36 -0
- capo_s3/types/get_object_tagging_output.py +39 -0
- capo_s3/types/get_object_tagging_request.py +36 -0
- capo_s3/types/get_object_torrent_output.py +15 -0
- capo_s3/types/get_object_torrent_request.py +33 -0
- capo_s3/types/get_public_access_block_output.py +44 -0
- capo_s3/types/get_public_access_block_request.py +30 -0
- capo_s3/types/glacier_job_parameters.py +36 -0
- capo_s3/types/grant.py +46 -0
- capo_s3/types/grant_full_control.py +5 -0
- capo_s3/types/grant_read.py +5 -0
- capo_s3/types/grant_read_acp.py +5 -0
- capo_s3/types/grant_write.py +5 -0
- capo_s3/types/grant_write_acp.py +5 -0
- capo_s3/types/grantee.py +68 -0
- capo_s3/types/grants.py +45 -0
- capo_s3/types/head_bucket_output.py +41 -0
- capo_s3/types/head_bucket_request.py +28 -0
- capo_s3/types/head_object_output.py +170 -0
- capo_s3/types/head_object_request.py +100 -0
- capo_s3/types/host_name.py +5 -0
- capo_s3/types/http_error_code_returned_equals.py +5 -0
- capo_s3/types/http_redirect_code.py +5 -0
- capo_s3/types/id.py +5 -0
- capo_s3/types/if_match.py +5 -0
- capo_s3/types/if_match_initiated_time.py +27 -0
- capo_s3/types/if_match_last_modified_time.py +27 -0
- capo_s3/types/if_match_size.py +5 -0
- capo_s3/types/if_modified_since.py +25 -0
- capo_s3/types/if_none_match.py +5 -0
- capo_s3/types/if_unmodified_since.py +25 -0
- capo_s3/types/index_document.py +32 -0
- capo_s3/types/initiated.py +25 -0
- capo_s3/types/initiator.py +38 -0
- capo_s3/types/input_serialization.py +74 -0
- capo_s3/types/intelligent_tiering_access_tier.py +29 -0
- capo_s3/types/intelligent_tiering_and_operator.py +43 -0
- capo_s3/types/intelligent_tiering_configuration.py +81 -0
- capo_s3/types/intelligent_tiering_configuration_list.py +59 -0
- capo_s3/types/intelligent_tiering_days.py +5 -0
- capo_s3/types/intelligent_tiering_filter.py +61 -0
- capo_s3/types/intelligent_tiering_id.py +5 -0
- capo_s3/types/intelligent_tiering_status.py +27 -0
- capo_s3/types/inventory_configuration.py +126 -0
- capo_s3/types/inventory_configuration_list.py +49 -0
- capo_s3/types/inventory_configuration_state.py +29 -0
- capo_s3/types/inventory_destination.py +46 -0
- capo_s3/types/inventory_encryption.py +46 -0
- capo_s3/types/inventory_filter.py +32 -0
- capo_s3/types/inventory_format.py +28 -0
- capo_s3/types/inventory_frequency.py +27 -0
- capo_s3/types/inventory_id.py +5 -0
- capo_s3/types/inventory_included_object_versions.py +29 -0
- capo_s3/types/inventory_optional_field.py +41 -0
- capo_s3/types/inventory_optional_fields.py +49 -0
- capo_s3/types/inventory_s3_bucket_destination.py +79 -0
- capo_s3/types/inventory_schedule.py +38 -0
- capo_s3/types/inventory_table_configuration.py +68 -0
- capo_s3/types/inventory_table_configuration_result.py +83 -0
- capo_s3/types/inventory_table_configuration_updates.py +68 -0
- capo_s3/types/is_enabled.py +5 -0
- capo_s3/types/is_latest.py +5 -0
- capo_s3/types/is_public.py +5 -0
- capo_s3/types/is_restore_in_progress.py +5 -0
- capo_s3/types/is_truncated.py +5 -0
- capo_s3/types/journal_table_configuration.py +62 -0
- capo_s3/types/journal_table_configuration_result.py +85 -0
- capo_s3/types/journal_table_configuration_updates.py +44 -0
- capo_s3/types/json_input.py +34 -0
- capo_s3/types/json_output.py +30 -0
- capo_s3/types/json_type.py +27 -0
- capo_s3/types/key_count.py +5 -0
- capo_s3/types/key_marker.py +5 -0
- capo_s3/types/key_prefix_equals.py +5 -0
- capo_s3/types/kms_context.py +5 -0
- capo_s3/types/kms_key_arn.py +5 -0
- capo_s3/types/lambda_function_arn.py +5 -0
- capo_s3/types/lambda_function_configuration.py +72 -0
- capo_s3/types/lambda_function_configuration_list.py +51 -0
- capo_s3/types/last_modified.py +25 -0
- capo_s3/types/last_modified_time.py +27 -0
- capo_s3/types/lifecycle_expiration.py +56 -0
- capo_s3/types/lifecycle_rule.py +156 -0
- capo_s3/types/lifecycle_rule_and_operator.py +63 -0
- capo_s3/types/lifecycle_rule_filter.py +79 -0
- capo_s3/types/lifecycle_rules.py +45 -0
- capo_s3/types/list_bucket_analytics_configurations_output.py +71 -0
- capo_s3/types/list_bucket_analytics_configurations_request.py +33 -0
- capo_s3/types/list_bucket_intelligent_tiering_configurations_output.py +73 -0
- capo_s3/types/list_bucket_intelligent_tiering_configurations_request.py +33 -0
- capo_s3/types/list_bucket_inventory_configurations_output.py +71 -0
- capo_s3/types/list_bucket_inventory_configurations_request.py +33 -0
- capo_s3/types/list_bucket_metrics_configurations_output.py +71 -0
- capo_s3/types/list_bucket_metrics_configurations_request.py +33 -0
- capo_s3/types/list_buckets_output.py +62 -0
- capo_s3/types/list_buckets_request.py +34 -0
- capo_s3/types/list_directory_buckets_output.py +44 -0
- capo_s3/types/list_directory_buckets_request.py +34 -0
- capo_s3/types/list_multipart_uploads_output.py +146 -0
- capo_s3/types/list_multipart_uploads_request.py +49 -0
- capo_s3/types/list_object_versions_output.py +163 -0
- capo_s3/types/list_object_versions_request.py +52 -0
- capo_s3/types/list_objects_output.py +124 -0
- capo_s3/types/list_objects_request.py +50 -0
- capo_s3/types/list_objects_v2_output.py +142 -0
- capo_s3/types/list_objects_v2_request.py +57 -0
- capo_s3/types/list_parts_output.py +177 -0
- capo_s3/types/list_parts_request.py +55 -0
- capo_s3/types/location.py +5 -0
- capo_s3/types/location_info.py +42 -0
- capo_s3/types/location_name_as_string.py +5 -0
- capo_s3/types/location_prefix.py +5 -0
- capo_s3/types/location_type.py +27 -0
- capo_s3/types/logging_enabled.py +77 -0
- capo_s3/types/marker.py +5 -0
- capo_s3/types/max_age_seconds.py +5 -0
- capo_s3/types/max_buckets.py +5 -0
- capo_s3/types/max_directory_buckets.py +5 -0
- capo_s3/types/max_keys.py +5 -0
- capo_s3/types/max_parts.py +5 -0
- capo_s3/types/max_uploads.py +5 -0
- capo_s3/types/message.py +5 -0
- capo_s3/types/metadata.py +56 -0
- capo_s3/types/metadata_configuration.py +66 -0
- capo_s3/types/metadata_configuration_result.py +92 -0
- capo_s3/types/metadata_directive.py +27 -0
- capo_s3/types/metadata_entry.py +38 -0
- capo_s3/types/metadata_key.py +5 -0
- capo_s3/types/metadata_table_configuration.py +44 -0
- capo_s3/types/metadata_table_configuration_result.py +48 -0
- capo_s3/types/metadata_table_encryption_configuration.py +52 -0
- capo_s3/types/metadata_table_status.py +5 -0
- capo_s3/types/metadata_value.py +5 -0
- capo_s3/types/metrics.py +54 -0
- capo_s3/types/metrics_and_operator.py +49 -0
- capo_s3/types/metrics_configuration.py +44 -0
- capo_s3/types/metrics_configuration_list.py +49 -0
- capo_s3/types/metrics_filter.py +74 -0
- capo_s3/types/metrics_id.py +5 -0
- capo_s3/types/metrics_status.py +27 -0
- capo_s3/types/mfa.py +5 -0
- capo_s3/types/mfa_delete.py +27 -0
- capo_s3/types/mfa_delete_status.py +27 -0
- capo_s3/types/minutes.py +5 -0
- capo_s3/types/missing_meta.py +5 -0
- capo_s3/types/mpu_object_size.py +5 -0
- capo_s3/types/multipart_upload.py +124 -0
- capo_s3/types/multipart_upload_id.py +5 -0
- capo_s3/types/multipart_upload_list.py +45 -0
- capo_s3/types/next_key_marker.py +5 -0
- capo_s3/types/next_marker.py +5 -0
- capo_s3/types/next_part_number_marker.py +5 -0
- capo_s3/types/next_token.py +5 -0
- capo_s3/types/next_upload_id_marker.py +5 -0
- capo_s3/types/next_version_id_marker.py +5 -0
- capo_s3/types/non_empty_kms_key_arn_string.py +5 -0
- capo_s3/types/noncurrent_version_expiration.py +44 -0
- capo_s3/types/noncurrent_version_transition.py +62 -0
- capo_s3/types/noncurrent_version_transition_list.py +51 -0
- capo_s3/types/notification_configuration.py +99 -0
- capo_s3/types/notification_configuration_filter.py +35 -0
- capo_s3/types/notification_id.py +6 -0
- capo_s3/types/object.py +141 -0
- capo_s3/types/object_attributes.py +30 -0
- capo_s3/types/object_attributes_list.py +47 -0
- capo_s3/types/object_canned_acl.py +32 -0
- capo_s3/types/object_encryption.py +38 -0
- capo_s3/types/object_identifier.py +72 -0
- capo_s3/types/object_identifier_list.py +47 -0
- capo_s3/types/object_key.py +5 -0
- capo_s3/types/object_list.py +45 -0
- capo_s3/types/object_lock_configuration.py +52 -0
- capo_s3/types/object_lock_enabled.py +24 -0
- capo_s3/types/object_lock_enabled_for_bucket.py +5 -0
- capo_s3/types/object_lock_legal_hold.py +40 -0
- capo_s3/types/object_lock_legal_hold_status.py +27 -0
- capo_s3/types/object_lock_mode.py +27 -0
- capo_s3/types/object_lock_retain_until_date.py +25 -0
- capo_s3/types/object_lock_retention.py +56 -0
- capo_s3/types/object_lock_retention_mode.py +27 -0
- capo_s3/types/object_lock_rule.py +38 -0
- capo_s3/types/object_lock_token.py +5 -0
- capo_s3/types/object_ownership.py +29 -0
- capo_s3/types/object_part.py +122 -0
- capo_s3/types/object_size.py +5 -0
- capo_s3/types/object_size_greater_than_bytes.py +5 -0
- capo_s3/types/object_size_less_than_bytes.py +5 -0
- capo_s3/types/object_storage_class.py +38 -0
- capo_s3/types/object_version.py +161 -0
- capo_s3/types/object_version_id.py +5 -0
- capo_s3/types/object_version_list.py +45 -0
- capo_s3/types/object_version_storage_class.py +24 -0
- capo_s3/types/optional_object_attributes.py +24 -0
- capo_s3/types/optional_object_attributes_list.py +51 -0
- capo_s3/types/output_location.py +34 -0
- capo_s3/types/output_serialization.py +46 -0
- capo_s3/types/owner.py +38 -0
- capo_s3/types/owner_override.py +24 -0
- capo_s3/types/ownership_controls.py +39 -0
- capo_s3/types/ownership_controls_rule.py +39 -0
- capo_s3/types/ownership_controls_rules.py +49 -0
- capo_s3/types/parquet_input.py +19 -0
- capo_s3/types/part.py +146 -0
- capo_s3/types/part_number.py +5 -0
- capo_s3/types/part_number_marker.py +5 -0
- capo_s3/types/partition_date_source.py +27 -0
- capo_s3/types/partitioned_prefix.py +42 -0
- capo_s3/types/parts.py +45 -0
- capo_s3/types/parts_count.py +5 -0
- capo_s3/types/parts_list.py +45 -0
- capo_s3/types/payer.py +27 -0
- capo_s3/types/permission.py +30 -0
- capo_s3/types/policy.py +5 -0
- capo_s3/types/policy_status.py +30 -0
- capo_s3/types/prefix.py +5 -0
- capo_s3/types/priority.py +5 -0
- capo_s3/types/progress.py +46 -0
- capo_s3/types/progress_event.py +48 -0
- capo_s3/types/protocol.py +27 -0
- capo_s3/types/public_access_block_configuration.py +69 -0
- capo_s3/types/put_bucket_abac_request.py +52 -0
- capo_s3/types/put_bucket_accelerate_configuration_request.py +59 -0
- capo_s3/types/put_bucket_acl_request.py +74 -0
- capo_s3/types/put_bucket_analytics_configuration_request.py +57 -0
- capo_s3/types/put_bucket_cors_request.py +54 -0
- capo_s3/types/put_bucket_encryption_request.py +61 -0
- capo_s3/types/put_bucket_intelligent_tiering_configuration_request.py +57 -0
- capo_s3/types/put_bucket_inventory_configuration_request.py +57 -0
- capo_s3/types/put_bucket_lifecycle_configuration_output.py +29 -0
- capo_s3/types/put_bucket_lifecycle_configuration_request.py +60 -0
- capo_s3/types/put_bucket_logging_request.py +58 -0
- capo_s3/types/put_bucket_metrics_configuration_request.py +55 -0
- capo_s3/types/put_bucket_notification_configuration_request.py +58 -0
- capo_s3/types/put_bucket_ownership_controls_request.py +58 -0
- capo_s3/types/put_bucket_policy_request.py +51 -0
- capo_s3/types/put_bucket_replication_request.py +64 -0
- capo_s3/types/put_bucket_request_payment_request.py +62 -0
- capo_s3/types/put_bucket_tagging_request.py +50 -0
- capo_s3/types/put_bucket_versioning_request.py +63 -0
- capo_s3/types/put_bucket_website_request.py +58 -0
- capo_s3/types/put_object_acl_output.py +24 -0
- capo_s3/types/put_object_acl_request.py +82 -0
- capo_s3/types/put_object_legal_hold_output.py +24 -0
- capo_s3/types/put_object_legal_hold_request.py +60 -0
- capo_s3/types/put_object_lock_configuration_output.py +26 -0
- capo_s3/types/put_object_lock_configuration_request.py +63 -0
- capo_s3/types/put_object_output.py +99 -0
- capo_s3/types/put_object_request.py +169 -0
- capo_s3/types/put_object_retention_output.py +24 -0
- capo_s3/types/put_object_retention_request.py +65 -0
- capo_s3/types/put_object_tagging_output.py +25 -0
- capo_s3/types/put_object_tagging_request.py +59 -0
- capo_s3/types/put_public_access_block_request.py +62 -0
- capo_s3/types/queue_arn.py +5 -0
- capo_s3/types/queue_configuration.py +68 -0
- capo_s3/types/queue_configuration_list.py +49 -0
- capo_s3/types/quiet.py +5 -0
- capo_s3/types/quote_character.py +5 -0
- capo_s3/types/quote_escape_character.py +5 -0
- capo_s3/types/quote_fields.py +27 -0
- capo_s3/types/range.py +5 -0
- capo_s3/types/record_delimiter.py +5 -0
- capo_s3/types/record_expiration.py +46 -0
- capo_s3/types/record_expiration_days.py +5 -0
- capo_s3/types/records_event.py +42 -0
- capo_s3/types/redirect.py +70 -0
- capo_s3/types/redirect_all_requests_to.py +44 -0
- capo_s3/types/region.py +5 -0
- capo_s3/types/rename_object_output.py +19 -0
- capo_s3/types/rename_object_request.py +70 -0
- capo_s3/types/rename_source.py +5 -0
- capo_s3/types/rename_source_if_match.py +5 -0
- capo_s3/types/rename_source_if_modified_since.py +29 -0
- capo_s3/types/rename_source_if_none_match.py +5 -0
- capo_s3/types/rename_source_if_unmodified_since.py +29 -0
- capo_s3/types/replace_key_prefix_with.py +5 -0
- capo_s3/types/replace_key_with.py +5 -0
- capo_s3/types/replica_kms_key_id.py +5 -0
- capo_s3/types/replica_modifications.py +40 -0
- capo_s3/types/replica_modifications_status.py +27 -0
- capo_s3/types/replication_configuration.py +44 -0
- capo_s3/types/replication_rule.py +151 -0
- capo_s3/types/replication_rule_and_operator.py +41 -0
- capo_s3/types/replication_rule_filter.py +61 -0
- capo_s3/types/replication_rule_status.py +27 -0
- capo_s3/types/replication_rules.py +45 -0
- capo_s3/types/replication_status.py +30 -0
- capo_s3/types/replication_time.py +51 -0
- capo_s3/types/replication_time_status.py +27 -0
- capo_s3/types/replication_time_value.py +30 -0
- capo_s3/types/request_charged.py +25 -0
- capo_s3/types/request_payer.py +25 -0
- capo_s3/types/request_payment_configuration.py +38 -0
- capo_s3/types/request_progress.py +30 -0
- capo_s3/types/request_route.py +5 -0
- capo_s3/types/request_token.py +5 -0
- capo_s3/types/response_cache_control.py +5 -0
- capo_s3/types/response_content_disposition.py +5 -0
- capo_s3/types/response_content_encoding.py +5 -0
- capo_s3/types/response_content_language.py +5 -0
- capo_s3/types/response_content_type.py +5 -0
- capo_s3/types/response_expires.py +27 -0
- capo_s3/types/restore.py +5 -0
- capo_s3/types/restore_expiry_date.py +25 -0
- capo_s3/types/restore_object_output.py +29 -0
- capo_s3/types/restore_object_request.py +56 -0
- capo_s3/types/restore_output_path.py +5 -0
- capo_s3/types/restore_request.py +114 -0
- capo_s3/types/restore_request_type.py +24 -0
- capo_s3/types/restore_status.py +54 -0
- capo_s3/types/role.py +5 -0
- capo_s3/types/routing_rule.py +48 -0
- capo_s3/types/routing_rules.py +45 -0
- capo_s3/types/s3_key_filter.py +36 -0
- capo_s3/types/s3_location.py +128 -0
- capo_s3/types/s3_regional_or_s3_express_bucket_arn_string.py +5 -0
- capo_s3/types/s3_tables_arn.py +5 -0
- capo_s3/types/s3_tables_bucket_arn.py +5 -0
- capo_s3/types/s3_tables_bucket_type.py +27 -0
- capo_s3/types/s3_tables_destination.py +41 -0
- capo_s3/types/s3_tables_destination_result.py +61 -0
- capo_s3/types/s3_tables_name.py +5 -0
- capo_s3/types/s3_tables_namespace.py +5 -0
- capo_s3/types/scan_range.py +38 -0
- capo_s3/types/select_object_content_event_stream.py +110 -0
- capo_s3/types/select_object_content_output.py +15 -0
- capo_s3/types/select_object_content_request.py +141 -0
- capo_s3/types/select_parameters.py +85 -0
- capo_s3/types/server_side_encryption.py +29 -0
- capo_s3/types/server_side_encryption_by_default.py +52 -0
- capo_s3/types/server_side_encryption_configuration.py +41 -0
- capo_s3/types/server_side_encryption_rule.py +78 -0
- capo_s3/types/server_side_encryption_rules.py +49 -0
- capo_s3/types/session_credential_value.py +5 -0
- capo_s3/types/session_credentials.py +66 -0
- capo_s3/types/session_expiration.py +25 -0
- capo_s3/types/session_mode.py +27 -0
- capo_s3/types/setting.py +5 -0
- capo_s3/types/simple_prefix.py +19 -0
- capo_s3/types/size.py +5 -0
- capo_s3/types/skip_validation.py +5 -0
- capo_s3/types/source_selection_criteria.py +62 -0
- capo_s3/types/sse_customer_algorithm.py +5 -0
- capo_s3/types/sse_customer_key.py +5 -0
- capo_s3/types/sse_customer_key_md5.py +5 -0
- capo_s3/types/sse_kms_encrypted_objects.py +42 -0
- capo_s3/types/sse_kms_encrypted_objects_status.py +29 -0
- capo_s3/types/ssekms.py +32 -0
- capo_s3/types/ssekms_encryption.py +44 -0
- capo_s3/types/ssekms_encryption_context.py +5 -0
- capo_s3/types/ssekms_key_id.py +5 -0
- capo_s3/types/sses3.py +19 -0
- capo_s3/types/start.py +5 -0
- capo_s3/types/start_after.py +5 -0
- capo_s3/types/stats.py +46 -0
- capo_s3/types/stats_event.py +48 -0
- capo_s3/types/storage_class.py +38 -0
- capo_s3/types/storage_class_analysis.py +42 -0
- capo_s3/types/storage_class_analysis_data_export.py +65 -0
- capo_s3/types/storage_class_analysis_schema_version.py +26 -0
- capo_s3/types/streaming_blob.py +7 -0
- capo_s3/types/suffix.py +5 -0
- capo_s3/types/table_sse_algorithm.py +27 -0
- capo_s3/types/tag.py +41 -0
- capo_s3/types/tag_count.py +5 -0
- capo_s3/types/tag_set.py +45 -0
- capo_s3/types/tagging.py +36 -0
- capo_s3/types/tagging_directive.py +27 -0
- capo_s3/types/tagging_header.py +5 -0
- capo_s3/types/target_bucket.py +5 -0
- capo_s3/types/target_grant.py +50 -0
- capo_s3/types/target_grants.py +45 -0
- capo_s3/types/target_object_key_format.py +56 -0
- capo_s3/types/target_prefix.py +5 -0
- capo_s3/types/tier.py +28 -0
- capo_s3/types/tiering.py +53 -0
- capo_s3/types/tiering_list.py +45 -0
- capo_s3/types/token.py +5 -0
- capo_s3/types/topic_arn.py +5 -0
- capo_s3/types/topic_configuration.py +68 -0
- capo_s3/types/topic_configuration_list.py +49 -0
- capo_s3/types/transition.py +60 -0
- capo_s3/types/transition_default_minimum_object_size.py +29 -0
- capo_s3/types/transition_list.py +45 -0
- capo_s3/types/transition_storage_class.py +31 -0
- capo_s3/types/type.py +28 -0
- capo_s3/types/update_bucket_metadata_inventory_table_configuration_request.py +64 -0
- capo_s3/types/update_bucket_metadata_journal_table_configuration_request.py +64 -0
- capo_s3/types/update_object_encryption_request.py +66 -0
- capo_s3/types/update_object_encryption_response.py +26 -0
- capo_s3/types/upload_id_marker.py +5 -0
- capo_s3/types/upload_part_copy_output.py +66 -0
- capo_s3/types/upload_part_copy_request.py +95 -0
- capo_s3/types/upload_part_output.py +82 -0
- capo_s3/types/upload_part_request.py +88 -0
- capo_s3/types/uri.py +5 -0
- capo_s3/types/user_metadata.py +45 -0
- capo_s3/types/value.py +5 -0
- capo_s3/types/version_count.py +5 -0
- capo_s3/types/version_id_marker.py +5 -0
- capo_s3/types/versioning_configuration.py +50 -0
- capo_s3/types/website_configuration.py +90 -0
- capo_s3/types/website_redirect_location.py +5 -0
- capo_s3/types/write_get_object_response_request.py +167 -0
- capo_s3/types/write_offset_bytes.py +5 -0
- capo_s3/types/years.py +5 -0
- capo_s3-0.1.0.dist-info/METADATA +165 -0
- capo_s3-0.1.0.dist-info/RECORD +817 -0
- capo_s3-0.1.0.dist-info/WHEEL +5 -0
- capo_s3-0.1.0.dist-info/licenses/LICENSE +21 -0
- capo_s3-0.1.0.dist-info/top_level.txt +1 -0
capo_s3/__init__.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from . import _iter as _iter
|
|
4
|
+
from . import _protocol as _protocol
|
|
5
|
+
from ._auth._identity import Credentials as Credentials
|
|
6
|
+
from ._auth._identity import Identity as Identity
|
|
7
|
+
from ._auth._providers import (
|
|
8
|
+
CachedProvider as CachedProvider,
|
|
9
|
+
)
|
|
10
|
+
from ._auth._providers import (
|
|
11
|
+
ChainedProvider as ChainedProvider,
|
|
12
|
+
)
|
|
13
|
+
from ._auth._providers import (
|
|
14
|
+
CredentialsProvider as CredentialsProvider,
|
|
15
|
+
)
|
|
16
|
+
from ._auth._providers import (
|
|
17
|
+
EnvCredentialsProvider as EnvCredentialsProvider,
|
|
18
|
+
)
|
|
19
|
+
from ._auth._providers import (
|
|
20
|
+
IdentityNotFound as IdentityNotFound,
|
|
21
|
+
)
|
|
22
|
+
from ._auth._providers import (
|
|
23
|
+
IdentityProvider as IdentityProvider,
|
|
24
|
+
)
|
|
25
|
+
from ._auth._providers import (
|
|
26
|
+
ProfileCredentialsProvider as ProfileCredentialsProvider,
|
|
27
|
+
)
|
|
28
|
+
from ._auth._providers import (
|
|
29
|
+
StaticAwsCredentialsProvider as StaticAwsCredentialsProvider,
|
|
30
|
+
)
|
|
31
|
+
from ._auth._signers import Signer as Signer
|
|
32
|
+
from ._auth._signers import SigV4Signer as SigV4Signer
|
|
33
|
+
from ._services._pipeline import (
|
|
34
|
+
AsyncOperationOptions as AsyncOperationOptions,
|
|
35
|
+
)
|
|
36
|
+
from ._services._pipeline import (
|
|
37
|
+
AsyncOperationRequest as AsyncOperationRequest,
|
|
38
|
+
)
|
|
39
|
+
from ._services._pipeline import (
|
|
40
|
+
AsyncOperationResponse as AsyncOperationResponse,
|
|
41
|
+
)
|
|
42
|
+
from ._services._pipeline import (
|
|
43
|
+
OperationOptions as OperationOptions,
|
|
44
|
+
)
|
|
45
|
+
from ._services._pipeline import (
|
|
46
|
+
OperationRequest as OperationRequest,
|
|
47
|
+
)
|
|
48
|
+
from ._services._pipeline import (
|
|
49
|
+
OperationResponse as OperationResponse,
|
|
50
|
+
)
|
|
51
|
+
from ._services.async_s3 import AsyncS3Client as AsyncS3Client
|
|
52
|
+
from ._services.s3 import S3Client as S3Client
|
capo_s3/_async.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
import trio
|
|
8
|
+
else:
|
|
9
|
+
try:
|
|
10
|
+
import trio
|
|
11
|
+
except ImportError:
|
|
12
|
+
trio = None
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def in_trio_run() -> bool:
|
|
16
|
+
if trio is None:
|
|
17
|
+
return False
|
|
18
|
+
return trio.lowlevel.in_trio_run()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
async def anysleep(delay: float) -> None:
|
|
22
|
+
if in_trio_run():
|
|
23
|
+
await trio.sleep(delay)
|
|
24
|
+
else:
|
|
25
|
+
await asyncio.sleep(delay)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing import TypedDict
|
|
5
|
+
|
|
6
|
+
from typing_extensions import NotRequired
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Identity(TypedDict):
|
|
10
|
+
expiration: NotRequired[datetime | None]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Credentials(Identity):
|
|
14
|
+
access_key: str
|
|
15
|
+
secret_key: str
|
|
16
|
+
session_token: NotRequired[str | None]
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import configparser
|
|
4
|
+
import os
|
|
5
|
+
from abc import abstractmethod
|
|
6
|
+
from datetime import datetime, timezone
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import Generic, TypeVar
|
|
9
|
+
|
|
10
|
+
from zapros import AsyncClient, Client, ZaprosError
|
|
11
|
+
|
|
12
|
+
from capo_s3._auth._identity import (
|
|
13
|
+
Credentials,
|
|
14
|
+
Identity,
|
|
15
|
+
)
|
|
16
|
+
from capo_s3._services._aws_config import _load_profile
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class IdentityNotFound(Exception):
|
|
20
|
+
"""Raised when a provider cannot resolve an identity. Chain continues."""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
IdentityT = TypeVar("IdentityT", bound="Identity")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class IdentityProvider(Generic[IdentityT]):
|
|
27
|
+
@abstractmethod
|
|
28
|
+
def resolve_identity(self) -> IdentityT:
|
|
29
|
+
raise NotImplementedError
|
|
30
|
+
|
|
31
|
+
async def aresolve_identity(self) -> IdentityT:
|
|
32
|
+
# default: no network I/O, reuse the sync resolution
|
|
33
|
+
return self.resolve_identity()
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class ChainedProvider(IdentityProvider[IdentityT]):
|
|
37
|
+
"""Try each provider in order; first non-`IdentityNotFound` wins."""
|
|
38
|
+
|
|
39
|
+
def __init__(self, *providers: IdentityProvider[IdentityT]) -> None:
|
|
40
|
+
if not providers:
|
|
41
|
+
raise ValueError("ChainedProvider requires at least one provider")
|
|
42
|
+
self._providers = providers
|
|
43
|
+
|
|
44
|
+
def resolve_identity(self) -> IdentityT:
|
|
45
|
+
errors: list[str] = []
|
|
46
|
+
for p in self._providers:
|
|
47
|
+
try:
|
|
48
|
+
return p.resolve_identity()
|
|
49
|
+
except IdentityNotFound as e:
|
|
50
|
+
errors.append(f"{type(p).__name__}: {e}")
|
|
51
|
+
raise IdentityNotFound("no provider succeeded: " + "; ".join(errors))
|
|
52
|
+
|
|
53
|
+
async def aresolve_identity(self) -> IdentityT:
|
|
54
|
+
errors: list[str] = []
|
|
55
|
+
for p in self._providers:
|
|
56
|
+
try:
|
|
57
|
+
return await p.aresolve_identity()
|
|
58
|
+
except IdentityNotFound as e:
|
|
59
|
+
errors.append(f"{type(p).__name__}: {e}")
|
|
60
|
+
raise IdentityNotFound("no provider succeeded: " + "; ".join(errors))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class CachedProvider(IdentityProvider[IdentityT]):
|
|
64
|
+
"""Cache an identity until its `expiration` (minus skew) elapses."""
|
|
65
|
+
|
|
66
|
+
_SKEW_SECONDS = 60
|
|
67
|
+
|
|
68
|
+
def __init__(self, inner: IdentityProvider[IdentityT]) -> None:
|
|
69
|
+
self._inner = inner
|
|
70
|
+
self._cached: IdentityT | None = None
|
|
71
|
+
|
|
72
|
+
def resolve_identity(self) -> IdentityT:
|
|
73
|
+
if self._cached is not None and not self._expired(self._cached):
|
|
74
|
+
return self._cached
|
|
75
|
+
self._cached = self._inner.resolve_identity()
|
|
76
|
+
return self._cached
|
|
77
|
+
|
|
78
|
+
async def aresolve_identity(self) -> IdentityT:
|
|
79
|
+
if self._cached is not None and not self._expired(self._cached):
|
|
80
|
+
return self._cached
|
|
81
|
+
self._cached = await self._inner.aresolve_identity()
|
|
82
|
+
return self._cached
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def _expired(cls, ident: Identity) -> bool:
|
|
86
|
+
exp = ident.get("expiration")
|
|
87
|
+
if exp is None:
|
|
88
|
+
return False
|
|
89
|
+
return (exp - datetime.now(timezone.utc)).total_seconds() <= cls._SKEW_SECONDS
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class CredentialsProvider(IdentityProvider[Credentials]):
|
|
93
|
+
"""Base class for providers that resolve AWS `Credentials`."""
|
|
94
|
+
|
|
95
|
+
@abstractmethod
|
|
96
|
+
def resolve_identity(self) -> Credentials:
|
|
97
|
+
raise NotImplementedError
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class StaticAwsCredentialsProvider(CredentialsProvider):
|
|
101
|
+
def __init__(self, credentials: Credentials) -> None:
|
|
102
|
+
self._credentials = credentials
|
|
103
|
+
|
|
104
|
+
def resolve_identity(self) -> Credentials:
|
|
105
|
+
return self._credentials
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class EnvCredentialsProvider(CredentialsProvider):
|
|
109
|
+
"""Read AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN."""
|
|
110
|
+
|
|
111
|
+
def resolve_identity(self) -> Credentials:
|
|
112
|
+
ak = os.environ.get("AWS_ACCESS_KEY_ID")
|
|
113
|
+
sk = os.environ.get("AWS_SECRET_ACCESS_KEY")
|
|
114
|
+
if not ak or not sk:
|
|
115
|
+
raise IdentityNotFound("AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY unset")
|
|
116
|
+
out: Credentials = {"access_key": ak, "secret_key": sk}
|
|
117
|
+
token = os.environ.get("AWS_SESSION_TOKEN")
|
|
118
|
+
if token:
|
|
119
|
+
out["session_token"] = token
|
|
120
|
+
return out
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class ProfileCredentialsProvider(CredentialsProvider):
|
|
124
|
+
"""Read ~/.aws/credentials and ~/.aws/config for the active profile."""
|
|
125
|
+
|
|
126
|
+
def __init__(self, credentials_file: Path | None = None) -> None:
|
|
127
|
+
self._profile = (
|
|
128
|
+
os.environ.get("AWS_PROFILE")
|
|
129
|
+
or os.environ.get("AWS_DEFAULT_PROFILE")
|
|
130
|
+
or "default"
|
|
131
|
+
)
|
|
132
|
+
self._cred_file = credentials_file or Path(
|
|
133
|
+
os.environ.get("AWS_SHARED_CREDENTIALS_FILE")
|
|
134
|
+
or Path.home() / ".aws" / "credentials"
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
def resolve_identity(self) -> Credentials:
|
|
138
|
+
section = self._load_section()
|
|
139
|
+
ak = section.get("aws_access_key_id")
|
|
140
|
+
sk = section.get("aws_secret_access_key")
|
|
141
|
+
if not ak or not sk:
|
|
142
|
+
raise IdentityNotFound(
|
|
143
|
+
f"profile {self._profile!r}: missing aws_access_key_id/aws_secret_access_key"
|
|
144
|
+
)
|
|
145
|
+
out: Credentials = {"access_key": ak, "secret_key": sk}
|
|
146
|
+
token = section.get("aws_session_token")
|
|
147
|
+
if token:
|
|
148
|
+
out["session_token"] = token
|
|
149
|
+
return out
|
|
150
|
+
|
|
151
|
+
def _load_section(self) -> dict[str, str]:
|
|
152
|
+
# config-file profile reuses the loader from _services/_aws_config
|
|
153
|
+
merged, _ = _load_profile()
|
|
154
|
+
if self._cred_file.is_file():
|
|
155
|
+
cfg = configparser.ConfigParser(interpolation=None)
|
|
156
|
+
cfg.read(self._cred_file)
|
|
157
|
+
if cfg.has_section(self._profile):
|
|
158
|
+
merged.update(dict(cfg.items(self._profile)))
|
|
159
|
+
if not merged:
|
|
160
|
+
raise IdentityNotFound(
|
|
161
|
+
f"profile {self._profile!r} not found in credentials/config files"
|
|
162
|
+
)
|
|
163
|
+
return merged
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
class EcsContainerCredentialsProvider(CredentialsProvider):
|
|
167
|
+
"""Resolve credentials from the ECS/EKS container credentials endpoint."""
|
|
168
|
+
|
|
169
|
+
def __init__(self, client: Client | AsyncClient) -> None:
|
|
170
|
+
self._client = client
|
|
171
|
+
|
|
172
|
+
def resolve_identity(self) -> Credentials:
|
|
173
|
+
if isinstance(self._client, AsyncClient):
|
|
174
|
+
raise TypeError(
|
|
175
|
+
"EcsContainerCredentialsProvider configured with AsyncClient; use aresolve_identity"
|
|
176
|
+
)
|
|
177
|
+
url, headers = self._request_args()
|
|
178
|
+
resp = self._client.get(url, headers=headers)
|
|
179
|
+
if resp.status < 200 or resp.status >= 300:
|
|
180
|
+
raise IdentityNotFound(
|
|
181
|
+
f"ECS credentials endpoint returned status {resp.status}"
|
|
182
|
+
)
|
|
183
|
+
return _credentials_from_json(resp.json)
|
|
184
|
+
|
|
185
|
+
async def aresolve_identity(self) -> Credentials:
|
|
186
|
+
if not isinstance(self._client, AsyncClient):
|
|
187
|
+
raise TypeError(
|
|
188
|
+
"EcsContainerCredentialsProvider configured with sync Client; use resolve_identity"
|
|
189
|
+
)
|
|
190
|
+
url, headers = self._request_args()
|
|
191
|
+
resp = await self._client.get(url, headers=headers)
|
|
192
|
+
if resp.status < 200 or resp.status >= 300:
|
|
193
|
+
raise IdentityNotFound(
|
|
194
|
+
f"ECS credentials endpoint returned status {resp.status}"
|
|
195
|
+
)
|
|
196
|
+
return _credentials_from_json(resp.json)
|
|
197
|
+
|
|
198
|
+
def _request_args(self) -> tuple[str, dict[str, str]]:
|
|
199
|
+
relative = os.environ.get("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")
|
|
200
|
+
full = os.environ.get("AWS_CONTAINER_CREDENTIALS_FULL_URI")
|
|
201
|
+
if relative:
|
|
202
|
+
url = "http://169.254.170.2" + relative
|
|
203
|
+
elif full:
|
|
204
|
+
url = full
|
|
205
|
+
else:
|
|
206
|
+
raise IdentityNotFound("no ECS container credentials env var set")
|
|
207
|
+
headers: dict[str, str] = {}
|
|
208
|
+
token = os.environ.get("AWS_CONTAINER_AUTHORIZATION_TOKEN")
|
|
209
|
+
token_file = os.environ.get("AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE")
|
|
210
|
+
if token_file:
|
|
211
|
+
token = Path(token_file).read_text().strip()
|
|
212
|
+
if token:
|
|
213
|
+
headers["Authorization"] = token
|
|
214
|
+
return url, headers
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
class Ec2InstanceMetadataProvider(CredentialsProvider):
|
|
218
|
+
"""Resolve credentials from the EC2 Instance Metadata Service (IMDSv2)."""
|
|
219
|
+
|
|
220
|
+
_BASE = "http://169.254.169.254"
|
|
221
|
+
_TOKEN_PATH = "/latest/api/token"
|
|
222
|
+
_CREDS_PATH = "/latest/meta-data/iam/security-credentials/"
|
|
223
|
+
|
|
224
|
+
def __init__(self, client: Client | AsyncClient) -> None:
|
|
225
|
+
self._client = client
|
|
226
|
+
|
|
227
|
+
def resolve_identity(self) -> Credentials:
|
|
228
|
+
if isinstance(self._client, AsyncClient):
|
|
229
|
+
raise TypeError(
|
|
230
|
+
"Ec2InstanceMetadataProvider configured with AsyncClient; use aresolve_identity"
|
|
231
|
+
)
|
|
232
|
+
if os.environ.get("AWS_EC2_METADATA_DISABLED", "").strip().lower() in (
|
|
233
|
+
"true",
|
|
234
|
+
"1",
|
|
235
|
+
):
|
|
236
|
+
raise IdentityNotFound("IMDS disabled via AWS_EC2_METADATA_DISABLED")
|
|
237
|
+
try:
|
|
238
|
+
token_resp = self._client.put(
|
|
239
|
+
self._BASE + self._TOKEN_PATH,
|
|
240
|
+
headers={"X-aws-ec2-metadata-token-ttl-seconds": "21600"},
|
|
241
|
+
body=b"",
|
|
242
|
+
)
|
|
243
|
+
auth = {"X-aws-ec2-metadata-token": token_resp.text}
|
|
244
|
+
role_resp = self._client.get(self._BASE + self._CREDS_PATH, headers=auth)
|
|
245
|
+
role = role_resp.text.strip()
|
|
246
|
+
creds_resp = self._client.get(
|
|
247
|
+
self._BASE + self._CREDS_PATH + role, headers=auth
|
|
248
|
+
)
|
|
249
|
+
except ZaprosError as e:
|
|
250
|
+
raise IdentityNotFound(f"IMDS request failed: {e}")
|
|
251
|
+
if creds_resp.status < 200 or creds_resp.status >= 300:
|
|
252
|
+
raise IdentityNotFound(f"IMDS returned status {creds_resp.status}")
|
|
253
|
+
return _credentials_from_json(creds_resp.json)
|
|
254
|
+
|
|
255
|
+
async def aresolve_identity(self) -> Credentials:
|
|
256
|
+
if not isinstance(self._client, AsyncClient):
|
|
257
|
+
raise TypeError(
|
|
258
|
+
"Ec2InstanceMetadataProvider configured with sync Client; use resolve_identity"
|
|
259
|
+
)
|
|
260
|
+
if os.environ.get("AWS_EC2_METADATA_DISABLED", "").strip().lower() in (
|
|
261
|
+
"true",
|
|
262
|
+
"1",
|
|
263
|
+
):
|
|
264
|
+
raise IdentityNotFound("IMDS disabled via AWS_EC2_METADATA_DISABLED")
|
|
265
|
+
try:
|
|
266
|
+
token_resp = await self._client.put(
|
|
267
|
+
self._BASE + self._TOKEN_PATH,
|
|
268
|
+
headers={"X-aws-ec2-metadata-token-ttl-seconds": "21600"},
|
|
269
|
+
body=b"",
|
|
270
|
+
)
|
|
271
|
+
auth = {"X-aws-ec2-metadata-token": token_resp.text}
|
|
272
|
+
role_resp = await self._client.get(
|
|
273
|
+
self._BASE + self._CREDS_PATH, headers=auth
|
|
274
|
+
)
|
|
275
|
+
role = role_resp.text.strip()
|
|
276
|
+
creds_resp = await self._client.get(
|
|
277
|
+
self._BASE + self._CREDS_PATH + role, headers=auth
|
|
278
|
+
)
|
|
279
|
+
except ZaprosError as e:
|
|
280
|
+
raise IdentityNotFound(f"IMDS request failed: {e}")
|
|
281
|
+
if creds_resp.status < 200 or creds_resp.status >= 300:
|
|
282
|
+
raise IdentityNotFound(f"IMDS returned status {creds_resp.status}")
|
|
283
|
+
return _credentials_from_json(creds_resp.json)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def _parse_iso8601(value: str) -> datetime:
|
|
287
|
+
# tolerate trailing 'Z'
|
|
288
|
+
return datetime.fromisoformat(value.replace("Z", "+00:00"))
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
def _credentials_from_json(data: dict[str, object]) -> Credentials:
|
|
292
|
+
ak = data.get("AccessKeyId")
|
|
293
|
+
sk = data.get("SecretAccessKey")
|
|
294
|
+
if not isinstance(ak, str) or not isinstance(sk, str):
|
|
295
|
+
raise IdentityNotFound(
|
|
296
|
+
"credentials response missing AccessKeyId/SecretAccessKey"
|
|
297
|
+
)
|
|
298
|
+
out: Credentials = {"access_key": ak, "secret_key": sk}
|
|
299
|
+
token = data.get("Token")
|
|
300
|
+
if isinstance(token, str):
|
|
301
|
+
out["session_token"] = token
|
|
302
|
+
exp = data.get("Expiration")
|
|
303
|
+
if isinstance(exp, str):
|
|
304
|
+
out["expiration"] = _parse_iso8601(exp)
|
|
305
|
+
return out
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
def default_aws_credentials_chain(
|
|
309
|
+
client: Client | AsyncClient,
|
|
310
|
+
) -> IdentityProvider[Credentials]:
|
|
311
|
+
return CachedProvider(
|
|
312
|
+
ChainedProvider(
|
|
313
|
+
EnvCredentialsProvider(),
|
|
314
|
+
ProfileCredentialsProvider(),
|
|
315
|
+
EcsContainerCredentialsProvider(client),
|
|
316
|
+
Ec2InstanceMetadataProvider(client),
|
|
317
|
+
)
|
|
318
|
+
)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from abc import ABC, abstractmethod
|
|
4
|
+
from typing import Any, Generic, TypeVar
|
|
5
|
+
|
|
6
|
+
from zapros import Request
|
|
7
|
+
|
|
8
|
+
from capo_s3._auth._identity import Credentials, Identity
|
|
9
|
+
from capo_s3._auth._providers import IdentityProvider
|
|
10
|
+
from capo_s3._auth._sigv4 import SigV4AuthContext, sign_sigv4
|
|
11
|
+
|
|
12
|
+
IdentityT = TypeVar("IdentityT", bound="Identity")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class Signer(ABC, Generic[IdentityT]):
|
|
16
|
+
"""Per-request request signer. Holds an IdentityProvider plus static config."""
|
|
17
|
+
|
|
18
|
+
def __init__(self, provider: IdentityProvider[IdentityT]) -> None:
|
|
19
|
+
self.provider = provider
|
|
20
|
+
|
|
21
|
+
@abstractmethod
|
|
22
|
+
async def asign(self, req: Request) -> Request: ...
|
|
23
|
+
@abstractmethod
|
|
24
|
+
def sign(self, req: Request) -> Request: ...
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class SigV4Signer(Signer[Credentials]):
|
|
28
|
+
"""aws.auth#sigv4 — AWS Signature Version 4.
|
|
29
|
+
|
|
30
|
+
The full auth scheme (``name`` variant, ``signingName``, ``signingRegion``,
|
|
31
|
+
encoding/normalization flags) is provided by the caller — either from the
|
|
32
|
+
endpoint rule-set's ``authSchemes`` property or built by the generated
|
|
33
|
+
``get_signer`` from operation defaults.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(
|
|
37
|
+
self, provider: IdentityProvider[Credentials], *, auth_scheme: dict[str, Any]
|
|
38
|
+
) -> None:
|
|
39
|
+
super().__init__(provider)
|
|
40
|
+
self._auth_scheme = auth_scheme
|
|
41
|
+
|
|
42
|
+
async def asign(self, req: Request) -> Request:
|
|
43
|
+
creds = await self.provider.aresolve_identity()
|
|
44
|
+
ctx: SigV4AuthContext = {
|
|
45
|
+
"type": "sig_v4",
|
|
46
|
+
"access_key_id": creds["access_key"],
|
|
47
|
+
"secret_access_key": creds["secret_key"],
|
|
48
|
+
"session_token": creds.get("session_token"),
|
|
49
|
+
"signing_region": self._auth_scheme["signingRegion"],
|
|
50
|
+
"signing_name": self._auth_scheme["signingName"],
|
|
51
|
+
}
|
|
52
|
+
if req.body is None:
|
|
53
|
+
body: bytes | None = b""
|
|
54
|
+
elif isinstance(req.body, bytes):
|
|
55
|
+
body = req.body
|
|
56
|
+
else:
|
|
57
|
+
body = None
|
|
58
|
+
# Strip Accept-Encoding so transports/intermediaries can't transcode
|
|
59
|
+
# the response and so the value never enters the canonical request.
|
|
60
|
+
if "accept-encoding" in req.headers:
|
|
61
|
+
del req.headers["Accept-Encoding"]
|
|
62
|
+
return sign_sigv4(req, ctx, body)
|
|
63
|
+
|
|
64
|
+
def sign(self, req: Request) -> Request:
|
|
65
|
+
creds = self.provider.resolve_identity()
|
|
66
|
+
ctx: SigV4AuthContext = {
|
|
67
|
+
"type": "sig_v4",
|
|
68
|
+
"access_key_id": creds["access_key"],
|
|
69
|
+
"secret_access_key": creds["secret_key"],
|
|
70
|
+
"session_token": creds.get("session_token"),
|
|
71
|
+
"signing_region": self._auth_scheme["signingRegion"],
|
|
72
|
+
"signing_name": self._auth_scheme["signingName"],
|
|
73
|
+
}
|
|
74
|
+
if req.body is None:
|
|
75
|
+
body: bytes | None = b""
|
|
76
|
+
elif isinstance(req.body, bytes):
|
|
77
|
+
body = req.body
|
|
78
|
+
else:
|
|
79
|
+
body = None
|
|
80
|
+
# Strip Accept-Encoding so transports/intermediaries can't transcode
|
|
81
|
+
# the response and so the value never enters the canonical request.
|
|
82
|
+
if "accept-encoding" in req.headers:
|
|
83
|
+
del req.headers["Accept-Encoding"]
|
|
84
|
+
return sign_sigv4(req, ctx, body)
|