aws-sdk-s3 1.147.0 → 1.152.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +48 -2
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +241 -0
- data/lib/aws-sdk-s3/bucket.rb +10 -10
- data/lib/aws-sdk-s3/bucket_acl.rb +3 -3
- data/lib/aws-sdk-s3/bucket_cors.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +4 -4
- data/lib/aws-sdk-s3/bucket_logging.rb +3 -3
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +4 -4
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +4 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +5 -5
- data/lib/aws-sdk-s3/bucket_website.rb +4 -4
- data/lib/aws-sdk-s3/client.rb +174 -138
- data/lib/aws-sdk-s3/client_api.rb +3 -2
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
- data/lib/aws-sdk-s3/customizations/object.rb +5 -5
- data/lib/aws-sdk-s3/customizations.rb +4 -1
- data/lib/aws-sdk-s3/encryption/client.rb +2 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/endpoint_parameters.rb +8 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
- data/lib/aws-sdk-s3/endpoints.rb +100 -1
- data/lib/aws-sdk-s3/express_credentials_provider.rb +27 -4
- data/lib/aws-sdk-s3/file_downloader.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_upload.rb +4 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +3 -3
- data/lib/aws-sdk-s3/object.rb +12 -12
- data/lib/aws-sdk-s3/object_acl.rb +3 -3
- data/lib/aws-sdk-s3/object_copier.rb +1 -1
- data/lib/aws-sdk-s3/object_multipart_copier.rb +10 -8
- data/lib/aws-sdk-s3/object_summary.rb +10 -10
- data/lib/aws-sdk-s3/object_version.rb +5 -5
- data/lib/aws-sdk-s3/plugins/access_grants.rb +114 -0
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +8 -2
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/presigner.rb +1 -0
- data/lib/aws-sdk-s3/resource.rb +2 -2
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/client.rbs +2 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/resource.rbs +2 -0
- metadata +10 -5
- data/lib/aws-sdk-s3/express_credentials_cache.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2482fd08d0cf7ae9c7c6d788012eade6f874ea94884406a3c0dc578fda76144
|
4
|
+
data.tar.gz: f96e49214b5875df09f6240f95c92bb31a8043d4df965d6996bbb43b681904be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 499d5fe7d55cfe2317d258def749e9b2cfc04c1181d35989b0de4bcbc4c7ac977bf39efe572ba956408c82a7bea40dba528383f56b6c8e03fcf9d4b3287535e9
|
7
|
+
data.tar.gz: b969f42c202b5c8677adfee0eb94eac5d1747de817306dbd4b14736c01bf715ce181b7560b445ccc28a4752f9dc409956e257156cdbe5b27964ea6d91b246eba
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,53 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.152.3 (2024-06-13)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Issue - Handle 200 errors for all S3 operations that do not have streaming responses.
|
8
|
+
|
9
|
+
1.152.2 (2024-06-12)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Issue - Revert Handling of 200 errors for all S3 operations.
|
13
|
+
|
14
|
+
1.152.1 (2024-06-10)
|
15
|
+
------------------
|
16
|
+
|
17
|
+
* Issue - Handle 200 errors for all S3 operations that do not have streaming responses.
|
18
|
+
|
19
|
+
1.152.0 (2024-06-05)
|
20
|
+
------------------
|
21
|
+
|
22
|
+
* Feature - Added new params copySource and key to copyObject API for supporting S3 Access Grants plugin. These changes will not change any of the existing S3 API functionality.
|
23
|
+
|
24
|
+
1.151.0 (2024-05-14)
|
25
|
+
------------------
|
26
|
+
|
27
|
+
* Feature - Updated a few x-id in the http uri traits
|
28
|
+
|
29
|
+
1.150.0 (2024-05-13)
|
30
|
+
------------------
|
31
|
+
|
32
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
33
|
+
|
34
|
+
1.149.1 (2024-05-06)
|
35
|
+
------------------
|
36
|
+
|
37
|
+
* Issue - Fix bug where destination bucket default encryption was inadvertently overridden by source object encryption.
|
38
|
+
|
39
|
+
1.149.0 (2024-04-30)
|
40
|
+
------------------
|
41
|
+
|
42
|
+
* Feature - Support S3 Access Grants authentication. Access Grants can be enabled with the `access_grants` option, and custom options can be passed into the `access_grants_credentials_provider` option. This feature requires `aws-sdk-s3control` to be installed.
|
43
|
+
|
44
|
+
* Feature - Add RBS signatures for customizations of S3.
|
45
|
+
|
46
|
+
1.148.0 (2024-04-25)
|
47
|
+
------------------
|
48
|
+
|
49
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
50
|
+
|
4
51
|
1.147.0 (2024-04-16)
|
5
52
|
------------------
|
6
53
|
|
@@ -33,7 +80,6 @@ Unreleased Changes
|
|
33
80
|
|
34
81
|
* Issue - Include original part errors in message when aborting multipart upload fails (#2990).
|
35
82
|
|
36
|
-
|
37
83
|
1.143.0 (2024-01-26)
|
38
84
|
------------------
|
39
85
|
|
@@ -156,7 +202,7 @@ Unreleased Changes
|
|
156
202
|
1.123.2 (2023-06-12)
|
157
203
|
------------------
|
158
204
|
|
159
|
-
* Issue - Fix issue when decrypting noncurrent versions of objects when using client side encryption (#2866).
|
205
|
+
* Issue - Fix issue when decrypting noncurrent versions of objects when using client side encryption (#2866).
|
160
206
|
|
161
207
|
1.123.1 (2023-06-02)
|
162
208
|
------------------
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.152.3
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'set'
|
4
|
+
|
5
|
+
module Aws
|
6
|
+
module S3
|
7
|
+
# @api private
|
8
|
+
class AccessGrantsCredentials
|
9
|
+
include CredentialProvider
|
10
|
+
include RefreshingCredentials
|
11
|
+
|
12
|
+
def initialize(options = {})
|
13
|
+
@client = options[:client]
|
14
|
+
@get_data_access_params = {}
|
15
|
+
options.each_pair do |key, value|
|
16
|
+
if self.class.get_data_access_options.include?(key)
|
17
|
+
@get_data_access_params[key] = value
|
18
|
+
end
|
19
|
+
end
|
20
|
+
@async_refresh = true
|
21
|
+
super
|
22
|
+
end
|
23
|
+
|
24
|
+
# @return [S3Control::Client]
|
25
|
+
attr_reader :client
|
26
|
+
|
27
|
+
# @return [String]
|
28
|
+
attr_reader :matched_grant_target
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def refresh
|
33
|
+
c = @client.get_data_access(@get_data_access_params)
|
34
|
+
credentials = c.credentials
|
35
|
+
@matched_grant_target = c.matched_grant_target
|
36
|
+
@credentials = Credentials.new(
|
37
|
+
credentials.access_key_id,
|
38
|
+
credentials.secret_access_key,
|
39
|
+
credentials.session_token
|
40
|
+
)
|
41
|
+
@expiration = credentials.expiration
|
42
|
+
end
|
43
|
+
|
44
|
+
class << self
|
45
|
+
|
46
|
+
# @api private
|
47
|
+
def get_data_access_options
|
48
|
+
@gdao ||= begin
|
49
|
+
input = Aws::S3Control::Client.api.operation(:get_data_access).input
|
50
|
+
Set.new(input.shape.member_names)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,241 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module S3
|
5
|
+
# @api private
|
6
|
+
def self.access_grants_credentials_cache
|
7
|
+
@access_grants_credentials_cache ||= LRUCache.new(max_entries: 100)
|
8
|
+
end
|
9
|
+
|
10
|
+
# @api private
|
11
|
+
def self.access_grants_account_id_cache
|
12
|
+
@access_grants_account_id_cache ||= LRUCache.new(
|
13
|
+
max_entries: 100,
|
14
|
+
expiration: 60 * 10
|
15
|
+
)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Returns Credentials class for S3 Access Grants. Accepts GetDataAccess
|
19
|
+
# params and other configuration as options. See
|
20
|
+
# {Aws::S3Control::Client#get_data_access} for details.
|
21
|
+
class AccessGrantsCredentialsProvider
|
22
|
+
# @param [Hash] options
|
23
|
+
# @option options [Hash] :s3_control_client_options The S3 Control
|
24
|
+
# client options used to create regional S3 Control clients to
|
25
|
+
# create the session. Region will be set to the region of the
|
26
|
+
# bucket.
|
27
|
+
# @option options [Aws::STS::Client] :sts_client The STS client used for
|
28
|
+
# fetching the Account ID for the credentials if credentials do not
|
29
|
+
# include an Account ID.
|
30
|
+
# @option options [Aws::S3::Client] :s3_client The S3 client used for
|
31
|
+
# fetching the location of the bucket so that a regional S3 Control
|
32
|
+
# client can be created. Defaults to the S3 client from the access
|
33
|
+
# grants plugin.
|
34
|
+
# @option options [String] :privilege ('Default') The privilege to use
|
35
|
+
# when requesting credentials. (see: {Aws::S3Control::Client#get_data_access})
|
36
|
+
# @option options [Boolean] :fallback (false) When true, if access is
|
37
|
+
# denied, the provider will fall back to the configured credentials.
|
38
|
+
# @option options [Boolean] :caching (true) When true, credentials and
|
39
|
+
# bucket account ids will be cached.
|
40
|
+
# @option options [Callable] :before_refresh Proc called before
|
41
|
+
# credentials are refreshed.
|
42
|
+
def initialize(options = {})
|
43
|
+
@s3_control_options = options.delete(:s3_control_client_options) || {}
|
44
|
+
@s3_client = options.delete(:s3_client)
|
45
|
+
@sts_client = options.delete(:sts_client)
|
46
|
+
@fallback = options.delete(:fallback) || false
|
47
|
+
@caching = options.delete(:caching) != false
|
48
|
+
@s3_control_clients = {}
|
49
|
+
@bucket_region_cache = Aws::S3.bucket_region_cache
|
50
|
+
return unless @caching
|
51
|
+
|
52
|
+
@credentials_cache = Aws::S3.access_grants_credentials_cache
|
53
|
+
@account_id_cache = Aws::S3.access_grants_account_id_cache
|
54
|
+
end
|
55
|
+
|
56
|
+
def access_grants_credentials_for(options = {})
|
57
|
+
target = target_prefix(
|
58
|
+
options[:bucket],
|
59
|
+
options[:key],
|
60
|
+
options[:prefix]
|
61
|
+
)
|
62
|
+
credentials = s3_client.config.credentials.credentials # resolves
|
63
|
+
|
64
|
+
if @caching
|
65
|
+
cached_credentials_for(target, options[:permission], credentials)
|
66
|
+
else
|
67
|
+
new_credentials_for(target, options[:permission], credentials)
|
68
|
+
end
|
69
|
+
rescue Aws::S3Control::Errors::AccessDenied
|
70
|
+
raise unless @fallback
|
71
|
+
|
72
|
+
warn 'Access denied for S3 Access Grants. Falling back to ' \
|
73
|
+
'configured credentials.'
|
74
|
+
s3_client.config.credentials
|
75
|
+
end
|
76
|
+
|
77
|
+
attr_accessor :s3_client
|
78
|
+
|
79
|
+
private
|
80
|
+
|
81
|
+
def s3_control_client(bucket_region)
|
82
|
+
@s3_control_clients[bucket_region] ||= begin
|
83
|
+
credentials = s3_client.config.credentials
|
84
|
+
config = { credentials: credentials }.merge(@s3_control_options)
|
85
|
+
Aws::S3Control::Client.new(config.merge(
|
86
|
+
region: bucket_region,
|
87
|
+
use_fips_endpoint: s3_client.config.use_fips_endpoint,
|
88
|
+
use_dualstack_endpoint: s3_client.config.use_dualstack_endpoint
|
89
|
+
))
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def cached_credentials_for(target, permission, credentials)
|
94
|
+
cached_creds = broad_search_credentials_cache_prefix(target, permission, credentials)
|
95
|
+
return cached_creds if cached_creds
|
96
|
+
|
97
|
+
if %w[READ WRITE].include?(permission)
|
98
|
+
cached_creds = broad_search_credentials_cache_prefix(target, 'READWRITE', credentials)
|
99
|
+
return cached_creds if cached_creds
|
100
|
+
end
|
101
|
+
|
102
|
+
cached_creds = broad_search_credentials_cache_characters(target, permission, credentials)
|
103
|
+
return cached_creds if cached_creds
|
104
|
+
|
105
|
+
if %w[READ WRITE].include?(permission)
|
106
|
+
cached_creds = broad_search_credentials_cache_characters(target, 'READWRITE', credentials)
|
107
|
+
return cached_creds if cached_creds
|
108
|
+
end
|
109
|
+
|
110
|
+
creds = new_credentials_for(target, permission, credentials)
|
111
|
+
if creds.matched_grant_target.end_with?('*')
|
112
|
+
# remove /* from the end of the target
|
113
|
+
key = credentials_cache_key(creds.matched_grant_target[0...-2], permission, credentials)
|
114
|
+
@credentials_cache[key] = creds
|
115
|
+
end
|
116
|
+
|
117
|
+
creds
|
118
|
+
end
|
119
|
+
|
120
|
+
def broad_search_credentials_cache_prefix(target, permission, credentials)
|
121
|
+
prefix = target
|
122
|
+
while prefix != 's3:'
|
123
|
+
key = credentials_cache_key(prefix, permission, credentials)
|
124
|
+
return @credentials_cache[key] if @credentials_cache.key?(key)
|
125
|
+
|
126
|
+
prefix = prefix.split('/', -1)[0..-2].join('/')
|
127
|
+
end
|
128
|
+
nil
|
129
|
+
end
|
130
|
+
|
131
|
+
def broad_search_credentials_cache_characters(target, permission, credentials)
|
132
|
+
prefix = target
|
133
|
+
while prefix != 's3://'
|
134
|
+
key = credentials_cache_key("#{prefix}*", permission, credentials)
|
135
|
+
return @credentials_cache[key] if @credentials_cache.key?(key)
|
136
|
+
|
137
|
+
prefix = prefix[0..-2]
|
138
|
+
end
|
139
|
+
nil
|
140
|
+
end
|
141
|
+
|
142
|
+
def new_credentials_for(target, permission, credentials)
|
143
|
+
bucket_region = bucket_region_for_access_grants(target)
|
144
|
+
client = s3_control_client(bucket_region)
|
145
|
+
|
146
|
+
AccessGrantsCredentials.new(
|
147
|
+
target: target,
|
148
|
+
account_id: account_id_for_access_grants(target, credentials),
|
149
|
+
permission: permission,
|
150
|
+
client: client
|
151
|
+
)
|
152
|
+
end
|
153
|
+
|
154
|
+
def account_id_for_access_grants(target, credentials)
|
155
|
+
if @caching
|
156
|
+
cached_account_id_for(target, credentials)
|
157
|
+
else
|
158
|
+
new_account_id_for(target, credentials)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
def cached_account_id_for(target, credentials)
|
163
|
+
bucket = bucket_name_from(target)
|
164
|
+
|
165
|
+
if @account_id_cache.key?(bucket)
|
166
|
+
@account_id_cache[bucket]
|
167
|
+
else
|
168
|
+
@account_id_cache[bucket] = new_account_id_for(target, credentials)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# returns the account id associated with the access grants instance
|
173
|
+
def new_account_id_for(target, credentials)
|
174
|
+
bucket_region = bucket_region_for_access_grants(target)
|
175
|
+
s3_control_client = s3_control_client(bucket_region)
|
176
|
+
resp = s3_control_client.get_access_grants_instance_for_prefix(
|
177
|
+
s3_prefix: target,
|
178
|
+
account_id: account_id_for_credentials(bucket_region, credentials)
|
179
|
+
)
|
180
|
+
ARNParser.parse(resp.access_grants_instance_arn).account_id
|
181
|
+
end
|
182
|
+
|
183
|
+
def bucket_region_for_access_grants(target)
|
184
|
+
bucket = bucket_name_from(target)
|
185
|
+
# regardless of caching option, bucket region cache is always shared
|
186
|
+
cached_bucket_region_for(bucket)
|
187
|
+
end
|
188
|
+
|
189
|
+
def cached_bucket_region_for(bucket)
|
190
|
+
if @bucket_region_cache.key?(bucket)
|
191
|
+
@bucket_region_cache[bucket]
|
192
|
+
else
|
193
|
+
@bucket_region_cache[bucket] = new_bucket_region_for(bucket)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
def new_bucket_region_for(bucket)
|
198
|
+
@s3_client.head_bucket(bucket: bucket).bucket_region
|
199
|
+
rescue Aws::S3::Errors::Http301Error => e
|
200
|
+
e.data.region
|
201
|
+
end
|
202
|
+
|
203
|
+
# returns the account id for the configured credentials
|
204
|
+
def account_id_for_credentials(region, credentials)
|
205
|
+
# use resolved credentials to check for account id
|
206
|
+
if credentials.respond_to?(:account_id) && credentials.account_id &&
|
207
|
+
!credentials.account_id.empty?
|
208
|
+
credentials.account_id
|
209
|
+
else
|
210
|
+
@sts_client ||= Aws::STS::Client.new(
|
211
|
+
credentials: s3_client.config.credentials,
|
212
|
+
region: region,
|
213
|
+
use_fips_endpoint: s3_client.config.use_fips_endpoint,
|
214
|
+
use_dualstack_endpoint: s3_client.config.use_dualstack_endpoint
|
215
|
+
)
|
216
|
+
@sts_client.get_caller_identity.account
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
def target_prefix(bucket, key, prefix)
|
221
|
+
if key && !key.empty?
|
222
|
+
"s3://#{bucket}/#{key}"
|
223
|
+
elsif prefix && !prefix.empty?
|
224
|
+
"s3://#{bucket}/#{prefix}"
|
225
|
+
else
|
226
|
+
"s3://#{bucket}/*"
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
def credentials_cache_key(target, permission, credentials)
|
231
|
+
"#{credentials.access_key_id}-#{credentials.secret_access_key}" \
|
232
|
+
"-#{permission}-#{target}"
|
233
|
+
end
|
234
|
+
|
235
|
+
# extracts bucket name from target prefix
|
236
|
+
def bucket_name_from(target)
|
237
|
+
URI(target).host
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -95,7 +95,7 @@ module Aws::S3
|
|
95
95
|
options, params = separate_params_and_options(options)
|
96
96
|
waiter = Waiters::BucketExists.new(options)
|
97
97
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
98
|
-
Aws::Plugins::UserAgent.
|
98
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
99
99
|
waiter.wait(params.merge(bucket: @name))
|
100
100
|
end
|
101
101
|
Bucket.new({
|
@@ -114,7 +114,7 @@ module Aws::S3
|
|
114
114
|
options, params = separate_params_and_options(options)
|
115
115
|
waiter = Waiters::BucketNotExists.new(options)
|
116
116
|
yield_waiter_and_warn(waiter, &block) if block_given?
|
117
|
-
Aws::Plugins::UserAgent.
|
117
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
118
118
|
waiter.wait(params.merge(bucket: @name))
|
119
119
|
end
|
120
120
|
Bucket.new({
|
@@ -217,7 +217,7 @@ module Aws::S3
|
|
217
217
|
:retry
|
218
218
|
end
|
219
219
|
end
|
220
|
-
Aws::Plugins::UserAgent.
|
220
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
221
221
|
Aws::Waiters::Waiter.new(options).wait({})
|
222
222
|
end
|
223
223
|
end
|
@@ -334,7 +334,7 @@ module Aws::S3
|
|
334
334
|
# @return [Types::CreateBucketOutput]
|
335
335
|
def create(options = {})
|
336
336
|
options = options.merge(bucket: @name)
|
337
|
-
resp = Aws::Plugins::UserAgent.
|
337
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
338
338
|
@client.create_bucket(options)
|
339
339
|
end
|
340
340
|
resp.data
|
@@ -359,7 +359,7 @@ module Aws::S3
|
|
359
359
|
# @return [EmptyStructure]
|
360
360
|
def delete(options = {})
|
361
361
|
options = options.merge(bucket: @name)
|
362
|
-
resp = Aws::Plugins::UserAgent.
|
362
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
363
363
|
@client.delete_bucket(options)
|
364
364
|
end
|
365
365
|
resp.data
|
@@ -473,7 +473,7 @@ module Aws::S3
|
|
473
473
|
# @return [Types::DeleteObjectsOutput]
|
474
474
|
def delete_objects(options = {})
|
475
475
|
options = options.merge(bucket: @name)
|
476
|
-
resp = Aws::Plugins::UserAgent.
|
476
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
477
477
|
@client.delete_objects(options)
|
478
478
|
end
|
479
479
|
resp.data
|
@@ -939,7 +939,7 @@ module Aws::S3
|
|
939
939
|
# @return [Object]
|
940
940
|
def put_object(options = {})
|
941
941
|
options = options.merge(bucket: @name)
|
942
|
-
Aws::Plugins::UserAgent.
|
942
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
943
943
|
@client.put_object(options)
|
944
944
|
end
|
945
945
|
Object.new(
|
@@ -1097,7 +1097,7 @@ module Aws::S3
|
|
1097
1097
|
def multipart_uploads(options = {})
|
1098
1098
|
batches = Enumerator.new do |y|
|
1099
1099
|
options = options.merge(bucket: @name)
|
1100
|
-
resp = Aws::Plugins::UserAgent.
|
1100
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1101
1101
|
@client.list_multipart_uploads(options)
|
1102
1102
|
end
|
1103
1103
|
resp.each_page do |page|
|
@@ -1200,7 +1200,7 @@ module Aws::S3
|
|
1200
1200
|
def object_versions(options = {})
|
1201
1201
|
batches = Enumerator.new do |y|
|
1202
1202
|
options = options.merge(bucket: @name)
|
1203
|
-
resp = Aws::Plugins::UserAgent.
|
1203
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1204
1204
|
@client.list_object_versions(options)
|
1205
1205
|
end
|
1206
1206
|
resp.each_page do |page|
|
@@ -1303,7 +1303,7 @@ module Aws::S3
|
|
1303
1303
|
def objects(options = {})
|
1304
1304
|
batches = Enumerator.new do |y|
|
1305
1305
|
options = options.merge(bucket: @name)
|
1306
|
-
resp = Aws::Plugins::UserAgent.
|
1306
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
1307
1307
|
@client.list_objects_v2(options)
|
1308
1308
|
end
|
1309
1309
|
resp.each_page do |page|
|
@@ -60,7 +60,7 @@ module Aws::S3
|
|
60
60
|
#
|
61
61
|
# @return [self]
|
62
62
|
def load
|
63
|
-
resp = Aws::Plugins::UserAgent.
|
63
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
64
64
|
@client.get_bucket_acl(bucket: @bucket_name)
|
65
65
|
end
|
66
66
|
@data = resp.data
|
@@ -177,7 +177,7 @@ module Aws::S3
|
|
177
177
|
:retry
|
178
178
|
end
|
179
179
|
end
|
180
|
-
Aws::Plugins::UserAgent.
|
180
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
181
181
|
Aws::Waiters::Waiter.new(options).wait({})
|
182
182
|
end
|
183
183
|
end
|
@@ -269,7 +269,7 @@ module Aws::S3
|
|
269
269
|
# @return [EmptyStructure]
|
270
270
|
def put(options = {})
|
271
271
|
options = options.merge(bucket: @bucket_name)
|
272
|
-
resp = Aws::Plugins::UserAgent.
|
272
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
273
273
|
@client.put_bucket_acl(options)
|
274
274
|
end
|
275
275
|
resp.data
|
@@ -55,7 +55,7 @@ module Aws::S3
|
|
55
55
|
#
|
56
56
|
# @return [self]
|
57
57
|
def load
|
58
|
-
resp = Aws::Plugins::UserAgent.
|
58
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
59
59
|
@client.get_bucket_cors(bucket: @bucket_name)
|
60
60
|
end
|
61
61
|
@data = resp.data
|
@@ -172,7 +172,7 @@ module Aws::S3
|
|
172
172
|
:retry
|
173
173
|
end
|
174
174
|
end
|
175
|
-
Aws::Plugins::UserAgent.
|
175
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
176
176
|
Aws::Waiters::Waiter.new(options).wait({})
|
177
177
|
end
|
178
178
|
end
|
@@ -192,7 +192,7 @@ module Aws::S3
|
|
192
192
|
# @return [EmptyStructure]
|
193
193
|
def delete(options = {})
|
194
194
|
options = options.merge(bucket: @bucket_name)
|
195
|
-
resp = Aws::Plugins::UserAgent.
|
195
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
196
196
|
@client.delete_bucket_cors(options)
|
197
197
|
end
|
198
198
|
resp.data
|
@@ -260,7 +260,7 @@ module Aws::S3
|
|
260
260
|
# @return [EmptyStructure]
|
261
261
|
def put(options = {})
|
262
262
|
options = options.merge(bucket: @bucket_name)
|
263
|
-
resp = Aws::Plugins::UserAgent.
|
263
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
264
264
|
@client.put_bucket_cors(options)
|
265
265
|
end
|
266
266
|
resp.data
|
@@ -54,7 +54,7 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp = Aws::Plugins::UserAgent.
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
58
|
@client.get_bucket_lifecycle(bucket: @bucket_name)
|
59
59
|
end
|
60
60
|
@data = resp.data
|
@@ -171,7 +171,7 @@ module Aws::S3
|
|
171
171
|
:retry
|
172
172
|
end
|
173
173
|
end
|
174
|
-
Aws::Plugins::UserAgent.
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
175
175
|
Aws::Waiters::Waiter.new(options).wait({})
|
176
176
|
end
|
177
177
|
end
|
@@ -191,7 +191,7 @@ module Aws::S3
|
|
191
191
|
# @return [EmptyStructure]
|
192
192
|
def delete(options = {})
|
193
193
|
options = options.merge(bucket: @bucket_name)
|
194
|
-
resp = Aws::Plugins::UserAgent.
|
194
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
195
195
|
@client.delete_bucket_lifecycle(options)
|
196
196
|
end
|
197
197
|
resp.data
|
@@ -263,7 +263,7 @@ module Aws::S3
|
|
263
263
|
# @return [EmptyStructure]
|
264
264
|
def put(options = {})
|
265
265
|
options = options.merge(bucket: @bucket_name)
|
266
|
-
resp = Aws::Plugins::UserAgent.
|
266
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
267
267
|
@client.put_bucket_lifecycle(options)
|
268
268
|
end
|
269
269
|
resp.data
|
@@ -54,7 +54,7 @@ module Aws::S3
|
|
54
54
|
#
|
55
55
|
# @return [self]
|
56
56
|
def load
|
57
|
-
resp = Aws::Plugins::UserAgent.
|
57
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
58
58
|
@client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
|
59
59
|
end
|
60
60
|
@data = resp.data
|
@@ -171,7 +171,7 @@ module Aws::S3
|
|
171
171
|
:retry
|
172
172
|
end
|
173
173
|
end
|
174
|
-
Aws::Plugins::UserAgent.
|
174
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
175
175
|
Aws::Waiters::Waiter.new(options).wait({})
|
176
176
|
end
|
177
177
|
end
|
@@ -191,7 +191,7 @@ module Aws::S3
|
|
191
191
|
# @return [EmptyStructure]
|
192
192
|
def delete(options = {})
|
193
193
|
options = options.merge(bucket: @bucket_name)
|
194
|
-
resp = Aws::Plugins::UserAgent.
|
194
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
195
195
|
@client.delete_bucket_lifecycle(options)
|
196
196
|
end
|
197
197
|
resp.data
|
@@ -283,7 +283,7 @@ module Aws::S3
|
|
283
283
|
# @return [EmptyStructure]
|
284
284
|
def put(options = {})
|
285
285
|
options = options.merge(bucket: @bucket_name)
|
286
|
-
resp = Aws::Plugins::UserAgent.
|
286
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
287
287
|
@client.put_bucket_lifecycle_configuration(options)
|
288
288
|
end
|
289
289
|
resp.data
|
@@ -60,7 +60,7 @@ module Aws::S3
|
|
60
60
|
#
|
61
61
|
# @return [self]
|
62
62
|
def load
|
63
|
-
resp = Aws::Plugins::UserAgent.
|
63
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
64
64
|
@client.get_bucket_logging(bucket: @bucket_name)
|
65
65
|
end
|
66
66
|
@data = resp.data
|
@@ -177,7 +177,7 @@ module Aws::S3
|
|
177
177
|
:retry
|
178
178
|
end
|
179
179
|
end
|
180
|
-
Aws::Plugins::UserAgent.
|
180
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
181
181
|
Aws::Waiters::Waiter.new(options).wait({})
|
182
182
|
end
|
183
183
|
end
|
@@ -247,7 +247,7 @@ module Aws::S3
|
|
247
247
|
# @return [EmptyStructure]
|
248
248
|
def put(options = {})
|
249
249
|
options = options.merge(bucket: @bucket_name)
|
250
|
-
resp = Aws::Plugins::UserAgent.
|
250
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
251
251
|
@client.put_bucket_logging(options)
|
252
252
|
end
|
253
253
|
resp.data
|
@@ -75,7 +75,7 @@ module Aws::S3
|
|
75
75
|
#
|
76
76
|
# @return [self]
|
77
77
|
def load
|
78
|
-
resp = Aws::Plugins::UserAgent.
|
78
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
79
79
|
@client.get_bucket_notification_configuration(bucket: @bucket_name)
|
80
80
|
end
|
81
81
|
@data = resp.data
|
@@ -192,7 +192,7 @@ module Aws::S3
|
|
192
192
|
:retry
|
193
193
|
end
|
194
194
|
end
|
195
|
-
Aws::Plugins::UserAgent.
|
195
|
+
Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
196
196
|
Aws::Waiters::Waiter.new(options).wait({})
|
197
197
|
end
|
198
198
|
end
|
@@ -275,7 +275,7 @@ module Aws::S3
|
|
275
275
|
# @return [EmptyStructure]
|
276
276
|
def put(options = {})
|
277
277
|
options = options.merge(bucket: @bucket_name)
|
278
|
-
resp = Aws::Plugins::UserAgent.
|
278
|
+
resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
|
279
279
|
@client.put_bucket_notification_configuration(options)
|
280
280
|
end
|
281
281
|
resp.data
|