google-apis-storage_v1 0.19.0 → 0.29.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 +41 -0
- data/lib/google/apis/storage_v1/classes.rb +412 -11
- data/lib/google/apis/storage_v1/gem_version.rb +3 -3
- data/lib/google/apis/storage_v1/representations.rb +161 -0
- data/lib/google/apis/storage_v1/service.rb +586 -26
- metadata +6 -6
@@ -426,6 +426,8 @@ module Google
|
|
426
426
|
# @param [String] project
|
427
427
|
# A valid API project identifier.
|
428
428
|
# @param [Google::Apis::StorageV1::Bucket] bucket_object
|
429
|
+
# @param [Boolean] enable_object_retention
|
430
|
+
# When set to true, object retention is enabled for this bucket.
|
429
431
|
# @param [String] predefined_acl
|
430
432
|
# Apply a predefined set of access controls to this bucket.
|
431
433
|
# @param [String] predefined_default_object_acl
|
@@ -454,12 +456,13 @@ module Google
|
|
454
456
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
455
457
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
456
458
|
# @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)
|
459
|
+
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
460
|
command = make_simple_command(:post, 'b', options)
|
459
461
|
command.request_representation = Google::Apis::StorageV1::Bucket::Representation
|
460
462
|
command.request_object = bucket_object
|
461
463
|
command.response_representation = Google::Apis::StorageV1::Bucket::Representation
|
462
464
|
command.response_class = Google::Apis::StorageV1::Bucket
|
465
|
+
command.query['enableObjectRetention'] = enable_object_retention unless enable_object_retention.nil?
|
463
466
|
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
464
467
|
command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
|
465
468
|
command.query['project'] = project unless project.nil?
|
@@ -1034,6 +1037,300 @@ module Google
|
|
1034
1037
|
execute_or_queue_command(command, &block)
|
1035
1038
|
end
|
1036
1039
|
|
1040
|
+
# Permanently deletes a managed folder.
|
1041
|
+
# @param [String] bucket
|
1042
|
+
# Name of the bucket containing the managed folder.
|
1043
|
+
# @param [String] managed_folder
|
1044
|
+
# The managed folder name/path.
|
1045
|
+
# @param [Fixnum] if_metageneration_match
|
1046
|
+
# If set, only deletes the managed folder if its metageneration matches this
|
1047
|
+
# value.
|
1048
|
+
# @param [Fixnum] if_metageneration_not_match
|
1049
|
+
# If set, only deletes the managed folder if its metageneration does not match
|
1050
|
+
# this value.
|
1051
|
+
# @param [String] fields
|
1052
|
+
# Selector specifying which fields to include in a partial response.
|
1053
|
+
# @param [String] quota_user
|
1054
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1055
|
+
# characters.
|
1056
|
+
# @param [String] user_ip
|
1057
|
+
# Deprecated. Please use quotaUser instead.
|
1058
|
+
# @param [Google::Apis::RequestOptions] options
|
1059
|
+
# Request-specific options
|
1060
|
+
#
|
1061
|
+
# @yield [result, err] Result & error if block supplied
|
1062
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1063
|
+
# @yieldparam err [StandardError] error object if request failed
|
1064
|
+
#
|
1065
|
+
# @return [void]
|
1066
|
+
#
|
1067
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1068
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1069
|
+
# @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)
|
1071
|
+
command = make_simple_command(:delete, 'b/{bucket}/managedFolders/{managedFolder}', options)
|
1072
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1073
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1074
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1075
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
1076
|
+
command.query['fields'] = fields unless fields.nil?
|
1077
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1078
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1079
|
+
execute_or_queue_command(command, &block)
|
1080
|
+
end
|
1081
|
+
|
1082
|
+
# Returns metadata of the specified managed folder.
|
1083
|
+
# @param [String] bucket
|
1084
|
+
# Name of the bucket containing the managed folder.
|
1085
|
+
# @param [String] managed_folder
|
1086
|
+
# The managed folder name/path.
|
1087
|
+
# @param [Fixnum] if_metageneration_match
|
1088
|
+
# Makes the return of the managed folder metadata conditional on whether the
|
1089
|
+
# managed folder's current metageneration matches the given value.
|
1090
|
+
# @param [Fixnum] if_metageneration_not_match
|
1091
|
+
# Makes the return of the managed folder metadata conditional on whether the
|
1092
|
+
# managed folder's current metageneration does not match the given value.
|
1093
|
+
# @param [String] fields
|
1094
|
+
# Selector specifying which fields to include in a partial response.
|
1095
|
+
# @param [String] quota_user
|
1096
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1097
|
+
# characters.
|
1098
|
+
# @param [String] user_ip
|
1099
|
+
# Deprecated. Please use quotaUser instead.
|
1100
|
+
# @param [Google::Apis::RequestOptions] options
|
1101
|
+
# Request-specific options
|
1102
|
+
#
|
1103
|
+
# @yield [result, err] Result & error if block supplied
|
1104
|
+
# @yieldparam result [Google::Apis::StorageV1::ManagedFolder] parsed result object
|
1105
|
+
# @yieldparam err [StandardError] error object if request failed
|
1106
|
+
#
|
1107
|
+
# @return [Google::Apis::StorageV1::ManagedFolder]
|
1108
|
+
#
|
1109
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1110
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1111
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1112
|
+
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)
|
1113
|
+
command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}', options)
|
1114
|
+
command.response_representation = Google::Apis::StorageV1::ManagedFolder::Representation
|
1115
|
+
command.response_class = Google::Apis::StorageV1::ManagedFolder
|
1116
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1117
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1118
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1119
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
1120
|
+
command.query['fields'] = fields unless fields.nil?
|
1121
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1122
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1123
|
+
execute_or_queue_command(command, &block)
|
1124
|
+
end
|
1125
|
+
|
1126
|
+
# Returns an IAM policy for the specified managed folder.
|
1127
|
+
# @param [String] bucket
|
1128
|
+
# Name of the bucket containing the managed folder.
|
1129
|
+
# @param [String] managed_folder
|
1130
|
+
# The managed folder name/path.
|
1131
|
+
# @param [Fixnum] options_requested_policy_version
|
1132
|
+
# The IAM policy format version to be returned. If the
|
1133
|
+
# optionsRequestedPolicyVersion is for an older version that doesn't support
|
1134
|
+
# part of the requested IAM policy, the request fails.
|
1135
|
+
# @param [String] user_project
|
1136
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1137
|
+
# @param [String] fields
|
1138
|
+
# Selector specifying which fields to include in a partial response.
|
1139
|
+
# @param [String] quota_user
|
1140
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1141
|
+
# characters.
|
1142
|
+
# @param [String] user_ip
|
1143
|
+
# Deprecated. Please use quotaUser instead.
|
1144
|
+
# @param [Google::Apis::RequestOptions] options
|
1145
|
+
# Request-specific options
|
1146
|
+
#
|
1147
|
+
# @yield [result, err] Result & error if block supplied
|
1148
|
+
# @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object
|
1149
|
+
# @yieldparam err [StandardError] error object if request failed
|
1150
|
+
#
|
1151
|
+
# @return [Google::Apis::StorageV1::Policy]
|
1152
|
+
#
|
1153
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1154
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1155
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1156
|
+
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)
|
1157
|
+
command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}/iam', options)
|
1158
|
+
command.response_representation = Google::Apis::StorageV1::Policy::Representation
|
1159
|
+
command.response_class = Google::Apis::StorageV1::Policy
|
1160
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1161
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1162
|
+
command.query['optionsRequestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
|
1163
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1164
|
+
command.query['fields'] = fields unless fields.nil?
|
1165
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1166
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1167
|
+
execute_or_queue_command(command, &block)
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
# Creates a new managed folder.
|
1171
|
+
# @param [String] bucket
|
1172
|
+
# Name of the bucket containing the managed folder.
|
1173
|
+
# @param [Google::Apis::StorageV1::ManagedFolder] managed_folder_object
|
1174
|
+
# @param [String] fields
|
1175
|
+
# Selector specifying which fields to include in a partial response.
|
1176
|
+
# @param [String] quota_user
|
1177
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1178
|
+
# characters.
|
1179
|
+
# @param [String] user_ip
|
1180
|
+
# Deprecated. Please use quotaUser instead.
|
1181
|
+
# @param [Google::Apis::RequestOptions] options
|
1182
|
+
# Request-specific options
|
1183
|
+
#
|
1184
|
+
# @yield [result, err] Result & error if block supplied
|
1185
|
+
# @yieldparam result [Google::Apis::StorageV1::ManagedFolder] parsed result object
|
1186
|
+
# @yieldparam err [StandardError] error object if request failed
|
1187
|
+
#
|
1188
|
+
# @return [Google::Apis::StorageV1::ManagedFolder]
|
1189
|
+
#
|
1190
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1191
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1192
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1193
|
+
def insert_managed_folder(bucket, managed_folder_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1194
|
+
command = make_simple_command(:post, 'b/{bucket}/managedFolders', options)
|
1195
|
+
command.request_representation = Google::Apis::StorageV1::ManagedFolder::Representation
|
1196
|
+
command.request_object = managed_folder_object
|
1197
|
+
command.response_representation = Google::Apis::StorageV1::ManagedFolder::Representation
|
1198
|
+
command.response_class = Google::Apis::StorageV1::ManagedFolder
|
1199
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1200
|
+
command.query['fields'] = fields unless fields.nil?
|
1201
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1202
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1203
|
+
execute_or_queue_command(command, &block)
|
1204
|
+
end
|
1205
|
+
|
1206
|
+
# Lists managed folders in the given bucket.
|
1207
|
+
# @param [String] bucket
|
1208
|
+
# Name of the bucket containing the managed folder.
|
1209
|
+
# @param [Fixnum] page_size
|
1210
|
+
# Maximum number of items return in a single page of responses.
|
1211
|
+
# @param [String] page_token
|
1212
|
+
# A previously-returned page token representing part of the larger set of
|
1213
|
+
# results to view.
|
1214
|
+
# @param [String] prefix
|
1215
|
+
# The managed folder name/path prefix to filter the output list of results.
|
1216
|
+
# @param [String] fields
|
1217
|
+
# Selector specifying which fields to include in a partial response.
|
1218
|
+
# @param [String] quota_user
|
1219
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1220
|
+
# characters.
|
1221
|
+
# @param [String] user_ip
|
1222
|
+
# Deprecated. Please use quotaUser instead.
|
1223
|
+
# @param [Google::Apis::RequestOptions] options
|
1224
|
+
# Request-specific options
|
1225
|
+
#
|
1226
|
+
# @yield [result, err] Result & error if block supplied
|
1227
|
+
# @yieldparam result [Google::Apis::StorageV1::ManagedFolders] parsed result object
|
1228
|
+
# @yieldparam err [StandardError] error object if request failed
|
1229
|
+
#
|
1230
|
+
# @return [Google::Apis::StorageV1::ManagedFolders]
|
1231
|
+
#
|
1232
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1233
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1234
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1235
|
+
def list_managed_folders(bucket, page_size: nil, page_token: nil, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1236
|
+
command = make_simple_command(:get, 'b/{bucket}/managedFolders', options)
|
1237
|
+
command.response_representation = Google::Apis::StorageV1::ManagedFolders::Representation
|
1238
|
+
command.response_class = Google::Apis::StorageV1::ManagedFolders
|
1239
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1240
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
1241
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1242
|
+
command.query['prefix'] = prefix unless prefix.nil?
|
1243
|
+
command.query['fields'] = fields unless fields.nil?
|
1244
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1245
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1246
|
+
execute_or_queue_command(command, &block)
|
1247
|
+
end
|
1248
|
+
|
1249
|
+
# Updates an IAM policy for the specified managed folder.
|
1250
|
+
# @param [String] bucket
|
1251
|
+
# Name of the bucket containing the managed folder.
|
1252
|
+
# @param [String] managed_folder
|
1253
|
+
# The managed folder name/path.
|
1254
|
+
# @param [Google::Apis::StorageV1::Policy] policy_object
|
1255
|
+
# @param [String] user_project
|
1256
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1257
|
+
# @param [String] fields
|
1258
|
+
# Selector specifying which fields to include in a partial response.
|
1259
|
+
# @param [String] quota_user
|
1260
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1261
|
+
# characters.
|
1262
|
+
# @param [String] user_ip
|
1263
|
+
# Deprecated. Please use quotaUser instead.
|
1264
|
+
# @param [Google::Apis::RequestOptions] options
|
1265
|
+
# Request-specific options
|
1266
|
+
#
|
1267
|
+
# @yield [result, err] Result & error if block supplied
|
1268
|
+
# @yieldparam result [Google::Apis::StorageV1::Policy] parsed result object
|
1269
|
+
# @yieldparam err [StandardError] error object if request failed
|
1270
|
+
#
|
1271
|
+
# @return [Google::Apis::StorageV1::Policy]
|
1272
|
+
#
|
1273
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1274
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1275
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1276
|
+
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)
|
1277
|
+
command = make_simple_command(:put, 'b/{bucket}/managedFolders/{managedFolder}/iam', options)
|
1278
|
+
command.request_representation = Google::Apis::StorageV1::Policy::Representation
|
1279
|
+
command.request_object = policy_object
|
1280
|
+
command.response_representation = Google::Apis::StorageV1::Policy::Representation
|
1281
|
+
command.response_class = Google::Apis::StorageV1::Policy
|
1282
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1283
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1284
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1285
|
+
command.query['fields'] = fields unless fields.nil?
|
1286
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1287
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1288
|
+
execute_or_queue_command(command, &block)
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
# Tests a set of permissions on the given managed folder to see which, if any,
|
1292
|
+
# are held by the caller.
|
1293
|
+
# @param [String] bucket
|
1294
|
+
# Name of the bucket containing the managed folder.
|
1295
|
+
# @param [String] managed_folder
|
1296
|
+
# The managed folder name/path.
|
1297
|
+
# @param [Array<String>, String] permissions
|
1298
|
+
# Permissions to test.
|
1299
|
+
# @param [String] user_project
|
1300
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
1301
|
+
# @param [String] fields
|
1302
|
+
# Selector specifying which fields to include in a partial response.
|
1303
|
+
# @param [String] quota_user
|
1304
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1305
|
+
# characters.
|
1306
|
+
# @param [String] user_ip
|
1307
|
+
# Deprecated. Please use quotaUser instead.
|
1308
|
+
# @param [Google::Apis::RequestOptions] options
|
1309
|
+
# Request-specific options
|
1310
|
+
#
|
1311
|
+
# @yield [result, err] Result & error if block supplied
|
1312
|
+
# @yieldparam result [Google::Apis::StorageV1::TestIamPermissionsResponse] parsed result object
|
1313
|
+
# @yieldparam err [StandardError] error object if request failed
|
1314
|
+
#
|
1315
|
+
# @return [Google::Apis::StorageV1::TestIamPermissionsResponse]
|
1316
|
+
#
|
1317
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1318
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1319
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1320
|
+
def test_managed_folder_iam_permissions(bucket, managed_folder, permissions, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1321
|
+
command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions', options)
|
1322
|
+
command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation
|
1323
|
+
command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse
|
1324
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1325
|
+
command.params['managedFolder'] = managed_folder unless managed_folder.nil?
|
1326
|
+
command.query['permissions'] = permissions unless permissions.nil?
|
1327
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
1328
|
+
command.query['fields'] = fields unless fields.nil?
|
1329
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1330
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1331
|
+
execute_or_queue_command(command, &block)
|
1332
|
+
end
|
1333
|
+
|
1037
1334
|
# Permanently deletes a notification subscription.
|
1038
1335
|
# @param [String] bucket
|
1039
1336
|
# The parent bucket of the notification.
|
@@ -1191,7 +1488,8 @@ module Google
|
|
1191
1488
|
# Name of a bucket.
|
1192
1489
|
# @param [String] object
|
1193
1490
|
# Name of the object. For information about how to URL encode object names to be
|
1194
|
-
# path safe, see Encoding URI Path Parts.
|
1491
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1492
|
+
# request-endpoints#encoding).
|
1195
1493
|
# @param [String] entity
|
1196
1494
|
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1197
1495
|
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
@@ -1237,7 +1535,8 @@ module Google
|
|
1237
1535
|
# Name of a bucket.
|
1238
1536
|
# @param [String] object
|
1239
1537
|
# Name of the object. For information about how to URL encode object names to be
|
1240
|
-
# path safe, see Encoding URI Path Parts.
|
1538
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1539
|
+
# request-endpoints#encoding).
|
1241
1540
|
# @param [String] entity
|
1242
1541
|
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1243
1542
|
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
@@ -1285,7 +1584,8 @@ module Google
|
|
1285
1584
|
# Name of a bucket.
|
1286
1585
|
# @param [String] object
|
1287
1586
|
# Name of the object. For information about how to URL encode object names to be
|
1288
|
-
# path safe, see Encoding URI Path Parts.
|
1587
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1588
|
+
# request-endpoints#encoding).
|
1289
1589
|
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
1290
1590
|
# @param [Fixnum] generation
|
1291
1591
|
# If present, selects a specific revision of this object (as opposed to the
|
@@ -1332,7 +1632,8 @@ module Google
|
|
1332
1632
|
# Name of a bucket.
|
1333
1633
|
# @param [String] object
|
1334
1634
|
# Name of the object. For information about how to URL encode object names to be
|
1335
|
-
# path safe, see Encoding URI Path Parts.
|
1635
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1636
|
+
# request-endpoints#encoding).
|
1336
1637
|
# @param [Fixnum] generation
|
1337
1638
|
# If present, selects a specific revision of this object (as opposed to the
|
1338
1639
|
# latest version, the default).
|
@@ -1376,7 +1677,8 @@ module Google
|
|
1376
1677
|
# Name of a bucket.
|
1377
1678
|
# @param [String] object
|
1378
1679
|
# Name of the object. For information about how to URL encode object names to be
|
1379
|
-
# path safe, see Encoding URI Path Parts.
|
1680
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1681
|
+
# request-endpoints#encoding).
|
1380
1682
|
# @param [String] entity
|
1381
1683
|
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1382
1684
|
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
@@ -1427,7 +1729,8 @@ module Google
|
|
1427
1729
|
# Name of a bucket.
|
1428
1730
|
# @param [String] object
|
1429
1731
|
# Name of the object. For information about how to URL encode object names to be
|
1430
|
-
# path safe, see Encoding URI Path Parts.
|
1732
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1733
|
+
# request-endpoints#encoding).
|
1431
1734
|
# @param [String] entity
|
1432
1735
|
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
1433
1736
|
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
@@ -1473,13 +1776,50 @@ module Google
|
|
1473
1776
|
execute_or_queue_command(command, &block)
|
1474
1777
|
end
|
1475
1778
|
|
1779
|
+
# Initiates a long-running bulk restore operation on the specified bucket.
|
1780
|
+
# @param [String] bucket
|
1781
|
+
# Name of the bucket in which the object resides.
|
1782
|
+
# @param [Google::Apis::StorageV1::BulkRestoreObjectsRequest] bulk_restore_objects_request_object
|
1783
|
+
# @param [String] fields
|
1784
|
+
# Selector specifying which fields to include in a partial response.
|
1785
|
+
# @param [String] quota_user
|
1786
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
1787
|
+
# characters.
|
1788
|
+
# @param [String] user_ip
|
1789
|
+
# Deprecated. Please use quotaUser instead.
|
1790
|
+
# @param [Google::Apis::RequestOptions] options
|
1791
|
+
# Request-specific options
|
1792
|
+
#
|
1793
|
+
# @yield [result, err] Result & error if block supplied
|
1794
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
1795
|
+
# @yieldparam err [StandardError] error object if request failed
|
1796
|
+
#
|
1797
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
1798
|
+
#
|
1799
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1800
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1801
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1802
|
+
def bulk_restore_objects(bucket, bulk_restore_objects_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1803
|
+
command = make_simple_command(:post, 'b/{bucket}/o/bulkRestore', options)
|
1804
|
+
command.request_representation = Google::Apis::StorageV1::BulkRestoreObjectsRequest::Representation
|
1805
|
+
command.request_object = bulk_restore_objects_request_object
|
1806
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
1807
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
1808
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
1809
|
+
command.query['fields'] = fields unless fields.nil?
|
1810
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1811
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1812
|
+
execute_or_queue_command(command, &block)
|
1813
|
+
end
|
1814
|
+
|
1476
1815
|
# Concatenates a list of existing objects into a new object in the same bucket.
|
1477
1816
|
# @param [String] destination_bucket
|
1478
1817
|
# Name of the bucket containing the source objects. The destination object is
|
1479
1818
|
# stored in this bucket.
|
1480
1819
|
# @param [String] destination_object
|
1481
1820
|
# Name of the new object. For information about how to URL encode object names
|
1482
|
-
# to be path safe, see Encoding URI Path Parts.
|
1821
|
+
# to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
|
1822
|
+
# storage/docs/request-endpoints#encoding).
|
1483
1823
|
# @param [Google::Apis::StorageV1::ComposeRequest] compose_request_object
|
1484
1824
|
# @param [String] destination_predefined_acl
|
1485
1825
|
# Apply a predefined set of access controls to the destination object.
|
@@ -1539,11 +1879,13 @@ module Google
|
|
1539
1879
|
# Name of the bucket in which to find the source object.
|
1540
1880
|
# @param [String] source_object
|
1541
1881
|
# Name of the source object. For information about how to URL encode object
|
1542
|
-
# names to be path safe, see Encoding URI Path Parts.
|
1882
|
+
# names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
|
1883
|
+
# storage/docs/request-endpoints#encoding).
|
1543
1884
|
# @param [String] destination_bucket
|
1544
1885
|
# Name of the bucket in which to store the new object. Overrides the provided
|
1545
1886
|
# 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.
|
1887
|
+
# object names to be path safe, see [Encoding URI Path Parts](https://cloud.
|
1888
|
+
# google.com/storage/docs/request-endpoints#encoding).
|
1547
1889
|
# @param [String] destination_object
|
1548
1890
|
# Name of the new object. Required when the object metadata is not otherwise
|
1549
1891
|
# provided. Overrides the object metadata's name value, if any.
|
@@ -1643,7 +1985,8 @@ module Google
|
|
1643
1985
|
# Name of the bucket in which the object resides.
|
1644
1986
|
# @param [String] object
|
1645
1987
|
# Name of the object. For information about how to URL encode object names to be
|
1646
|
-
# path safe, see Encoding URI Path Parts.
|
1988
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
1989
|
+
# request-endpoints#encoding).
|
1647
1990
|
# @param [Fixnum] generation
|
1648
1991
|
# If present, permanently deletes a specific revision of this object (as opposed
|
1649
1992
|
# to the latest version, the default).
|
@@ -1704,7 +2047,8 @@ module Google
|
|
1704
2047
|
# Name of the bucket in which the object resides.
|
1705
2048
|
# @param [String] object
|
1706
2049
|
# Name of the object. For information about how to URL encode object names to be
|
1707
|
-
# path safe, see Encoding URI Path Parts.
|
2050
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2051
|
+
# request-endpoints#encoding).
|
1708
2052
|
# @param [Fixnum] generation
|
1709
2053
|
# If present, selects a specific revision of this object (as opposed to the
|
1710
2054
|
# latest version, the default).
|
@@ -1725,6 +2069,9 @@ module Google
|
|
1725
2069
|
# does not match the given value.
|
1726
2070
|
# @param [String] projection
|
1727
2071
|
# Set of properties to return. Defaults to noAcl.
|
2072
|
+
# @param [Boolean] soft_deleted
|
2073
|
+
# If true, only soft-deleted object versions will be listed. The default is
|
2074
|
+
# false. For more information, see Soft Delete.
|
1728
2075
|
# @param [String] user_project
|
1729
2076
|
# The project to be billed for this request. Required for Requester Pays buckets.
|
1730
2077
|
# @param [String] fields
|
@@ -1748,7 +2095,7 @@ module Google
|
|
1748
2095
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1749
2096
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1750
2097
|
# @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)
|
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)
|
1752
2099
|
|
1753
2100
|
if download_dest.nil?
|
1754
2101
|
command = make_simple_command(:get, 'b/{bucket}/o/{object}', options)
|
@@ -1766,6 +2113,7 @@ module Google
|
|
1766
2113
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
1767
2114
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
1768
2115
|
command.query['projection'] = projection unless projection.nil?
|
2116
|
+
command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
|
1769
2117
|
command.query['userProject'] = user_project unless user_project.nil?
|
1770
2118
|
command.query['fields'] = fields unless fields.nil?
|
1771
2119
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
@@ -1778,7 +2126,8 @@ module Google
|
|
1778
2126
|
# Name of the bucket in which the object resides.
|
1779
2127
|
# @param [String] object
|
1780
2128
|
# Name of the object. For information about how to URL encode object names to be
|
1781
|
-
# path safe, see Encoding URI Path Parts.
|
2129
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2130
|
+
# request-endpoints#encoding).
|
1782
2131
|
# @param [Fixnum] generation
|
1783
2132
|
# If present, selects a specific revision of this object (as opposed to the
|
1784
2133
|
# latest version, the default).
|
@@ -1849,8 +2198,8 @@ module Google
|
|
1849
2198
|
# @param [String] name
|
1850
2199
|
# Name of the object. Required when the object metadata is not otherwise
|
1851
2200
|
# 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.
|
2201
|
+
# about how to URL encode object names to be path safe, see [Encoding URI Path
|
2202
|
+
# Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
1854
2203
|
# @param [String] predefined_acl
|
1855
2204
|
# Apply a predefined set of access controls to this object.
|
1856
2205
|
# @param [String] projection
|
@@ -1924,9 +2273,14 @@ module Google
|
|
1924
2273
|
# Filter results to objects whose names are lexicographically before endOffset.
|
1925
2274
|
# If startOffset is also set, the objects listed will have names between
|
1926
2275
|
# startOffset (inclusive) and endOffset (exclusive).
|
2276
|
+
# @param [Boolean] include_folders_as_prefixes
|
2277
|
+
# Only applicable if delimiter is set to '/'. If true, will also include folders
|
2278
|
+
# and managed folders (besides objects) in the returned prefixes.
|
1927
2279
|
# @param [Boolean] include_trailing_delimiter
|
1928
2280
|
# If true, objects that end in exactly one instance of delimiter will have their
|
1929
2281
|
# metadata included in items in addition to prefixes.
|
2282
|
+
# @param [String] match_glob
|
2283
|
+
# Filter results to objects and prefixes that match this glob pattern.
|
1930
2284
|
# @param [Fixnum] max_results
|
1931
2285
|
# Maximum number of items plus prefixes to return in a single page of responses.
|
1932
2286
|
# As duplicate prefixes are omitted, fewer total results may be returned than
|
@@ -1939,6 +2293,9 @@ module Google
|
|
1939
2293
|
# Filter results to objects whose names begin with this prefix.
|
1940
2294
|
# @param [String] projection
|
1941
2295
|
# Set of properties to return. Defaults to noAcl.
|
2296
|
+
# @param [Boolean] soft_deleted
|
2297
|
+
# If true, only soft-deleted object versions will be listed. The default is
|
2298
|
+
# false. For more information, see Soft Delete.
|
1942
2299
|
# @param [String] start_offset
|
1943
2300
|
# Filter results to objects whose names are lexicographically equal to or after
|
1944
2301
|
# startOffset. If endOffset is also set, the objects listed will have names
|
@@ -1967,18 +2324,21 @@ module Google
|
|
1967
2324
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1968
2325
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1969
2326
|
# @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)
|
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)
|
1971
2328
|
command = make_simple_command(:get, 'b/{bucket}/o', options)
|
1972
2329
|
command.response_representation = Google::Apis::StorageV1::Objects::Representation
|
1973
2330
|
command.response_class = Google::Apis::StorageV1::Objects
|
1974
2331
|
command.params['bucket'] = bucket unless bucket.nil?
|
1975
2332
|
command.query['delimiter'] = delimiter unless delimiter.nil?
|
1976
2333
|
command.query['endOffset'] = end_offset unless end_offset.nil?
|
2334
|
+
command.query['includeFoldersAsPrefixes'] = include_folders_as_prefixes unless include_folders_as_prefixes.nil?
|
1977
2335
|
command.query['includeTrailingDelimiter'] = include_trailing_delimiter unless include_trailing_delimiter.nil?
|
2336
|
+
command.query['matchGlob'] = match_glob unless match_glob.nil?
|
1978
2337
|
command.query['maxResults'] = max_results unless max_results.nil?
|
1979
2338
|
command.query['pageToken'] = page_token unless page_token.nil?
|
1980
2339
|
command.query['prefix'] = prefix unless prefix.nil?
|
1981
2340
|
command.query['projection'] = projection unless projection.nil?
|
2341
|
+
command.query['softDeleted'] = soft_deleted unless soft_deleted.nil?
|
1982
2342
|
command.query['startOffset'] = start_offset unless start_offset.nil?
|
1983
2343
|
command.query['userProject'] = user_project unless user_project.nil?
|
1984
2344
|
command.query['versions'] = versions unless versions.nil?
|
@@ -1993,7 +2353,8 @@ module Google
|
|
1993
2353
|
# Name of the bucket in which the object resides.
|
1994
2354
|
# @param [String] object
|
1995
2355
|
# Name of the object. For information about how to URL encode object names to be
|
1996
|
-
# path safe, see Encoding URI Path Parts.
|
2356
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2357
|
+
# request-endpoints#encoding).
|
1997
2358
|
# @param [Google::Apis::StorageV1::Object] object_object
|
1998
2359
|
# @param [Fixnum] generation
|
1999
2360
|
# If present, selects a specific revision of this object (as opposed to the
|
@@ -2013,6 +2374,9 @@ module Google
|
|
2013
2374
|
# @param [Fixnum] if_metageneration_not_match
|
2014
2375
|
# Makes the operation conditional on whether the object's current metageneration
|
2015
2376
|
# does not match the given value.
|
2377
|
+
# @param [Boolean] override_unlocked_retention
|
2378
|
+
# Must be true to remove the retention configuration, reduce its unlocked
|
2379
|
+
# retention period, or change its mode from unlocked to locked.
|
2016
2380
|
# @param [String] predefined_acl
|
2017
2381
|
# Apply a predefined set of access controls to this object.
|
2018
2382
|
# @param [String] projection
|
@@ -2038,7 +2402,7 @@ module Google
|
|
2038
2402
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2039
2403
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2040
2404
|
# @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)
|
2405
|
+
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
2406
|
command = make_simple_command(:patch, 'b/{bucket}/o/{object}', options)
|
2043
2407
|
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
2044
2408
|
command.request_object = object_object
|
@@ -2051,6 +2415,7 @@ module Google
|
|
2051
2415
|
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
2052
2416
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
2053
2417
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
2418
|
+
command.query['overrideUnlockedRetention'] = override_unlocked_retention unless override_unlocked_retention.nil?
|
2054
2419
|
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
2055
2420
|
command.query['projection'] = projection unless projection.nil?
|
2056
2421
|
command.query['userProject'] = user_project unless user_project.nil?
|
@@ -2060,21 +2425,92 @@ module Google
|
|
2060
2425
|
execute_or_queue_command(command, &block)
|
2061
2426
|
end
|
2062
2427
|
|
2428
|
+
# Restores a soft-deleted object.
|
2429
|
+
# @param [String] bucket
|
2430
|
+
# Name of the bucket in which the object resides.
|
2431
|
+
# @param [String] object
|
2432
|
+
# Name of the object. For information about how to URL encode object names to be
|
2433
|
+
# path safe, see Encoding URI Path Parts.
|
2434
|
+
# @param [Google::Apis::StorageV1::Object] object_object
|
2435
|
+
# @param [Boolean] copy_source_acl
|
2436
|
+
# If true, copies the source object's ACL; otherwise, uses the bucket's default
|
2437
|
+
# object ACL. The default is false.
|
2438
|
+
# @param [Fixnum] if_generation_match
|
2439
|
+
# Makes the operation conditional on whether the object's one live generation
|
2440
|
+
# matches the given value. Setting to 0 makes the operation succeed only if
|
2441
|
+
# there are no live versions of the object.
|
2442
|
+
# @param [Fixnum] if_generation_not_match
|
2443
|
+
# Makes the operation conditional on whether none of the object's live
|
2444
|
+
# generations match the given value. If no live object exists, the precondition
|
2445
|
+
# fails. Setting to 0 makes the operation succeed only if there is a live
|
2446
|
+
# version of the object.
|
2447
|
+
# @param [Fixnum] if_metageneration_match
|
2448
|
+
# Makes the operation conditional on whether the object's one live
|
2449
|
+
# metageneration matches the given value.
|
2450
|
+
# @param [Fixnum] if_metageneration_not_match
|
2451
|
+
# Makes the operation conditional on whether none of the object's live
|
2452
|
+
# metagenerations match the given value.
|
2453
|
+
# @param [String] projection
|
2454
|
+
# Set of properties to return. Defaults to full.
|
2455
|
+
# @param [String] user_project
|
2456
|
+
# The project to be billed for this request. Required for Requester Pays buckets.
|
2457
|
+
# @param [String] fields
|
2458
|
+
# Selector specifying which fields to include in a partial response.
|
2459
|
+
# @param [String] quota_user
|
2460
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2461
|
+
# characters.
|
2462
|
+
# @param [String] user_ip
|
2463
|
+
# Deprecated. Please use quotaUser instead.
|
2464
|
+
# @param [Google::Apis::RequestOptions] options
|
2465
|
+
# Request-specific options
|
2466
|
+
#
|
2467
|
+
# @yield [result, err] Result & error if block supplied
|
2468
|
+
# @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
|
2469
|
+
# @yieldparam err [StandardError] error object if request failed
|
2470
|
+
#
|
2471
|
+
# @return [Google::Apis::StorageV1::Object]
|
2472
|
+
#
|
2473
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2474
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2475
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2476
|
+
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)
|
2477
|
+
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
|
+
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
2481
|
+
command.response_class = Google::Apis::StorageV1::Object
|
2482
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
2483
|
+
command.params['object'] = object unless object.nil?
|
2484
|
+
command.query['copySourceAcl'] = copy_source_acl unless copy_source_acl.nil?
|
2485
|
+
command.query['generation'] = generation unless generation.nil?
|
2486
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
2487
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
2488
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
2489
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
2490
|
+
command.query['projection'] = projection unless projection.nil?
|
2491
|
+
command.query['userProject'] = user_project unless user_project.nil?
|
2492
|
+
command.query['fields'] = fields unless fields.nil?
|
2493
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2494
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2495
|
+
execute_or_queue_command(command, &block)
|
2496
|
+
end
|
2497
|
+
|
2063
2498
|
# Rewrites a source object to a destination object. Optionally overrides
|
2064
2499
|
# metadata.
|
2065
2500
|
# @param [String] source_bucket
|
2066
2501
|
# Name of the bucket in which to find the source object.
|
2067
2502
|
# @param [String] source_object
|
2068
2503
|
# Name of the source object. For information about how to URL encode object
|
2069
|
-
# names to be path safe, see Encoding URI Path Parts.
|
2504
|
+
# names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/
|
2505
|
+
# storage/docs/request-endpoints#encoding).
|
2070
2506
|
# @param [String] destination_bucket
|
2071
2507
|
# Name of the bucket in which to store the new object. Overrides the provided
|
2072
2508
|
# object metadata's bucket value, if any.
|
2073
2509
|
# @param [String] destination_object
|
2074
2510
|
# Name of the new object. Required when the object metadata is not otherwise
|
2075
2511
|
# 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.
|
2512
|
+
# about how to URL encode object names to be path safe, see [Encoding URI Path
|
2513
|
+
# Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).
|
2078
2514
|
# @param [Google::Apis::StorageV1::Object] object_object
|
2079
2515
|
# @param [String] destination_kms_key_name
|
2080
2516
|
# Resource name of the Cloud KMS key, of the form projects/my-project/locations/
|
@@ -2185,7 +2621,8 @@ module Google
|
|
2185
2621
|
# Name of the bucket in which the object resides.
|
2186
2622
|
# @param [String] object
|
2187
2623
|
# Name of the object. For information about how to URL encode object names to be
|
2188
|
-
# path safe, see Encoding URI Path Parts.
|
2624
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2625
|
+
# request-endpoints#encoding).
|
2189
2626
|
# @param [Google::Apis::StorageV1::Policy] policy_object
|
2190
2627
|
# @param [Fixnum] generation
|
2191
2628
|
# If present, selects a specific revision of this object (as opposed to the
|
@@ -2233,7 +2670,8 @@ module Google
|
|
2233
2670
|
# Name of the bucket in which the object resides.
|
2234
2671
|
# @param [String] object
|
2235
2672
|
# Name of the object. For information about how to URL encode object names to be
|
2236
|
-
# path safe, see Encoding URI Path Parts.
|
2673
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2674
|
+
# request-endpoints#encoding).
|
2237
2675
|
# @param [Array<String>, String] permissions
|
2238
2676
|
# Permissions to test.
|
2239
2677
|
# @param [Fixnum] generation
|
@@ -2280,7 +2718,8 @@ module Google
|
|
2280
2718
|
# Name of the bucket in which the object resides.
|
2281
2719
|
# @param [String] object
|
2282
2720
|
# Name of the object. For information about how to URL encode object names to be
|
2283
|
-
# path safe, see Encoding URI Path Parts.
|
2721
|
+
# path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/
|
2722
|
+
# request-endpoints#encoding).
|
2284
2723
|
# @param [Google::Apis::StorageV1::Object] object_object
|
2285
2724
|
# @param [Fixnum] generation
|
2286
2725
|
# If present, selects a specific revision of this object (as opposed to the
|
@@ -2300,6 +2739,9 @@ module Google
|
|
2300
2739
|
# @param [Fixnum] if_metageneration_not_match
|
2301
2740
|
# Makes the operation conditional on whether the object's current metageneration
|
2302
2741
|
# does not match the given value.
|
2742
|
+
# @param [Boolean] override_unlocked_retention
|
2743
|
+
# Must be true to remove the retention configuration, reduce its unlocked
|
2744
|
+
# retention period, or change its mode from unlocked to locked.
|
2303
2745
|
# @param [String] predefined_acl
|
2304
2746
|
# Apply a predefined set of access controls to this object.
|
2305
2747
|
# @param [String] projection
|
@@ -2325,7 +2767,7 @@ module Google
|
|
2325
2767
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2326
2768
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2327
2769
|
# @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)
|
2770
|
+
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
2771
|
command = make_simple_command(:put, 'b/{bucket}/o/{object}', options)
|
2330
2772
|
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
2331
2773
|
command.request_object = object_object
|
@@ -2338,6 +2780,7 @@ module Google
|
|
2338
2780
|
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
2339
2781
|
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
2340
2782
|
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
2783
|
+
command.query['overrideUnlockedRetention'] = override_unlocked_retention unless override_unlocked_retention.nil?
|
2341
2784
|
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
2342
2785
|
command.query['projection'] = projection unless projection.nil?
|
2343
2786
|
command.query['userProject'] = user_project unless user_project.nil?
|
@@ -2427,6 +2870,123 @@ module Google
|
|
2427
2870
|
execute_or_queue_command(command, &block)
|
2428
2871
|
end
|
2429
2872
|
|
2873
|
+
# Starts asynchronous cancellation on a long-running operation. The server makes
|
2874
|
+
# a best effort to cancel the operation, but success is not guaranteed.
|
2875
|
+
# @param [String] bucket
|
2876
|
+
# The parent bucket of the operation resource.
|
2877
|
+
# @param [String] operation_id
|
2878
|
+
# The ID of the operation resource.
|
2879
|
+
# @param [String] fields
|
2880
|
+
# Selector specifying which fields to include in a partial response.
|
2881
|
+
# @param [String] quota_user
|
2882
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2883
|
+
# characters.
|
2884
|
+
# @param [String] user_ip
|
2885
|
+
# Deprecated. Please use quotaUser instead.
|
2886
|
+
# @param [Google::Apis::RequestOptions] options
|
2887
|
+
# Request-specific options
|
2888
|
+
#
|
2889
|
+
# @yield [result, err] Result & error if block supplied
|
2890
|
+
# @yieldparam result [NilClass] No result returned for this method
|
2891
|
+
# @yieldparam err [StandardError] error object if request failed
|
2892
|
+
#
|
2893
|
+
# @return [void]
|
2894
|
+
#
|
2895
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2896
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2897
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2898
|
+
def cancel_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2899
|
+
command = make_simple_command(:post, 'b/{bucket}/operations/{operationId}/cancel', options)
|
2900
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
2901
|
+
command.params['operationId'] = operation_id unless operation_id.nil?
|
2902
|
+
command.query['fields'] = fields unless fields.nil?
|
2903
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2904
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2905
|
+
execute_or_queue_command(command, &block)
|
2906
|
+
end
|
2907
|
+
|
2908
|
+
# Gets the latest state of a long-running operation.
|
2909
|
+
# @param [String] bucket
|
2910
|
+
# The parent bucket of the operation resource.
|
2911
|
+
# @param [String] operation_id
|
2912
|
+
# The ID of the operation resource.
|
2913
|
+
# @param [String] fields
|
2914
|
+
# Selector specifying which fields to include in a partial response.
|
2915
|
+
# @param [String] quota_user
|
2916
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2917
|
+
# characters.
|
2918
|
+
# @param [String] user_ip
|
2919
|
+
# Deprecated. Please use quotaUser instead.
|
2920
|
+
# @param [Google::Apis::RequestOptions] options
|
2921
|
+
# Request-specific options
|
2922
|
+
#
|
2923
|
+
# @yield [result, err] Result & error if block supplied
|
2924
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningOperation] parsed result object
|
2925
|
+
# @yieldparam err [StandardError] error object if request failed
|
2926
|
+
#
|
2927
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningOperation]
|
2928
|
+
#
|
2929
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2930
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2931
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2932
|
+
def get_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2933
|
+
command = make_simple_command(:get, 'b/{bucket}/operations/{operationId}', options)
|
2934
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation
|
2935
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation
|
2936
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
2937
|
+
command.params['operationId'] = operation_id unless operation_id.nil?
|
2938
|
+
command.query['fields'] = fields unless fields.nil?
|
2939
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2940
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2941
|
+
execute_or_queue_command(command, &block)
|
2942
|
+
end
|
2943
|
+
|
2944
|
+
# Lists operations that match the specified filter in the request.
|
2945
|
+
# @param [String] bucket
|
2946
|
+
# Name of the bucket in which to look for operations.
|
2947
|
+
# @param [String] filter
|
2948
|
+
# A filter to narrow down results to a preferred subset. The filtering language
|
2949
|
+
# is documented in more detail in [AIP-160](https://google.aip.dev/160).
|
2950
|
+
# @param [Fixnum] page_size
|
2951
|
+
# Maximum number of items to return in a single page of responses. Fewer total
|
2952
|
+
# results may be returned than requested. The service uses this parameter or 100
|
2953
|
+
# items, whichever is smaller.
|
2954
|
+
# @param [String] page_token
|
2955
|
+
# A previously-returned page token representing part of the larger set of
|
2956
|
+
# results to view.
|
2957
|
+
# @param [String] fields
|
2958
|
+
# Selector specifying which fields to include in a partial response.
|
2959
|
+
# @param [String] quota_user
|
2960
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
2961
|
+
# characters.
|
2962
|
+
# @param [String] user_ip
|
2963
|
+
# Deprecated. Please use quotaUser instead.
|
2964
|
+
# @param [Google::Apis::RequestOptions] options
|
2965
|
+
# Request-specific options
|
2966
|
+
#
|
2967
|
+
# @yield [result, err] Result & error if block supplied
|
2968
|
+
# @yieldparam result [Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse] parsed result object
|
2969
|
+
# @yieldparam err [StandardError] error object if request failed
|
2970
|
+
#
|
2971
|
+
# @return [Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse]
|
2972
|
+
#
|
2973
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2974
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2975
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2976
|
+
def list_bucket_operations(bucket, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2977
|
+
command = make_simple_command(:get, 'b/{bucket}/operations', options)
|
2978
|
+
command.response_representation = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse::Representation
|
2979
|
+
command.response_class = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse
|
2980
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
2981
|
+
command.query['filter'] = filter unless filter.nil?
|
2982
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
2983
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
2984
|
+
command.query['fields'] = fields unless fields.nil?
|
2985
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2986
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2987
|
+
execute_or_queue_command(command, &block)
|
2988
|
+
end
|
2989
|
+
|
2430
2990
|
# Creates a new HMAC key for the specified service account.
|
2431
2991
|
# @param [String] project_id
|
2432
2992
|
# Project ID owning the service account.
|