Class: Google::Apis::StorageV1beta2::StorageService

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

Overview

Cloud Storage JSON API

Lets you store and retrieve potentially-large, immutable data objects.

Examples:

require 'google/apis/storage_v1beta2'

Storage = Google::Apis::StorageV1beta2 # 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

Methods included from Core::Logging

#logger

Constructor Details

#initializeStorageService

Returns a new instance of StorageService



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

def initialize
  super('https://www.googleapis.com/', 'storage/v1beta2/')
  @batch_path = 'batch/storage/v1beta2'
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_v1beta2/service.rb', line 38

def key
  @key
end

#quota_userString

Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.



43
44
45
# File 'generated/google/apis/storage_v1beta2/service.rb', line 43

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.



47
48
49
# File 'generated/google/apis/storage_v1beta2/service.rb', line 47

def user_ip
  @user_ip
end

Instance Method Details

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

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

Parameters:

  • destination_bucket (String)

    Name of the bucket containing the source objects. The destination object is stored in this bucket.

  • destination_object (String)

    Name of the new object.

  • compose_request_object (Google::Apis::StorageV1beta2::ComposeRequest) (defaults to: nil)
  • if_generation_match (Fixnum)

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

  • if_metageneration_match (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1099

def compose_object(destination_bucket, destination_object, compose_request_object = nil, if_generation_match: nil, if_metageneration_match: 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::StorageV1beta2::ComposeRequest::Representation
  command.request_object = compose_request_object
  command.response_representation = Google::Apis::StorageV1beta2::Object::Representation
  command.response_class = Google::Apis::StorageV1beta2::Object
  command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
  command.params['destinationObject'] = destination_object unless destination_object.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['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, 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::StorageV1beta2::Object

Copies an object to a destination in the same location. 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.

  • 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.

  • object_object (Google::Apis::StorageV1beta2::Object) (defaults to: nil)
  • if_generation_match (Fixnum)

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

  • if_generation_not_match (Fixnum)

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

  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • if_source_generation_match (Fixnum)

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

  • if_source_generation_not_match (Fixnum)

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

  • if_source_metageneration_match (Fixnum)

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

  • if_source_metageneration_not_match (Fixnum)

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

  • projection (String)

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

  • source_generation (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    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
1206
1207
1208
1209
1210
1211
1212
1213
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1184

def copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = 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::StorageV1beta2::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1beta2::Object::Representation
  command.response_class = Google::Apis::StorageV1beta2::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['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 (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    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:



305
306
307
308
309
310
311
312
313
314
# File 'generated/google/apis/storage_v1beta2/service.rb', line 305

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    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:



80
81
82
83
84
85
86
87
88
# File 'generated/google/apis/storage_v1beta2/service.rb', line 80

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    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:



594
595
596
597
598
599
600
601
602
# File 'generated/google/apis/storage_v1beta2/service.rb', line 594

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 data blobs and associated 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.

  • generation (Fixnum)

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

  • if_generation_match (Fixnum)

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

  • if_generation_not_match (Fixnum)

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

  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    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:



1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1256

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.

  • entity (String)

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

  • generation (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    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:



831
832
833
834
835
836
837
838
839
840
841
# File 'generated/google/apis/storage_v1beta2/service.rb', line 831

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::StorageV1beta2::Bucket

Returns metadata for the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • projection (String)

    Set of properties to return. Defaults to noAcl.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'generated/google/apis/storage_v1beta2/service.rb', line 346

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::StorageV1beta2::Bucket::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



115
116
117
118
119
120
121
122
123
124
125
# File 'generated/google/apis/storage_v1beta2/service.rb', line 115

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::StorageV1beta2::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



630
631
632
633
634
635
636
637
638
639
640
# File 'generated/google/apis/storage_v1beta2/service.rb', line 630

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::StorageV1beta2::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::Object

Retrieves objects or their associated metadata.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

    Name of the object.

  • generation (Fixnum)

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

  • if_generation_match (Fixnum)

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

  • if_generation_not_match (Fixnum)

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

  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • projection (String)

    Set of properties to return. Defaults to noAcl.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1314

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::StorageV1beta2::Object::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::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.

  • entity (String)

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

  • generation (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



873
874
875
876
877
878
879
880
881
882
883
884
885
# File 'generated/google/apis/storage_v1beta2/service.rb', line 873

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::StorageV1beta2::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta2::Bucket

Creates a new bucket.

Parameters:

  • project (String)

    A valid API project identifier.

  • bucket_object (Google::Apis::StorageV1beta2::Bucket) (defaults to: nil)
  • projection (String)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



386
387
388
389
390
391
392
393
394
395
396
397
398
# File 'generated/google/apis/storage_v1beta2/service.rb', line 386

def insert_bucket(project, bucket_object = 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::StorageV1beta2::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1beta2::Bucket::Representation
  command.response_class = Google::Apis::StorageV1beta2::Bucket
  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::StorageV1beta2::BucketAccessControl

Creates a new ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

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

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



150
151
152
153
154
155
156
157
158
159
160
161
# File 'generated/google/apis/storage_v1beta2/service.rb', line 150

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::StorageV1beta2::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1beta2::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::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::StorageV1beta2::ObjectAccessControl) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



665
666
667
668
669
670
671
672
673
674
675
676
# File 'generated/google/apis/storage_v1beta2/service.rb', line 665

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::StorageV1beta2::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1beta2::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, name: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta2::Object

Stores new data blobs and associated 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::StorageV1beta2::Object) (defaults to: nil)
  • if_generation_match (Fixnum)

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

  • if_generation_not_match (Fixnum)

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

  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • name (String)

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

  • projection (String)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • upload_source (IO, String)

    IO stream or filename containing content to upload

  • content_type (String)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1383

def insert_object(bucket, object_object = nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, name: 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::StorageV1beta2::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1beta2::Object::Representation
  command.response_class = Google::Apis::StorageV1beta2::Object
  command.params['bucket'] = bucket unless bucket.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['name'] = name unless name.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::StorageV1beta2::ObjectAccessControl

Creates a new ACL entry on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object.

  • object_access_control_object (Google::Apis::StorageV1beta2::ObjectAccessControl) (defaults to: nil)
  • generation (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



915
916
917
918
919
920
921
922
923
924
925
926
927
928
# File 'generated/google/apis/storage_v1beta2/service.rb', line 915

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::StorageV1beta2::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1beta2::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::BucketAccessControls

Retrieves ACL entries on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



185
186
187
188
189
190
191
192
193
194
# File 'generated/google/apis/storage_v1beta2/service.rb', line 185

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::StorageV1beta2::BucketAccessControls::Representation
  command.response_class = Google::Apis::StorageV1beta2::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, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta2::Buckets

Retrieves a list of buckets for a given project.

Parameters:

  • project (String)

    A valid API project identifier.

  • max_results (Fixnum)

    Maximum number of buckets to return.

  • page_token (String)

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

  • projection (String)

    Set of properties to return. Defaults to noAcl.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



429
430
431
432
433
434
435
436
437
438
439
440
441
# File 'generated/google/apis/storage_v1beta2/service.rb', line 429

def list_buckets(project, max_results: nil, page_token: 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::StorageV1beta2::Buckets::Representation
  command.response_class = Google::Apis::StorageV1beta2::Buckets
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.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::StorageV1beta2::ObjectAccessControls

Retrieves default object ACL entries on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



706
707
708
709
710
711
712
713
714
715
716
717
# File 'generated/google/apis/storage_v1beta2/service.rb', line 706

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::StorageV1beta2::ObjectAccessControls::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::ObjectAccessControls

Retrieves ACL entries on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object.

  • generation (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



957
958
959
960
961
962
963
964
965
966
967
968
# File 'generated/google/apis/storage_v1beta2/service.rb', line 957

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::StorageV1beta2::ObjectAccessControls::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::Objects

Retrieves a list of objects matching the criteria.

Parameters:

  • bucket (String)

    Name of the bucket in which to look for objects.

  • delimiter (String)

    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)

    Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested.

  • page_token (String)

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

  • prefix (String)

    Filter results to objects whose names begin with this prefix.

  • projection (String)

    Set of properties to return. Defaults to noAcl.

  • versions (Boolean)

    If true, lists all versions of a file as distinct results.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1448

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::StorageV1beta2::Objects::Representation
  command.response_class = Google::Apis::StorageV1beta2::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, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta2::Bucket

Updates a bucket. This method supports patch semantics.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_object (Google::Apis::StorageV1beta2::Bucket) (defaults to: nil)
  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • projection (String)

    Set of properties to return. Defaults to full.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'generated/google/apis/storage_v1beta2/service.rb', line 474

def patch_bucket(bucket, bucket_object = nil, 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(:patch, 'b/{bucket}', options)
  command.request_representation = Google::Apis::StorageV1beta2::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1beta2::Bucket::Representation
  command.response_class = Google::Apis::StorageV1beta2::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

#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::StorageV1beta2::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::StorageV1beta2::BucketAccessControl) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'generated/google/apis/storage_v1beta2/service.rb', line 223

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::StorageV1beta2::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1beta2::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::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::StorageV1beta2::ObjectAccessControl) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



746
747
748
749
750
751
752
753
754
755
756
757
758
# File 'generated/google/apis/storage_v1beta2/service.rb', line 746

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::StorageV1beta2::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1beta2::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta2::Object

Updates a data blob's associated metadata. This method supports patch semantics.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

    Name of the object.

  • object_object (Google::Apis::StorageV1beta2::Object) (defaults to: nil)
  • generation (Fixnum)

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

  • if_generation_match (Fixnum)

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

  • if_generation_not_match (Fixnum)

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

  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • projection (String)

    Set of properties to return. Defaults to full.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1508

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, 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::StorageV1beta2::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1beta2::Object::Representation
  command.response_class = Google::Apis::StorageV1beta2::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

#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::StorageV1beta2::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.

  • 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::StorageV1beta2::ObjectAccessControl) (defaults to: nil)
  • generation (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1002

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::StorageV1beta2::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1beta2::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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

#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::StorageV1beta2::Channel) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    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:



558
559
560
561
562
563
564
565
566
# File 'generated/google/apis/storage_v1beta2/service.rb', line 558

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

Updates a bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_object (Google::Apis::StorageV1beta2::Bucket) (defaults to: nil)
  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • projection (String)

    Set of properties to return. Defaults to full.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
# File 'generated/google/apis/storage_v1beta2/service.rb', line 521

def update_bucket(bucket, bucket_object = nil, 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(:put, 'b/{bucket}', options)
  command.request_representation = Google::Apis::StorageV1beta2::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1beta2::Bucket::Representation
  command.response_class = Google::Apis::StorageV1beta2::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

#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::StorageV1beta2::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::StorageV1beta2::BucketAccessControl) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



263
264
265
266
267
268
269
270
271
272
273
274
275
# File 'generated/google/apis/storage_v1beta2/service.rb', line 263

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::StorageV1beta2::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1beta2::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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::StorageV1beta2::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::StorageV1beta2::ObjectAccessControl) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



786
787
788
789
790
791
792
793
794
795
796
797
798
# File 'generated/google/apis/storage_v1beta2/service.rb', line 786

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::StorageV1beta2::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1beta2::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta2::Object

Updates a data blob's associated metadata.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

    Name of the object.

  • object_object (Google::Apis::StorageV1beta2::Object) (defaults to: nil)
  • generation (Fixnum)

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

  • if_generation_match (Fixnum)

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

  • if_generation_not_match (Fixnum)

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

  • if_metageneration_match (Fixnum)

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

  • if_metageneration_not_match (Fixnum)

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

  • projection (String)

    Set of properties to return. Defaults to full.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1572

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, 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::StorageV1beta2::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1beta2::Object::Representation
  command.response_class = Google::Apis::StorageV1beta2::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

#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::StorageV1beta2::ObjectAccessControl

Updates an ACL entry on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object.

  • 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::StorageV1beta2::ObjectAccessControl) (defaults to: nil)
  • generation (Fixnum)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1049

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::StorageV1beta2::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1beta2::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta2::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_object_all(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::StorageV1beta2::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::StorageV1beta2::Channel) (defaults to: nil)
  • delimiter (String)

    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)

    Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested.

  • page_token (String)

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

  • prefix (String)

    Filter results to objects whose names begin with this prefix.

  • projection (String)

    Set of properties to return. Defaults to noAcl.

  • versions (Boolean)

    If true, lists all versions of a file as distinct results.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1638

def watch_object_all(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::StorageV1beta2::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::StorageV1beta2::Channel::Representation
  command.response_class = Google::Apis::StorageV1beta2::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