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

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

Overview

Cloud Storage JSON API

Stores and retrieves potentially large, immutable data objects.

Examples:

require 'google/apis/storage_v1'

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

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

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

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeStorageService

Returns a new instance of StorageService



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

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

Instance Attribute Details

#keyString

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

Returns:

  • (String)

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



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

def key
  @key
end

#quota_userString

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

Returns:

  • (String)

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



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

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.



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

def user_ip
  @user_ip
end

Instance Method Details

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

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

Parameters:

  • destination_bucket (String)

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

  • destination_object (String)

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

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

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

  • if_generation_match (Fixnum)

    Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

  • if_metageneration_match (Fixnum)

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

  • kms_key_name (String)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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

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

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

Parameters:

  • source_bucket (String)

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

  • source_object (String)

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

  • destination_bucket (String)

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

  • destination_object (String)

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

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

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

  • if_generation_match (Fixnum)

    Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

  • if_generation_not_match (Fixnum)

    Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

  • 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 current generation matches the given value.

  • if_source_generation_not_match (Fixnum)

    Makes the operation conditional on whether the source object's current 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).

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
# File 'generated/google/apis/storage_v1/service.rb', line 1600

def copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, source_generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}', options)
  command.request_representation = Google::Apis::StorageV1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1::Object::Representation
  command.response_class = Google::Apis::StorageV1::Object
  command.params['sourceBucket'] = source_bucket unless source_bucket.nil?
  command.params['sourceObject'] = source_object unless source_object.nil?
  command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
  command.params['destinationObject'] = destination_object unless destination_object.nil?
  command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil?
  command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil?
  command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
  command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['sourceGeneration'] = source_generation unless source_generation.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: 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)

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

  • if_metageneration_not_match (Fixnum)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



323
324
325
326
327
328
329
330
331
332
333
# File 'generated/google/apis/storage_v1/service.rb', line 323

def delete_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: 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['userProject'] = user_project unless user_project.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, user_project: 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 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.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



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

def delete_bucket_access_control(bucket, entity, user_project: nil, 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['userProject'] = user_project unless user_project.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, user_project: nil, 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.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



809
810
811
812
813
814
815
816
817
818
# File 'generated/google/apis/storage_v1/service.rb', line 809

def delete_default_object_access_control(bucket, entity, user_project: nil, 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['userProject'] = user_project unless user_project.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_notification(bucket, notification, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Permanently deletes a notification subscription.

Parameters:

  • bucket (String)

    The parent bucket of the notification.

  • notification (String)

    ID of the notification to delete.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
# File 'generated/google/apis/storage_v1/service.rb', line 1056

def delete_notification(bucket, notification, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'b/{bucket}/notificationConfigs/{notification}', options)
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['notification'] = notification unless notification.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

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

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

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

  • generation (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. Setting to 0 makes the operation succeed only if there are no live versions of the object.

  • if_generation_not_match (Fixnum)

    Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
# File 'generated/google/apis/storage_v1/service.rb', line 1674

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, user_project: 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['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

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

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

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

  • entity (String)

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

  • generation (Fixnum)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# File 'generated/google/apis/storage_v1/service.rb', line 1215

def delete_object_access_control(bucket, object, entity, generation: nil, user_project: 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['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Bucket

Returns metadata for the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def get_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}', options)
  command.response_representation = Google::Apis::StorageV1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1::Bucket
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControl

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

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def get_bucket_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/acl/{entity}', options)
  command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::BucketAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['userProject'] = user_project unless user_project.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_iam_policy(bucket, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Policy

Returns an IAM policy for the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def get_bucket_iam_policy(bucket, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/iam', options)
  command.response_representation = Google::Apis::StorageV1::Policy::Representation
  command.response_class = Google::Apis::StorageV1::Policy
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

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

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def get_default_object_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/defaultObjectAcl/{entity}', options)
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['userProject'] = user_project unless user_project.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_notification(bucket, notification, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Notification

View a notification configuration.

Parameters:

  • bucket (String)

    The parent bucket of the notification.

  • notification (String)

    Notification ID

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
# File 'generated/google/apis/storage_v1/service.rb', line 1093

def get_notification(bucket, notification, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/notificationConfigs/{notification}', options)
  command.response_representation = Google::Apis::StorageV1::Notification::Representation
  command.response_class = Google::Apis::StorageV1::Notification
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['notification'] = notification unless notification.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object

Retrieves an object or its metadata.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

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

  • generation (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. Setting to 0 makes the operation succeed only if there are no live versions of the object.

  • if_generation_not_match (Fixnum)

    Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • download_dest (IO, String)

    IO stream or filename to receive content download

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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

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

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

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

  • entity (String)

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

  • generation (Fixnum)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
# File 'generated/google/apis/storage_v1/service.rb', line 1261

def get_object_access_control(bucket, object, entity, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/o/{object}/acl/{entity}', options)
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['userProject'] = user_project unless user_project.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_iam_policy(bucket, object, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Policy

Returns an IAM policy for the specified object.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

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

  • generation (Fixnum)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
# File 'generated/google/apis/storage_v1/service.rb', line 1793

def get_object_iam_policy(bucket, object, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/o/{object}/iam', options)
  command.response_representation = Google::Apis::StorageV1::Policy::Representation
  command.response_class = Google::Apis::StorageV1::Policy
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['userProject'] = user_project unless user_project.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_project_service_account(project_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ServiceAccount

Get the email address of this project's Google Cloud Storage service account.

Parameters:

  • project_id (String)

    Project ID

  • user_project (String)

    The project to be billed for this request.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
# File 'generated/google/apis/storage_v1/service.rb', line 2420

def (project_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'projects/{projectId}/serviceAccount', options)
  command.response_representation = Google::Apis::StorageV1::ServiceAccount::Representation
  command.response_class = Google::Apis::StorageV1::ServiceAccount
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['userProject'] = user_project unless user_project.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Creates a new bucket.

Parameters:

  • project (String)

    A valid API project identifier.

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

    Apply a predefined set of access controls to this bucket.

  • predefined_default_object_acl (String)

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

  • projection (String)

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

  • user_project (String)

    The project to be billed for this request.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def insert_bucket(project, bucket_object = nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b', options)
  command.request_representation = Google::Apis::StorageV1::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1::Bucket
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
  command.query['project'] = project unless project.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControl

Creates a new ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

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

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def insert_bucket_access_control(bucket, bucket_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{bucket}/acl', options)
  command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::BucketAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

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

Parameters:

  • bucket (String)

    Name of a bucket.

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

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



886
887
888
889
890
891
892
893
894
895
896
897
898
# File 'generated/google/apis/storage_v1/service.rb', line 886

def insert_default_object_access_control(bucket, object_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{bucket}/defaultObjectAcl', options)
  command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['userProject'] = user_project unless user_project.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_notification(bucket, notification_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Notification

Creates a notification subscription for a given bucket.

Parameters:

  • bucket (String)

    The parent bucket of the notification.

  • notification_object (Google::Apis::StorageV1::Notification) (defaults to: nil)
  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
# File 'generated/google/apis/storage_v1/service.rb', line 1131

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

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

Stores a new object and metadata.

Parameters:

  • bucket (String)

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

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

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

  • if_generation_match (Fixnum)

    Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

  • if_generation_not_match (Fixnum)

    Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

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

  • kms_key_name (String)

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

  • name (String)

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

  • predefined_acl (String)

    Apply a predefined set of access controls to this object.

  • projection (String)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • upload_source (IO, String)

    IO stream or filename containing content to upload

  • content_type (String)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
# File 'generated/google/apis/storage_v1/service.rb', line 1871

def insert_object(bucket, object_object = nil, content_encoding: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, kms_key_name: nil, name: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command =  make_simple_command(:post, 'b/{bucket}/o', options)
  else
    command = make_upload_command(:post, 'b/{bucket}/o', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.request_representation = Google::Apis::StorageV1::Object::Representation
  command.request_object = object_object
  command.response_representation = Google::Apis::StorageV1::Object::Representation
  command.response_class = Google::Apis::StorageV1::Object
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['contentEncoding'] = content_encoding unless content_encoding.nil?
  command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
  command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['kmsKeyName'] = kms_key_name unless kms_key_name.nil?
  command.query['name'] = name unless name.nil?
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Creates a new ACL entry on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

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

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

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
# File 'generated/google/apis/storage_v1/service.rb', line 1307

def insert_object_access_control(bucket, object, object_access_control_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{bucket}/o/{object}/acl', options)
  command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.request_object = object_access_control_object
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControls

Retrieves ACL entries on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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

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

Retrieves a list of buckets for a given project.

Parameters:

  • project (String)

    A valid API project identifier.

  • max_results (Fixnum)

    Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.

  • page_token (String)

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

  • prefix (String)

    Filter results to buckets whose names begin with this prefix.

  • projection (String)

    Set of properties to return. Defaults to noAcl.

  • user_project (String)

    The project to be billed for this request.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# File 'generated/google/apis/storage_v1/service.rb', line 501

def list_buckets(project, max_results: nil, page_token: nil, prefix: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b', options)
  command.response_representation = Google::Apis::StorageV1::Buckets::Representation
  command.response_class = Google::Apis::StorageV1::Buckets
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['prefix'] = prefix unless prefix.nil?
  command.query['project'] = project unless project.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControls

Retrieves default object ACL entries on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



930
931
932
933
934
935
936
937
938
939
940
941
942
# File 'generated/google/apis/storage_v1/service.rb', line 930

def list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/defaultObjectAcl', options)
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControls
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['userProject'] = user_project unless user_project.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_notifications(bucket, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Notifications

Retrieves a list of notification subscriptions for a given bucket.

Parameters:

  • bucket (String)

    Name of a Google Cloud Storage bucket.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
# File 'generated/google/apis/storage_v1/service.rb', line 1169

def list_notifications(bucket, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/notificationConfigs', options)
  command.response_representation = Google::Apis::StorageV1::Notifications::Representation
  command.response_class = Google::Apis::StorageV1::Notifications
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControls

Retrieves ACL entries on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

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

  • generation (Fixnum)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def list_object_access_controls(bucket, object, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/o/{object}/acl', options)
  command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
  command.response_class = Google::Apis::StorageV1::ObjectAccessControls
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['object'] = object unless object.nil?
  command.query['generation'] = generation unless generation.nil?
  command.query['userProject'] = user_project unless user_project.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, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Objects

Retrieves a list of objects matching the criteria.

Parameters:

  • bucket (String)

    Name of the bucket in which to look for objects.

  • delimiter (String)

    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.

  • include_trailing_delimiter (Boolean)

    If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.

  • max_results (Fixnum)

    Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • versions (Boolean)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
# File 'generated/google/apis/storage_v1/service.rb', line 1948

def list_objects(bucket, delimiter: nil, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/o', options)
  command.response_representation = Google::Apis::StorageV1::Objects::Representation
  command.response_class = Google::Apis::StorageV1::Objects
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['delimiter'] = delimiter unless delimiter.nil?
  command.query['includeTrailingDelimiter'] = include_trailing_delimiter unless include_trailing_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['userProject'] = user_project unless user_project.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

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

Locks retention policy on a bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • if_metageneration_match (Fixnum)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



544
545
546
547
548
549
550
551
552
553
554
555
# File 'generated/google/apis/storage_v1/service.rb', line 544

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

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

Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_object (Google::Apis::StorageV1::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.

  • predefined_acl (String)

    Apply a predefined set of access controls to this bucket.

  • predefined_default_object_acl (String)

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

  • projection (String)

    Set of properties to return. Defaults to full.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'generated/google/apis/storage_v1/service.rb', line 595

def patch_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'b/{bucket}', options)
  command.request_representation = Google::Apis::StorageV1::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1::Bucket
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControl

Patches an ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

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

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

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def patch_bucket_access_control(bucket, entity, bucket_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'b/{bucket}/acl/{entity}', options)
  command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::BucketAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Patches a default object ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

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

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

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



972
973
974
975
976
977
978
979
980
981
982
983
984
985
# File 'generated/google/apis/storage_v1/service.rb', line 972

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

#patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object

Patches an object's metadata.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

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

  • object_object (Google::Apis::StorageV1::Object) (defaults to: nil)
  • generation (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. Setting to 0 makes the operation succeed only if there are no live versions of the object.

  • if_generation_not_match (Fixnum)

    Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

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

  • predefined_acl (String)

    Apply a predefined set of access controls to this object.

  • projection (String)

    Set of properties to return. Defaults to full.

  • user_project (String)

    The project to be billed for this request, for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
# File 'generated/google/apis/storage_v1/service.rb', line 2017

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

Patches an ACL entry on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

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

  • entity (String)

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

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

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
# File 'generated/google/apis/storage_v1/service.rb', line 1401

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

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

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

Parameters:

  • source_bucket (String)

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

  • source_object (String)

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

  • destination_bucket (String)

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

  • destination_object (String)

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

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

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

  • destination_predefined_acl (String)

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

  • if_generation_match (Fixnum)

    Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.

  • if_generation_not_match (Fixnum)

    Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

  • 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 current generation matches the given value.

  • if_source_generation_not_match (Fixnum)

    Makes the operation conditional on whether the source object's current 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.

  • max_bytes_rewritten_per_call (Fixnum)

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

  • projection (String)

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

  • rewrite_token (String)

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

  • source_generation (Fixnum)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
# File 'generated/google/apis/storage_v1/service.rb', line 2128

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

#set_bucket_iam_policy(bucket, policy_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Policy

Updates an IAM policy for the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • policy_object (Google::Apis::StorageV1::Policy) (defaults to: nil)
  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def set_bucket_iam_policy(bucket, policy_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'b/{bucket}/iam', options)
  command.request_representation = Google::Apis::StorageV1::Policy::Representation
  command.request_object = policy_object
  command.response_representation = Google::Apis::StorageV1::Policy::Representation
  command.response_class = Google::Apis::StorageV1::Policy
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['userProject'] = user_project unless user_project.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

#set_object_iam_policy(bucket, object, policy_object = nil, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Policy

Updates an IAM policy for the specified object.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

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

  • policy_object (Google::Apis::StorageV1::Policy) (defaults to: nil)
  • generation (Fixnum)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
# File 'generated/google/apis/storage_v1/service.rb', line 2190

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

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

This method returns an undefined value.

Stop watching resources through this channel

Parameters:

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

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:



771
772
773
774
775
776
777
778
779
# File 'generated/google/apis/storage_v1/service.rb', line 771

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

#test_bucket_iam_permissions(bucket, permissions, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::TestIamPermissionsResponse

Tests a set of permissions on the given bucket to see which, if any, are held by the caller.

Parameters:

  • bucket (String)

    Name of a bucket.

  • permissions (Array<String>, String)

    Permissions to test.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def test_bucket_iam_permissions(bucket, permissions, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'b/{bucket}/iam/testPermissions', options)
  command.response_representation = Google::Apis::StorageV1::TestIamPermissionsResponse::Representation
  command.response_class = Google::Apis::StorageV1::TestIamPermissionsResponse
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['permissions'] = permissions unless permissions.nil?
  command.query['userProject'] = user_project unless user_project.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

#test_object_iam_permissions(bucket, object, permissions, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::TestIamPermissionsResponse

Tests a set of permissions on the given object to see which, if any, are held by the caller.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

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

  • permissions (Array<String>, String)

    Permissions to test.

  • generation (Fixnum)

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
# File 'generated/google/apis/storage_v1/service.rb', line 2239

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

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

Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

Parameters:

  • bucket (String)

    Name of a bucket.

  • bucket_object (Google::Apis::StorageV1::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.

  • predefined_acl (String)

    Apply a predefined set of access controls to this bucket.

  • predefined_default_object_acl (String)

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

  • projection (String)

    Set of properties to return. Defaults to full.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
# File 'generated/google/apis/storage_v1/service.rb', line 731

def update_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'b/{bucket}', options)
  command.request_representation = Google::Apis::StorageV1::Bucket::Representation
  command.request_object = bucket_object
  command.response_representation = Google::Apis::StorageV1::Bucket::Representation
  command.response_class = Google::Apis::StorageV1::Bucket
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
  command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
  command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
  command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketAccessControl

Updates an ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

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

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

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



279
280
281
282
283
284
285
286
287
288
289
290
291
292
# File 'generated/google/apis/storage_v1/service.rb', line 279

def update_bucket_access_control(bucket, entity, bucket_access_control_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'b/{bucket}/acl/{entity}', options)
  command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.request_object = bucket_access_control_object
  command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
  command.response_class = Google::Apis::StorageV1::BucketAccessControl
  command.params['bucket'] = bucket unless bucket.nil?
  command.params['entity'] = entity unless entity.nil?
  command.query['userProject'] = user_project unless user_project.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, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ObjectAccessControl

Updates a default object ACL entry on the specified bucket.

Parameters:

  • bucket (String)

    Name of a bucket.

  • entity (String)

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

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

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
# File 'generated/google/apis/storage_v1/service.rb', line 1015

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

#update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object

Updates an object's metadata.

Parameters:

  • bucket (String)

    Name of the bucket in which the object resides.

  • object (String)

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

  • object_object (Google::Apis::StorageV1::Object) (defaults to: nil)
  • generation (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. Setting to 0 makes the operation succeed only if there are no live versions of the object.

  • if_generation_not_match (Fixnum)

    Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.

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

  • predefined_acl (String)

    Apply a predefined set of access controls to this object.

  • projection (String)

    Set of properties to return. Defaults to full.

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
# File 'generated/google/apis/storage_v1/service.rb', line 2304

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

Updates an ACL entry on the specified object.

Parameters:

  • bucket (String)

    Name of a bucket.

  • object (String)

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

  • entity (String)

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

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

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
# File 'generated/google/apis/storage_v1/service.rb', line 1452

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

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

Watch for changes on all objects in a bucket.

Parameters:

  • bucket (String)

    Name of the bucket in which to look for objects.

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

    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.

  • include_trailing_delimiter (Boolean)

    If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.

  • max_results (Fixnum)

    Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.

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

  • user_project (String)

    The project to be billed for this request. Required for Requester Pays buckets.

  • versions (Boolean)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

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

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
# File 'generated/google/apis/storage_v1/service.rb', line 2375

def watch_all_objects(bucket, channel_object = nil, delimiter: nil, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, user_project: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'b/{bucket}/o/watch', options)
  command.request_representation = Google::Apis::StorageV1::Channel::Representation
  command.request_object = channel_object
  command.response_representation = Google::Apis::StorageV1::Channel::Representation
  command.response_class = Google::Apis::StorageV1::Channel
  command.params['bucket'] = bucket unless bucket.nil?
  command.query['delimiter'] = delimiter unless delimiter.nil?
  command.query['includeTrailingDelimiter'] = include_trailing_delimiter unless include_trailing_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['userProject'] = user_project unless user_project.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