Class: Google::Apis::StorageV1::StorageService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/storage_v1/service.rb

Overview

Cloud Storage JSON API

Stores and retrieves potentially large, immutable data objects.

Examples:

require 'google/apis/storage_v1'

Storage = Google::Apis::StorageV1 # Alias the module
service = Storage::StorageService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Constructor Details

#initializeStorageService

Returns a new instance of StorageService.



51
52
53
# File 'generated/google/apis/storage_v1/service.rb', line 51

def initialize
  super('https://www.googleapis.com/', 'storage/v1/')
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/storage_v1/service.rb', line 38

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.



44
45
46
# File 'generated/google/apis/storage_v1/service.rb', line 44

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.



49
50
51
# File 'generated/google/apis/storage_v1/service.rb', line 49

def user_ip
  @user_ip
end

Instance Method Details

#compose_object(destination_bucket, destination_object, compose_request_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_metageneration_match: nil, kms_key_name: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object

Concatenates a list of existing objects into a new object in the same bucket.

Parameters:

  • destination_bucket (String)

    Name of the bucket in which to store the new object.

  • destination_object (String)

    Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • compose_request_object (Google::Apis::StorageV1::ComposeRequest) (defaults to: nil)
  • destination_predefined_acl (String) (defaults to: nil)

    Apply a predefined set of access controls to the destination object.

  • if_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current generation matches the given value.

  • if_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration matches the given value.

  • kms_key_name (String) (defaults to: nil)

    Resource name of the Cloud KMS key, of the form projects/my-project/locations/ global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • download_dest (IO, String) (defaults to: nil)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
# File 'generated/google/apis/storage_v1/service.rb', line 1184

def compose_object(destination_bucket, destination_object, compose_request_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_metageneration_match: nil, kms_key_name: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:post, 'b/{destinationBucket}/o/{destinationObject}/compose', options)
  else
    command = make_download_command(:post, 'b/{destinationBucket}/o/{destinationObject}/compose', options)
    command.download_dest = download_dest
  end
  command.request_representation = Google::Apis::StorageV1::ComposeRequest::Representation
  command.request_object = compose_request_object
  command.response_representation = Google::Apis::StorageV1::Object::Representation
  command.response_class = Google::Apis::StorageV1::Object
  command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
  command.params['destinationObject'] = destination_object unless destination_object.nil?
  command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['kmsKeyName'] = kms_key_name unless kms_key_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object

Copies a source object to a destination object. Optionally overrides metadata.

Parameters:

  • source_bucket (String)

    Name of the bucket in which to find the source object.

  • source_object (String)

    Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • destination_bucket (String)

    Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • destination_object (String)

    Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.

  • object_object (Google::Apis::StorageV1::Object) (defaults to: nil)
  • destination_predefined_acl (String) (defaults to: nil)

    Apply a predefined set of access controls to the destination object.

  • if_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the destination object's current generation matches the given value.

  • if_generation_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the destination object's current generation does not match the given value.

  • if_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the destination object's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the destination object's current metageneration does not match the given value.

  • if_source_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the source object's generation matches the given value.

  • if_source_generation_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the source object's generation does not match the given value.

  • if_source_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the source object's current metageneration matches the given value.

  • if_source_metageneration_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the source object's current metageneration does not match the given value.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.

  • source_generation (String) (defaults to: nil)

    If present, selects a specific revision of the source object (as opposed to the latest version, the default).

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • download_dest (IO, String) (defaults to: nil)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
# File 'generated/google/apis/storage_v1/service.rb', line 1276

def copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:post, 'b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}', options)
  else
    command = make_download_command(:post, 'b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}', options)
    command.download_dest = download_dest
  end
  command.request_representation = Google::Apis::StorageV1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1::Object::Representation
  command.response_class = Google::Apis::StorageV1::Object
  command.params['sourceBucket'] = source_bucket unless source_bucket.nil?
  command.params['sourceObject'] = source_object unless source_object.nil?
  command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
  command.params['destinationObject'] = destination_object unless destination_object.nil?
  command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil?
  command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil?
  command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
  command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['sourceGeneration'] = source_generation unless source_generation.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Permanently deletes an empty bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • if_metageneration_match (String) (defaults to: nil)

    If set, only deletes the bucket if its metageneration matches this value.

  • if_metageneration_not_match (String) (defaults to: nil)

    If set, only deletes the bucket if its metageneration does not match this value.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



319
320
321
322
323
324
325
326
327
328
# File 'generated/google/apis/storage_v1/service.rb', line 319

def delete_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'b/{bucket}', options)
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Permanently deletes the ACL entry for the specified entity on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



83
84
85
86
87
88
89
90
91
# File 'generated/google/apis/storage_v1/service.rb', line 83

def delete_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'b/{bucket}/acl/{entity}', options)
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Permanently deletes the default object ACL entry for the specified entity on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



643
644
645
646
647
648
649
650
651
# File 'generated/google/apis/storage_v1/service.rb', line 643

def delete_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'b/{bucket}/defaultObjectAcl/{entity}', options)
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • generation (String) (defaults to: nil)

    If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).

  • if_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current generation matches the given value.

  • if_generation_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current generation does not match the given value.

  • if_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration does not match the given value.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
# File 'generated/google/apis/storage_v1/service.rb', line 1351

def delete_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'b/{bucket}/o/{object}', options)
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Permanently deletes the ACL entry for the specified entity on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • generation (String) (defaults to: nil)

    If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



893
894
895
896
897
898
899
900
901
902
903
# File 'generated/google/apis/storage_v1/service.rb', line 893

def delete_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'b/{bucket}/o/{object}/acl/{entity}', options)
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Bucket

Returns metadata for the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • if_metageneration_match (String) (defaults to: nil)

    Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to noAcl.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'generated/google/apis/storage_v1/service.rb', line 362

def get_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}', options)
  command.response_representation = Google::Apis::StorageV1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1::Bucket
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControl

Returns the ACL entry for the specified entity on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



120
121
122
123
124
125
126
127
128
129
130
# File 'generated/google/apis/storage_v1/service.rb', line 120

def get_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/acl/{entity}', options)
  command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::BucketAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Returns the default object ACL entry for the specified entity on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



681
682
683
684
685
686
687
688
689
690
691
# File 'generated/google/apis/storage_v1/service.rb', line 681

def get_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/defaultObjectAcl/{entity}', options)
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#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, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object

Retrieves an object or its metadata.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • generation (String) (defaults to: nil)

    If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • if_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's generation matches the given value.

  • if_generation_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's generation does not match the given value.

  • if_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration does not match the given value.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to noAcl.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • download_dest (IO, String) (defaults to: nil)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
# File 'generated/google/apis/storage_v1/service.rb', line 1412

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, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:get, 'b/{bucket}/o/{object}', options)
  else
    command = make_download_command(:get, 'b/{bucket}/o/{object}', options)
    command.download_dest = download_dest
  end
  command.response_representation = Google::Apis::StorageV1::Object::Representation
  command.response_class = Google::Apis::StorageV1::Object
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Returns the ACL entry for the specified entity on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • generation (String) (defaults to: nil)

    If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



938
939
940
941
942
943
944
945
946
947
948
949
950
# File 'generated/google/apis/storage_v1/service.rb', line 938

def get_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/o/{object}/acl/{entity}', options)
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_bucket(project, bucket_object = nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Bucket

Creates a new bucket.

Parameters:

  • project (String)

    A valid API project identifier.

  • bucket_object (Google::Apis::StorageV1::Bucket) (defaults to: nil)
  • predefined_acl (String) (defaults to: nil)

    Apply a predefined set of access controls to this bucket.

  • predefined_default_object_acl (String) (defaults to: nil)

    Apply a predefined set of default object access controls to this bucket.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
# File 'generated/google/apis/storage_v1/service.rb', line 408

def insert_bucket(project, bucket_object = nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b', options)
  command.request_representation = Google::Apis::StorageV1::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1::Bucket
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
  command.query['project'] = project unless project.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_bucket_access_control(bucket, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControl

Creates a new ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_access_control_object (Google::Apis::StorageV1::BucketAccessControl) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



157
158
159
160
161
162
163
164
165
166
167
168
# File 'generated/google/apis/storage_v1/service.rb', line 157

def insert_bucket_access_control(bucket, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{bucket}/acl', options)
  command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::BucketAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_default_object_access_control(bucket, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Creates a new default object ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object_access_control_object (Google::Apis::StorageV1::ObjectAccessControl) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



718
719
720
721
722
723
724
725
726
727
728
729
# File 'generated/google/apis/storage_v1/service.rb', line 718

def insert_default_object_access_control(bucket, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{bucket}/defaultObjectAcl', options)
  command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_object(bucket, object_object = nil, content_encoding: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, kms_key_name: nil, name: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object

Stores a new object and metadata.

Parameters:

  • bucket (String)

    Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.

  • object_object (Google::Apis::StorageV1::Object) (defaults to: nil)
  • content_encoding (String) (defaults to: nil)

    If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.

  • if_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current generation matches the given value.

  • if_generation_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current generation does not match the given value.

  • if_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration does not match the given value.

  • kms_key_name (String) (defaults to: nil)

    Resource name of the Cloud KMS key, of the form projects/my-project/locations/ global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.

  • name (String) (defaults to: nil)

    Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • predefined_acl (String) (defaults to: nil)

    Apply a predefined set of access controls to this object.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • upload_source (IO, String) (defaults to: nil)

    IO stream or filename containing content to upload

  • content_type (String) (defaults to: nil)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
# File 'generated/google/apis/storage_v1/service.rb', line 1496

def insert_object(bucket, object_object = nil, content_encoding: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, kms_key_name: nil, name: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command =  make_simple_command(:post, 'b/{bucket}/o', options)
  else
    command = make_upload_command(:post, 'b/{bucket}/o', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.request_representation = Google::Apis::StorageV1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1::Object::Representation
  command.response_class = Google::Apis::StorageV1::Object
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['contentEncoding'] = content_encoding unless content_encoding.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['kmsKeyName'] = kms_key_name unless kms_key_name.nil?
  command.query['name'] = name unless name.nil?
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_object_access_control(bucket, object, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Creates a new ACL entry on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • object_access_control_object (Google::Apis::StorageV1::ObjectAccessControl) (defaults to: nil)
  • generation (String) (defaults to: nil)

    If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



983
984
985
986
987
988
989
990
991
992
993
994
995
996
# File 'generated/google/apis/storage_v1/service.rb', line 983

def insert_object_access_control(bucket, object, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{bucket}/o/{object}/acl', options)
  command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_bucket_access_controls(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControls

Retrieves ACL entries on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



194
195
196
197
198
199
200
201
202
203
# File 'generated/google/apis/storage_v1/service.rb', line 194

def list_bucket_access_controls(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/acl', options)
  command.response_representation = Google::Apis::StorageV1::BucketAccessControls::Representation
  command.response_class = Google::Apis::StorageV1::BucketAccessControls
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_buckets(project, max_results: nil, page_token: nil, prefix: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Buckets

Retrieves a list of buckets for a given project.

Parameters:

  • project (String)

    A valid API project identifier.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of buckets to return.

  • page_token (String) (defaults to: nil)

    A previously-returned page token representing part of the larger set of results to view.

  • prefix (String) (defaults to: nil)

    Filter results to buckets whose names begin with this prefix.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to noAcl.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



457
458
459
460
461
462
463
464
465
466
467
468
469
470
# File 'generated/google/apis/storage_v1/service.rb', line 457

def list_buckets(project, max_results: nil, page_token: nil, prefix: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b', options)
  command.response_representation = Google::Apis::StorageV1::Buckets::Representation
  command.response_class = Google::Apis::StorageV1::Buckets
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['prefix'] = prefix unless prefix.nil?
  command.query['project'] = project unless project.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControls

Retrieves default object ACL entries on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • if_metageneration_match (String) (defaults to: nil)

    If present, only return default ACL listing if the bucket's current metageneration matches this value.

  • if_metageneration_not_match (String) (defaults to: nil)

    If present, only return default ACL listing if the bucket's current metageneration does not match the given value.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



761
762
763
764
765
766
767
768
769
770
771
772
# File 'generated/google/apis/storage_v1/service.rb', line 761

def list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/defaultObjectAcl', options)
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControls
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_object_access_controls(bucket, object, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControls

Retrieves ACL entries on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • generation (String) (defaults to: nil)

    If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
# File 'generated/google/apis/storage_v1/service.rb', line 1028

def list_object_access_controls(bucket, object, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/o/{object}/acl', options)
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControls
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_objects(bucket, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Objects

Retrieves a list of objects matching the criteria.

Parameters:

  • bucket (String)

    Name of the bucket in which to look for objects.

  • delimiter (String) (defaults to: nil)

    Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items.

  • page_token (String) (defaults to: nil)

    A previously-returned page token representing part of the larger set of results to view.

  • prefix (String) (defaults to: nil)

    Filter results to objects whose names begin with this prefix.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to noAcl.

  • versions (Boolean) (defaults to: nil)

    If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
# File 'generated/google/apis/storage_v1/service.rb', line 1568

def list_objects(bucket, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/o', options)
  command.response_representation = Google::Apis::StorageV1::Objects::Representation
  command.response_class = Google::Apis::StorageV1::Objects
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['delimiter'] = delimiter unless delimiter.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['prefix'] = prefix unless prefix.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['versions'] = versions unless versions.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Bucket

Updates a bucket. This method supports patch semantics.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_object (Google::Apis::StorageV1::Bucket) (defaults to: nil)
  • if_metageneration_match (String) (defaults to: nil)

    Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

  • predefined_acl (String) (defaults to: nil)

    Apply a predefined set of access controls to this bucket.

  • predefined_default_object_acl (String) (defaults to: nil)

    Apply a predefined set of default object access controls to this bucket.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to full.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
# File 'generated/google/apis/storage_v1/service.rb', line 509

def patch_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'b/{bucket}', options)
  command.request_representation = Google::Apis::StorageV1::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1::Bucket
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControl

Updates an ACL entry on the specified bucket. This method supports patch semantics.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • bucket_access_control_object (Google::Apis::StorageV1::BucketAccessControl) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'generated/google/apis/storage_v1/service.rb', line 234

def patch_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'b/{bucket}/acl/{entity}', options)
  command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::BucketAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Updates a default object ACL entry on the specified bucket. This method supports patch semantics.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • object_access_control_object (Google::Apis::StorageV1::ObjectAccessControl) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



803
804
805
806
807
808
809
810
811
812
813
814
815
# File 'generated/google/apis/storage_v1/service.rb', line 803

def patch_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'b/{bucket}/defaultObjectAcl/{entity}', options)
  command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#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, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object

Updates an object's metadata. This method supports patch semantics.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • object_object (Google::Apis::StorageV1::Object) (defaults to: nil)
  • generation (String) (defaults to: nil)

    If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • if_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current generation matches the given value.

  • if_generation_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current generation does not match the given value.

  • if_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration does not match the given value.

  • predefined_acl (String) (defaults to: nil)

    Apply a predefined set of access controls to this object.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to full.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
# File 'generated/google/apis/storage_v1/service.rb', line 1632

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, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'b/{bucket}/o/{object}', options)
  command.request_representation = Google::Apis::StorageV1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1::Object::Representation
  command.response_class = Google::Apis::StorageV1::Object
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Updates an ACL entry on the specified object. This method supports patch semantics.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • object_access_control_object (Google::Apis::StorageV1::ObjectAccessControl) (defaults to: nil)
  • generation (String) (defaults to: nil)

    If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
# File 'generated/google/apis/storage_v1/service.rb', line 1076

def patch_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'b/{bucket}/o/{object}/acl/{entity}', options)
  command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#rewrite_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_kms_key_name: nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, max_bytes_rewritten_per_call: nil, projection: nil, rewrite_token: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::RewriteResponse

Rewrites a source object to a destination object. Optionally overrides metadata.

Parameters:

  • source_bucket (String)

    Name of the bucket in which to find the source object.

  • source_object (String)

    Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • destination_bucket (String)

    Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.

  • destination_object (String)

    Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • object_object (Google::Apis::StorageV1::Object) (defaults to: nil)
  • destination_kms_key_name (String) (defaults to: nil)

    Resource name of the Cloud KMS key, of the form projects/my-project/locations/ global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.

  • destination_predefined_acl (String) (defaults to: nil)

    Apply a predefined set of access controls to the destination object.

  • if_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the destination object's current generation matches the given value.

  • if_generation_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the destination object's current generation does not match the given value.

  • if_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the destination object's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the destination object's current metageneration does not match the given value.

  • if_source_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the source object's generation matches the given value.

  • if_source_generation_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the source object's generation does not match the given value.

  • if_source_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the source object's current metageneration matches the given value.

  • if_source_metageneration_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the source object's current metageneration does not match the given value.

  • max_bytes_rewritten_per_call (String) (defaults to: nil)

    The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB ( 1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.

  • rewrite_token (String) (defaults to: nil)

    Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.

  • source_generation (String) (defaults to: nil)

    If present, selects a specific revision of the source object (as opposed to the latest version, the default).

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
# File 'generated/google/apis/storage_v1/service.rb', line 1739

def rewrite_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_kms_key_name: nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, max_bytes_rewritten_per_call: nil, projection: nil, rewrite_token: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}', options)
  command.request_representation = Google::Apis::StorageV1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1::RewriteResponse::Representation
  command.response_class = Google::Apis::StorageV1::RewriteResponse
  command.params['sourceBucket'] = source_bucket unless source_bucket.nil?
  command.params['sourceObject'] = source_object unless source_object.nil?
  command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
  command.params['destinationObject'] = destination_object unless destination_object.nil?
  command.query['destinationKmsKeyName'] = destination_kms_key_name unless destination_kms_key_name.nil?
  command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil?
  command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil?
  command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
  command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
  command.query['maxBytesRewrittenPerCall'] = max_bytes_rewritten_per_call unless max_bytes_rewritten_per_call.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['rewriteToken'] = rewrite_token unless rewrite_token.nil?
  command.query['sourceGeneration'] = source_generation unless source_generation.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Stop watching resources through this channel

Parameters:

  • channel_object (Google::Apis::StorageV1::Channel) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



605
606
607
608
609
610
611
612
613
# File 'generated/google/apis/storage_v1/service.rb', line 605

def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'channels/stop', options)
  command.request_representation = Google::Apis::StorageV1::Channel::Representation
  command.request_object = channel_object
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Bucket

Updates a bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_object (Google::Apis::StorageV1::Bucket) (defaults to: nil)
  • if_metageneration_match (String) (defaults to: nil)

    Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.

  • predefined_acl (String) (defaults to: nil)

    Apply a predefined set of access controls to this bucket.

  • predefined_default_object_acl (String) (defaults to: nil)

    Apply a predefined set of default object access controls to this bucket.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to full.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'generated/google/apis/storage_v1/service.rb', line 564

def update_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'b/{bucket}', options)
  command.request_representation = Google::Apis::StorageV1::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1::Bucket
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControl

Updates an ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • bucket_access_control_object (Google::Apis::StorageV1::BucketAccessControl) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'generated/google/apis/storage_v1/service.rb', line 276

def update_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'b/{bucket}/acl/{entity}', options)
  command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::BucketAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Updates a default object ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • object_access_control_object (Google::Apis::StorageV1::ObjectAccessControl) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



845
846
847
848
849
850
851
852
853
854
855
856
857
# File 'generated/google/apis/storage_v1/service.rb', line 845

def update_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'b/{bucket}/defaultObjectAcl/{entity}', options)
  command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#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, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object

Updates an object's metadata.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • object_object (Google::Apis::StorageV1::Object) (defaults to: nil)
  • generation (String) (defaults to: nil)

    If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • if_generation_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current generation matches the given value.

  • if_generation_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current generation does not match the given value.

  • if_metageneration_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration matches the given value.

  • if_metageneration_not_match (String) (defaults to: nil)

    Makes the operation conditional on whether the object's current metageneration does not match the given value.

  • predefined_acl (String) (defaults to: nil)

    Apply a predefined set of access controls to this object.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to full.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • download_dest (IO, String) (defaults to: nil)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
# File 'generated/google/apis/storage_v1/service.rb', line 1818

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, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
  if download_dest.nil?
    command =  make_simple_command(:put, 'b/{bucket}/o/{object}', options)
  else
    command = make_download_command(:put, 'b/{bucket}/o/{object}', options)
    command.download_dest = download_dest
  end
  command.request_representation = Google::Apis::StorageV1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1::Object::Representation
  command.response_class = Google::Apis::StorageV1::Object
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Updates an ACL entry on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.

  • entity (String)

    The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.

  • object_access_control_object (Google::Apis::StorageV1::ObjectAccessControl) (defaults to: nil)
  • generation (String) (defaults to: nil)

    If present, selects a specific revision of this object (as opposed to the latest version, the default).

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
# File 'generated/google/apis/storage_v1/service.rb', line 1126

def update_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'b/{bucket}/o/{object}/acl/{entity}', options)
  command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#watch_all_objects(bucket, channel_object = nil, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Channel

Watch for changes on all objects in a bucket.

Parameters:

  • bucket (String)

    Name of the bucket in which to look for objects.

  • channel_object (Google::Apis::StorageV1::Channel) (defaults to: nil)
  • delimiter (String) (defaults to: nil)

    Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested. The default value of this parameter is 1,000 items.

  • page_token (String) (defaults to: nil)

    A previously-returned page token representing part of the larger set of results to view.

  • prefix (String) (defaults to: nil)

    Filter results to objects whose names begin with this prefix.

  • projection (String) (defaults to: nil)

    Set of properties to return. Defaults to noAcl.

  • versions (Boolean) (defaults to: nil)

    If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.

  • user_ip (String) (defaults to: nil)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
# File 'generated/google/apis/storage_v1/service.rb', line 1889

def watch_all_objects(bucket, channel_object = nil, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{bucket}/o/watch', options)
  command.request_representation = Google::Apis::StorageV1::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::StorageV1::Channel::Representation
  command.response_class = Google::Apis::StorageV1::Channel
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['delimiter'] = delimiter unless delimiter.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['prefix'] = prefix unless prefix.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['versions'] = versions unless versions.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end