aws-sdk-s3 1.103.0 → 1.143.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +288 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +590 -100
- data/lib/aws-sdk-s3/bucket_acl.rb +28 -6
- data/lib/aws-sdk-s3/bucket_cors.rb +34 -10
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +38 -12
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +42 -12
- data/lib/aws-sdk-s3/bucket_logging.rb +35 -6
- data/lib/aws-sdk-s3/bucket_notification.rb +27 -9
- data/lib/aws-sdk-s3/bucket_policy.rb +78 -10
- data/lib/aws-sdk-s3/bucket_request_payment.rb +28 -6
- data/lib/aws-sdk-s3/bucket_tagging.rb +34 -10
- data/lib/aws-sdk-s3/bucket_versioning.rb +72 -14
- data/lib/aws-sdk-s3/bucket_website.rb +34 -10
- data/lib/aws-sdk-s3/client.rb +7917 -3171
- data/lib/aws-sdk-s3/client_api.rb +709 -224
- data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
- data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
- data/lib/aws-sdk-s3/customizations/object.rb +171 -22
- data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
- data/lib/aws-sdk-s3/customizations.rb +7 -0
- data/lib/aws-sdk-s3/encryption/client.rb +6 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
- data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
- data/lib/aws-sdk-s3/endpoint_parameters.rb +178 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +591 -0
- data/lib/aws-sdk-s3/endpoints.rb +2590 -0
- data/lib/aws-sdk-s3/express_credentials.rb +55 -0
- data/lib/aws-sdk-s3/express_credentials_cache.rb +30 -0
- data/lib/aws-sdk-s3/express_credentials_provider.rb +36 -0
- data/lib/aws-sdk-s3/file_downloader.rb +170 -45
- data/lib/aws-sdk-s3/file_uploader.rb +11 -4
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -8
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +41 -14
- data/lib/aws-sdk-s3/multipart_upload.rb +194 -19
- data/lib/aws-sdk-s3/multipart_upload_part.rb +280 -30
- data/lib/aws-sdk-s3/object.rb +1735 -266
- data/lib/aws-sdk-s3/object_acl.rb +49 -13
- data/lib/aws-sdk-s3/object_copier.rb +7 -5
- data/lib/aws-sdk-s3/object_multipart_copier.rb +41 -19
- data/lib/aws-sdk-s3/object_summary.rb +1497 -221
- data/lib/aws-sdk-s3/object_version.rb +365 -58
- data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -44
- data/lib/aws-sdk-s3/plugins/arn.rb +0 -197
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
- data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -55
- data/lib/aws-sdk-s3/plugins/endpoints.rb +274 -0
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +91 -0
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
- data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
- data/lib/aws-sdk-s3/plugins/md5s.rb +6 -3
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +35 -109
- data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
- data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
- data/lib/aws-sdk-s3/presigned_post.rb +99 -78
- data/lib/aws-sdk-s3/presigner.rb +26 -37
- data/lib/aws-sdk-s3/resource.rb +97 -3
- data/lib/aws-sdk-s3/types.rb +6618 -4880
- data/lib/aws-sdk-s3.rb +5 -1
- data/sig/bucket.rbs +212 -0
- data/sig/bucket_acl.rbs +78 -0
- data/sig/bucket_cors.rbs +69 -0
- data/sig/bucket_lifecycle.rbs +88 -0
- data/sig/bucket_lifecycle_configuration.rbs +111 -0
- data/sig/bucket_logging.rbs +76 -0
- data/sig/bucket_notification.rbs +114 -0
- data/sig/bucket_policy.rbs +59 -0
- data/sig/bucket_request_payment.rbs +54 -0
- data/sig/bucket_tagging.rbs +65 -0
- data/sig/bucket_versioning.rbs +77 -0
- data/sig/bucket_website.rbs +93 -0
- data/sig/client.rbs +2360 -0
- data/sig/errors.rbs +34 -0
- data/sig/multipart_upload.rbs +110 -0
- data/sig/multipart_upload_part.rbs +105 -0
- data/sig/object.rbs +436 -0
- data/sig/object_acl.rbs +86 -0
- data/sig/object_summary.rbs +334 -0
- data/sig/object_version.rbs +131 -0
- data/sig/resource.rbs +124 -0
- data/sig/types.rbs +2562 -0
- data/sig/waiters.rbs +83 -0
- metadata +45 -16
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -73
- data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -0,0 +1,178 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::S3
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute bucket
|
14
|
+
# The S3 bucket used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 bucket.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute region
|
19
|
+
# The AWS region used to dispatch the request.
|
20
|
+
#
|
21
|
+
# @return [String]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute use_dual_stack
|
29
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
30
|
+
#
|
31
|
+
# @return [Boolean]
|
32
|
+
#
|
33
|
+
# @!attribute endpoint
|
34
|
+
# Override the endpoint used to send this request
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# @!attribute force_path_style
|
39
|
+
# When true, force a path-style endpoint to be used where the bucket name is part of the path.
|
40
|
+
#
|
41
|
+
# @return [Boolean]
|
42
|
+
#
|
43
|
+
# @!attribute accelerate
|
44
|
+
# When true, use S3 Accelerate. NOTE: Not all regions support S3 accelerate.
|
45
|
+
#
|
46
|
+
# @return [Boolean]
|
47
|
+
#
|
48
|
+
# @!attribute use_global_endpoint
|
49
|
+
# Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.
|
50
|
+
#
|
51
|
+
# @return [Boolean]
|
52
|
+
#
|
53
|
+
# @!attribute use_object_lambda_endpoint
|
54
|
+
# Internal parameter to use object lambda endpoint for an operation (eg: WriteGetObjectResponse)
|
55
|
+
#
|
56
|
+
# @return [Boolean]
|
57
|
+
#
|
58
|
+
# @!attribute key
|
59
|
+
# The S3 Key used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Key.
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
#
|
63
|
+
# @!attribute prefix
|
64
|
+
# The S3 Prefix used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Prefix.
|
65
|
+
#
|
66
|
+
# @return [String]
|
67
|
+
#
|
68
|
+
# @!attribute disable_access_points
|
69
|
+
# Internal parameter to disable Access Point Buckets
|
70
|
+
#
|
71
|
+
# @return [Boolean]
|
72
|
+
#
|
73
|
+
# @!attribute disable_multi_region_access_points
|
74
|
+
# Whether multi-region access points (MRAP) should be disabled.
|
75
|
+
#
|
76
|
+
# @return [Boolean]
|
77
|
+
#
|
78
|
+
# @!attribute use_arn_region
|
79
|
+
# When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.
|
80
|
+
#
|
81
|
+
# @return [Boolean]
|
82
|
+
#
|
83
|
+
# @!attribute use_s3_express_control_endpoint
|
84
|
+
# Internal parameter to indicate whether S3Express operation should use control plane, (ex. CreateBucket)
|
85
|
+
#
|
86
|
+
# @return [Boolean]
|
87
|
+
#
|
88
|
+
# @!attribute disable_s3_express_session_auth
|
89
|
+
# Parameter to indicate whether S3Express session auth should be disabled
|
90
|
+
#
|
91
|
+
# @return [Boolean]
|
92
|
+
#
|
93
|
+
EndpointParameters = Struct.new(
|
94
|
+
:bucket,
|
95
|
+
:region,
|
96
|
+
:use_fips,
|
97
|
+
:use_dual_stack,
|
98
|
+
:endpoint,
|
99
|
+
:force_path_style,
|
100
|
+
:accelerate,
|
101
|
+
:use_global_endpoint,
|
102
|
+
:use_object_lambda_endpoint,
|
103
|
+
:key,
|
104
|
+
:prefix,
|
105
|
+
:disable_access_points,
|
106
|
+
:disable_multi_region_access_points,
|
107
|
+
:use_arn_region,
|
108
|
+
:use_s3_express_control_endpoint,
|
109
|
+
:disable_s3_express_session_auth,
|
110
|
+
) do
|
111
|
+
include Aws::Structure
|
112
|
+
|
113
|
+
# @api private
|
114
|
+
class << self
|
115
|
+
PARAM_MAP = {
|
116
|
+
'Bucket' => :bucket,
|
117
|
+
'Region' => :region,
|
118
|
+
'UseFIPS' => :use_fips,
|
119
|
+
'UseDualStack' => :use_dual_stack,
|
120
|
+
'Endpoint' => :endpoint,
|
121
|
+
'ForcePathStyle' => :force_path_style,
|
122
|
+
'Accelerate' => :accelerate,
|
123
|
+
'UseGlobalEndpoint' => :use_global_endpoint,
|
124
|
+
'UseObjectLambdaEndpoint' => :use_object_lambda_endpoint,
|
125
|
+
'Key' => :key,
|
126
|
+
'Prefix' => :prefix,
|
127
|
+
'DisableAccessPoints' => :disable_access_points,
|
128
|
+
'DisableMultiRegionAccessPoints' => :disable_multi_region_access_points,
|
129
|
+
'UseArnRegion' => :use_arn_region,
|
130
|
+
'UseS3ExpressControlEndpoint' => :use_s3_express_control_endpoint,
|
131
|
+
'DisableS3ExpressSessionAuth' => :disable_s3_express_session_auth,
|
132
|
+
}.freeze
|
133
|
+
end
|
134
|
+
|
135
|
+
def initialize(options = {})
|
136
|
+
self[:bucket] = options[:bucket]
|
137
|
+
self[:region] = options[:region]
|
138
|
+
self[:use_fips] = options[:use_fips]
|
139
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
140
|
+
if self[:use_fips].nil?
|
141
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
142
|
+
end
|
143
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
144
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
145
|
+
if self[:use_dual_stack].nil?
|
146
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
147
|
+
end
|
148
|
+
self[:endpoint] = options[:endpoint]
|
149
|
+
self[:force_path_style] = options[:force_path_style]
|
150
|
+
self[:force_path_style] = false if self[:force_path_style].nil?
|
151
|
+
if self[:force_path_style].nil?
|
152
|
+
raise ArgumentError, "Missing required EndpointParameter: :force_path_style"
|
153
|
+
end
|
154
|
+
self[:accelerate] = options[:accelerate]
|
155
|
+
self[:accelerate] = false if self[:accelerate].nil?
|
156
|
+
if self[:accelerate].nil?
|
157
|
+
raise ArgumentError, "Missing required EndpointParameter: :accelerate"
|
158
|
+
end
|
159
|
+
self[:use_global_endpoint] = options[:use_global_endpoint]
|
160
|
+
self[:use_global_endpoint] = false if self[:use_global_endpoint].nil?
|
161
|
+
if self[:use_global_endpoint].nil?
|
162
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_global_endpoint"
|
163
|
+
end
|
164
|
+
self[:use_object_lambda_endpoint] = options[:use_object_lambda_endpoint]
|
165
|
+
self[:key] = options[:key]
|
166
|
+
self[:prefix] = options[:prefix]
|
167
|
+
self[:disable_access_points] = options[:disable_access_points]
|
168
|
+
self[:disable_multi_region_access_points] = options[:disable_multi_region_access_points]
|
169
|
+
self[:disable_multi_region_access_points] = false if self[:disable_multi_region_access_points].nil?
|
170
|
+
if self[:disable_multi_region_access_points].nil?
|
171
|
+
raise ArgumentError, "Missing required EndpointParameter: :disable_multi_region_access_points"
|
172
|
+
end
|
173
|
+
self[:use_arn_region] = options[:use_arn_region]
|
174
|
+
self[:use_s3_express_control_endpoint] = options[:use_s3_express_control_endpoint]
|
175
|
+
self[:disable_s3_express_session_auth] = options[:disable_s3_express_session_auth]
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|