google-apis-storage_v1 0.19.0 → 0.31.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +49 -0
- data/lib/google/apis/storage_v1/classes.rb +527 -11
- data/lib/google/apis/storage_v1/gem_version.rb +3 -3
- data/lib/google/apis/storage_v1/representations.rb +202 -0
- data/lib/google/apis/storage_v1/service.rb +903 -84
- metadata +6 -6
@@ -53,6 +53,265 @@ module Google
|
|
53
53
|
@batch_path = 'batch/storage/v1'
|
54
54
|
end
|
55
55
|
|
56
|
+
# Disables an Anywhere Cache instance.
|
57
|
+
# @param [String] bucket
|
58
|
+
# Name of the partent bucket
|
59
|
+
# @param [String] anywhere_cache_id
|
60
|
+
# The ID of requested Anywhere Cache instance.
|
61
|
+
# @param [String] fields
|
62
|
+
# Selector specifying which fields to include in a partial response.
|
63
|
+
# @param [String] quota_user
|
64
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
65
|
+
# characters.
|
66
|
+
# @param [String] user_ip
|
67
|
+
# Deprecated. Please use quotaUser instead.
|
68
|
+
# @param [Google::Apis::RequestOptions] options
|
69
|
+
# Request-specific options
|
70
|
+
#
|
71
|
+
# @yield [result, err] Result & error if block supplied
|
72
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
|
73
|
+
# @yieldparam err [StandardError] error object if request failed
|
74
|
+
#
|
75
|
+
# @return [Google::Apis::StorageV1::AnywhereCache]
|
76
|
+
#
|
77
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
78
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
79
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
80
|
+
def disable_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
81
|
+
command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/disable', options)
|
82
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
83
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCache
|
84
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
85
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
86
|
+
command.query['fields'] = fields unless fields.nil?
|
87
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
88
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
89
|
+
execute_or_queue_command(command, &block)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Returns the metadata of an Anywhere Cache instance.
|
93
|
+
# @param [String] bucket
|
94
|
+
# Name of the partent bucket
|
95
|
+
# @param [String] anywhere_cache_id
|
96
|
+
# The ID of requested Anywhere Cache instance.
|
97
|
+
# @param [String] fields
|
98
|
+
# Selector specifying which fields to include in a partial response.
|
99
|
+
# @param [String] quota_user
|
100
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
101
|
+
# characters.
|
102
|
+
# @param [String] user_ip
|
103
|
+
# Deprecated. Please use quotaUser instead.
|
104
|
+
# @param [Google::Apis::RequestOptions] options
|
105
|
+
# Request-specific options
|
106
|
+
#
|
107
|
+
# @yield [result, err] Result & error if block supplied
|
108
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
|
109
|
+
# @yieldparam err [StandardError] error object if request failed
|
110
|
+
#
|
111
|
+
# @return [Google::Apis::StorageV1::AnywhereCache]
|
112
|
+
#
|
113
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
114
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
115
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
116
|
+
def get_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
117
|
+
command = make_simple_command(:get, 'b/{bucket}/anywhereCaches/{anywhereCacheId}', options)
|
118
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
119
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCache
|
120
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
121
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
122
|
+
command.query['fields'] = fields unless fields.nil?
|
123
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
124
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
125
|
+
execute_or_queue_command(command, &block)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Creates an Anywhere Cache instance.
|
129
|
+
# @param [String] bucket
|
130
|
+
# Name of the partent bucket
|
131
|
+
# @param [Google::Apis::StorageV1::AnywhereCache] anywhere_cache_object
|
132
|
+
# @param [String] fields
|
133
|
+
# Selector specifying which fields to include in a partial response.
|
134
|
+
# @param [String] quota_user
|
135
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
136
|
+
# characters.
|
137
|
+
# @param [String] user_ip
|
138
|
+
# Deprecated. Please use quotaUser instead.
|
139
|
+
# @param [Google::Apis::RequestOptions] options
|
140
|
+
# Request-specific options
|
141
|
+
#
|
142
|
+
# @yield [result, err] Result & error if block supplied
|
143
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
144
|
+
# @yieldparam err [StandardError] error object if request failed
|
145
|
+
#
|
146
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
147
|
+
#
|
148
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
149
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
150
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
151
|
+
def insert_anywhere_cach(bucket, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
152
|
+
command = make_simple_command(:post, 'b/{bucket}/anywhereCaches', options)
|
153
|
+
command.request_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
154
|
+
command.request_object = anywhere_cache_object
|
155
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
156
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
157
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
158
|
+
command.query['fields'] = fields unless fields.nil?
|
159
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
160
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
161
|
+
execute_or_queue_command(command, &block)
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns a list of Anywhere Cache instances of the bucket matching the criteria.
|
165
|
+
# @param [String] bucket
|
166
|
+
# Name of the partent bucket
|
167
|
+
# @param [Fixnum] page_size
|
168
|
+
# Maximum number of items return in a single page of responses. Maximum 1000.
|
169
|
+
# @param [String] page_token
|
170
|
+
# A previously-returned page token representing part of the larger set of
|
171
|
+
# results to view.
|
172
|
+
# @param [String] fields
|
173
|
+
# Selector specifying which fields to include in a partial response.
|
174
|
+
# @param [String] quota_user
|
175
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
176
|
+
# characters.
|
177
|
+
# @param [String] user_ip
|
178
|
+
# Deprecated. Please use quotaUser instead.
|
179
|
+
# @param [Google::Apis::RequestOptions] options
|
180
|
+
# Request-specific options
|
181
|
+
#
|
182
|
+
# @yield [result, err] Result & error if block supplied
|
183
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCaches] parsed result object
|
184
|
+
# @yieldparam err [StandardError] error object if request failed
|
185
|
+
#
|
186
|
+
# @return [Google::Apis::StorageV1::AnywhereCaches]
|
187
|
+
#
|
188
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
189
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
190
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
191
|
+
def list_anywhere_caches(bucket, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
192
|
+
command = make_simple_command(:get, 'b/{bucket}/anywhereCaches', options)
|
193
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCaches::Representation
|
194
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCaches
|
195
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
196
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
197
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
198
|
+
command.query['fields'] = fields unless fields.nil?
|
199
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
200
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
201
|
+
execute_or_queue_command(command, &block)
|
202
|
+
end
|
203
|
+
|
204
|
+
# Pauses an Anywhere Cache instance.
|
205
|
+
# @param [String] bucket
|
206
|
+
# Name of the partent bucket
|
207
|
+
# @param [String] anywhere_cache_id
|
208
|
+
# The ID of requested Anywhere Cache instance.
|
209
|
+
# @param [String] fields
|
210
|
+
# Selector specifying which fields to include in a partial response.
|
211
|
+
# @param [String] quota_user
|
212
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
213
|
+
# characters.
|
214
|
+
# @param [String] user_ip
|
215
|
+
# Deprecated. Please use quotaUser instead.
|
216
|
+
# @param [Google::Apis::RequestOptions] options
|
217
|
+
# Request-specific options
|
218
|
+
#
|
219
|
+
# @yield [result, err] Result & error if block supplied
|
220
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
|
221
|
+
# @yieldparam err [StandardError] error object if request failed
|
222
|
+
#
|
223
|
+
# @return [Google::Apis::StorageV1::AnywhereCache]
|
224
|
+
#
|
225
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
226
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
227
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
228
|
+
def pause_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
229
|
+
command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/pause', options)
|
230
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
231
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCache
|
232
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
233
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
234
|
+
command.query['fields'] = fields unless fields.nil?
|
235
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
236
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
237
|
+
execute_or_queue_command(command, &block)
|
238
|
+
end
|
239
|
+
|
240
|
+
# Resumes a paused or disabled Anywhere Cache instance.
|
241
|
+
# @param [String] bucket
|
242
|
+
# Name of the partent bucket
|
243
|
+
# @param [String] anywhere_cache_id
|
244
|
+
# The ID of requested Anywhere Cache instance.
|
245
|
+
# @param [String] fields
|
246
|
+
# Selector specifying which fields to include in a partial response.
|
247
|
+
# @param [String] quota_user
|
248
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
249
|
+
# characters.
|
250
|
+
# @param [String] user_ip
|
251
|
+
# Deprecated. Please use quotaUser instead.
|
252
|
+
# @param [Google::Apis::RequestOptions] options
|
253
|
+
# Request-specific options
|
254
|
+
#
|
255
|
+
# @yield [result, err] Result & error if block supplied
|
256
|
+
# @yieldparam result [Google::Apis::StorageV1::AnywhereCache] parsed result object
|
257
|
+
# @yieldparam err [StandardError] error object if request failed
|
258
|
+
#
|
259
|
+
# @return [Google::Apis::StorageV1::AnywhereCache]
|
260
|
+
#
|
261
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
262
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
263
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
264
|
+
def resume_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
265
|
+
command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/resume', options)
|
266
|
+
command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
267
|
+
command.response_class = Google::Apis::StorageV1::AnywhereCache
|
268
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
269
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
270
|
+
command.query['fields'] = fields unless fields.nil?
|
271
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
272
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
273
|
+
execute_or_queue_command(command, &block)
|
274
|
+
end
|
275
|
+
|
276
|
+
# Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
|
277
|
+
# @param [String] bucket
|
278
|
+
# Name of the partent bucket
|
279
|
+
# @param [String] anywhere_cache_id
|
280
|
+
# The ID of requested Anywhere Cache instance.
|
281
|
+
# @param [Google::Apis::StorageV1::AnywhereCache] anywhere_cache_object
|
282
|
+
# @param [String] fields
|
283
|
+
# Selector specifying which fields to include in a partial response.
|
284
|
+
# @param [String] quota_user
|
285
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
286
|
+
# characters.
|
287
|
+
# @param [String] user_ip
|
288
|
+
# Deprecated. Please use quotaUser instead.
|
289
|
+
# @param [Google::Apis::RequestOptions] options
|
290
|
+
# Request-specific options
|
291
|
+
#
|
292
|
+
# @yield [result, err] Result & error if block supplied
|
293
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
294
|
+
# @yieldparam err [StandardError] error object if request failed
|
295
|
+
#
|
296
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
297
|
+
#
|
298
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
299
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
300
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
301
|
+
def update_anywhere_cach(bucket, anywhere_cache_id, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
302
|
+
command = make_simple_command(:patch, 'b/{bucket}/anywhereCaches/{anywhereCacheId}', options)
|
303
|
+
command.request_representation = Google::Apis::StorageV1::AnywhereCache::Representation
|
304
|
+
command.request_object = anywhere_cache_object
|
305
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
306
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
307
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
308
|
+
command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.nil?
|
309
|
+
command.query['fields'] = fields unless fields.nil?
|
310
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
311
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
312
|
+
execute_or_queue_command(command, &block)
|
313
|
+
end
|
314
|
+
|
56
315
|
# Permanently deletes the ACL entry for the specified entity on the specified
|
57
316
|
# bucket.
|
58
317
|
# @param [String] bucket
|
@@ -426,6 +685,8 @@ module Google
|
|
426
685
|
# @param [String] project
|
427
686
|
# A valid API project identifier.
|
428
687
|
# @param [Google::Apis::StorageV1::Bucket] bucket_object
|
688
|
+
# @param [Boolean] enable_object_retention
|
689
|
+
# When set to true, object retention is enabled for this bucket.
|
429
690
|
# @param [String] predefined_acl
|
430
691
|
# Apply a predefined set of access controls to this bucket.
|
431
692
|
# @param [String] predefined_default_object_acl
|
@@ -454,12 +715,13 @@ module Google
|
|
454
715
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
455
716
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
456
717
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
457
|
-
def insert_bucket(project, bucket_object = nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
718
|
+
def insert_bucket(project, bucket_object = nil, enable_object_retention: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
458
719
|
command = make_simple_command(:post, 'b', options)
|
459
720
|
command.request_representation = Google::Apis::StorageV1::Bucket::Representation
|
460
721
|
command.request_object = bucket_object
|
461
722
|
command.response_representation = Google::Apis::StorageV1::Bucket::Representation
|
462
723
|
command.response_class = Google::Apis::StorageV1::Bucket
|
724
|
+
command.query['enableObjectRetention'] = enable_object_retention unless enable_object_retention.nil?
|
463
725
|
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
464
726
|
command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
|
465
727
|
command.query['project'] = project unless project.nil?
|
@@ -882,39 +1144,334 @@ module Google
|
|
882
1144
|
# Request-specific options
|
883
1145
|
#
|
884
1146
|
# @yield [result, err] Result & error if block supplied
|
885
|
-
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
1147
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
1148
|
+
# @yieldparam err [StandardError] error object if request failed
|
1149
|
+
#
|
1150
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
1151
|
+
#
|
1152
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1153
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1154
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1155
|
+
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)
|
1156
|
+
command = make_simple_command(:post, 'b/{bucket}/defaultObjectAcl', options)
|
1157
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1158
|
+
command.request_object = object_access_control_object
|
1159
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1160
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1161
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1162
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1163
|
+
command.query['fields'] = fields unless fields.nil?
|
1164
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1165
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1166
|
+
execute_or_queue_command(command, &block)
|
1167
|
+
end
|
1168
|
+
|
1169
|
+
# Retrieves default object ACL entries on the specified bucket.
|
1170
|
+
# @param [String] bucket
|
1171
|
+
# Name of a bucket.
|
1172
|
+
# @param [Fixnum] if_metageneration_match
|
1173
|
+
# If present, only return default ACL listing if the bucket's current
|
1174
|
+
# metageneration matches this value.
|
1175
|
+
# @param [Fixnum] if_metageneration_not_match
|
1176
|
+
# If present, only return default ACL listing if the bucket's current
|
1177
|
+
# metageneration does not match the given value.
|
1178
|
+
# @param [String] user_project
|
1179
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1180
|
+
# @param [String] fields
|
1181
|
+
# Selector specifying which fields to include in a partial response.
|
1182
|
+
# @param [String] quota_user
|
1183
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1184
|
+
# characters.
|
1185
|
+
# @param [String] user_ip
|
1186
|
+
# Deprecated. Please use quotaUser instead.
|
1187
|
+
# @param [Google::Apis::RequestOptions] options
|
1188
|
+
# Request-specific options
|
1189
|
+
#
|
1190
|
+
# @yield [result, err] Result & error if block supplied
|
1191
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object
|
1192
|
+
# @yieldparam err [StandardError] error object if request failed
|
1193
|
+
#
|
1194
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControls]
|
1195
|
+
#
|
1196
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1197
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1198
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1199
|
+
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)
|
1200
|
+
command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl', options)
|
1201
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
|
1202
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControls
|
1203
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1204
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1205
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
1206
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1207
|
+
command.query['fields'] = fields unless fields.nil?
|
1208
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1209
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1210
|
+
execute_or_queue_command(command, &block)
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
# Patches a default object ACL entry on the specified bucket.
|
1214
|
+
# @param [String] bucket
|
1215
|
+
# Name of a bucket.
|
1216
|
+
# @param [String] entity
|
1217
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1218
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
1219
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
1220
|
+
# @param [String] user_project
|
1221
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1222
|
+
# @param [String] fields
|
1223
|
+
# Selector specifying which fields to include in a partial response.
|
1224
|
+
# @param [String] quota_user
|
1225
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1226
|
+
# characters.
|
1227
|
+
# @param [String] user_ip
|
1228
|
+
# Deprecated. Please use quotaUser instead.
|
1229
|
+
# @param [Google::Apis::RequestOptions] options
|
1230
|
+
# Request-specific options
|
1231
|
+
#
|
1232
|
+
# @yield [result, err] Result & error if block supplied
|
1233
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
1234
|
+
# @yieldparam err [StandardError] error object if request failed
|
1235
|
+
#
|
1236
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
1237
|
+
#
|
1238
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1239
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1240
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1241
|
+
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)
|
1242
|
+
command = make_simple_command(:patch, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
1243
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1244
|
+
command.request_object = object_access_control_object
|
1245
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1246
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1247
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1248
|
+
command.params['entity'] = entity unless entity.nil?
|
1249
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1250
|
+
command.query['fields'] = fields unless fields.nil?
|
1251
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1252
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1253
|
+
execute_or_queue_command(command, &block)
|
1254
|
+
end
|
1255
|
+
|
1256
|
+
# Updates a default object ACL entry on the specified bucket.
|
1257
|
+
# @param [String] bucket
|
1258
|
+
# Name of a bucket.
|
1259
|
+
# @param [String] entity
|
1260
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1261
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
1262
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
1263
|
+
# @param [String] user_project
|
1264
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1265
|
+
# @param [String] fields
|
1266
|
+
# Selector specifying which fields to include in a partial response.
|
1267
|
+
# @param [String] quota_user
|
1268
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1269
|
+
# characters.
|
1270
|
+
# @param [String] user_ip
|
1271
|
+
# Deprecated. Please use quotaUser instead.
|
1272
|
+
# @param [Google::Apis::RequestOptions] options
|
1273
|
+
# Request-specific options
|
1274
|
+
#
|
1275
|
+
# @yield [result, err] Result & error if block supplied
|
1276
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
1277
|
+
# @yieldparam err [StandardError] error object if request failed
|
1278
|
+
#
|
1279
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
1280
|
+
#
|
1281
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1282
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1283
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1284
|
+
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)
|
1285
|
+
command = make_simple_command(:put, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
1286
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1287
|
+
command.request_object = object_access_control_object
|
1288
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1289
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1290
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1291
|
+
command.params['entity'] = entity unless entity.nil?
|
1292
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1293
|
+
command.query['fields'] = fields unless fields.nil?
|
1294
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1295
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1296
|
+
execute_or_queue_command(command, &block)
|
1297
|
+
end
|
1298
|
+
|
1299
|
+
# Permanently deletes a managed folder.
|
1300
|
+
# @param [String] bucket
|
1301
|
+
# Name of the bucket containing the managed folder.
|
1302
|
+
# @param [String] managed_folder
|
1303
|
+
# The managed folder name/path.
|
1304
|
+
# @param [Fixnum] if_metageneration_match
|
1305
|
+
# If set, only deletes the managed folder if its metageneration matches this
|
1306
|
+
# value.
|
1307
|
+
# @param [Fixnum] if_metageneration_not_match
|
1308
|
+
# If set, only deletes the managed folder if its metageneration does not match
|
1309
|
+
# this value.
|
1310
|
+
# @param [String] fields
|
1311
|
+
# Selector specifying which fields to include in a partial response.
|
1312
|
+
# @param [String] quota_user
|
1313
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1314
|
+
# characters.
|
1315
|
+
# @param [String] user_ip
|
1316
|
+
# Deprecated. Please use quotaUser instead.
|
1317
|
+
# @param [Google::Apis::RequestOptions] options
|
1318
|
+
# Request-specific options
|
1319
|
+
#
|
1320
|
+
# @yield [result, err] Result & error if block supplied
|
1321
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1322
|
+
# @yieldparam err [StandardError] error object if request failed
|
1323
|
+
#
|
1324
|
+
# @return [void]
|
1325
|
+
#
|
1326
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1327
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1328
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1329
|
+
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)
|
1330
|
+
command = make_simple_command(:delete, 'b/{bucket}/managedFolders/{managedFolder}', options)
|
1331
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1332
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1333
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1334
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
1335
|
+
command.query['fields'] = fields unless fields.nil?
|
1336
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1337
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1338
|
+
execute_or_queue_command(command, &block)
|
1339
|
+
end
|
1340
|
+
|
1341
|
+
# Returns metadata of the specified managed folder.
|
1342
|
+
# @param [String] bucket
|
1343
|
+
# Name of the bucket containing the managed folder.
|
1344
|
+
# @param [String] managed_folder
|
1345
|
+
# The managed folder name/path.
|
1346
|
+
# @param [Fixnum] if_metageneration_match
|
1347
|
+
# Makes the return of the managed folder metadata conditional on whether the
|
1348
|
+
# managed folder's current metageneration matches the given value.
|
1349
|
+
# @param [Fixnum] if_metageneration_not_match
|
1350
|
+
# Makes the return of the managed folder metadata conditional on whether the
|
1351
|
+
# managed folder's current metageneration does not match the given value.
|
1352
|
+
# @param [String] fields
|
1353
|
+
# Selector specifying which fields to include in a partial response.
|
1354
|
+
# @param [String] quota_user
|
1355
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1356
|
+
# characters.
|
1357
|
+
# @param [String] user_ip
|
1358
|
+
# Deprecated. Please use quotaUser instead.
|
1359
|
+
# @param [Google::Apis::RequestOptions] options
|
1360
|
+
# Request-specific options
|
1361
|
+
#
|
1362
|
+
# @yield [result, err] Result & error if block supplied
|
1363
|
+
# @yieldparam result [Google::Apis::StorageV1::ManagedFolder] parsed result object
|
1364
|
+
# @yieldparam err [StandardError] error object if request failed
|
1365
|
+
#
|
1366
|
+
# @return [Google::Apis::StorageV1::ManagedFolder]
|
1367
|
+
#
|
1368
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1369
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1370
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1371
|
+
def get_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)
|
1372
|
+
command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}', options)
|
1373
|
+
command.response_representation = Google::Apis::StorageV1::ManagedFolder::Representation
|
1374
|
+
command.response_class = Google::Apis::StorageV1::ManagedFolder
|
1375
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1376
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1377
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1378
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
1379
|
+
command.query['fields'] = fields unless fields.nil?
|
1380
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1381
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1382
|
+
execute_or_queue_command(command, &block)
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
# Returns an IAM policy for the specified managed folder.
|
1386
|
+
# @param [String] bucket
|
1387
|
+
# Name of the bucket containing the managed folder.
|
1388
|
+
# @param [String] managed_folder
|
1389
|
+
# The managed folder name/path.
|
1390
|
+
# @param [Fixnum] options_requested_policy_version
|
1391
|
+
# The IAM policy format version to be returned. If the
|
1392
|
+
# optionsRequestedPolicyVersion is for an older version that doesn't support
|
1393
|
+
# part of the requested IAM policy, the request fails.
|
1394
|
+
# @param [String] user_project
|
1395
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1396
|
+
# @param [String] fields
|
1397
|
+
# Selector specifying which fields to include in a partial response.
|
1398
|
+
# @param [String] quota_user
|
1399
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1400
|
+
# characters.
|
1401
|
+
# @param [String] user_ip
|
1402
|
+
# Deprecated. Please use quotaUser instead.
|
1403
|
+
# @param [Google::Apis::RequestOptions] options
|
1404
|
+
# Request-specific options
|
1405
|
+
#
|
1406
|
+
# @yield [result, err] Result & error if block supplied
|
1407
|
+
# @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object
|
1408
|
+
# @yieldparam err [StandardError] error object if request failed
|
1409
|
+
#
|
1410
|
+
# @return [Google::Apis::StorageV1::Policy]
|
1411
|
+
#
|
1412
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1413
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1414
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1415
|
+
def get_managed_folder_iam_policy(bucket, managed_folder, options_requested_policy_version: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1416
|
+
command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}/iam', options)
|
1417
|
+
command.response_representation = Google::Apis::StorageV1::Policy::Representation
|
1418
|
+
command.response_class = Google::Apis::StorageV1::Policy
|
1419
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1420
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1421
|
+
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
|
1422
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1423
|
+
command.query['fields'] = fields unless fields.nil?
|
1424
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1425
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1426
|
+
execute_or_queue_command(command, &block)
|
1427
|
+
end
|
1428
|
+
|
1429
|
+
# Creates a new managed folder.
|
1430
|
+
# @param [String] bucket
|
1431
|
+
# Name of the bucket containing the managed folder.
|
1432
|
+
# @param [Google::Apis::StorageV1::ManagedFolder] managed_folder_object
|
1433
|
+
# @param [String] fields
|
1434
|
+
# Selector specifying which fields to include in a partial response.
|
1435
|
+
# @param [String] quota_user
|
1436
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1437
|
+
# characters.
|
1438
|
+
# @param [String] user_ip
|
1439
|
+
# Deprecated. Please use quotaUser instead.
|
1440
|
+
# @param [Google::Apis::RequestOptions] options
|
1441
|
+
# Request-specific options
|
1442
|
+
#
|
1443
|
+
# @yield [result, err] Result & error if block supplied
|
1444
|
+
# @yieldparam result [Google::Apis::StorageV1::ManagedFolder] parsed result object
|
886
1445
|
# @yieldparam err [StandardError] error object if request failed
|
887
1446
|
#
|
888
|
-
# @return [Google::Apis::StorageV1::
|
1447
|
+
# @return [Google::Apis::StorageV1::ManagedFolder]
|
889
1448
|
#
|
890
1449
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
891
1450
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
892
1451
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
893
|
-
def
|
894
|
-
command = make_simple_command(:post, 'b/{bucket}/
|
895
|
-
command.request_representation = Google::Apis::StorageV1::
|
896
|
-
command.request_object =
|
897
|
-
command.response_representation = Google::Apis::StorageV1::
|
898
|
-
command.response_class = Google::Apis::StorageV1::
|
1452
|
+
def insert_managed_folder(bucket, managed_folder_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1453
|
+
command = make_simple_command(:post, 'b/{bucket}/managedFolders', options)
|
1454
|
+
command.request_representation = Google::Apis::StorageV1::ManagedFolder::Representation
|
1455
|
+
command.request_object = managed_folder_object
|
1456
|
+
command.response_representation = Google::Apis::StorageV1::ManagedFolder::Representation
|
1457
|
+
command.response_class = Google::Apis::StorageV1::ManagedFolder
|
899
1458
|
command.params['bucket'] = bucket unless bucket.nil?
|
900
|
-
command.query['userProject'] = user_project unless user_project.nil?
|
901
1459
|
command.query['fields'] = fields unless fields.nil?
|
902
1460
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
903
1461
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
904
1462
|
execute_or_queue_command(command, &block)
|
905
1463
|
end
|
906
1464
|
|
907
|
-
#
|
1465
|
+
# Lists managed folders in the given bucket.
|
908
1466
|
# @param [String] bucket
|
909
|
-
# Name of
|
910
|
-
# @param [Fixnum]
|
911
|
-
#
|
912
|
-
#
|
913
|
-
#
|
914
|
-
#
|
915
|
-
#
|
916
|
-
#
|
917
|
-
# The project to be billed for this request. Required for Requester Pays buckets.
|
1467
|
+
# Name of the bucket containing the managed folder.
|
1468
|
+
# @param [Fixnum] page_size
|
1469
|
+
# Maximum number of items return in a single page of responses.
|
1470
|
+
# @param [String] page_token
|
1471
|
+
# A previously-returned page token representing part of the larger set of
|
1472
|
+
# results to view.
|
1473
|
+
# @param [String] prefix
|
1474
|
+
# The managed folder name/path prefix to filter the output list of results.
|
918
1475
|
# @param [String] fields
|
919
1476
|
# Selector specifying which fields to include in a partial response.
|
920
1477
|
# @param [String] quota_user
|
@@ -926,35 +1483,34 @@ module Google
|
|
926
1483
|
# Request-specific options
|
927
1484
|
#
|
928
1485
|
# @yield [result, err] Result & error if block supplied
|
929
|
-
# @yieldparam result [Google::Apis::StorageV1::
|
1486
|
+
# @yieldparam result [Google::Apis::StorageV1::ManagedFolders] parsed result object
|
930
1487
|
# @yieldparam err [StandardError] error object if request failed
|
931
1488
|
#
|
932
|
-
# @return [Google::Apis::StorageV1::
|
1489
|
+
# @return [Google::Apis::StorageV1::ManagedFolders]
|
933
1490
|
#
|
934
1491
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
935
1492
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
936
1493
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
937
|
-
def
|
938
|
-
command = make_simple_command(:get, 'b/{bucket}/
|
939
|
-
command.response_representation = Google::Apis::StorageV1::
|
940
|
-
command.response_class = Google::Apis::StorageV1::
|
1494
|
+
def list_managed_folders(bucket, page_size: nil, page_token: nil, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1495
|
+
command = make_simple_command(:get, 'b/{bucket}/managedFolders', options)
|
1496
|
+
command.response_representation = Google::Apis::StorageV1::ManagedFolders::Representation
|
1497
|
+
command.response_class = Google::Apis::StorageV1::ManagedFolders
|
941
1498
|
command.params['bucket'] = bucket unless bucket.nil?
|
942
|
-
command.query['
|
943
|
-
command.query['
|
944
|
-
command.query['
|
1499
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1500
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1501
|
+
command.query['prefix'] = prefix unless prefix.nil?
|
945
1502
|
command.query['fields'] = fields unless fields.nil?
|
946
1503
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
947
1504
|
command.query['userIp'] = user_ip unless user_ip.nil?
|
948
1505
|
execute_or_queue_command(command, &block)
|
949
1506
|
end
|
950
1507
|
|
951
|
-
#
|
1508
|
+
# Updates an IAM policy for the specified managed folder.
|
952
1509
|
# @param [String] bucket
|
953
|
-
# Name of
|
954
|
-
# @param [String]
|
955
|
-
# The
|
956
|
-
#
|
957
|
-
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
1510
|
+
# Name of the bucket containing the managed folder.
|
1511
|
+
# @param [String] managed_folder
|
1512
|
+
# The managed folder name/path.
|
1513
|
+
# @param [Google::Apis::StorageV1::Policy] policy_object
|
958
1514
|
# @param [String] user_project
|
959
1515
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
960
1516
|
# @param [String] fields
|
@@ -968,22 +1524,22 @@ module Google
|
|
968
1524
|
# Request-specific options
|
969
1525
|
#
|
970
1526
|
# @yield [result, err] Result & error if block supplied
|
971
|
-
# @yieldparam result [Google::Apis::StorageV1::
|
1527
|
+
# @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object
|
972
1528
|
# @yieldparam err [StandardError] error object if request failed
|
973
1529
|
#
|
974
|
-
# @return [Google::Apis::StorageV1::
|
1530
|
+
# @return [Google::Apis::StorageV1::Policy]
|
975
1531
|
#
|
976
1532
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
977
1533
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
978
1534
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
979
|
-
def
|
980
|
-
command = make_simple_command(:
|
981
|
-
command.request_representation = Google::Apis::StorageV1::
|
982
|
-
command.request_object =
|
983
|
-
command.response_representation = Google::Apis::StorageV1::
|
984
|
-
command.response_class = Google::Apis::StorageV1::
|
1535
|
+
def set_managed_folder_iam_policy(bucket, managed_folder, policy_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1536
|
+
command = make_simple_command(:put, 'b/{bucket}/managedFolders/{managedFolder}/iam', options)
|
1537
|
+
command.request_representation = Google::Apis::StorageV1::Policy::Representation
|
1538
|
+
command.request_object = policy_object
|
1539
|
+
command.response_representation = Google::Apis::StorageV1::Policy::Representation
|
1540
|
+
command.response_class = Google::Apis::StorageV1::Policy
|
985
1541
|
command.params['bucket'] = bucket unless bucket.nil?
|
986
|
-
command.params['
|
1542
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
987
1543
|
command.query['userProject'] = user_project unless user_project.nil?
|
988
1544
|
command.query['fields'] = fields unless fields.nil?
|
989
1545
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -991,13 +1547,14 @@ module Google
|
|
991
1547
|
execute_or_queue_command(command, &block)
|
992
1548
|
end
|
993
1549
|
|
994
|
-
#
|
1550
|
+
# Tests a set of permissions on the given managed folder to see which, if any,
|
1551
|
+
# are held by the caller.
|
995
1552
|
# @param [String] bucket
|
996
|
-
# Name of
|
997
|
-
# @param [String]
|
998
|
-
# The
|
999
|
-
#
|
1000
|
-
#
|
1553
|
+
# Name of the bucket containing the managed folder.
|
1554
|
+
# @param [String] managed_folder
|
1555
|
+
# The managed folder name/path.
|
1556
|
+
# @param [Array<String>, String] permissions
|
1557
|
+
# Permissions to test.
|
1001
1558
|
# @param [String] user_project
|
1002
1559
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
1003
1560
|
# @param [String] fields
|
@@ -1011,22 +1568,21 @@ module Google
|
|
1011
1568
|
# Request-specific options
|
1012
1569
|
#
|
1013
1570
|
# @yield [result, err] Result & error if block supplied
|
1014
|
-
# @yieldparam result [Google::Apis::StorageV1::
|
1571
|
+
# @yieldparam result [Google::Apis::StorageV1::TestIamPermissionsResponse] parsed result object
|
1015
1572
|
# @yieldparam err [StandardError] error object if request failed
|
1016
1573
|
#
|
1017
|
-
# @return [Google::Apis::StorageV1::
|
1574
|
+
# @return [Google::Apis::StorageV1::TestIamPermissionsResponse]
|
1018
1575
|
#
|
1019
1576
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1020
1577
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1021
1578
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1022
|
-
def
|
1023
|
-
command = make_simple_command(:
|
1024
|
-
command.
|
1025
|
-
command.
|
1026
|
-
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
1027
|
-
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
1579
|
+
def test_managed_folder_iam_permissions(bucket, managed_folder, permissions, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1580
|
+
command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions', options)
|
1581
|
+
command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation
|
1582
|
+
command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse
|
1028
1583
|
command.params['bucket'] = bucket unless bucket.nil?
|
1029
|
-
command.params['
|
1584
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1585
|
+
command.query['permissions'] = permissions unless permissions.nil?
|
1030
1586
|
command.query['userProject'] = user_project unless user_project.nil?
|
1031
1587
|
command.query['fields'] = fields unless fields.nil?
|
1032
1588
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -1191,7 +1747,8 @@ module Google
|
|
1191
1747
|
# Name of a bucket.
|
1192
1748
|
# @param [String] object
|
1193
1749
|
# Name of the object. For information about how to URL encode object names to be
|
1194
|
-
# path safe, see Encoding URI Path Parts.
|
1750
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1751
|
+
# request-endpoints#encoding).
|
1195
1752
|
# @param [String] entity
|
1196
1753
|
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1197
1754
|
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
@@ -1237,7 +1794,8 @@ module Google
|
|
1237
1794
|
# Name of a bucket.
|
1238
1795
|
# @param [String] object
|
1239
1796
|
# Name of the object. For information about how to URL encode object names to be
|
1240
|
-
# path safe, see Encoding URI Path Parts.
|
1797
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1798
|
+
# request-endpoints#encoding).
|
1241
1799
|
# @param [String] entity
|
1242
1800
|
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1243
1801
|
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
@@ -1285,7 +1843,8 @@ module Google
|
|
1285
1843
|
# Name of a bucket.
|
1286
1844
|
# @param [String] object
|
1287
1845
|
# Name of the object. For information about how to URL encode object names to be
|
1288
|
-
# path safe, see Encoding URI Path Parts.
|
1846
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1847
|
+
# request-endpoints#encoding).
|
1289
1848
|
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
1290
1849
|
# @param [Fixnum] generation
|
1291
1850
|
# If present, selects a specific revision of this object (as opposed to the
|
@@ -1332,7 +1891,8 @@ module Google
|
|
1332
1891
|
# Name of a bucket.
|
1333
1892
|
# @param [String] object
|
1334
1893
|
# Name of the object. For information about how to URL encode object names to be
|
1335
|
-
# path safe, see Encoding URI Path Parts.
|
1894
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1895
|
+
# request-endpoints#encoding).
|
1336
1896
|
# @param [Fixnum] generation
|
1337
1897
|
# If present, selects a specific revision of this object (as opposed to the
|
1338
1898
|
# latest version, the default).
|
@@ -1376,7 +1936,8 @@ module Google
|
|
1376
1936
|
# Name of a bucket.
|
1377
1937
|
# @param [String] object
|
1378
1938
|
# Name of the object. For information about how to URL encode object names to be
|
1379
|
-
# path safe, see Encoding URI Path Parts.
|
1939
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1940
|
+
# request-endpoints#encoding).
|
1380
1941
|
# @param [String] entity
|
1381
1942
|
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1382
1943
|
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
@@ -1427,7 +1988,8 @@ module Google
|
|
1427
1988
|
# Name of a bucket.
|
1428
1989
|
# @param [String] object
|
1429
1990
|
# Name of the object. For information about how to URL encode object names to be
|
1430
|
-
# path safe, see Encoding URI Path Parts.
|
1991
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1992
|
+
# request-endpoints#encoding).
|
1431
1993
|
# @param [String] entity
|
1432
1994
|
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1433
1995
|
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
@@ -1473,13 +2035,50 @@ module Google
|
|
1473
2035
|
execute_or_queue_command(command, &block)
|
1474
2036
|
end
|
1475
2037
|
|
2038
|
+
# Initiates a long-running bulk restore operation on the specified bucket.
|
2039
|
+
# @param [String] bucket
|
2040
|
+
# Name of the bucket in which the object resides.
|
2041
|
+
# @param [Google::Apis::StorageV1::BulkRestoreObjectsRequest] bulk_restore_objects_request_object
|
2042
|
+
# @param [String] fields
|
2043
|
+
# Selector specifying which fields to include in a partial response.
|
2044
|
+
# @param [String] quota_user
|
2045
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2046
|
+
# characters.
|
2047
|
+
# @param [String] user_ip
|
2048
|
+
# Deprecated. Please use quotaUser instead.
|
2049
|
+
# @param [Google::Apis::RequestOptions] options
|
2050
|
+
# Request-specific options
|
2051
|
+
#
|
2052
|
+
# @yield [result, err] Result & error if block supplied
|
2053
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
2054
|
+
# @yieldparam err [StandardError] error object if request failed
|
2055
|
+
#
|
2056
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
2057
|
+
#
|
2058
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2059
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2060
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2061
|
+
def bulk_restore_objects(bucket, bulk_restore_objects_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2062
|
+
command = make_simple_command(:post, 'b/{bucket}/o/bulkRestore', options)
|
2063
|
+
command.request_representation = Google::Apis::StorageV1::BulkRestoreObjectsRequest::Representation
|
2064
|
+
command.request_object = bulk_restore_objects_request_object
|
2065
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
2066
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
2067
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
2068
|
+
command.query['fields'] = fields unless fields.nil?
|
2069
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2070
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2071
|
+
execute_or_queue_command(command, &block)
|
2072
|
+
end
|
2073
|
+
|
1476
2074
|
# Concatenates a list of existing objects into a new object in the same bucket.
|
1477
2075
|
# @param [String] destination_bucket
|
1478
2076
|
# Name of the bucket containing the source objects. The destination object is
|
1479
2077
|
# stored in this bucket.
|
1480
2078
|
# @param [String] destination_object
|
1481
2079
|
# Name of the new object. For information about how to URL encode object names
|
1482
|
-
# to be path safe, see Encoding URI Path Parts.
|
2080
|
+
# to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
|
2081
|
+
# storage/docs/request-endpoints#encoding).
|
1483
2082
|
# @param [Google::Apis::StorageV1::ComposeRequest] compose_request_object
|
1484
2083
|
# @param [String] destination_predefined_acl
|
1485
2084
|
# Apply a predefined set of access controls to the destination object.
|
@@ -1539,11 +2138,13 @@ module Google
|
|
1539
2138
|
# Name of the bucket in which to find the source object.
|
1540
2139
|
# @param [String] source_object
|
1541
2140
|
# Name of the source object. For information about how to URL encode object
|
1542
|
-
# names to be path safe, see Encoding URI Path Parts.
|
2141
|
+
# names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
|
2142
|
+
# storage/docs/request-endpoints#encoding).
|
1543
2143
|
# @param [String] destination_bucket
|
1544
2144
|
# Name of the bucket in which to store the new object. Overrides the provided
|
1545
2145
|
# object metadata's bucket value, if any.For information about how to URL encode
|
1546
|
-
# object names to be path safe, see Encoding URI Path Parts.
|
2146
|
+
# object names to be path safe, see [Encoding URI Path Parts](https://cloud.
|
2147
|
+
# google.com/storage/docs/request-endpoints#encoding).
|
1547
2148
|
# @param [String] destination_object
|
1548
2149
|
# Name of the new object. Required when the object metadata is not otherwise
|
1549
2150
|
# provided. Overrides the object metadata's name value, if any.
|
@@ -1643,7 +2244,8 @@ module Google
|
|
1643
2244
|
# Name of the bucket in which the object resides.
|
1644
2245
|
# @param [String] object
|
1645
2246
|
# Name of the object. For information about how to URL encode object names to be
|
1646
|
-
# path safe, see Encoding URI Path Parts.
|
2247
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2248
|
+
# request-endpoints#encoding).
|
1647
2249
|
# @param [Fixnum] generation
|
1648
2250
|
# If present, permanently deletes a specific revision of this object (as opposed
|
1649
2251
|
# to the latest version, the default).
|
@@ -1704,7 +2306,8 @@ module Google
|
|
1704
2306
|
# Name of the bucket in which the object resides.
|
1705
2307
|
# @param [String] object
|
1706
2308
|
# Name of the object. For information about how to URL encode object names to be
|
1707
|
-
# path safe, see Encoding URI Path Parts.
|
2309
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2310
|
+
# request-endpoints#encoding).
|
1708
2311
|
# @param [Fixnum] generation
|
1709
2312
|
# If present, selects a specific revision of this object (as opposed to the
|
1710
2313
|
# latest version, the default).
|
@@ -1725,6 +2328,9 @@ module Google
|
|
1725
2328
|
# does not match the given value.
|
1726
2329
|
# @param [String] projection
|
1727
2330
|
# Set of properties to return. Defaults to noAcl.
|
2331
|
+
# @param [Boolean] soft_deleted
|
2332
|
+
# If true, only soft-deleted object versions will be listed. The default is
|
2333
|
+
# false. For more information, see Soft Delete.
|
1728
2334
|
# @param [String] user_project
|
1729
2335
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
1730
2336
|
# @param [String] fields
|
@@ -1748,7 +2354,7 @@ module Google
|
|
1748
2354
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1749
2355
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1750
2356
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1751
|
-
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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
2357
|
+
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)
|
1752
2358
|
|
1753
2359
|
if download_dest.nil?
|
1754
2360
|
command = make_simple_command(:get, 'b/{bucket}/o/{object}', options)
|
@@ -1766,6 +2372,7 @@ module Google
|
|
1766
2372
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1767
2373
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
1768
2374
|
command.query['projection'] = projection unless projection.nil?
|
2375
|
+
command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
|
1769
2376
|
command.query['userProject'] = user_project unless user_project.nil?
|
1770
2377
|
command.query['fields'] = fields unless fields.nil?
|
1771
2378
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -1778,7 +2385,8 @@ module Google
|
|
1778
2385
|
# Name of the bucket in which the object resides.
|
1779
2386
|
# @param [String] object
|
1780
2387
|
# Name of the object. For information about how to URL encode object names to be
|
1781
|
-
# path safe, see Encoding URI Path Parts.
|
2388
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2389
|
+
# request-endpoints#encoding).
|
1782
2390
|
# @param [Fixnum] generation
|
1783
2391
|
# If present, selects a specific revision of this object (as opposed to the
|
1784
2392
|
# latest version, the default).
|
@@ -1849,8 +2457,8 @@ module Google
|
|
1849
2457
|
# @param [String] name
|
1850
2458
|
# Name of the object. Required when the object metadata is not otherwise
|
1851
2459
|
# provided. Overrides the object metadata's name value, if any. For information
|
1852
|
-
# about how to URL encode object names to be path safe, see Encoding URI Path
|
1853
|
-
# Parts.
|
2460
|
+
# about how to URL encode object names to be path safe, see [Encoding URI Path
|
2461
|
+
# Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
1854
2462
|
# @param [String] predefined_acl
|
1855
2463
|
# Apply a predefined set of access controls to this object.
|
1856
2464
|
# @param [String] projection
|
@@ -1924,9 +2532,14 @@ module Google
|
|
1924
2532
|
# Filter results to objects whose names are lexicographically before endOffset.
|
1925
2533
|
# If startOffset is also set, the objects listed will have names between
|
1926
2534
|
# startOffset (inclusive) and endOffset (exclusive).
|
2535
|
+
# @param [Boolean] include_folders_as_prefixes
|
2536
|
+
# Only applicable if delimiter is set to '/'. If true, will also include folders
|
2537
|
+
# and managed folders (besides objects) in the returned prefixes.
|
1927
2538
|
# @param [Boolean] include_trailing_delimiter
|
1928
2539
|
# If true, objects that end in exactly one instance of delimiter will have their
|
1929
2540
|
# metadata included in items in addition to prefixes.
|
2541
|
+
# @param [String] match_glob
|
2542
|
+
# Filter results to objects and prefixes that match this glob pattern.
|
1930
2543
|
# @param [Fixnum] max_results
|
1931
2544
|
# Maximum number of items plus prefixes to return in a single page of responses.
|
1932
2545
|
# As duplicate prefixes are omitted, fewer total results may be returned than
|
@@ -1939,6 +2552,9 @@ module Google
|
|
1939
2552
|
# Filter results to objects whose names begin with this prefix.
|
1940
2553
|
# @param [String] projection
|
1941
2554
|
# Set of properties to return. Defaults to noAcl.
|
2555
|
+
# @param [Boolean] soft_deleted
|
2556
|
+
# If true, only soft-deleted object versions will be listed. The default is
|
2557
|
+
# false. For more information, see Soft Delete.
|
1942
2558
|
# @param [String] start_offset
|
1943
2559
|
# Filter results to objects whose names are lexicographically equal to or after
|
1944
2560
|
# startOffset. If endOffset is also set, the objects listed will have names
|
@@ -1967,18 +2583,21 @@ module Google
|
|
1967
2583
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1968
2584
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1969
2585
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1970
|
-
def list_objects(bucket, delimiter: nil, end_offset: nil, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, start_offset: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2586
|
+
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)
|
1971
2587
|
command = make_simple_command(:get, 'b/{bucket}/o', options)
|
1972
2588
|
command.response_representation = Google::Apis::StorageV1::Objects::Representation
|
1973
2589
|
command.response_class = Google::Apis::StorageV1::Objects
|
1974
2590
|
command.params['bucket'] = bucket unless bucket.nil?
|
1975
2591
|
command.query['delimiter'] = delimiter unless delimiter.nil?
|
1976
2592
|
command.query['endOffset'] = end_offset unless end_offset.nil?
|
2593
|
+
command.query['includeFoldersAsPrefixes'] = include_folders_as_prefixes unless include_folders_as_prefixes.nil?
|
1977
2594
|
command.query['includeTrailingDelimiter'] = include_trailing_delimiter unless include_trailing_delimiter.nil?
|
2595
|
+
command.query['matchGlob'] = match_glob unless match_glob.nil?
|
1978
2596
|
command.query['maxResults'] = max_results unless max_results.nil?
|
1979
2597
|
command.query['pageToken'] = page_token unless page_token.nil?
|
1980
2598
|
command.query['prefix'] = prefix unless prefix.nil?
|
1981
2599
|
command.query['projection'] = projection unless projection.nil?
|
2600
|
+
command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
|
1982
2601
|
command.query['startOffset'] = start_offset unless start_offset.nil?
|
1983
2602
|
command.query['userProject'] = user_project unless user_project.nil?
|
1984
2603
|
command.query['versions'] = versions unless versions.nil?
|
@@ -1993,7 +2612,8 @@ module Google
|
|
1993
2612
|
# Name of the bucket in which the object resides.
|
1994
2613
|
# @param [String] object
|
1995
2614
|
# Name of the object. For information about how to URL encode object names to be
|
1996
|
-
# path safe, see Encoding URI Path Parts.
|
2615
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2616
|
+
# request-endpoints#encoding).
|
1997
2617
|
# @param [Google::Apis::StorageV1::Object] object_object
|
1998
2618
|
# @param [Fixnum] generation
|
1999
2619
|
# If present, selects a specific revision of this object (as opposed to the
|
@@ -2013,6 +2633,9 @@ module Google
|
|
2013
2633
|
# @param [Fixnum] if_metageneration_not_match
|
2014
2634
|
# Makes the operation conditional on whether the object's current metageneration
|
2015
2635
|
# does not match the given value.
|
2636
|
+
# @param [Boolean] override_unlocked_retention
|
2637
|
+
# Must be true to remove the retention configuration, reduce its unlocked
|
2638
|
+
# retention period, or change its mode from unlocked to locked.
|
2016
2639
|
# @param [String] predefined_acl
|
2017
2640
|
# Apply a predefined set of access controls to this object.
|
2018
2641
|
# @param [String] projection
|
@@ -2038,7 +2661,7 @@ module Google
|
|
2038
2661
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2039
2662
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2040
2663
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2041
|
-
def patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2664
|
+
def patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, override_unlocked_retention: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2042
2665
|
command = make_simple_command(:patch, 'b/{bucket}/o/{object}', options)
|
2043
2666
|
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
2044
2667
|
command.request_object = object_object
|
@@ -2051,6 +2674,7 @@ module Google
|
|
2051
2674
|
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
2052
2675
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
2053
2676
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
2677
|
+
command.query['overrideUnlockedRetention'] = override_unlocked_retention unless override_unlocked_retention.nil?
|
2054
2678
|
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
2055
2679
|
command.query['projection'] = projection unless projection.nil?
|
2056
2680
|
command.query['userProject'] = user_project unless user_project.nil?
|
@@ -2060,21 +2684,92 @@ module Google
|
|
2060
2684
|
execute_or_queue_command(command, &block)
|
2061
2685
|
end
|
2062
2686
|
|
2687
|
+
# Restores a soft-deleted object.
|
2688
|
+
# @param [String] bucket
|
2689
|
+
# Name of the bucket in which the object resides.
|
2690
|
+
# @param [String] object
|
2691
|
+
# Name of the object. For information about how to URL encode object names to be
|
2692
|
+
# path safe, see Encoding URI Path Parts.
|
2693
|
+
# @param [Google::Apis::StorageV1::Object] object_object
|
2694
|
+
# @param [Boolean] copy_source_acl
|
2695
|
+
# If true, copies the source object's ACL; otherwise, uses the bucket's default
|
2696
|
+
# object ACL. The default is false.
|
2697
|
+
# @param [Fixnum] if_generation_match
|
2698
|
+
# Makes the operation conditional on whether the object's one live generation
|
2699
|
+
# matches the given value. Setting to 0 makes the operation succeed only if
|
2700
|
+
# there are no live versions of the object.
|
2701
|
+
# @param [Fixnum] if_generation_not_match
|
2702
|
+
# Makes the operation conditional on whether none of the object's live
|
2703
|
+
# generations match the given value. If no live object exists, the precondition
|
2704
|
+
# fails. Setting to 0 makes the operation succeed only if there is a live
|
2705
|
+
# version of the object.
|
2706
|
+
# @param [Fixnum] if_metageneration_match
|
2707
|
+
# Makes the operation conditional on whether the object's one live
|
2708
|
+
# metageneration matches the given value.
|
2709
|
+
# @param [Fixnum] if_metageneration_not_match
|
2710
|
+
# Makes the operation conditional on whether none of the object's live
|
2711
|
+
# metagenerations match the given value.
|
2712
|
+
# @param [String] projection
|
2713
|
+
# Set of properties to return. Defaults to full.
|
2714
|
+
# @param [String] user_project
|
2715
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
2716
|
+
# @param [String] fields
|
2717
|
+
# Selector specifying which fields to include in a partial response.
|
2718
|
+
# @param [String] quota_user
|
2719
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2720
|
+
# characters.
|
2721
|
+
# @param [String] user_ip
|
2722
|
+
# Deprecated. Please use quotaUser instead.
|
2723
|
+
# @param [Google::Apis::RequestOptions] options
|
2724
|
+
# Request-specific options
|
2725
|
+
#
|
2726
|
+
# @yield [result, err] Result & error if block supplied
|
2727
|
+
# @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
|
2728
|
+
# @yieldparam err [StandardError] error object if request failed
|
2729
|
+
#
|
2730
|
+
# @return [Google::Apis::StorageV1::Object]
|
2731
|
+
#
|
2732
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2733
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2734
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2735
|
+
def restore_object(bucket, object, object_object = nil, copy_source_acl: nil, if_generation_match: nil, if_generation_not_match: nil, 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)
|
2736
|
+
command = make_simple_command(:post, 'b/{bucket}/o/{object}/restore', options)
|
2737
|
+
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
2738
|
+
command.request_object = object_object
|
2739
|
+
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
2740
|
+
command.response_class = Google::Apis::StorageV1::Object
|
2741
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
2742
|
+
command.params['object'] = object unless object.nil?
|
2743
|
+
command.query['copySourceAcl'] = copy_source_acl unless copy_source_acl.nil?
|
2744
|
+
command.query['generation'] = generation unless generation.nil?
|
2745
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
2746
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
2747
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
2748
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
2749
|
+
command.query['projection'] = projection unless projection.nil?
|
2750
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
2751
|
+
command.query['fields'] = fields unless fields.nil?
|
2752
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2753
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2754
|
+
execute_or_queue_command(command, &block)
|
2755
|
+
end
|
2756
|
+
|
2063
2757
|
# Rewrites a source object to a destination object. Optionally overrides
|
2064
2758
|
# metadata.
|
2065
2759
|
# @param [String] source_bucket
|
2066
2760
|
# Name of the bucket in which to find the source object.
|
2067
2761
|
# @param [String] source_object
|
2068
2762
|
# Name of the source object. For information about how to URL encode object
|
2069
|
-
# names to be path safe, see Encoding URI Path Parts.
|
2763
|
+
# names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
|
2764
|
+
# storage/docs/request-endpoints#encoding).
|
2070
2765
|
# @param [String] destination_bucket
|
2071
2766
|
# Name of the bucket in which to store the new object. Overrides the provided
|
2072
2767
|
# object metadata's bucket value, if any.
|
2073
2768
|
# @param [String] destination_object
|
2074
2769
|
# Name of the new object. Required when the object metadata is not otherwise
|
2075
2770
|
# provided. Overrides the object metadata's name value, if any. For information
|
2076
|
-
# about how to URL encode object names to be path safe, see Encoding URI Path
|
2077
|
-
# Parts.
|
2771
|
+
# about how to URL encode object names to be path safe, see [Encoding URI Path
|
2772
|
+
# Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
2078
2773
|
# @param [Google::Apis::StorageV1::Object] object_object
|
2079
2774
|
# @param [String] destination_kms_key_name
|
2080
2775
|
# Resource name of the Cloud KMS key, of the form projects/my-project/locations/
|
@@ -2185,7 +2880,8 @@ module Google
|
|
2185
2880
|
# Name of the bucket in which the object resides.
|
2186
2881
|
# @param [String] object
|
2187
2882
|
# Name of the object. For information about how to URL encode object names to be
|
2188
|
-
# path safe, see Encoding URI Path Parts.
|
2883
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2884
|
+
# request-endpoints#encoding).
|
2189
2885
|
# @param [Google::Apis::StorageV1::Policy] policy_object
|
2190
2886
|
# @param [Fixnum] generation
|
2191
2887
|
# If present, selects a specific revision of this object (as opposed to the
|
@@ -2233,7 +2929,8 @@ module Google
|
|
2233
2929
|
# Name of the bucket in which the object resides.
|
2234
2930
|
# @param [String] object
|
2235
2931
|
# Name of the object. For information about how to URL encode object names to be
|
2236
|
-
# path safe, see Encoding URI Path Parts.
|
2932
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2933
|
+
# request-endpoints#encoding).
|
2237
2934
|
# @param [Array<String>, String] permissions
|
2238
2935
|
# Permissions to test.
|
2239
2936
|
# @param [Fixnum] generation
|
@@ -2280,7 +2977,8 @@ module Google
|
|
2280
2977
|
# Name of the bucket in which the object resides.
|
2281
2978
|
# @param [String] object
|
2282
2979
|
# Name of the object. For information about how to URL encode object names to be
|
2283
|
-
# path safe, see Encoding URI Path Parts.
|
2980
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2981
|
+
# request-endpoints#encoding).
|
2284
2982
|
# @param [Google::Apis::StorageV1::Object] object_object
|
2285
2983
|
# @param [Fixnum] generation
|
2286
2984
|
# If present, selects a specific revision of this object (as opposed to the
|
@@ -2300,6 +2998,9 @@ module Google
|
|
2300
2998
|
# @param [Fixnum] if_metageneration_not_match
|
2301
2999
|
# Makes the operation conditional on whether the object's current metageneration
|
2302
3000
|
# does not match the given value.
|
3001
|
+
# @param [Boolean] override_unlocked_retention
|
3002
|
+
# Must be true to remove the retention configuration, reduce its unlocked
|
3003
|
+
# retention period, or change its mode from unlocked to locked.
|
2303
3004
|
# @param [String] predefined_acl
|
2304
3005
|
# Apply a predefined set of access controls to this object.
|
2305
3006
|
# @param [String] projection
|
@@ -2325,7 +3026,7 @@ module Google
|
|
2325
3026
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2326
3027
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2327
3028
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2328
|
-
def update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
3029
|
+
def update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, override_unlocked_retention: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2329
3030
|
command = make_simple_command(:put, 'b/{bucket}/o/{object}', options)
|
2330
3031
|
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
2331
3032
|
command.request_object = object_object
|
@@ -2338,6 +3039,7 @@ module Google
|
|
2338
3039
|
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
2339
3040
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
2340
3041
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
3042
|
+
command.query['overrideUnlockedRetention'] = override_unlocked_retention unless override_unlocked_retention.nil?
|
2341
3043
|
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
2342
3044
|
command.query['projection'] = projection unless projection.nil?
|
2343
3045
|
command.query['userProject'] = user_project unless user_project.nil?
|
@@ -2427,6 +3129,123 @@ module Google
|
|
2427
3129
|
execute_or_queue_command(command, &block)
|
2428
3130
|
end
|
2429
3131
|
|
3132
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
3133
|
+
# a best effort to cancel the operation, but success is not guaranteed.
|
3134
|
+
# @param [String] bucket
|
3135
|
+
# The parent bucket of the operation resource.
|
3136
|
+
# @param [String] operation_id
|
3137
|
+
# The ID of the operation resource.
|
3138
|
+
# @param [String] fields
|
3139
|
+
# Selector specifying which fields to include in a partial response.
|
3140
|
+
# @param [String] quota_user
|
3141
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
3142
|
+
# characters.
|
3143
|
+
# @param [String] user_ip
|
3144
|
+
# Deprecated. Please use quotaUser instead.
|
3145
|
+
# @param [Google::Apis::RequestOptions] options
|
3146
|
+
# Request-specific options
|
3147
|
+
#
|
3148
|
+
# @yield [result, err] Result & error if block supplied
|
3149
|
+
# @yieldparam result [NilClass] No result returned for this method
|
3150
|
+
# @yieldparam err [StandardError] error object if request failed
|
3151
|
+
#
|
3152
|
+
# @return [void]
|
3153
|
+
#
|
3154
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3155
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3156
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3157
|
+
def cancel_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
3158
|
+
command = make_simple_command(:post, 'b/{bucket}/operations/{operationId}/cancel', options)
|
3159
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
3160
|
+
command.params['operationId'] = operation_id unless operation_id.nil?
|
3161
|
+
command.query['fields'] = fields unless fields.nil?
|
3162
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3163
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
3164
|
+
execute_or_queue_command(command, &block)
|
3165
|
+
end
|
3166
|
+
|
3167
|
+
# Gets the latest state of a long-running operation.
|
3168
|
+
# @param [String] bucket
|
3169
|
+
# The parent bucket of the operation resource.
|
3170
|
+
# @param [String] operation_id
|
3171
|
+
# The ID of the operation resource.
|
3172
|
+
# @param [String] fields
|
3173
|
+
# Selector specifying which fields to include in a partial response.
|
3174
|
+
# @param [String] quota_user
|
3175
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
3176
|
+
# characters.
|
3177
|
+
# @param [String] user_ip
|
3178
|
+
# Deprecated. Please use quotaUser instead.
|
3179
|
+
# @param [Google::Apis::RequestOptions] options
|
3180
|
+
# Request-specific options
|
3181
|
+
#
|
3182
|
+
# @yield [result, err] Result & error if block supplied
|
3183
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
3184
|
+
# @yieldparam err [StandardError] error object if request failed
|
3185
|
+
#
|
3186
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
3187
|
+
#
|
3188
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3189
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3190
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3191
|
+
def get_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
3192
|
+
command = make_simple_command(:get, 'b/{bucket}/operations/{operationId}', options)
|
3193
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
3194
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
3195
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
3196
|
+
command.params['operationId'] = operation_id unless operation_id.nil?
|
3197
|
+
command.query['fields'] = fields unless fields.nil?
|
3198
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3199
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
3200
|
+
execute_or_queue_command(command, &block)
|
3201
|
+
end
|
3202
|
+
|
3203
|
+
# Lists operations that match the specified filter in the request.
|
3204
|
+
# @param [String] bucket
|
3205
|
+
# Name of the bucket in which to look for operations.
|
3206
|
+
# @param [String] filter
|
3207
|
+
# A filter to narrow down results to a preferred subset. The filtering language
|
3208
|
+
# is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
3209
|
+
# @param [Fixnum] page_size
|
3210
|
+
# Maximum number of items to return in a single page of responses. Fewer total
|
3211
|
+
# results may be returned than requested. The service uses this parameter or 100
|
3212
|
+
# items, whichever is smaller.
|
3213
|
+
# @param [String] page_token
|
3214
|
+
# A previously-returned page token representing part of the larger set of
|
3215
|
+
# results to view.
|
3216
|
+
# @param [String] fields
|
3217
|
+
# Selector specifying which fields to include in a partial response.
|
3218
|
+
# @param [String] quota_user
|
3219
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
3220
|
+
# characters.
|
3221
|
+
# @param [String] user_ip
|
3222
|
+
# Deprecated. Please use quotaUser instead.
|
3223
|
+
# @param [Google::Apis::RequestOptions] options
|
3224
|
+
# Request-specific options
|
3225
|
+
#
|
3226
|
+
# @yield [result, err] Result & error if block supplied
|
3227
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse] parsed result object
|
3228
|
+
# @yieldparam err [StandardError] error object if request failed
|
3229
|
+
#
|
3230
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse]
|
3231
|
+
#
|
3232
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
3233
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
3234
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
3235
|
+
def list_bucket_operations(bucket, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
3236
|
+
command = make_simple_command(:get, 'b/{bucket}/operations', options)
|
3237
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse::Representation
|
3238
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse
|
3239
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
3240
|
+
command.query['filter'] = filter unless filter.nil?
|
3241
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
3242
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
3243
|
+
command.query['fields'] = fields unless fields.nil?
|
3244
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
3245
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
3246
|
+
execute_or_queue_command(command, &block)
|
3247
|
+
end
|
3248
|
+
|
2430
3249
|
# Creates a new HMAC key for the specified service account.
|
2431
3250
|
# @param [String] project_id
|
2432
3251
|
# Project ID owning the service account.
|