google-apis-storage_v1 0.29.0 → 0.55.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +111 -0
- data/OVERVIEW.md +2 -2
- data/lib/google/apis/storage_v1/classes.rb +832 -53
- data/lib/google/apis/storage_v1/gem_version.rb +3 -3
- data/lib/google/apis/storage_v1/representations.rb +344 -0
- data/lib/google/apis/storage_v1/service.rb +904 -110
- metadata +7 -10
@@ -32,6 +32,8 @@ module Google
|
|
32
32
|
#
|
33
33
|
# @see https://developers.google.com/storage/docs/json_api/
|
34
34
|
class StorageService < Google::Apis::Core::BaseService
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "https://storage.$UNIVERSE_DOMAIN$/"
|
36
|
+
|
35
37
|
# @return [String]
|
36
38
|
# API key. Your API key identifies your project and provides you with API access,
|
37
39
|
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
@@ -47,12 +49,271 @@ module Google
|
|
47
49
|
attr_accessor :user_ip
|
48
50
|
|
49
51
|
def initialize
|
50
|
-
super(
|
52
|
+
super(DEFAULT_ENDPOINT_TEMPLATE, 'storage/v1/',
|
51
53
|
client_name: 'google-apis-storage_v1',
|
52
54
|
client_version: Google::Apis::StorageV1::GEM_VERSION)
|
53
55
|
@batch_path = 'batch/storage/v1'
|
54
56
|
end
|
55
57
|
|
58
|
+
# Disables an Anywhere Cache instance.
|
59
|
+
# @param [String] bucket
|
60
|
+
# Name of the parent bucket.
|
61
|
+
# @param [String] anywhere_cache_id
|
62
|
+
# The ID of requested Anywhere Cache instance.
|
63
|
+
# @param [String] fields
|
64
|
+
# Selector specifying which fields to include in a partial response.
|
65
|
+
# @param [String] quota_user
|
66
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
67
|
+
# characters.
|
68
|
+
# @param [String] user_ip
|
69
|
+
# Deprecated. Please use quotaUser instead.
|
70
|
+
# @param [Google::Apis::RequestOptions] options
|
71
|
+
# Request-specific options
|
72
|
+
#
|
73
|
+
# @yield [result, err] Result & error if block supplied
|
74
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
|
75
|
+
# @yieldparam err [StandardError] error object if request failed
|
76
|
+
#
|
77
|
+
# @return [Google::Apis::StorageV1::AnywhereCache]
|
78
|
+
#
|
79
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
80
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
81
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
82
|
+
def disable_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
83
|
+
command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/disable', options)
|
84
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
85
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCache
|
86
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
87
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
88
|
+
command.query['fields'] = fields unless fields.nil?
|
89
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
90
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
91
|
+
execute_or_queue_command(command, &block)
|
92
|
+
end
|
93
|
+
|
94
|
+
# Returns the metadata of an Anywhere Cache instance.
|
95
|
+
# @param [String] bucket
|
96
|
+
# Name of the parent bucket.
|
97
|
+
# @param [String] anywhere_cache_id
|
98
|
+
# The ID of requested Anywhere Cache instance.
|
99
|
+
# @param [String] fields
|
100
|
+
# Selector specifying which fields to include in a partial response.
|
101
|
+
# @param [String] quota_user
|
102
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
103
|
+
# characters.
|
104
|
+
# @param [String] user_ip
|
105
|
+
# Deprecated. Please use quotaUser instead.
|
106
|
+
# @param [Google::Apis::RequestOptions] options
|
107
|
+
# Request-specific options
|
108
|
+
#
|
109
|
+
# @yield [result, err] Result & error if block supplied
|
110
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
|
111
|
+
# @yieldparam err [StandardError] error object if request failed
|
112
|
+
#
|
113
|
+
# @return [Google::Apis::StorageV1::AnywhereCache]
|
114
|
+
#
|
115
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
116
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
117
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
118
|
+
def get_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
119
|
+
command = make_simple_command(:get, 'b/{bucket}/anywhereCaches/{anywhereCacheId}', options)
|
120
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
121
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCache
|
122
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
123
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
124
|
+
command.query['fields'] = fields unless fields.nil?
|
125
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
126
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
127
|
+
execute_or_queue_command(command, &block)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Creates an Anywhere Cache instance.
|
131
|
+
# @param [String] bucket
|
132
|
+
# Name of the parent bucket.
|
133
|
+
# @param [Google::Apis::StorageV1::AnywhereCache] anywhere_cache_object
|
134
|
+
# @param [String] fields
|
135
|
+
# Selector specifying which fields to include in a partial response.
|
136
|
+
# @param [String] quota_user
|
137
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
138
|
+
# characters.
|
139
|
+
# @param [String] user_ip
|
140
|
+
# Deprecated. Please use quotaUser instead.
|
141
|
+
# @param [Google::Apis::RequestOptions] options
|
142
|
+
# Request-specific options
|
143
|
+
#
|
144
|
+
# @yield [result, err] Result & error if block supplied
|
145
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
146
|
+
# @yieldparam err [StandardError] error object if request failed
|
147
|
+
#
|
148
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
149
|
+
#
|
150
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
151
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
152
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
153
|
+
def insert_anywhere_cach(bucket, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
154
|
+
command = make_simple_command(:post, 'b/{bucket}/anywhereCaches', options)
|
155
|
+
command.request_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
156
|
+
command.request_object = anywhere_cache_object
|
157
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
158
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
159
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
160
|
+
command.query['fields'] = fields unless fields.nil?
|
161
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
162
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
163
|
+
execute_or_queue_command(command, &block)
|
164
|
+
end
|
165
|
+
|
166
|
+
# Returns a list of Anywhere Cache instances of the bucket matching the criteria.
|
167
|
+
# @param [String] bucket
|
168
|
+
# Name of the parent bucket.
|
169
|
+
# @param [Fixnum] page_size
|
170
|
+
# Maximum number of items to return in a single page of responses. Maximum 1000.
|
171
|
+
# @param [String] page_token
|
172
|
+
# A previously-returned page token representing part of the larger set of
|
173
|
+
# results to view.
|
174
|
+
# @param [String] fields
|
175
|
+
# Selector specifying which fields to include in a partial response.
|
176
|
+
# @param [String] quota_user
|
177
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
178
|
+
# characters.
|
179
|
+
# @param [String] user_ip
|
180
|
+
# Deprecated. Please use quotaUser instead.
|
181
|
+
# @param [Google::Apis::RequestOptions] options
|
182
|
+
# Request-specific options
|
183
|
+
#
|
184
|
+
# @yield [result, err] Result & error if block supplied
|
185
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCaches] parsed result object
|
186
|
+
# @yieldparam err [StandardError] error object if request failed
|
187
|
+
#
|
188
|
+
# @return [Google::Apis::StorageV1::AnywhereCaches]
|
189
|
+
#
|
190
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
191
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
192
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
193
|
+
def list_anywhere_caches(bucket, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
194
|
+
command = make_simple_command(:get, 'b/{bucket}/anywhereCaches', options)
|
195
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCaches::Representation
|
196
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCaches
|
197
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
198
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
199
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
200
|
+
command.query['fields'] = fields unless fields.nil?
|
201
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
202
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
203
|
+
execute_or_queue_command(command, &block)
|
204
|
+
end
|
205
|
+
|
206
|
+
# Pauses an Anywhere Cache instance.
|
207
|
+
# @param [String] bucket
|
208
|
+
# Name of the parent bucket.
|
209
|
+
# @param [String] anywhere_cache_id
|
210
|
+
# The ID of requested Anywhere Cache instance.
|
211
|
+
# @param [String] fields
|
212
|
+
# Selector specifying which fields to include in a partial response.
|
213
|
+
# @param [String] quota_user
|
214
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
215
|
+
# characters.
|
216
|
+
# @param [String] user_ip
|
217
|
+
# Deprecated. Please use quotaUser instead.
|
218
|
+
# @param [Google::Apis::RequestOptions] options
|
219
|
+
# Request-specific options
|
220
|
+
#
|
221
|
+
# @yield [result, err] Result & error if block supplied
|
222
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
|
223
|
+
# @yieldparam err [StandardError] error object if request failed
|
224
|
+
#
|
225
|
+
# @return [Google::Apis::StorageV1::AnywhereCache]
|
226
|
+
#
|
227
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
228
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
229
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
230
|
+
def pause_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
231
|
+
command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/pause', options)
|
232
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
233
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCache
|
234
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
235
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
236
|
+
command.query['fields'] = fields unless fields.nil?
|
237
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
238
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
239
|
+
execute_or_queue_command(command, &block)
|
240
|
+
end
|
241
|
+
|
242
|
+
# Resumes a paused or disabled Anywhere Cache instance.
|
243
|
+
# @param [String] bucket
|
244
|
+
# Name of the parent bucket.
|
245
|
+
# @param [String] anywhere_cache_id
|
246
|
+
# The ID of requested Anywhere Cache instance.
|
247
|
+
# @param [String] fields
|
248
|
+
# Selector specifying which fields to include in a partial response.
|
249
|
+
# @param [String] quota_user
|
250
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
251
|
+
# characters.
|
252
|
+
# @param [String] user_ip
|
253
|
+
# Deprecated. Please use quotaUser instead.
|
254
|
+
# @param [Google::Apis::RequestOptions] options
|
255
|
+
# Request-specific options
|
256
|
+
#
|
257
|
+
# @yield [result, err] Result & error if block supplied
|
258
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
|
259
|
+
# @yieldparam err [StandardError] error object if request failed
|
260
|
+
#
|
261
|
+
# @return [Google::Apis::StorageV1::AnywhereCache]
|
262
|
+
#
|
263
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
264
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
265
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
266
|
+
def resume_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
267
|
+
command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/resume', options)
|
268
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
269
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCache
|
270
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
271
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
272
|
+
command.query['fields'] = fields unless fields.nil?
|
273
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
274
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
275
|
+
execute_or_queue_command(command, &block)
|
276
|
+
end
|
277
|
+
|
278
|
+
# Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
|
279
|
+
# @param [String] bucket
|
280
|
+
# Name of the parent bucket.
|
281
|
+
# @param [String] anywhere_cache_id
|
282
|
+
# The ID of requested Anywhere Cache instance.
|
283
|
+
# @param [Google::Apis::StorageV1::AnywhereCache] anywhere_cache_object
|
284
|
+
# @param [String] fields
|
285
|
+
# Selector specifying which fields to include in a partial response.
|
286
|
+
# @param [String] quota_user
|
287
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
288
|
+
# characters.
|
289
|
+
# @param [String] user_ip
|
290
|
+
# Deprecated. Please use quotaUser instead.
|
291
|
+
# @param [Google::Apis::RequestOptions] options
|
292
|
+
# Request-specific options
|
293
|
+
#
|
294
|
+
# @yield [result, err] Result & error if block supplied
|
295
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
296
|
+
# @yieldparam err [StandardError] error object if request failed
|
297
|
+
#
|
298
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
299
|
+
#
|
300
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
301
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
302
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
303
|
+
def update_anywhere_cach(bucket, anywhere_cache_id, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
304
|
+
command = make_simple_command(:patch, 'b/{bucket}/anywhereCaches/{anywhereCacheId}', options)
|
305
|
+
command.request_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
306
|
+
command.request_object = anywhere_cache_object
|
307
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
308
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
309
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
310
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
311
|
+
command.query['fields'] = fields unless fields.nil?
|
312
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
313
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
314
|
+
execute_or_queue_command(command, &block)
|
315
|
+
end
|
316
|
+
|
56
317
|
# Permanently deletes the ACL entry for the specified entity on the specified
|
57
318
|
# bucket.
|
58
319
|
# @param [String] bucket
|
@@ -293,7 +554,8 @@ module Google
|
|
293
554
|
execute_or_queue_command(command, &block)
|
294
555
|
end
|
295
556
|
|
296
|
-
#
|
557
|
+
# Deletes an empty bucket. Deletions are permanent unless soft delete is enabled
|
558
|
+
# on the bucket.
|
297
559
|
# @param [String] bucket
|
298
560
|
# Name of a bucket.
|
299
561
|
# @param [Fixnum] if_metageneration_match
|
@@ -337,6 +599,9 @@ module Google
|
|
337
599
|
# Returns metadata for the specified bucket.
|
338
600
|
# @param [String] bucket
|
339
601
|
# Name of a bucket.
|
602
|
+
# @param [Fixnum] generation
|
603
|
+
# If present, specifies the generation of the bucket. This is required if
|
604
|
+
# softDeleted is true.
|
340
605
|
# @param [Fixnum] if_metageneration_match
|
341
606
|
# Makes the return of the bucket metadata conditional on whether the bucket's
|
342
607
|
# current metageneration matches the given value.
|
@@ -345,6 +610,10 @@ module Google
|
|
345
610
|
# current metageneration does not match the given value.
|
346
611
|
# @param [String] projection
|
347
612
|
# Set of properties to return. Defaults to noAcl.
|
613
|
+
# @param [Boolean] soft_deleted
|
614
|
+
# If true, return the soft-deleted version of this bucket. The default is false.
|
615
|
+
# For more information, see [Soft Delete](https://cloud.google.com/storage/docs/
|
616
|
+
# soft-delete).
|
348
617
|
# @param [String] user_project
|
349
618
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
350
619
|
# @param [String] fields
|
@@ -366,14 +635,16 @@ module Google
|
|
366
635
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
367
636
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
368
637
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
369
|
-
def get_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
638
|
+
def get_bucket(bucket, generation: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, soft_deleted: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
370
639
|
command = make_simple_command(:get, 'b/{bucket}', options)
|
371
640
|
command.response_representation = Google::Apis::StorageV1::Bucket::Representation
|
372
641
|
command.response_class = Google::Apis::StorageV1::Bucket
|
373
642
|
command.params['bucket'] = bucket unless bucket.nil?
|
643
|
+
command.query['generation'] = generation unless generation.nil?
|
374
644
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
375
645
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
376
646
|
command.query['projection'] = projection unless projection.nil?
|
647
|
+
command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
|
377
648
|
command.query['userProject'] = user_project unless user_project.nil?
|
378
649
|
command.query['fields'] = fields unless fields.nil?
|
379
650
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -422,6 +693,44 @@ module Google
|
|
422
693
|
execute_or_queue_command(command, &block)
|
423
694
|
end
|
424
695
|
|
696
|
+
# Returns the storage layout configuration for the specified bucket. Note that
|
697
|
+
# this operation requires storage.objects.list permission.
|
698
|
+
# @param [String] bucket
|
699
|
+
# Name of a bucket.
|
700
|
+
# @param [String] prefix
|
701
|
+
# An optional prefix used for permission check. It is useful when the caller
|
702
|
+
# only has storage.objects.list permission under a specific prefix.
|
703
|
+
# @param [String] fields
|
704
|
+
# Selector specifying which fields to include in a partial response.
|
705
|
+
# @param [String] quota_user
|
706
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
707
|
+
# characters.
|
708
|
+
# @param [String] user_ip
|
709
|
+
# Deprecated. Please use quotaUser instead.
|
710
|
+
# @param [Google::Apis::RequestOptions] options
|
711
|
+
# Request-specific options
|
712
|
+
#
|
713
|
+
# @yield [result, err] Result & error if block supplied
|
714
|
+
# @yieldparam result [Google::Apis::StorageV1::BucketStorageLayout] parsed result object
|
715
|
+
# @yieldparam err [StandardError] error object if request failed
|
716
|
+
#
|
717
|
+
# @return [Google::Apis::StorageV1::BucketStorageLayout]
|
718
|
+
#
|
719
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
720
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
721
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
722
|
+
def get_bucket_storage_layout(bucket, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
723
|
+
command = make_simple_command(:get, 'b/{bucket}/storageLayout', options)
|
724
|
+
command.response_representation = Google::Apis::StorageV1::BucketStorageLayout::Representation
|
725
|
+
command.response_class = Google::Apis::StorageV1::BucketStorageLayout
|
726
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
727
|
+
command.query['prefix'] = prefix unless prefix.nil?
|
728
|
+
command.query['fields'] = fields unless fields.nil?
|
729
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
730
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
731
|
+
execute_or_queue_command(command, &block)
|
732
|
+
end
|
733
|
+
|
425
734
|
# Creates a new bucket.
|
426
735
|
# @param [String] project
|
427
736
|
# A valid API project identifier.
|
@@ -487,6 +796,10 @@ module Google
|
|
487
796
|
# Filter results to buckets whose names begin with this prefix.
|
488
797
|
# @param [String] projection
|
489
798
|
# Set of properties to return. Defaults to noAcl.
|
799
|
+
# @param [Boolean] soft_deleted
|
800
|
+
# If true, only soft-deleted bucket versions will be returned. The default is
|
801
|
+
# false. For more information, see [Soft Delete](https://cloud.google.com/
|
802
|
+
# storage/docs/soft-delete).
|
490
803
|
# @param [String] user_project
|
491
804
|
# The project to be billed for this request.
|
492
805
|
# @param [String] fields
|
@@ -508,7 +821,7 @@ module Google
|
|
508
821
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
509
822
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
510
823
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
511
|
-
def list_buckets(project, max_results: nil, page_token: nil, prefix: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
824
|
+
def list_buckets(project, max_results: nil, page_token: nil, prefix: nil, projection: nil, soft_deleted: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
512
825
|
command = make_simple_command(:get, 'b', options)
|
513
826
|
command.response_representation = Google::Apis::StorageV1::Buckets::Representation
|
514
827
|
command.response_class = Google::Apis::StorageV1::Buckets
|
@@ -517,6 +830,7 @@ module Google
|
|
517
830
|
command.query['prefix'] = prefix unless prefix.nil?
|
518
831
|
command.query['project'] = project unless project.nil?
|
519
832
|
command.query['projection'] = projection unless projection.nil?
|
833
|
+
command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
|
520
834
|
command.query['userProject'] = user_project unless user_project.nil?
|
521
835
|
command.query['fields'] = fields unless fields.nil?
|
522
836
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -621,6 +935,84 @@ module Google
|
|
621
935
|
execute_or_queue_command(command, &block)
|
622
936
|
end
|
623
937
|
|
938
|
+
# Initiates a long-running Relocate Bucket operation on the specified bucket.
|
939
|
+
# @param [String] bucket
|
940
|
+
# Name of the bucket to be moved.
|
941
|
+
# @param [Google::Apis::StorageV1::RelocateBucketRequest] relocate_bucket_request_object
|
942
|
+
# @param [String] fields
|
943
|
+
# Selector specifying which fields to include in a partial response.
|
944
|
+
# @param [String] quota_user
|
945
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
946
|
+
# characters.
|
947
|
+
# @param [String] user_ip
|
948
|
+
# Deprecated. Please use quotaUser instead.
|
949
|
+
# @param [Google::Apis::RequestOptions] options
|
950
|
+
# Request-specific options
|
951
|
+
#
|
952
|
+
# @yield [result, err] Result & error if block supplied
|
953
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
954
|
+
# @yieldparam err [StandardError] error object if request failed
|
955
|
+
#
|
956
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
957
|
+
#
|
958
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
959
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
960
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
961
|
+
def relocate_bucket(bucket, relocate_bucket_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
962
|
+
command = make_simple_command(:post, 'b/{bucket}/relocate', options)
|
963
|
+
command.request_representation = Google::Apis::StorageV1::RelocateBucketRequest::Representation
|
964
|
+
command.request_object = relocate_bucket_request_object
|
965
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
966
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
967
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
968
|
+
command.query['fields'] = fields unless fields.nil?
|
969
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
970
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
971
|
+
execute_or_queue_command(command, &block)
|
972
|
+
end
|
973
|
+
|
974
|
+
# Restores a soft-deleted bucket.
|
975
|
+
# @param [String] bucket
|
976
|
+
# Name of a bucket.
|
977
|
+
# @param [Fixnum] generation
|
978
|
+
# Generation of a bucket.
|
979
|
+
# @param [String] projection
|
980
|
+
# Set of properties to return. Defaults to full.
|
981
|
+
# @param [String] user_project
|
982
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
983
|
+
# @param [String] fields
|
984
|
+
# Selector specifying which fields to include in a partial response.
|
985
|
+
# @param [String] quota_user
|
986
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
987
|
+
# characters.
|
988
|
+
# @param [String] user_ip
|
989
|
+
# Deprecated. Please use quotaUser instead.
|
990
|
+
# @param [Google::Apis::RequestOptions] options
|
991
|
+
# Request-specific options
|
992
|
+
#
|
993
|
+
# @yield [result, err] Result & error if block supplied
|
994
|
+
# @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
|
995
|
+
# @yieldparam err [StandardError] error object if request failed
|
996
|
+
#
|
997
|
+
# @return [Google::Apis::StorageV1::Bucket]
|
998
|
+
#
|
999
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1000
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1001
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1002
|
+
def restore_bucket(bucket, generation, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1003
|
+
command = make_simple_command(:post, 'b/{bucket}/restore', options)
|
1004
|
+
command.response_representation = Google::Apis::StorageV1::Bucket::Representation
|
1005
|
+
command.response_class = Google::Apis::StorageV1::Bucket
|
1006
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1007
|
+
command.query['generation'] = generation unless generation.nil?
|
1008
|
+
command.query['projection'] = projection unless projection.nil?
|
1009
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1010
|
+
command.query['fields'] = fields unless fields.nil?
|
1011
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1012
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1013
|
+
execute_or_queue_command(command, &block)
|
1014
|
+
end
|
1015
|
+
|
624
1016
|
# Updates an IAM policy for the specified bucket.
|
625
1017
|
# @param [String] bucket
|
626
1018
|
# Name of a bucket.
|
@@ -788,13 +1180,219 @@ module Google
|
|
788
1180
|
execute_or_queue_command(command, &block)
|
789
1181
|
end
|
790
1182
|
|
791
|
-
# Permanently deletes the default object ACL entry for the specified entity on
|
792
|
-
# the specified bucket.
|
1183
|
+
# Permanently deletes the default object ACL entry for the specified entity on
|
1184
|
+
# the specified bucket.
|
1185
|
+
# @param [String] bucket
|
1186
|
+
# Name of a bucket.
|
1187
|
+
# @param [String] entity
|
1188
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1189
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
1190
|
+
# @param [String] user_project
|
1191
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1192
|
+
# @param [String] fields
|
1193
|
+
# Selector specifying which fields to include in a partial response.
|
1194
|
+
# @param [String] quota_user
|
1195
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1196
|
+
# characters.
|
1197
|
+
# @param [String] user_ip
|
1198
|
+
# Deprecated. Please use quotaUser instead.
|
1199
|
+
# @param [Google::Apis::RequestOptions] options
|
1200
|
+
# Request-specific options
|
1201
|
+
#
|
1202
|
+
# @yield [result, err] Result & error if block supplied
|
1203
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1204
|
+
# @yieldparam err [StandardError] error object if request failed
|
1205
|
+
#
|
1206
|
+
# @return [void]
|
1207
|
+
#
|
1208
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1209
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1210
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1211
|
+
def delete_default_object_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1212
|
+
command = make_simple_command(:delete, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
1213
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1214
|
+
command.params['entity'] = entity unless entity.nil?
|
1215
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1216
|
+
command.query['fields'] = fields unless fields.nil?
|
1217
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1218
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1219
|
+
execute_or_queue_command(command, &block)
|
1220
|
+
end
|
1221
|
+
|
1222
|
+
# Returns the default object ACL entry for the specified entity on the specified
|
1223
|
+
# bucket.
|
1224
|
+
# @param [String] bucket
|
1225
|
+
# Name of a bucket.
|
1226
|
+
# @param [String] entity
|
1227
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1228
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
1229
|
+
# @param [String] user_project
|
1230
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1231
|
+
# @param [String] fields
|
1232
|
+
# Selector specifying which fields to include in a partial response.
|
1233
|
+
# @param [String] quota_user
|
1234
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1235
|
+
# characters.
|
1236
|
+
# @param [String] user_ip
|
1237
|
+
# Deprecated. Please use quotaUser instead.
|
1238
|
+
# @param [Google::Apis::RequestOptions] options
|
1239
|
+
# Request-specific options
|
1240
|
+
#
|
1241
|
+
# @yield [result, err] Result & error if block supplied
|
1242
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
1243
|
+
# @yieldparam err [StandardError] error object if request failed
|
1244
|
+
#
|
1245
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
1246
|
+
#
|
1247
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1248
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1249
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1250
|
+
def get_default_object_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1251
|
+
command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
1252
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1253
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1254
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1255
|
+
command.params['entity'] = entity unless entity.nil?
|
1256
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1257
|
+
command.query['fields'] = fields unless fields.nil?
|
1258
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1259
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1260
|
+
execute_or_queue_command(command, &block)
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
# Creates a new default object ACL entry on the specified bucket.
|
1264
|
+
# @param [String] bucket
|
1265
|
+
# Name of a bucket.
|
1266
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
1267
|
+
# @param [String] user_project
|
1268
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1269
|
+
# @param [String] fields
|
1270
|
+
# Selector specifying which fields to include in a partial response.
|
1271
|
+
# @param [String] quota_user
|
1272
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1273
|
+
# characters.
|
1274
|
+
# @param [String] user_ip
|
1275
|
+
# Deprecated. Please use quotaUser instead.
|
1276
|
+
# @param [Google::Apis::RequestOptions] options
|
1277
|
+
# Request-specific options
|
1278
|
+
#
|
1279
|
+
# @yield [result, err] Result & error if block supplied
|
1280
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
1281
|
+
# @yieldparam err [StandardError] error object if request failed
|
1282
|
+
#
|
1283
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
1284
|
+
#
|
1285
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1286
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1287
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1288
|
+
def insert_default_object_access_control(bucket, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1289
|
+
command = make_simple_command(:post, 'b/{bucket}/defaultObjectAcl', options)
|
1290
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1291
|
+
command.request_object = object_access_control_object
|
1292
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1293
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1294
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1295
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1296
|
+
command.query['fields'] = fields unless fields.nil?
|
1297
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1298
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1299
|
+
execute_or_queue_command(command, &block)
|
1300
|
+
end
|
1301
|
+
|
1302
|
+
# Retrieves default object ACL entries on the specified bucket.
|
1303
|
+
# @param [String] bucket
|
1304
|
+
# Name of a bucket.
|
1305
|
+
# @param [Fixnum] if_metageneration_match
|
1306
|
+
# If present, only return default ACL listing if the bucket's current
|
1307
|
+
# metageneration matches this value.
|
1308
|
+
# @param [Fixnum] if_metageneration_not_match
|
1309
|
+
# If present, only return default ACL listing if the bucket's current
|
1310
|
+
# metageneration does not match the given value.
|
1311
|
+
# @param [String] user_project
|
1312
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1313
|
+
# @param [String] fields
|
1314
|
+
# Selector specifying which fields to include in a partial response.
|
1315
|
+
# @param [String] quota_user
|
1316
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1317
|
+
# characters.
|
1318
|
+
# @param [String] user_ip
|
1319
|
+
# Deprecated. Please use quotaUser instead.
|
1320
|
+
# @param [Google::Apis::RequestOptions] options
|
1321
|
+
# Request-specific options
|
1322
|
+
#
|
1323
|
+
# @yield [result, err] Result & error if block supplied
|
1324
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object
|
1325
|
+
# @yieldparam err [StandardError] error object if request failed
|
1326
|
+
#
|
1327
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControls]
|
1328
|
+
#
|
1329
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1330
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1331
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1332
|
+
def list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1333
|
+
command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl', options)
|
1334
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
|
1335
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControls
|
1336
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1337
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1338
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
1339
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1340
|
+
command.query['fields'] = fields unless fields.nil?
|
1341
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1342
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1343
|
+
execute_or_queue_command(command, &block)
|
1344
|
+
end
|
1345
|
+
|
1346
|
+
# Patches a default object ACL entry on the specified bucket.
|
1347
|
+
# @param [String] bucket
|
1348
|
+
# Name of a bucket.
|
1349
|
+
# @param [String] entity
|
1350
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1351
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
1352
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
1353
|
+
# @param [String] user_project
|
1354
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1355
|
+
# @param [String] fields
|
1356
|
+
# Selector specifying which fields to include in a partial response.
|
1357
|
+
# @param [String] quota_user
|
1358
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1359
|
+
# characters.
|
1360
|
+
# @param [String] user_ip
|
1361
|
+
# Deprecated. Please use quotaUser instead.
|
1362
|
+
# @param [Google::Apis::RequestOptions] options
|
1363
|
+
# Request-specific options
|
1364
|
+
#
|
1365
|
+
# @yield [result, err] Result & error if block supplied
|
1366
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
1367
|
+
# @yieldparam err [StandardError] error object if request failed
|
1368
|
+
#
|
1369
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
1370
|
+
#
|
1371
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1372
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1373
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1374
|
+
def patch_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1375
|
+
command = make_simple_command(:patch, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
1376
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1377
|
+
command.request_object = object_access_control_object
|
1378
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1379
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1380
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1381
|
+
command.params['entity'] = entity unless entity.nil?
|
1382
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1383
|
+
command.query['fields'] = fields unless fields.nil?
|
1384
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1385
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1386
|
+
execute_or_queue_command(command, &block)
|
1387
|
+
end
|
1388
|
+
|
1389
|
+
# Updates a default object ACL entry on the specified bucket.
|
793
1390
|
# @param [String] bucket
|
794
1391
|
# Name of a bucket.
|
795
1392
|
# @param [String] entity
|
796
1393
|
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
797
1394
|
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
1395
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
798
1396
|
# @param [String] user_project
|
799
1397
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
800
1398
|
# @param [String] fields
|
@@ -808,16 +1406,20 @@ module Google
|
|
808
1406
|
# Request-specific options
|
809
1407
|
#
|
810
1408
|
# @yield [result, err] Result & error if block supplied
|
811
|
-
# @yieldparam result [
|
1409
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
812
1410
|
# @yieldparam err [StandardError] error object if request failed
|
813
1411
|
#
|
814
|
-
# @return [
|
1412
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
815
1413
|
#
|
816
1414
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
817
1415
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
818
1416
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
819
|
-
def
|
820
|
-
command = make_simple_command(:
|
1417
|
+
def update_default_object_access_control(bucket, entity, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1418
|
+
command = make_simple_command(:put, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
1419
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1420
|
+
command.request_object = object_access_control_object
|
1421
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1422
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
821
1423
|
command.params['bucket'] = bucket unless bucket.nil?
|
822
1424
|
command.params['entity'] = entity unless entity.nil?
|
823
1425
|
command.query['userProject'] = user_project unless user_project.nil?
|
@@ -827,15 +1429,17 @@ module Google
|
|
827
1429
|
execute_or_queue_command(command, &block)
|
828
1430
|
end
|
829
1431
|
|
830
|
-
#
|
831
|
-
#
|
1432
|
+
# Permanently deletes a folder. Only applicable to buckets with hierarchical
|
1433
|
+
# namespace enabled.
|
832
1434
|
# @param [String] bucket
|
833
|
-
# Name of
|
834
|
-
# @param [String]
|
835
|
-
#
|
836
|
-
#
|
837
|
-
#
|
838
|
-
#
|
1435
|
+
# Name of the bucket in which the folder resides.
|
1436
|
+
# @param [String] folder
|
1437
|
+
# Name of a folder.
|
1438
|
+
# @param [Fixnum] if_metageneration_match
|
1439
|
+
# If set, only deletes the folder if its metageneration matches this value.
|
1440
|
+
# @param [Fixnum] if_metageneration_not_match
|
1441
|
+
# If set, only deletes the folder if its metageneration does not match this
|
1442
|
+
# value.
|
839
1443
|
# @param [String] fields
|
840
1444
|
# Selector specifying which fields to include in a partial response.
|
841
1445
|
# @param [String] quota_user
|
@@ -847,33 +1451,38 @@ module Google
|
|
847
1451
|
# Request-specific options
|
848
1452
|
#
|
849
1453
|
# @yield [result, err] Result & error if block supplied
|
850
|
-
# @yieldparam result [
|
1454
|
+
# @yieldparam result [NilClass] No result returned for this method
|
851
1455
|
# @yieldparam err [StandardError] error object if request failed
|
852
1456
|
#
|
853
|
-
# @return [
|
1457
|
+
# @return [void]
|
854
1458
|
#
|
855
1459
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
856
1460
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
857
1461
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
858
|
-
def
|
859
|
-
command = make_simple_command(:
|
860
|
-
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
861
|
-
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1462
|
+
def delete_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1463
|
+
command = make_simple_command(:delete, 'b/{bucket}/folders/{folder}', options)
|
862
1464
|
command.params['bucket'] = bucket unless bucket.nil?
|
863
|
-
command.params['
|
864
|
-
command.query['
|
1465
|
+
command.params['folder'] = folder unless folder.nil?
|
1466
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1467
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
865
1468
|
command.query['fields'] = fields unless fields.nil?
|
866
1469
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
867
1470
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
868
1471
|
execute_or_queue_command(command, &block)
|
869
1472
|
end
|
870
1473
|
|
871
|
-
#
|
1474
|
+
# Returns metadata for the specified folder. Only applicable to buckets with
|
1475
|
+
# hierarchical namespace enabled.
|
872
1476
|
# @param [String] bucket
|
873
|
-
# Name of
|
874
|
-
# @param [
|
875
|
-
#
|
876
|
-
#
|
1477
|
+
# Name of the bucket in which the folder resides.
|
1478
|
+
# @param [String] folder
|
1479
|
+
# Name of a folder.
|
1480
|
+
# @param [Fixnum] if_metageneration_match
|
1481
|
+
# Makes the return of the folder metadata conditional on whether the folder's
|
1482
|
+
# current metageneration matches the given value.
|
1483
|
+
# @param [Fixnum] if_metageneration_not_match
|
1484
|
+
# Makes the return of the folder metadata conditional on whether the folder's
|
1485
|
+
# current metageneration does not match the given value.
|
877
1486
|
# @param [String] fields
|
878
1487
|
# Selector specifying which fields to include in a partial response.
|
879
1488
|
# @param [String] quota_user
|
@@ -885,39 +1494,35 @@ module Google
|
|
885
1494
|
# Request-specific options
|
886
1495
|
#
|
887
1496
|
# @yield [result, err] Result & error if block supplied
|
888
|
-
# @yieldparam result [Google::Apis::StorageV1::
|
1497
|
+
# @yieldparam result [Google::Apis::StorageV1::Folder] parsed result object
|
889
1498
|
# @yieldparam err [StandardError] error object if request failed
|
890
1499
|
#
|
891
|
-
# @return [Google::Apis::StorageV1::
|
1500
|
+
# @return [Google::Apis::StorageV1::Folder]
|
892
1501
|
#
|
893
1502
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
894
1503
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
895
1504
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
896
|
-
def
|
897
|
-
command = make_simple_command(:
|
898
|
-
command.
|
899
|
-
command.
|
900
|
-
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
901
|
-
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1505
|
+
def get_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1506
|
+
command = make_simple_command(:get, 'b/{bucket}/folders/{folder}', options)
|
1507
|
+
command.response_representation = Google::Apis::StorageV1::Folder::Representation
|
1508
|
+
command.response_class = Google::Apis::StorageV1::Folder
|
902
1509
|
command.params['bucket'] = bucket unless bucket.nil?
|
903
|
-
command.
|
1510
|
+
command.params['folder'] = folder unless folder.nil?
|
1511
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1512
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
904
1513
|
command.query['fields'] = fields unless fields.nil?
|
905
1514
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
906
1515
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
907
1516
|
execute_or_queue_command(command, &block)
|
908
1517
|
end
|
909
1518
|
|
910
|
-
#
|
1519
|
+
# Creates a new folder. Only applicable to buckets with hierarchical namespace
|
1520
|
+
# enabled.
|
911
1521
|
# @param [String] bucket
|
912
|
-
# Name of
|
913
|
-
# @param [
|
914
|
-
#
|
915
|
-
#
|
916
|
-
# @param [Fixnum] if_metageneration_not_match
|
917
|
-
# If present, only return default ACL listing if the bucket's current
|
918
|
-
# metageneration does not match the given value.
|
919
|
-
# @param [String] user_project
|
920
|
-
# The project to be billed for this request. Required for Requester Pays buckets.
|
1522
|
+
# Name of the bucket in which the folder resides.
|
1523
|
+
# @param [Google::Apis::StorageV1::Folder] folder_object
|
1524
|
+
# @param [Boolean] recursive
|
1525
|
+
# If true, any parent folder which doesn't exist will be created automatically.
|
921
1526
|
# @param [String] fields
|
922
1527
|
# Selector specifying which fields to include in a partial response.
|
923
1528
|
# @param [String] quota_user
|
@@ -929,37 +1534,52 @@ module Google
|
|
929
1534
|
# Request-specific options
|
930
1535
|
#
|
931
1536
|
# @yield [result, err] Result & error if block supplied
|
932
|
-
# @yieldparam result [Google::Apis::StorageV1::
|
1537
|
+
# @yieldparam result [Google::Apis::StorageV1::Folder] parsed result object
|
933
1538
|
# @yieldparam err [StandardError] error object if request failed
|
934
1539
|
#
|
935
|
-
# @return [Google::Apis::StorageV1::
|
1540
|
+
# @return [Google::Apis::StorageV1::Folder]
|
936
1541
|
#
|
937
1542
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
938
1543
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
939
1544
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
940
|
-
def
|
941
|
-
command = make_simple_command(:
|
942
|
-
command.
|
943
|
-
command.
|
1545
|
+
def insert_folder(bucket, folder_object = nil, recursive: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1546
|
+
command = make_simple_command(:post, 'b/{bucket}/folders', options)
|
1547
|
+
command.request_representation = Google::Apis::StorageV1::Folder::Representation
|
1548
|
+
command.request_object = folder_object
|
1549
|
+
command.response_representation = Google::Apis::StorageV1::Folder::Representation
|
1550
|
+
command.response_class = Google::Apis::StorageV1::Folder
|
944
1551
|
command.params['bucket'] = bucket unless bucket.nil?
|
945
|
-
command.query['
|
946
|
-
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
947
|
-
command.query['userProject'] = user_project unless user_project.nil?
|
1552
|
+
command.query['recursive'] = recursive unless recursive.nil?
|
948
1553
|
command.query['fields'] = fields unless fields.nil?
|
949
1554
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
950
1555
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
951
1556
|
execute_or_queue_command(command, &block)
|
952
1557
|
end
|
953
1558
|
|
954
|
-
#
|
1559
|
+
# Retrieves a list of folders matching the criteria. Only applicable to buckets
|
1560
|
+
# with hierarchical namespace enabled.
|
955
1561
|
# @param [String] bucket
|
956
|
-
# Name of
|
957
|
-
# @param [String]
|
958
|
-
#
|
959
|
-
#
|
960
|
-
#
|
961
|
-
# @param [String]
|
962
|
-
#
|
1562
|
+
# Name of the bucket in which to look for folders.
|
1563
|
+
# @param [String] delimiter
|
1564
|
+
# Returns results in a directory-like mode. The only supported value is '/'. If
|
1565
|
+
# set, items will only contain folders that either exactly match the prefix, or
|
1566
|
+
# are one level below the prefix.
|
1567
|
+
# @param [String] end_offset
|
1568
|
+
# Filter results to folders whose names are lexicographically before endOffset.
|
1569
|
+
# If startOffset is also set, the folders listed will have names between
|
1570
|
+
# startOffset (inclusive) and endOffset (exclusive).
|
1571
|
+
# @param [Fixnum] page_size
|
1572
|
+
# Maximum number of items to return in a single page of responses.
|
1573
|
+
# @param [String] page_token
|
1574
|
+
# A previously-returned page token representing part of the larger set of
|
1575
|
+
# results to view.
|
1576
|
+
# @param [String] prefix
|
1577
|
+
# Filter results to folders whose paths begin with this prefix. If set, the
|
1578
|
+
# value must either be an empty string or end with a '/'.
|
1579
|
+
# @param [String] start_offset
|
1580
|
+
# Filter results to folders whose names are lexicographically equal to or after
|
1581
|
+
# startOffset. If endOffset is also set, the folders listed will have names
|
1582
|
+
# between startOffset (inclusive) and endOffset (exclusive).
|
963
1583
|
# @param [String] fields
|
964
1584
|
# Selector specifying which fields to include in a partial response.
|
965
1585
|
# @param [String] quota_user
|
@@ -971,38 +1591,45 @@ module Google
|
|
971
1591
|
# Request-specific options
|
972
1592
|
#
|
973
1593
|
# @yield [result, err] Result & error if block supplied
|
974
|
-
# @yieldparam result [Google::Apis::StorageV1::
|
1594
|
+
# @yieldparam result [Google::Apis::StorageV1::Folders] parsed result object
|
975
1595
|
# @yieldparam err [StandardError] error object if request failed
|
976
1596
|
#
|
977
|
-
# @return [Google::Apis::StorageV1::
|
1597
|
+
# @return [Google::Apis::StorageV1::Folders]
|
978
1598
|
#
|
979
1599
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
980
1600
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
981
1601
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
982
|
-
def
|
983
|
-
command = make_simple_command(:
|
984
|
-
command.
|
985
|
-
command.
|
986
|
-
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
987
|
-
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1602
|
+
def list_folders(bucket, delimiter: nil, end_offset: nil, page_size: nil, page_token: nil, prefix: nil, start_offset: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1603
|
+
command = make_simple_command(:get, 'b/{bucket}/folders', options)
|
1604
|
+
command.response_representation = Google::Apis::StorageV1::Folders::Representation
|
1605
|
+
command.response_class = Google::Apis::StorageV1::Folders
|
988
1606
|
command.params['bucket'] = bucket unless bucket.nil?
|
989
|
-
command.
|
990
|
-
command.query['
|
1607
|
+
command.query['delimiter'] = delimiter unless delimiter.nil?
|
1608
|
+
command.query['endOffset'] = end_offset unless end_offset.nil?
|
1609
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1610
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1611
|
+
command.query['prefix'] = prefix unless prefix.nil?
|
1612
|
+
command.query['startOffset'] = start_offset unless start_offset.nil?
|
991
1613
|
command.query['fields'] = fields unless fields.nil?
|
992
1614
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
993
1615
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
994
1616
|
execute_or_queue_command(command, &block)
|
995
1617
|
end
|
996
1618
|
|
997
|
-
#
|
1619
|
+
# Renames a source folder to a destination folder. Only applicable to buckets
|
1620
|
+
# with hierarchical namespace enabled.
|
998
1621
|
# @param [String] bucket
|
999
|
-
# Name of
|
1000
|
-
# @param [String]
|
1001
|
-
#
|
1002
|
-
#
|
1003
|
-
#
|
1004
|
-
# @param [
|
1005
|
-
#
|
1622
|
+
# Name of the bucket in which the folders are in.
|
1623
|
+
# @param [String] source_folder
|
1624
|
+
# Name of the source folder.
|
1625
|
+
# @param [String] destination_folder
|
1626
|
+
# Name of the destination folder.
|
1627
|
+
# @param [Fixnum] if_source_metageneration_match
|
1628
|
+
# Makes the operation conditional on whether the source object's current
|
1629
|
+
# metageneration matches the given value.
|
1630
|
+
# @param [Fixnum] if_source_metageneration_not_match
|
1631
|
+
# Makes the operation conditional on whether the source object's current
|
1632
|
+
# metageneration does not match the given value.
|
1006
1633
|
# @param [String] fields
|
1007
1634
|
# Selector specifying which fields to include in a partial response.
|
1008
1635
|
# @param [String] quota_user
|
@@ -1014,23 +1641,23 @@ module Google
|
|
1014
1641
|
# Request-specific options
|
1015
1642
|
#
|
1016
1643
|
# @yield [result, err] Result & error if block supplied
|
1017
|
-
# @yieldparam result [Google::Apis::StorageV1::
|
1644
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
1018
1645
|
# @yieldparam err [StandardError] error object if request failed
|
1019
1646
|
#
|
1020
|
-
# @return [Google::Apis::StorageV1::
|
1647
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
1021
1648
|
#
|
1022
1649
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1023
1650
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1024
1651
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1025
|
-
def
|
1026
|
-
command = make_simple_command(:
|
1027
|
-
command.
|
1028
|
-
command.
|
1029
|
-
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1030
|
-
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1652
|
+
def rename_folder(bucket, source_folder, destination_folder, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1653
|
+
command = make_simple_command(:post, 'b/{bucket}/folders/{sourceFolder}/renameTo/folders/{destinationFolder}', options)
|
1654
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
1655
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
1031
1656
|
command.params['bucket'] = bucket unless bucket.nil?
|
1032
|
-
command.params['
|
1033
|
-
command.
|
1657
|
+
command.params['sourceFolder'] = source_folder unless source_folder.nil?
|
1658
|
+
command.params['destinationFolder'] = destination_folder unless destination_folder.nil?
|
1659
|
+
command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
|
1660
|
+
command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
|
1034
1661
|
command.query['fields'] = fields unless fields.nil?
|
1035
1662
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1036
1663
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
@@ -1042,6 +1669,10 @@ module Google
|
|
1042
1669
|
# Name of the bucket containing the managed folder.
|
1043
1670
|
# @param [String] managed_folder
|
1044
1671
|
# The managed folder name/path.
|
1672
|
+
# @param [Boolean] allow_non_empty
|
1673
|
+
# Allows the deletion of a managed folder even if it is not empty. A managed
|
1674
|
+
# folder is empty if there are no objects or managed folders that it applies to.
|
1675
|
+
# Callers must have storage.managedFolders.setIamPolicy permission.
|
1045
1676
|
# @param [Fixnum] if_metageneration_match
|
1046
1677
|
# If set, only deletes the managed folder if its metageneration matches this
|
1047
1678
|
# value.
|
@@ -1067,10 +1698,11 @@ module Google
|
|
1067
1698
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1068
1699
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1069
1700
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1070
|
-
def delete_managed_folder(bucket, managed_folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1701
|
+
def delete_managed_folder(bucket, managed_folder, allow_non_empty: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1071
1702
|
command = make_simple_command(:delete, 'b/{bucket}/managedFolders/{managedFolder}', options)
|
1072
1703
|
command.params['bucket'] = bucket unless bucket.nil?
|
1073
1704
|
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1705
|
+
command.query['allowNonEmpty'] = allow_non_empty unless allow_non_empty.nil?
|
1074
1706
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1075
1707
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
1076
1708
|
command.query['fields'] = fields unless fields.nil?
|
@@ -1207,7 +1839,7 @@ module Google
|
|
1207
1839
|
# @param [String] bucket
|
1208
1840
|
# Name of the bucket containing the managed folder.
|
1209
1841
|
# @param [Fixnum] page_size
|
1210
|
-
# Maximum number of items return in a single page of responses.
|
1842
|
+
# Maximum number of items to return in a single page of responses.
|
1211
1843
|
# @param [String] page_token
|
1212
1844
|
# A previously-returned page token representing part of the larger set of
|
1213
1845
|
# results to view.
|
@@ -2069,9 +2701,16 @@ module Google
|
|
2069
2701
|
# does not match the given value.
|
2070
2702
|
# @param [String] projection
|
2071
2703
|
# Set of properties to return. Defaults to noAcl.
|
2704
|
+
# @param [String] restore_token
|
2705
|
+
# Restore token used to differentiate soft-deleted objects with the same name
|
2706
|
+
# and generation. Only applicable for hierarchical namespace buckets and if
|
2707
|
+
# softDeleted is set to true. This parameter is optional, and is only required
|
2708
|
+
# in the rare case when there are multiple soft-deleted objects with the same
|
2709
|
+
# name and generation.
|
2072
2710
|
# @param [Boolean] soft_deleted
|
2073
2711
|
# If true, only soft-deleted object versions will be listed. The default is
|
2074
|
-
# false. For more information, see Soft Delete.
|
2712
|
+
# false. For more information, see [Soft Delete](https://cloud.google.com/
|
2713
|
+
# storage/docs/soft-delete).
|
2075
2714
|
# @param [String] user_project
|
2076
2715
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
2077
2716
|
# @param [String] fields
|
@@ -2095,7 +2734,7 @@ module Google
|
|
2095
2734
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2096
2735
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2097
2736
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2098
|
-
def get_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, soft_deleted: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
2737
|
+
def get_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, restore_token: nil, soft_deleted: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
2099
2738
|
|
2100
2739
|
if download_dest.nil?
|
2101
2740
|
command = make_simple_command(:get, 'b/{bucket}/o/{object}', options)
|
@@ -2113,6 +2752,7 @@ module Google
|
|
2113
2752
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
2114
2753
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
2115
2754
|
command.query['projection'] = projection unless projection.nil?
|
2755
|
+
command.query['restoreToken'] = restore_token unless restore_token.nil?
|
2116
2756
|
command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
|
2117
2757
|
command.query['userProject'] = user_project unless user_project.nil?
|
2118
2758
|
command.query['fields'] = fields unless fields.nil?
|
@@ -2273,6 +2913,9 @@ module Google
|
|
2273
2913
|
# Filter results to objects whose names are lexicographically before endOffset.
|
2274
2914
|
# If startOffset is also set, the objects listed will have names between
|
2275
2915
|
# startOffset (inclusive) and endOffset (exclusive).
|
2916
|
+
# @param [String] filter
|
2917
|
+
# Filter the returned objects. Currently only supported for the contexts field.
|
2918
|
+
# If delimiter is set, the returned prefixes are exempt from this filter.
|
2276
2919
|
# @param [Boolean] include_folders_as_prefixes
|
2277
2920
|
# Only applicable if delimiter is set to '/'. If true, will also include folders
|
2278
2921
|
# and managed folders (besides objects) in the returned prefixes.
|
@@ -2295,7 +2938,8 @@ module Google
|
|
2295
2938
|
# Set of properties to return. Defaults to noAcl.
|
2296
2939
|
# @param [Boolean] soft_deleted
|
2297
2940
|
# If true, only soft-deleted object versions will be listed. The default is
|
2298
|
-
# false. For more information, see Soft Delete.
|
2941
|
+
# false. For more information, see [Soft Delete](https://cloud.google.com/
|
2942
|
+
# storage/docs/soft-delete).
|
2299
2943
|
# @param [String] start_offset
|
2300
2944
|
# Filter results to objects whose names are lexicographically equal to or after
|
2301
2945
|
# startOffset. If endOffset is also set, the objects listed will have names
|
@@ -2304,7 +2948,8 @@ module Google
|
|
2304
2948
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
2305
2949
|
# @param [Boolean] versions
|
2306
2950
|
# If true, lists all versions of an object as distinct results. The default is
|
2307
|
-
# false. For more information, see Object Versioning.
|
2951
|
+
# false. For more information, see [Object Versioning](https://cloud.google.com/
|
2952
|
+
# storage/docs/object-versioning).
|
2308
2953
|
# @param [String] fields
|
2309
2954
|
# Selector specifying which fields to include in a partial response.
|
2310
2955
|
# @param [String] quota_user
|
@@ -2324,13 +2969,14 @@ module Google
|
|
2324
2969
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2325
2970
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2326
2971
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2327
|
-
def list_objects(bucket, delimiter: nil, end_offset: nil, include_folders_as_prefixes: nil, include_trailing_delimiter: nil, match_glob: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, soft_deleted: nil, start_offset: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2972
|
+
def list_objects(bucket, delimiter: nil, end_offset: nil, filter: nil, include_folders_as_prefixes: nil, include_trailing_delimiter: nil, match_glob: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, soft_deleted: nil, start_offset: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2328
2973
|
command = make_simple_command(:get, 'b/{bucket}/o', options)
|
2329
2974
|
command.response_representation = Google::Apis::StorageV1::Objects::Representation
|
2330
2975
|
command.response_class = Google::Apis::StorageV1::Objects
|
2331
2976
|
command.params['bucket'] = bucket unless bucket.nil?
|
2332
2977
|
command.query['delimiter'] = delimiter unless delimiter.nil?
|
2333
2978
|
command.query['endOffset'] = end_offset unless end_offset.nil?
|
2979
|
+
command.query['filter'] = filter unless filter.nil?
|
2334
2980
|
command.query['includeFoldersAsPrefixes'] = include_folders_as_prefixes unless include_folders_as_prefixes.nil?
|
2335
2981
|
command.query['includeTrailingDelimiter'] = include_trailing_delimiter unless include_trailing_delimiter.nil?
|
2336
2982
|
command.query['matchGlob'] = match_glob unless match_glob.nil?
|
@@ -2348,6 +2994,106 @@ module Google
|
|
2348
2994
|
execute_or_queue_command(command, &block)
|
2349
2995
|
end
|
2350
2996
|
|
2997
|
+
# Moves the source object to the destination object in the same bucket.
|
2998
|
+
# @param [String] bucket
|
2999
|
+
# Name of the bucket in which the object resides.
|
3000
|
+
# @param [String] source_object
|
3001
|
+
# Name of the source object. For information about how to URL encode object
|
3002
|
+
# names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
|
3003
|
+
# storage/docs/request-endpoints#encoding).
|
3004
|
+
# @param [String] destination_object
|
3005
|
+
# Name of the destination object. For information about how to URL encode object
|
3006
|
+
# names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
|
3007
|
+
# storage/docs/request-endpoints#encoding).
|
3008
|
+
# @param [Fixnum] if_generation_match
|
3009
|
+
# Makes the operation conditional on whether the destination object's current
|
3010
|
+
# generation matches the given value. Setting to 0 makes the operation succeed
|
3011
|
+
# only if there are no live versions of the object. `ifGenerationMatch` and `
|
3012
|
+
# ifGenerationNotMatch` conditions are mutually exclusive: it's an error for
|
3013
|
+
# both of them to be set in the request.
|
3014
|
+
# @param [Fixnum] if_generation_not_match
|
3015
|
+
# Makes the operation conditional on whether the destination object's current
|
3016
|
+
# generation does not match the given value. If no live object exists, the
|
3017
|
+
# precondition fails. Setting to 0 makes the operation succeed only if there is
|
3018
|
+
# a live version of the object.`ifGenerationMatch` and `ifGenerationNotMatch`
|
3019
|
+
# conditions are mutually exclusive: it's an error for both of them to be set in
|
3020
|
+
# the request.
|
3021
|
+
# @param [Fixnum] if_metageneration_match
|
3022
|
+
# Makes the operation conditional on whether the destination object's current
|
3023
|
+
# metageneration matches the given value. `ifMetagenerationMatch` and `
|
3024
|
+
# ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for
|
3025
|
+
# both of them to be set in the request.
|
3026
|
+
# @param [Fixnum] if_metageneration_not_match
|
3027
|
+
# Makes the operation conditional on whether the destination object's current
|
3028
|
+
# metageneration does not match the given value. `ifMetagenerationMatch` and `
|
3029
|
+
# ifMetagenerationNotMatch` conditions are mutually exclusive: it's an error for
|
3030
|
+
# both of them to be set in the request.
|
3031
|
+
# @param [Fixnum] if_source_generation_match
|
3032
|
+
# Makes the operation conditional on whether the source object's current
|
3033
|
+
# generation matches the given value. `ifSourceGenerationMatch` and `
|
3034
|
+
# ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error
|
3035
|
+
# for both of them to be set in the request.
|
3036
|
+
# @param [Fixnum] if_source_generation_not_match
|
3037
|
+
# Makes the operation conditional on whether the source object's current
|
3038
|
+
# generation does not match the given value. `ifSourceGenerationMatch` and `
|
3039
|
+
# ifSourceGenerationNotMatch` conditions are mutually exclusive: it's an error
|
3040
|
+
# for both of them to be set in the request.
|
3041
|
+
# @param [Fixnum] if_source_metageneration_match
|
3042
|
+
# Makes the operation conditional on whether the source object's current
|
3043
|
+
# metageneration matches the given value. `ifSourceMetagenerationMatch` and `
|
3044
|
+
# ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's an
|
3045
|
+
# error for both of them to be set in the request.
|
3046
|
+
# @param [Fixnum] if_source_metageneration_not_match
|
3047
|
+
# Makes the operation conditional on whether the source object's current
|
3048
|
+
# metageneration does not match the given value. `ifSourceMetagenerationMatch`
|
3049
|
+
# and `ifSourceMetagenerationNotMatch` conditions are mutually exclusive: it's
|
3050
|
+
# an error for both of them to be set in the request.
|
3051
|
+
# @param [String] projection
|
3052
|
+
# Set of properties to return. Defaults to noAcl.
|
3053
|
+
# @param [String] user_project
|
3054
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
3055
|
+
# @param [String] fields
|
3056
|
+
# Selector specifying which fields to include in a partial response.
|
3057
|
+
# @param [String] quota_user
|
3058
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
3059
|
+
# characters.
|
3060
|
+
# @param [String] user_ip
|
3061
|
+
# Deprecated. Please use quotaUser instead.
|
3062
|
+
# @param [Google::Apis::RequestOptions] options
|
3063
|
+
# Request-specific options
|
3064
|
+
#
|
3065
|
+
# @yield [result, err] Result & error if block supplied
|
3066
|
+
# @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
|
3067
|
+
# @yieldparam err [StandardError] error object if request failed
|
3068
|
+
#
|
3069
|
+
# @return [Google::Apis::StorageV1::Object]
|
3070
|
+
#
|
3071
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3072
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3073
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3074
|
+
def move_object(bucket, source_object, destination_object, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
3075
|
+
command = make_simple_command(:post, 'b/{bucket}/o/{sourceObject}/moveTo/o/{destinationObject}', options)
|
3076
|
+
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
3077
|
+
command.response_class = Google::Apis::StorageV1::Object
|
3078
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
3079
|
+
command.params['sourceObject'] = source_object unless source_object.nil?
|
3080
|
+
command.params['destinationObject'] = destination_object unless destination_object.nil?
|
3081
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
3082
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
3083
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
3084
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
3085
|
+
command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil?
|
3086
|
+
command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil?
|
3087
|
+
command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
|
3088
|
+
command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
|
3089
|
+
command.query['projection'] = projection unless projection.nil?
|
3090
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
3091
|
+
command.query['fields'] = fields unless fields.nil?
|
3092
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3093
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
3094
|
+
execute_or_queue_command(command, &block)
|
3095
|
+
end
|
3096
|
+
|
2351
3097
|
# Patches an object's metadata.
|
2352
3098
|
# @param [String] bucket
|
2353
3099
|
# Name of the bucket in which the object resides.
|
@@ -2430,8 +3176,10 @@ module Google
|
|
2430
3176
|
# Name of the bucket in which the object resides.
|
2431
3177
|
# @param [String] object
|
2432
3178
|
# Name of the object. For information about how to URL encode object names to be
|
2433
|
-
# path safe, see Encoding URI Path Parts.
|
2434
|
-
#
|
3179
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
3180
|
+
# request-endpoints#encoding).
|
3181
|
+
# @param [Fixnum] generation
|
3182
|
+
# Selects a specific revision of this object.
|
2435
3183
|
# @param [Boolean] copy_source_acl
|
2436
3184
|
# If true, copies the source object's ACL; otherwise, uses the bucket's default
|
2437
3185
|
# object ACL. The default is false.
|
@@ -2452,6 +3200,11 @@ module Google
|
|
2452
3200
|
# metagenerations match the given value.
|
2453
3201
|
# @param [String] projection
|
2454
3202
|
# Set of properties to return. Defaults to full.
|
3203
|
+
# @param [String] restore_token
|
3204
|
+
# Restore token used to differentiate sof-deleted objects with the same name and
|
3205
|
+
# generation. Only applicable for hierarchical namespace buckets. This parameter
|
3206
|
+
# is optional, and is only required in the rare case when there are multiple
|
3207
|
+
# soft-deleted objects with the same name and generation.
|
2455
3208
|
# @param [String] user_project
|
2456
3209
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
2457
3210
|
# @param [String] fields
|
@@ -2473,10 +3226,8 @@ module Google
|
|
2473
3226
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2474
3227
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2475
3228
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2476
|
-
def restore_object(bucket, object,
|
3229
|
+
def restore_object(bucket, object, generation, copy_source_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, restore_token: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2477
3230
|
command = make_simple_command(:post, 'b/{bucket}/o/{object}/restore', options)
|
2478
|
-
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
2479
|
-
command.request_object = object_object
|
2480
3231
|
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
2481
3232
|
command.response_class = Google::Apis::StorageV1::Object
|
2482
3233
|
command.params['bucket'] = bucket unless bucket.nil?
|
@@ -2488,6 +3239,7 @@ module Google
|
|
2488
3239
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
2489
3240
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
2490
3241
|
command.query['projection'] = projection unless projection.nil?
|
3242
|
+
command.query['restoreToken'] = restore_token unless restore_token.nil?
|
2491
3243
|
command.query['userProject'] = user_project unless user_project.nil?
|
2492
3244
|
command.query['fields'] = fields unless fields.nil?
|
2493
3245
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -2827,7 +3579,8 @@ module Google
|
|
2827
3579
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
2828
3580
|
# @param [Boolean] versions
|
2829
3581
|
# If true, lists all versions of an object as distinct results. The default is
|
2830
|
-
# false. For more information, see Object Versioning.
|
3582
|
+
# false. For more information, see [Object Versioning](https://cloud.google.com/
|
3583
|
+
# storage/docs/object-versioning).
|
2831
3584
|
# @param [String] fields
|
2832
3585
|
# Selector specifying which fields to include in a partial response.
|
2833
3586
|
# @param [String] quota_user
|
@@ -2870,6 +3623,46 @@ module Google
|
|
2870
3623
|
execute_or_queue_command(command, &block)
|
2871
3624
|
end
|
2872
3625
|
|
3626
|
+
# Starts asynchronous advancement of the relocate bucket operation in the case
|
3627
|
+
# of required write downtime, to allow it to lock the bucket at the source
|
3628
|
+
# location, and proceed with the bucket location swap. The server makes a best
|
3629
|
+
# effort to advance the relocate bucket operation, but success is not guaranteed.
|
3630
|
+
# @param [String] bucket
|
3631
|
+
# Name of the bucket to advance the relocate for.
|
3632
|
+
# @param [String] operation_id
|
3633
|
+
# ID of the operation resource.
|
3634
|
+
# @param [Google::Apis::StorageV1::AdvanceRelocateBucketOperationRequest] advance_relocate_bucket_operation_request_object
|
3635
|
+
# @param [String] fields
|
3636
|
+
# Selector specifying which fields to include in a partial response.
|
3637
|
+
# @param [String] quota_user
|
3638
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
3639
|
+
# characters.
|
3640
|
+
# @param [String] user_ip
|
3641
|
+
# Deprecated. Please use quotaUser instead.
|
3642
|
+
# @param [Google::Apis::RequestOptions] options
|
3643
|
+
# Request-specific options
|
3644
|
+
#
|
3645
|
+
# @yield [result, err] Result & error if block supplied
|
3646
|
+
# @yieldparam result [NilClass] No result returned for this method
|
3647
|
+
# @yieldparam err [StandardError] error object if request failed
|
3648
|
+
#
|
3649
|
+
# @return [void]
|
3650
|
+
#
|
3651
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3652
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3653
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3654
|
+
def advance_relocate_bucket_operation(bucket, operation_id, advance_relocate_bucket_operation_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
3655
|
+
command = make_simple_command(:post, 'b/{bucket}/operations/{operationId}/advanceRelocateBucket', options)
|
3656
|
+
command.request_representation = Google::Apis::StorageV1::AdvanceRelocateBucketOperationRequest::Representation
|
3657
|
+
command.request_object = advance_relocate_bucket_operation_request_object
|
3658
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
3659
|
+
command.params['operationId'] = operation_id unless operation_id.nil?
|
3660
|
+
command.query['fields'] = fields unless fields.nil?
|
3661
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3662
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
3663
|
+
execute_or_queue_command(command, &block)
|
3664
|
+
end
|
3665
|
+
|
2873
3666
|
# Starts asynchronous cancellation on a long-running operation. The server makes
|
2874
3667
|
# a best effort to cancel the operation, but success is not guaranteed.
|
2875
3668
|
# @param [String] bucket
|
@@ -3155,8 +3948,9 @@ module Google
|
|
3155
3948
|
execute_or_queue_command(command, &block)
|
3156
3949
|
end
|
3157
3950
|
|
3158
|
-
# Updates the state of an HMAC key. See the HMAC Key resource descriptor
|
3159
|
-
#
|
3951
|
+
# Updates the state of an HMAC key. See the [HMAC Key resource descriptor](https:
|
3952
|
+
# //cloud.google.com/storage/docs/json_api/v1/projects/hmacKeys/update#request-
|
3953
|
+
# body) for valid states.
|
3160
3954
|
# @param [String] project_id
|
3161
3955
|
# Project ID owning the service account of the updated key.
|
3162
3956
|
# @param [String] access_id
|