Class: Google::Apis::StorageV1::StorageService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::StorageV1::StorageService
- Defined in:
- generated/google/apis/storage_v1/service.rb
Overview
Cloud Storage JSON API
Stores and retrieves potentially large, immutable data objects.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#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.
-
#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.
-
#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| ... }
Permanently deletes an empty bucket.
-
#delete_bucket_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes the ACL entry for the specified entity on the specified bucket.
-
#delete_default_object_access_control(bucket, entity, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes the default object ACL entry for the specified entity on the specified bucket.
-
#delete_notification(bucket, notification, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes a notification subscription.
-
#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| ... }
Deletes an object and its metadata.
-
#delete_object_access_control(bucket, object, entity, generation: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes the ACL entry for the specified entity on the specified object.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#initialize ⇒ StorageService
constructor
A new instance of StorageService.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#list_objects(bucket, 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.
-
#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.
-
#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
Updates a bucket.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Stop watching resources through this channel.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#watch_all_objects(bucket, channel_object = nil, 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.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ StorageService
Returns a new instance of StorageService
51 52 53 54 |
# File 'generated/google/apis/storage_v1/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'storage/v1/') @batch_path = 'batch/storage/v1' end |
Instance Attribute Details
#key ⇒ String
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.
38 39 40 |
# File 'generated/google/apis/storage_v1/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
44 45 46 |
# File 'generated/google/apis/storage_v1/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
49 50 51 |
# File 'generated/google/apis/storage_v1/service.rb', line 49 def user_ip @user_ip end |
Instance Method Details
#compose_object(destination_bucket, destination_object, compose_request_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_metageneration_match: nil, kms_key_name: nil, 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.
1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 |
# File 'generated/google/apis/storage_v1/service.rb', line 1581 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', ) 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'] = unless .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.
1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 |
# File 'generated/google/apis/storage_v1/service.rb', line 1672 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}', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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'] = unless .nil? command.query['ifSourceMetagenerationNotMatch'] = unless .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.
339 340 341 342 343 344 345 346 347 348 349 |
# File 'generated/google/apis/storage_v1/service.rb', line 339 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}', ) command.params['bucket'] = bucket unless bucket.nil? command.query['ifMetagenerationMatch'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
86 87 88 89 90 91 92 93 94 95 |
# File 'generated/google/apis/storage_v1/service.rb', line 86 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}', ) 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.
848 849 850 851 852 853 854 855 856 857 |
# File 'generated/google/apis/storage_v1/service.rb', line 848 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}', ) 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.
1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 |
# File 'generated/google/apis/storage_v1/service.rb', line 1107 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}', ) 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.
1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 |
# File 'generated/google/apis/storage_v1/service.rb', line 1748 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}', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 |
# File 'generated/google/apis/storage_v1/service.rb', line 1274 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}', ) 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.
385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
# File 'generated/google/apis/storage_v1/service.rb', line 385 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}', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'generated/google/apis/storage_v1/service.rb', line 126 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}', ) 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.
426 427 428 429 430 431 432 433 434 435 436 |
# File 'generated/google/apis/storage_v1/service.rb', line 426 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', ) 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.
889 890 891 892 893 894 895 896 897 898 899 900 |
# File 'generated/google/apis/storage_v1/service.rb', line 889 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}', ) 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.
1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
# File 'generated/google/apis/storage_v1/service.rb', line 1146 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}', ) 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.
1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 |
# File 'generated/google/apis/storage_v1/service.rb', line 1815 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}', ) else command = make_download_command(:get, 'b/{bucket}/o/{object}', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 |
# File 'generated/google/apis/storage_v1/service.rb', line 1322 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}', ) 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.
1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 |
# File 'generated/google/apis/storage_v1/service.rb', line 1871 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', ) 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.
2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 |
# File 'generated/google/apis/storage_v1/service.rb', line 2509 def get_project_service_account(project_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/serviceAccount', ) 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.
472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'generated/google/apis/storage_v1/service.rb', line 472 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', ) 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.
166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'generated/google/apis/storage_v1/service.rb', line 166 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', ) 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.
929 930 931 932 933 934 935 936 937 938 939 940 941 |
# File 'generated/google/apis/storage_v1/service.rb', line 929 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', ) 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.
1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 |
# File 'generated/google/apis/storage_v1/service.rb', line 1186 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', ) 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.
1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 |
# File 'generated/google/apis/storage_v1/service.rb', line 1952 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', ) else command = make_upload_command(:post, 'b/{bucket}/o', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 |
# File 'generated/google/apis/storage_v1/service.rb', line 1370 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', ) 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.
206 207 208 209 210 211 212 213 214 215 216 |
# File 'generated/google/apis/storage_v1/service.rb', line 206 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', ) 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.
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'generated/google/apis/storage_v1/service.rb', line 525 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', ) 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.
975 976 977 978 979 980 981 982 983 984 985 986 987 |
# File 'generated/google/apis/storage_v1/service.rb', line 975 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', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 |
# File 'generated/google/apis/storage_v1/service.rb', line 1226 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', ) 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.
1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 |
# File 'generated/google/apis/storage_v1/service.rb', line 1418 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', ) 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, 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.
2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 |
# File 'generated/google/apis/storage_v1/service.rb', line 2028 def list_objects(bucket, 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', ) command.response_representation = Google::Apis::StorageV1::Objects::Representation command.response_class = Google::Apis::StorageV1::Objects command.params['bucket'] = bucket unless bucket.nil? command.query['delimiter'] = delimiter unless delimiter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['prefix'] = prefix unless prefix.nil? command.query['projection'] = projection unless projection.nil? command.query['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.
570 571 572 573 574 575 576 577 578 579 580 581 |
# File 'generated/google/apis/storage_v1/service.rb', line 570 def lock_bucket_retention_policy(bucket, , user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/lockRetentionPolicy', ) 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'] = unless .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
Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate. This method supports patch semantics.
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 |
# File 'generated/google/apis/storage_v1/service.rb', line 624 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}', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'generated/google/apis/storage_v1/service.rb', line 248 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}', ) 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.
1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 |
# File 'generated/google/apis/storage_v1/service.rb', line 1019 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}', ) 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.
2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 |
# File 'generated/google/apis/storage_v1/service.rb', line 2098 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}', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 |
# File 'generated/google/apis/storage_v1/service.rb', line 1468 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}', ) 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.
2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 |
# File 'generated/google/apis/storage_v1/service.rb', line 2211 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}', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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'] = unless .nil? command.query['ifSourceMetagenerationNotMatch'] = unless .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.
670 671 672 673 674 675 676 677 678 679 680 681 682 |
# File 'generated/google/apis/storage_v1/service.rb', line 670 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', ) 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.
2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 |
# File 'generated/google/apis/storage_v1/service.rb', line 2275 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', ) 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
808 809 810 811 812 813 814 815 816 |
# File 'generated/google/apis/storage_v1/service.rb', line 808 def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'channels/stop', ) 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.
713 714 715 716 717 718 719 720 721 722 723 724 |
# File 'generated/google/apis/storage_v1/service.rb', line 713 def (bucket, , user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/iam/testPermissions', ) 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'] = unless .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.
2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 |
# File 'generated/google/apis/storage_v1/service.rb', line 2326 def (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/testPermissions', ) 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'] = unless .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.
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 |
# File 'generated/google/apis/storage_v1/service.rb', line 766 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}', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
293 294 295 296 297 298 299 300 301 302 303 304 305 306 |
# File 'generated/google/apis/storage_v1/service.rb', line 293 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}', ) 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.
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 |
# File 'generated/google/apis/storage_v1/service.rb', line 1064 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}', ) 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.
2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 |
# File 'generated/google/apis/storage_v1/service.rb', line 2393 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}', ) 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'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 |
# File 'generated/google/apis/storage_v1/service.rb', line 1521 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}', ) 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, 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.
2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 |
# File 'generated/google/apis/storage_v1/service.rb', line 2463 def watch_all_objects(bucket, channel_object = nil, 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', ) command.request_representation = Google::Apis::StorageV1::Channel::Representation command.request_object = channel_object command.response_representation = Google::Apis::StorageV1::Channel::Representation command.response_class = Google::Apis::StorageV1::Channel command.params['bucket'] = bucket unless bucket.nil? command.query['delimiter'] = delimiter unless delimiter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['prefix'] = prefix unless prefix.nil? command.query['projection'] = projection unless projection.nil? command.query['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 |