Class: Google::Apis::StorageV1beta1::StorageService

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

Overview

Cloud Storage JSON API

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

Examples:

require 'google/apis/storage_v1beta1'

Storage = Google::Apis::StorageV1beta1 # 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_v1beta1/service.rb', line 49

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

def user_ip
  @user_ip
end

Instance Method Details

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

This method returns an undefined value.

Deletes an empty 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:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:


298
299
300
301
302
303
304
305
# File 'generated/google/apis/storage_v1beta1/service.rb', line 298

def delete_bucket(bucket, 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['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.

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:


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

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_object(bucket, object, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes data blobs and associated metadata.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

    Name of the object.

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


765
766
767
768
769
770
771
772
773
# File 'generated/google/apis/storage_v1beta1/service.rb', line 765

def delete_object(bucket, object, 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['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, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

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.

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


528
529
530
531
532
533
534
535
536
537
# File 'generated/google/apis/storage_v1beta1/service.rb', line 528

def delete_object_access_control(bucket, object, entity, 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['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, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::Bucket

Returns metadata for the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • projection (String)

    Set of properties to return. Defaults to no_acl.

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


331
332
333
334
335
336
337
338
339
340
341
# File 'generated/google/apis/storage_v1beta1/service.rb', line 331

def get_bucket(bucket, 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::StorageV1beta1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1beta1::Bucket
  command.params['bucket'] = bucket unless bucket.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::StorageV1beta1::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:


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

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::StorageV1beta1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta1::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_object(bucket, object, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::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.

  • projection (String)

    Set of properties to return. Defaults to no_acl.

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


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

def get_object(bucket, object, 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::StorageV1beta1::Object::Representation
  command.response_class = Google::Apis::StorageV1beta1::Object
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.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, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::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.

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


566
567
568
569
570
571
572
573
574
575
576
577
# File 'generated/google/apis/storage_v1beta1/service.rb', line 566

def get_object_access_control(bucket, object, entity, 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::StorageV1beta1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.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

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

Creates a new bucket.

Parameters:

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

    Set of properties to return. Defaults to no_acl, 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:


367
368
369
370
371
372
373
374
375
376
377
378
# File 'generated/google/apis/storage_v1beta1/service.rb', line 367

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

Creates a new ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_access_control_object (Google::Apis::StorageV1beta1::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:


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

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::StorageV1beta1::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta1::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_object(bucket, object_object = 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::StorageV1beta1::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::StorageV1beta1::Object) (defaults to: nil)
  • 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 no_acl, 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:


855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
# File 'generated/google/apis/storage_v1beta1/service.rb', line 855

def insert_object(bucket, object_object = 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::StorageV1beta1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1beta1::Object::Representation
  command.response_class = Google::Apis::StorageV1beta1::Object
  command.params['bucket'] = bucket unless bucket.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, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::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::StorageV1beta1::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:


604
605
606
607
608
609
610
611
612
613
614
615
616
# File 'generated/google/apis/storage_v1beta1/service.rb', line 604

def insert_object_access_control(bucket, object, object_access_control_object = 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::StorageV1beta1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.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::StorageV1beta1::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:


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

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

Retrieves a list of buckets for a given project.

Parameters:

  • project_id (Fixnum)

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

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


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

def list_buckets(project_id, 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::StorageV1beta1::Buckets::Representation
  command.response_class = Google::Apis::StorageV1beta1::Buckets
  command.query['max-results'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['projectId'] = project_id unless project_id.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_object_access_controls(bucket, object, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::ObjectAccessControls

Retrieves ACL entries on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

    Name of the object.

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


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

def list_object_access_controls(bucket, object, 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::StorageV1beta1::ObjectAccessControls::Representation
  command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControls
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.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, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::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 no_acl.

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


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

def list_objects(bucket, delimiter: nil, 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/{bucket}/o', options)
  command.response_representation = Google::Apis::StorageV1beta1::Objects::Representation
  command.response_class = Google::Apis::StorageV1beta1::Objects
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['delimiter'] = delimiter unless delimiter.nil?
  command.query['max-results'] = 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['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, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::Bucket

Updates a bucket. This method supports patch semantics.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_object (Google::Apis::StorageV1beta1::Bucket) (defaults to: nil)
  • 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:


448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'generated/google/apis/storage_v1beta1/service.rb', line 448

def patch_bucket(bucket, bucket_object = 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::StorageV1beta1::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1beta1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1beta1::Bucket
  command.params['bucket'] = bucket unless bucket.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::StorageV1beta1::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::StorageV1beta1::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:


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

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::StorageV1beta1::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta1::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_object(bucket, object, object_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::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::StorageV1beta1::Object) (defaults to: nil)
  • 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:


958
959
960
961
962
963
964
965
966
967
968
969
970
971
# File 'generated/google/apis/storage_v1beta1/service.rb', line 958

def patch_object(bucket, object, object_object = 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::StorageV1beta1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1beta1::Object::Representation
  command.response_class = Google::Apis::StorageV1beta1::Object
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.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, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::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::StorageV1beta1::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:


683
684
685
686
687
688
689
690
691
692
693
694
695
696
# File 'generated/google/apis/storage_v1beta1/service.rb', line 683

def patch_object_access_control(bucket, object, entity, object_access_control_object = 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::StorageV1beta1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.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_bucket(bucket, bucket_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::Bucket

Updates a bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_object (Google::Apis::StorageV1beta1::Bucket) (defaults to: nil)
  • 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:


487
488
489
490
491
492
493
494
495
496
497
498
499
# File 'generated/google/apis/storage_v1beta1/service.rb', line 487

def update_bucket(bucket, bucket_object = 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::StorageV1beta1::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1beta1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1beta1::Bucket
  command.params['bucket'] = bucket unless bucket.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::StorageV1beta1::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::StorageV1beta1::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:


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

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::StorageV1beta1::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1beta1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta1::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_object(bucket, object, object_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::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::StorageV1beta1::Object) (defaults to: nil)
  • 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:


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

def update_object(bucket, object, object_object = 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::StorageV1beta1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1beta1::Object::Representation
  command.response_class = Google::Apis::StorageV1beta1::Object
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.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, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1beta1::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::StorageV1beta1::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:


726
727
728
729
730
731
732
733
734
735
736
737
738
739
# File 'generated/google/apis/storage_v1beta1/service.rb', line 726

def update_object_access_control(bucket, object, entity, object_access_control_object = 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::StorageV1beta1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1beta1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1beta1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.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