Class: Google::Apis::StorageV1::StorageService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::StorageV1::StorageService
- Defined in:
- lib/google/apis/storage_v1/service.rb
Overview
Cloud Storage JSON API
Stores and retrieves potentially large, immutable data objects.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://storage.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
Instance Method Summary collapse
-
#bulk_restore_objects(bucket, bulk_restore_objects_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Initiates a long-running bulk restore operation on the specified bucket.
-
#cancel_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Starts asynchronous cancellation on a long-running operation.
-
#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_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, 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.
-
#create_project_hmac_key(project_id, service_account_email, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::HmacKey
Creates a new HMAC key for the specified service account.
-
#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| ... }
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_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes a folder.
-
#delete_managed_folder(bucket, managed_folder, allow_non_empty: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Permanently deletes a managed folder.
-
#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.
-
#delete_project_hmac_key(project_id, access_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes an HMAC key.
-
#disable_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCache
Disables an Anywhere Cache instance.
-
#get_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCache
Returns the metadata of an Anywhere Cache instance.
-
#get_bucket(bucket, generation: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, soft_deleted: 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, options_requested_policy_version: 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 bucket.
-
#get_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
-
#get_bucket_storage_layout(bucket, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketStorageLayout
Returns the storage layout configuration 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_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Folder
Returns metadata for the specified folder.
-
#get_managed_folder(bucket, managed_folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ManagedFolder
Returns metadata of the specified managed folder.
-
#get_managed_folder_iam_policy(bucket, managed_folder, options_requested_policy_version: 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 managed folder.
-
#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, soft_deleted: 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_hmac_key(project_id, access_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::HmacKeyMetadata
Retrieves an HMAC key's metadata.
-
#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_anywhere_cach(bucket, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Creates an Anywhere Cache instance.
-
#insert_bucket(project, bucket_object = nil, enable_object_retention: 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_folder(bucket, folder_object = nil, recursive: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Folder
Creates a new folder.
-
#insert_managed_folder(bucket, managed_folder_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ManagedFolder
Creates a new managed folder.
-
#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_anywhere_caches(bucket, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCaches
Returns a list of Anywhere Cache instances of the bucket matching the criteria.
-
#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_bucket_operations(bucket, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request.
-
#list_buckets(project, max_results: nil, page_token: nil, prefix: nil, projection: nil, soft_deleted: 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_folders(bucket, delimiter: nil, end_offset: nil, page_size: nil, page_token: nil, prefix: nil, start_offset: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Folders
Retrieves a list of folders matching the criteria.
-
#list_managed_folders(bucket, page_size: nil, page_token: nil, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ManagedFolders
Lists managed folders in the given 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, end_offset: nil, include_folders_as_prefixes: nil, include_trailing_delimiter: nil, match_glob: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, soft_deleted: nil, start_offset: 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.
-
#list_project_hmac_keys(project_id, max_results: nil, page_token: nil, service_account_email: nil, show_deleted_keys: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::HmacKeysMetadata
Retrieves a list of HMAC keys 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
Patches 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, override_unlocked_retention: 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.
-
#pause_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCache
Pauses an Anywhere Cache instance.
-
#rename_folder(bucket, source_folder, destination_folder, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Renames a source folder to a destination folder.
-
#restore_bucket(bucket, generation, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Restores a soft-deleted bucket.
-
#restore_object(bucket, object, generation, copy_source_acl: 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, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object
Restores a soft-deleted object.
-
#resume_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCache
Resumes a paused or disabled Anywhere Cache instance.
-
#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_managed_folder_iam_policy(bucket, managed_folder, 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 managed folder.
-
#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_managed_folder_iam_permissions(bucket, managed_folder, 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 managed folder 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_anywhere_cach(bucket, anywhere_cache_id, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
-
#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, override_unlocked_retention: 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.
-
#update_project_hmac_key(project_id, access_id, hmac_key_metadata_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::HmacKeyMetadata
Updates the state of an HMAC key.
-
#watch_all_objects(bucket, channel_object = nil, delimiter: nil, end_offset: nil, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, start_offset: 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.
Constructor Details
#initialize ⇒ StorageService
Returns a new instance of StorageService.
51 52 53 54 55 56 |
# File 'lib/google/apis/storage_v1/service.rb', line 51 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, 'storage/v1/', client_name: 'google-apis-storage_v1', client_version: Google::Apis::StorageV1::GEM_VERSION) @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.
40 41 42 |
# File 'lib/google/apis/storage_v1/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/storage_v1/service.rb', line 45 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
49 50 51 |
# File 'lib/google/apis/storage_v1/service.rb', line 49 def user_ip @user_ip end |
Instance Method Details
#bulk_restore_objects(bucket, bulk_restore_objects_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Initiates a long-running bulk restore operation on the specified bucket.
2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 |
# File 'lib/google/apis/storage_v1/service.rb', line 2393 def bulk_restore_objects(bucket, bulk_restore_objects_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/o/bulkRestore', ) command.request_representation = Google::Apis::StorageV1::BulkRestoreObjectsRequest::Representation command.request_object = bulk_restore_objects_request_object command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation command.params['bucket'] = bucket unless bucket.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#cancel_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.
3490 3491 3492 3493 3494 3495 3496 3497 3498 |
# File 'lib/google/apis/storage_v1/service.rb', line 3490 def cancel_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/operations/{operationId}/cancel', ) command.params['bucket'] = bucket unless bucket.nil? command.params['operationId'] = operation_id unless operation_id.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 |
#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.
2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 |
# File 'lib/google/apis/storage_v1/service.rb', line 2449 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_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, 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.
2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 |
# File 'lib/google/apis/storage_v1/service.rb', line 2544 def copy_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, 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['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['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 |
#create_project_hmac_key(project_id, service_account_email, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::HmacKey
Creates a new HMAC key for the specified service account.
3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 |
# File 'lib/google/apis/storage_v1/service.rb', line 3608 def create_project_hmac_key(project_id, service_account_email, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{projectId}/hmacKeys', ) command.response_representation = Google::Apis::StorageV1::HmacKey::Representation command.response_class = Google::Apis::StorageV1::HmacKey command.params['projectId'] = project_id unless project_id.nil? command.query['serviceAccountEmail'] = service_account_email unless service_account_email.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.
Deletes an empty bucket. Deletions are permanent unless soft delete is enabled on the bucket.
587 588 589 590 591 592 593 594 595 596 597 |
# File 'lib/google/apis/storage_v1/service.rb', line 587 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.
345 346 347 348 349 350 351 352 353 354 |
# File 'lib/google/apis/storage_v1/service.rb', line 345 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.
1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 |
# File 'lib/google/apis/storage_v1/service.rb', line 1170 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_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled.
1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 |
# File 'lib/google/apis/storage_v1/service.rb', line 1421 def delete_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/folders/{folder}', ) command.params['bucket'] = bucket unless bucket.nil? command.params['folder'] = folder unless folder.nil? command.query['ifMetagenerationMatch'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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_managed_folder(bucket, managed_folder, allow_non_empty: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Permanently deletes a managed folder.
1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 |
# File 'lib/google/apis/storage_v1/service.rb', line 1660 def delete_managed_folder(bucket, managed_folder, allow_non_empty: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'b/{bucket}/managedFolders/{managedFolder}', ) command.params['bucket'] = bucket unless bucket.nil? command.params['managedFolder'] = managed_folder unless managed_folder.nil? command.query['allowNonEmpty'] = allow_non_empty unless allow_non_empty.nil? command.query['ifMetagenerationMatch'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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.
1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 |
# File 'lib/google/apis/storage_v1/service.rb', line 1951 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.
2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 |
# File 'lib/google/apis/storage_v1/service.rb', line 2620 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.
2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 |
# File 'lib/google/apis/storage_v1/service.rb', line 2111 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 |
#delete_project_hmac_key(project_id, access_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes an HMAC key.
3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 |
# File 'lib/google/apis/storage_v1/service.rb', line 3647 def delete_project_hmac_key(project_id, access_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'projects/{projectId}/hmacKeys/{accessId}', ) command.params['projectId'] = project_id unless project_id.nil? command.params['accessId'] = access_id unless access_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 |
#disable_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCache
Disables an Anywhere Cache instance.
82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/google/apis/storage_v1/service.rb', line 82 def disable_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/disable', ) command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation command.response_class = Google::Apis::StorageV1::AnywhereCache command.params['bucket'] = bucket unless bucket.nil? command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.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_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCache
Returns the metadata of an Anywhere Cache instance.
118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/google/apis/storage_v1/service.rb', line 118 def get_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/anywhereCaches/{anywhereCacheId}', ) command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation command.response_class = Google::Apis::StorageV1::AnywhereCache command.params['bucket'] = bucket unless bucket.nil? command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.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, generation: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, soft_deleted: 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.
638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 |
# File 'lib/google/apis/storage_v1/service.rb', line 638 def get_bucket(bucket, generation: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, soft_deleted: 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['generation'] = generation unless generation.nil? command.query['ifMetagenerationMatch'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .nil? command.query['projection'] = projection unless projection.nil? command.query['softDeleted'] = soft_deleted unless soft_deleted.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.
383 384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/google/apis/storage_v1/service.rb', line 383 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, options_requested_policy_version: 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 bucket.
683 684 685 686 687 688 689 690 691 692 693 694 |
# File 'lib/google/apis/storage_v1/service.rb', line 683 def get_bucket_iam_policy(bucket, options_requested_policy_version: nil, 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['optionsRequestedPolicyVersion'] = 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 |
#get_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Gets the latest state of a long-running operation.
3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 |
# File 'lib/google/apis/storage_v1/service.rb', line 3524 def get_bucket_operation(bucket, operation_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/operations/{operationId}', ) command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation command.params['bucket'] = bucket unless bucket.nil? command.params['operationId'] = operation_id unless operation_id.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_storage_layout(bucket, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::BucketStorageLayout
Returns the storage layout configuration for the specified bucket. Note that this operation requires storage.objects.list permission.
722 723 724 725 726 727 728 729 730 731 732 |
# File 'lib/google/apis/storage_v1/service.rb', line 722 def get_bucket_storage_layout(bucket, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/storageLayout', ) command.response_representation = Google::Apis::StorageV1::BucketStorageLayout::Representation command.response_class = Google::Apis::StorageV1::BucketStorageLayout command.params['bucket'] = bucket unless bucket.nil? command.query['prefix'] = prefix unless prefix.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.
1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 |
# File 'lib/google/apis/storage_v1/service.rb', line 1209 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_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Folder
Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled.
1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 |
# File 'lib/google/apis/storage_v1/service.rb', line 1464 def get_folder(bucket, folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/folders/{folder}', ) command.response_representation = Google::Apis::StorageV1::Folder::Representation command.response_class = Google::Apis::StorageV1::Folder command.params['bucket'] = bucket unless bucket.nil? command.params['folder'] = folder unless folder.nil? command.query['ifMetagenerationMatch'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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_managed_folder(bucket, managed_folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ManagedFolder
Returns metadata of the specified managed folder.
1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 |
# File 'lib/google/apis/storage_v1/service.rb', line 1703 def get_managed_folder(bucket, managed_folder, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}', ) command.response_representation = Google::Apis::StorageV1::ManagedFolder::Representation command.response_class = Google::Apis::StorageV1::ManagedFolder command.params['bucket'] = bucket unless bucket.nil? command.params['managedFolder'] = managed_folder unless managed_folder.nil? command.query['ifMetagenerationMatch'] = unless .nil? command.query['ifMetagenerationNotMatch'] = unless .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_managed_folder_iam_policy(bucket, managed_folder, options_requested_policy_version: 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 managed folder.
1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 |
# File 'lib/google/apis/storage_v1/service.rb', line 1747 def get_managed_folder_iam_policy(bucket, managed_folder, options_requested_policy_version: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}/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['managedFolder'] = managed_folder unless managed_folder.nil? command.query['optionsRequestedPolicyVersion'] = 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 |
#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.
1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 |
# File 'lib/google/apis/storage_v1/service.rb', line 1988 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, soft_deleted: 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.
2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 |
# File 'lib/google/apis/storage_v1/service.rb', line 2690 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, soft_deleted: 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_storage_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['softDeleted'] = soft_deleted unless soft_deleted.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.
2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 |
# File 'lib/google/apis/storage_v1/service.rb', line 2158 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.
2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 |
# File 'lib/google/apis/storage_v1/service.rb', line 2747 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_hmac_key(project_id, access_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::HmacKeyMetadata
Retrieves an HMAC key's metadata
3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 |
# File 'lib/google/apis/storage_v1/service.rb', line 3684 def get_project_hmac_key(project_id, access_id, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/hmacKeys/{accessId}', ) command.response_representation = Google::Apis::StorageV1::HmacKeyMetadata::Representation command.response_class = Google::Apis::StorageV1::HmacKeyMetadata command.params['projectId'] = project_id unless project_id.nil? command.params['accessId'] = access_id unless access_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 |
#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.
3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 |
# File 'lib/google/apis/storage_v1/service.rb', line 3817 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_anywhere_cach(bucket, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Creates an Anywhere Cache instance.
153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/google/apis/storage_v1/service.rb', line 153 def insert_anywhere_cach(bucket, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/anywhereCaches', ) command.request_representation = Google::Apis::StorageV1::AnywhereCache::Representation command.request_object = anywhere_cache_object command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation command.params['bucket'] = bucket unless bucket.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_bucket(project, bucket_object = nil, enable_object_retention: 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.
768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 |
# File 'lib/google/apis/storage_v1/service.rb', line 768 def insert_bucket(project, bucket_object = nil, enable_object_retention: 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['enableObjectRetention'] = enable_object_retention unless enable_object_retention.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['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.
421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'lib/google/apis/storage_v1/service.rb', line 421 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.
1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 |
# File 'lib/google/apis/storage_v1/service.rb', line 1247 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_folder(bucket, folder_object = nil, recursive: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Folder
Creates a new folder. Only applicable to buckets with hierarchical namespace enabled.
1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 |
# File 'lib/google/apis/storage_v1/service.rb', line 1504 def insert_folder(bucket, folder_object = nil, recursive: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/folders', ) command.request_representation = Google::Apis::StorageV1::Folder::Representation command.request_object = folder_object command.response_representation = Google::Apis::StorageV1::Folder::Representation command.response_class = Google::Apis::StorageV1::Folder command.params['bucket'] = bucket unless bucket.nil? command.query['recursive'] = recursive unless recursive.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_managed_folder(bucket, managed_folder_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ManagedFolder
Creates a new managed folder.
1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 |
# File 'lib/google/apis/storage_v1/service.rb', line 1784 def insert_managed_folder(bucket, managed_folder_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/managedFolders', ) command.request_representation = Google::Apis::StorageV1::ManagedFolder::Representation command.request_object = managed_folder_object command.response_representation = Google::Apis::StorageV1::ManagedFolder::Representation command.response_class = Google::Apis::StorageV1::ManagedFolder command.params['bucket'] = bucket unless bucket.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_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.
2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 |
# File 'lib/google/apis/storage_v1/service.rb', line 2026 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.
2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 |
# File 'lib/google/apis/storage_v1/service.rb', line 2825 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_storage_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.
2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 |
# File 'lib/google/apis/storage_v1/service.rb', line 2205 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_anywhere_caches(bucket, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCaches
Returns a list of Anywhere Cache instances of the bucket matching the criteria.
193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/google/apis/storage_v1/service.rb', line 193 def list_anywhere_caches(bucket, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/anywhereCaches', ) command.response_representation = Google::Apis::StorageV1::AnywhereCaches::Representation command.response_class = Google::Apis::StorageV1::AnywhereCaches command.params['bucket'] = bucket unless bucket.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.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.
459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/google/apis/storage_v1/service.rb', line 459 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_bucket_operations(bucket, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse
Lists operations that match the specified filter in the request.
3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 |
# File 'lib/google/apis/storage_v1/service.rb', line 3568 def list_bucket_operations(bucket, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/operations', ) command.response_representation = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse::Representation command.response_class = Google::Apis::StorageV1::GoogleLongrunningListOperationsResponse command.params['bucket'] = bucket unless bucket.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.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, soft_deleted: 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.
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 |
# File 'lib/google/apis/storage_v1/service.rb', line 824 def list_buckets(project, max_results: nil, page_token: nil, prefix: nil, projection: nil, soft_deleted: 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['softDeleted'] = soft_deleted unless soft_deleted.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.
1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 |
# File 'lib/google/apis/storage_v1/service.rb', line 1291 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_folders(bucket, delimiter: nil, end_offset: nil, page_size: nil, page_token: nil, prefix: nil, start_offset: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Folders
Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical namespace enabled.
1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 |
# File 'lib/google/apis/storage_v1/service.rb', line 1561 def list_folders(bucket, delimiter: nil, end_offset: nil, page_size: nil, page_token: nil, prefix: nil, start_offset: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/folders', ) command.response_representation = Google::Apis::StorageV1::Folders::Representation command.response_class = Google::Apis::StorageV1::Folders command.params['bucket'] = bucket unless bucket.nil? command.query['delimiter'] = delimiter unless delimiter.nil? command.query['endOffset'] = end_offset unless end_offset.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['prefix'] = prefix unless prefix.nil? command.query['startOffset'] = start_offset unless start_offset.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_managed_folders(bucket, page_size: nil, page_token: nil, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::ManagedFolders
Lists managed folders in the given bucket.
1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 |
# File 'lib/google/apis/storage_v1/service.rb', line 1826 def list_managed_folders(bucket, page_size: nil, page_token: nil, prefix: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/managedFolders', ) command.response_representation = Google::Apis::StorageV1::ManagedFolders::Representation command.response_class = Google::Apis::StorageV1::ManagedFolders command.params['bucket'] = bucket unless bucket.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['prefix'] = prefix unless prefix.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.
2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 |
# File 'lib/google/apis/storage_v1/service.rb', line 2064 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.
2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 |
# File 'lib/google/apis/storage_v1/service.rb', line 2252 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, end_offset: nil, include_folders_as_prefixes: nil, include_trailing_delimiter: nil, match_glob: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, soft_deleted: nil, start_offset: 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.
2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 |
# File 'lib/google/apis/storage_v1/service.rb', line 2920 def list_objects(bucket, delimiter: nil, end_offset: nil, include_folders_as_prefixes: nil, include_trailing_delimiter: nil, match_glob: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, soft_deleted: nil, start_offset: 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['endOffset'] = end_offset unless end_offset.nil? command.query['includeFoldersAsPrefixes'] = include_folders_as_prefixes unless include_folders_as_prefixes.nil? command.query['includeTrailingDelimiter'] = include_trailing_delimiter unless include_trailing_delimiter.nil? command.query['matchGlob'] = match_glob unless match_glob.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['softDeleted'] = soft_deleted unless soft_deleted.nil? command.query['startOffset'] = start_offset unless start_offset.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 |
#list_project_hmac_keys(project_id, max_results: nil, page_token: nil, service_account_email: nil, show_deleted_keys: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::HmacKeysMetadata
Retrieves a list of HMAC keys matching the criteria.
3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 |
# File 'lib/google/apis/storage_v1/service.rb', line 3734 def list_project_hmac_keys(project_id, max_results: nil, page_token: nil, service_account_email: nil, show_deleted_keys: nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/hmacKeys', ) command.response_representation = Google::Apis::StorageV1::HmacKeysMetadata::Representation command.response_class = Google::Apis::StorageV1::HmacKeysMetadata command.params['projectId'] = project_id unless project_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['serviceAccountEmail'] = service_account_email unless service_account_email.nil? command.query['showDeletedKeys'] = show_deleted_keys unless show_deleted_keys.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 |
#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.
868 869 870 871 872 873 874 875 876 877 878 879 |
# File 'lib/google/apis/storage_v1/service.rb', line 868 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
Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.
919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 |
# File 'lib/google/apis/storage_v1/service.rb', line 919 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.
499 500 501 502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/google/apis/storage_v1/service.rb', line 499 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.
1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 |
# File 'lib/google/apis/storage_v1/service.rb', line 1333 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, override_unlocked_retention: 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.
2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 |
# File 'lib/google/apis/storage_v1/service.rb', line 2998 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, override_unlocked_retention: 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['overrideUnlockedRetention'] = override_unlocked_retention unless override_unlocked_retention.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.
2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 |
# File 'lib/google/apis/storage_v1/service.rb', line 2301 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 |
#pause_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCache
Pauses an Anywhere Cache instance.
230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/google/apis/storage_v1/service.rb', line 230 def pause_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/pause', ) command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation command.response_class = Google::Apis::StorageV1::AnywhereCache command.params['bucket'] = bucket unless bucket.nil? command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.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 |
#rename_folder(bucket, source_folder, destination_folder, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Renames a source folder to a destination folder. Only applicable to buckets with hierarchical namespace enabled.
1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 |
# File 'lib/google/apis/storage_v1/service.rb', line 1611 def rename_folder(bucket, source_folder, destination_folder, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/folders/{sourceFolder}/renameTo/folders/{destinationFolder}', ) command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation command.params['bucket'] = bucket unless bucket.nil? command.params['sourceFolder'] = source_folder unless source_folder.nil? command.params['destinationFolder'] = destination_folder unless destination_folder.nil? command.query['ifSourceMetagenerationMatch'] = unless .nil? command.query['ifSourceMetagenerationNotMatch'] = unless .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 |
#restore_bucket(bucket, generation, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Restores a soft-deleted bucket.
964 965 966 967 968 969 970 971 972 973 |
# File 'lib/google/apis/storage_v1/service.rb', line 964 def restore_bucket(bucket, generation, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/restore', ) command.params['bucket'] = bucket unless bucket.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 |
#restore_object(bucket, object, generation, copy_source_acl: 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, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::Object
Restores a soft-deleted object.
3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 |
# File 'lib/google/apis/storage_v1/service.rb', line 3070 def restore_object(bucket, object, generation, copy_source_acl: 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, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/o/{object}/restore', ) 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['copySourceAcl'] = copy_source_acl unless copy_source_acl.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 |
#resume_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::AnywhereCache
Resumes a paused or disabled Anywhere Cache instance.
266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/google/apis/storage_v1/service.rb', line 266 def resume_anywhere_cach(bucket, anywhere_cache_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'b/{bucket}/anywhereCaches/{anywhereCacheId}/resume', ) command.response_representation = Google::Apis::StorageV1::AnywhereCache::Representation command.response_class = Google::Apis::StorageV1::AnywhereCache command.params['bucket'] = bucket unless bucket.nil? command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.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.
3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 |
# File 'lib/google/apis/storage_v1/service.rb', line 3180 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.
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 |
# File 'lib/google/apis/storage_v1/service.rb', line 1000 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_managed_folder_iam_policy(bucket, managed_folder, 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 managed folder.
1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 |
# File 'lib/google/apis/storage_v1/service.rb', line 1867 def set_managed_folder_iam_policy(bucket, managed_folder, policy_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'b/{bucket}/managedFolders/{managedFolder}/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['managedFolder'] = managed_folder unless managed_folder.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.
3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 |
# File 'lib/google/apis/storage_v1/service.rb', line 3243 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
1132 1133 1134 1135 1136 1137 1138 1139 1140 |
# File 'lib/google/apis/storage_v1/service.rb', line 1132 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.
1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 |
# File 'lib/google/apis/storage_v1/service.rb', line 1041 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_managed_folder_iam_permissions(bucket, managed_folder, 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 managed folder to see which, if any, are held by the caller.
1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 |
# File 'lib/google/apis/storage_v1/service.rb', line 1911 def (bucket, managed_folder, , user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'b/{bucket}/managedFolders/{managedFolder}/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['managedFolder'] = managed_folder unless managed_folder.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.
3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 |
# File 'lib/google/apis/storage_v1/service.rb', line 3293 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_anywhere_cach(bucket, anywhere_cache_id, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::GoogleLongrunningOperation
Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/google/apis/storage_v1/service.rb', line 303 def update_anywhere_cach(bucket, anywhere_cache_id, anywhere_cache_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'b/{bucket}/anywhereCaches/{anywhereCacheId}', ) command.request_representation = Google::Apis::StorageV1::AnywhereCache::Representation command.request_object = anywhere_cache_object command.response_representation = Google::Apis::StorageV1::GoogleLongrunningOperation::Representation command.response_class = Google::Apis::StorageV1::GoogleLongrunningOperation command.params['bucket'] = bucket unless bucket.nil? command.params['anywhereCacheId'] = anywhere_cache_id unless anywhere_cache_id.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.
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 |
# File 'lib/google/apis/storage_v1/service.rb', line 1092 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.
542 543 544 545 546 547 548 549 550 551 552 553 554 555 |
# File 'lib/google/apis/storage_v1/service.rb', line 542 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.
1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 |
# File 'lib/google/apis/storage_v1/service.rb', line 1376 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, override_unlocked_retention: 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.
3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 |
# File 'lib/google/apis/storage_v1/service.rb', line 3362 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, override_unlocked_retention: 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['overrideUnlockedRetention'] = override_unlocked_retention unless override_unlocked_retention.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.
2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 |
# File 'lib/google/apis/storage_v1/service.rb', line 2353 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 |
#update_project_hmac_key(project_id, access_id, hmac_key_metadata_object = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StorageV1::HmacKeyMetadata
Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.
3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 |
# File 'lib/google/apis/storage_v1/service.rb', line 3778 def update_project_hmac_key(project_id, access_id, = nil, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'projects/{projectId}/hmacKeys/{accessId}', ) command.request_representation = Google::Apis::StorageV1::HmacKeyMetadata::Representation command.request_object = command.response_representation = Google::Apis::StorageV1::HmacKeyMetadata::Representation command.response_class = Google::Apis::StorageV1::HmacKeyMetadata command.params['projectId'] = project_id unless project_id.nil? command.params['accessId'] = access_id unless access_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 |
#watch_all_objects(bucket, channel_object = nil, delimiter: nil, end_offset: nil, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, start_offset: 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.
3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 |
# File 'lib/google/apis/storage_v1/service.rb', line 3442 def watch_all_objects(bucket, channel_object = nil, delimiter: nil, end_offset: nil, include_trailing_delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, start_offset: 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['endOffset'] = end_offset unless end_offset.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['startOffset'] = start_offset unless start_offset.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 |