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



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

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

Returns:

  • (String)

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



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

def quota_user
  @quota_user
end

#user_ipString

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

Returns:

  • (String)

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



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

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 in which to store the new object.

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

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

  • user_ip (String)

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

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



1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1152

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)

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

  • user_ip (String)

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

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



1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1239

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)

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

  • user_ip (String)

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

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



321
322
323
324
325
326
327
328
329
330
# File 'generated/google/apis/storage_v1beta2/service.rb', line 321

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)

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

  • user_ip (String)

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

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



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

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)

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

  • user_ip (String)

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

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



624
625
626
627
628
629
630
631
632
# File 'generated/google/apis/storage_v1beta2/service.rb', line 624

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)

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

  • user_ip (String)

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

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



1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1313

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)

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

  • user_ip (String)

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

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



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'generated/google/apis/storage_v1beta2/service.rb', line 364

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



662
663
664
665
666
667
668
669
670
671
672
# File 'generated/google/apis/storage_v1beta2/service.rb', line 662

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)

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

  • user_ip (String)

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

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



1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1373

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'generated/google/apis/storage_v1beta2/service.rb', line 406

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



699
700
701
702
703
704
705
706
707
708
709
710
# File 'generated/google/apis/storage_v1beta2/service.rb', line 699

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)

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

  • user_ip (String)

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

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



1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1444

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



961
962
963
964
965
966
967
968
969
970
971
972
973
974
# File 'generated/google/apis/storage_v1beta2/service.rb', line 961

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



451
452
453
454
455
456
457
458
459
460
461
462
463
# File 'generated/google/apis/storage_v1beta2/service.rb', line 451

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



742
743
744
745
746
747
748
749
750
751
752
753
# File 'generated/google/apis/storage_v1beta2/service.rb', line 742

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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 1511

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
# File 'generated/google/apis/storage_v1beta2/service.rb', line 498

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

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



586
587
588
589
590
591
592
593
594
# File 'generated/google/apis/storage_v1beta2/service.rb', line 586

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# File 'generated/google/apis/storage_v1beta2/service.rb', line 547

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



826
827
828
829
830
831
832
833
834
835
836
837
838
# File 'generated/google/apis/storage_v1beta2/service.rb', line 826

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)

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

  • user_ip (String)

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

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



1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1639

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • user_ip (String)

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

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
# File 'generated/google/apis/storage_v1beta2/service.rb', line 1707

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