[][src]Struct gcp_client::google::storage::v1::storage_client::StorageClient

pub struct StorageClient<T> { /* fields omitted */ }

Manages Google Cloud Storage resources.

Implementations

impl<T> StorageClient<T> where
    T: GrpcService<BoxBody>,
    T::ResponseBody: Body + HttpBody + Send + 'static,
    T::Error: Into<StdError>,
    <T::ResponseBody as HttpBody>::Error: Into<StdError> + Send
[src]

pub fn new(inner: T) -> Self[src]

pub fn with_interceptor(inner: T, interceptor: impl Into<Interceptor>) -> Self[src]

pub async fn delete_bucket_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteBucketAccessControlRequest>
) -> Result<Response<()>, Status>
[src]

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

pub async fn get_bucket_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetBucketAccessControlRequest>
) -> Result<Response<BucketAccessControl>, Status>
[src]

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

pub async fn insert_bucket_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<InsertBucketAccessControlRequest>
) -> Result<Response<BucketAccessControl>, Status>
[src]

Creates a new ACL entry on the specified bucket.

pub async fn list_bucket_access_controls<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListBucketAccessControlsRequest>
) -> Result<Response<ListBucketAccessControlsResponse>, Status>
[src]

Retrieves ACL entries on the specified bucket.

pub async fn update_bucket_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateBucketAccessControlRequest>
) -> Result<Response<BucketAccessControl>, Status>
[src]

Updates an ACL entry on the specified bucket. Equivalent to PatchBucketAccessControl, but all unspecified fields will be reset to their default values.

pub async fn patch_bucket_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<PatchBucketAccessControlRequest>
) -> Result<Response<BucketAccessControl>, Status>
[src]

Updates an ACL entry on the specified bucket.

pub async fn delete_bucket<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteBucketRequest>
) -> Result<Response<()>, Status>
[src]

Permanently deletes an empty bucket.

pub async fn get_bucket<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetBucketRequest>
) -> Result<Response<Bucket>, Status>
[src]

Returns metadata for the specified bucket.

pub async fn insert_bucket<'_>(
    &'_ mut self,
    request: impl IntoRequest<InsertBucketRequest>
) -> Result<Response<Bucket>, Status>
[src]

Creates a new bucket.

pub async fn list_channels<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListChannelsRequest>
) -> Result<Response<ListChannelsResponse>, Status>
[src]

List active object change notification channels for this bucket.

pub async fn list_buckets<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListBucketsRequest>
) -> Result<Response<ListBucketsResponse>, Status>
[src]

Retrieves a list of buckets for a given project.

pub async fn lock_bucket_retention_policy<'_>(
    &'_ mut self,
    request: impl IntoRequest<LockRetentionPolicyRequest>
) -> Result<Response<Bucket>, Status>
[src]

Locks retention policy on a bucket.

pub async fn get_bucket_iam_policy<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetIamPolicyRequest>
) -> Result<Response<Policy>, Status>
[src]

Gets the IAM policy for the specified bucket.

pub async fn set_bucket_iam_policy<'_>(
    &'_ mut self,
    request: impl IntoRequest<SetIamPolicyRequest>
) -> Result<Response<Policy>, Status>
[src]

Updates an IAM policy for the specified bucket.

pub async fn test_bucket_iam_permissions<'_>(
    &'_ mut self,
    request: impl IntoRequest<TestIamPermissionsRequest>
) -> Result<Response<TestIamPermissionsResponse>, Status>
[src]

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

pub async fn patch_bucket<'_>(
    &'_ mut self,
    request: impl IntoRequest<PatchBucketRequest>
) -> Result<Response<Bucket>, Status>
[src]

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

pub async fn update_bucket<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateBucketRequest>
) -> Result<Response<Bucket>, Status>
[src]

Updates a bucket. Equivalent to PatchBucket, but always replaces all mutatable fields of the bucket with new values, reverting all unspecified fields to their default values. Like PatchBucket, Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.

pub async fn stop_channel<'_>(
    &'_ mut self,
    request: impl IntoRequest<StopChannelRequest>
) -> Result<Response<()>, Status>
[src]

Halts "Object Change Notification" push messagages. See https://cloud.google.com/storage/docs/object-change-notification Note: this is not related to the newer "Notifications" resource, which are stopped using DeleteNotification.

pub async fn delete_default_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteDefaultObjectAccessControlRequest>
) -> Result<Response<()>, Status>
[src]

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

pub async fn get_default_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetDefaultObjectAccessControlRequest>
) -> Result<Response<ObjectAccessControl>, Status>
[src]

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

pub async fn insert_default_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<InsertDefaultObjectAccessControlRequest>
) -> Result<Response<ObjectAccessControl>, Status>
[src]

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

pub async fn list_default_object_access_controls<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListDefaultObjectAccessControlsRequest>
) -> Result<Response<ListObjectAccessControlsResponse>, Status>
[src]

Retrieves default object ACL entries on the specified bucket.

pub async fn patch_default_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<PatchDefaultObjectAccessControlRequest>
) -> Result<Response<ObjectAccessControl>, Status>
[src]

Updates a default object ACL entry on the specified bucket.

pub async fn update_default_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateDefaultObjectAccessControlRequest>
) -> Result<Response<ObjectAccessControl>, Status>
[src]

Updates a default object ACL entry on the specified bucket. Equivalent to PatchDefaultObjectAccessControl, but modifies all unspecified fields to their default values.

pub async fn delete_notification<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteNotificationRequest>
) -> Result<Response<()>, Status>
[src]

Permanently deletes a notification subscription. Note: Older, "Object Change Notification" push subscriptions should be deleted using StopChannel instead.

pub async fn get_notification<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetNotificationRequest>
) -> Result<Response<Notification>, Status>
[src]

View a notification configuration.

pub async fn insert_notification<'_>(
    &'_ mut self,
    request: impl IntoRequest<InsertNotificationRequest>
) -> Result<Response<Notification>, Status>
[src]

Creates a notification subscription for a given bucket. These notifications, when triggered, publish messages to the specified Cloud Pub/Sub topics. See https://cloud.google.com/storage/docs/pubsub-notifications.

pub async fn list_notifications<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListNotificationsRequest>
) -> Result<Response<ListNotificationsResponse>, Status>
[src]

Retrieves a list of notification subscriptions for a given bucket.

pub async fn delete_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteObjectAccessControlRequest>
) -> Result<Response<()>, Status>
[src]

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

pub async fn get_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetObjectAccessControlRequest>
) -> Result<Response<ObjectAccessControl>, Status>
[src]

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

pub async fn insert_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<InsertObjectAccessControlRequest>
) -> Result<Response<ObjectAccessControl>, Status>
[src]

Creates a new ACL entry on the specified object.

pub async fn list_object_access_controls<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListObjectAccessControlsRequest>
) -> Result<Response<ListObjectAccessControlsResponse>, Status>
[src]

Retrieves ACL entries on the specified object.

pub async fn patch_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<PatchObjectAccessControlRequest>
) -> Result<Response<ObjectAccessControl>, Status>
[src]

Patches an ACL entry on the specified object. Patch is similar to update, but only applies or appends the specified fields in the object_access_control object. Other fields are unaffected.

pub async fn update_object_access_control<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateObjectAccessControlRequest>
) -> Result<Response<ObjectAccessControl>, Status>
[src]

Updates an ACL entry on the specified object.

pub async fn compose_object<'_>(
    &'_ mut self,
    request: impl IntoRequest<ComposeObjectRequest>
) -> Result<Response<Object>, Status>
[src]

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

pub async fn copy_object<'_>(
    &'_ mut self,
    request: impl IntoRequest<CopyObjectRequest>
) -> Result<Response<Object>, Status>
[src]

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

pub async fn delete_object<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteObjectRequest>
) -> Result<Response<()>, Status>
[src]

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

pub async fn get_object<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetObjectRequest>
) -> Result<Response<Object>, Status>
[src]

Retrieves an object's metadata.

pub async fn get_object_media<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetObjectMediaRequest>
) -> Result<Response<Streaming<GetObjectMediaResponse>>, Status>
[src]

Reads an object's data.

pub async fn insert_object<'_>(
    &'_ mut self,
    request: impl IntoStreamingRequest<Message = InsertObjectRequest>
) -> Result<Response<Object>, Status>
[src]

Stores a new object and metadata.

An object can be written either in a single message stream or in a resumable sequence of message streams. To write using a single stream, the client should include in the first message of the stream an InsertObjectSpec describing the destination bucket, object, and any preconditions. Additionally, the final message must set 'finish_write' to true, or else it is an error.

For a resumable write, the client should instead call StartResumableWrite() and provide that method an InsertObjectSpec. They should then attach the returned upload_id to the first message of each following call to Insert. If there is an error or the connection is broken during the resumable Insert(), the client should check the status of the Insert() by calling QueryWriteStatus() and continue writing from the returned committed_size. This may be less than the amount of data the client previously sent.

The service will not view the object as complete until the client has sent an Insert with finish_write set to true. Sending any requests on a stream after sending a request with finish_write set to true will cause an error. The client should check the Object it receives to determine how much data the service was able to commit and whether the service views the object as complete.

pub async fn list_objects<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListObjectsRequest>
) -> Result<Response<ListObjectsResponse>, Status>
[src]

Retrieves a list of objects matching the criteria.

pub async fn rewrite_object<'_>(
    &'_ mut self,
    request: impl IntoRequest<RewriteObjectRequest>
) -> Result<Response<RewriteResponse>, Status>
[src]

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

pub async fn start_resumable_write<'_>(
    &'_ mut self,
    request: impl IntoRequest<StartResumableWriteRequest>
) -> Result<Response<StartResumableWriteResponse>, Status>
[src]

Starts a resumable write. How long the write operation remains valid, and what happens when the write operation becomes invalid, are service-dependent.

pub async fn query_write_status<'_>(
    &'_ mut self,
    request: impl IntoRequest<QueryWriteStatusRequest>
) -> Result<Response<QueryWriteStatusResponse>, Status>
[src]

Determines the committed_size for an object that is being written, which can then be used as the write_offset for the next Write() call.

If the object does not exist (i.e., the object has been deleted, or the first Write() has not yet reached the service), this method returns the error NOT_FOUND.

The client may call QueryWriteStatus() at any time to determine how much data has been processed for this object. This is useful if the client is buffering data and needs to know which data can be safely evicted. For any sequence of QueryWriteStatus() calls for a given object name, the sequence of returned committed_size values will be non-decreasing.

pub async fn patch_object<'_>(
    &'_ mut self,
    request: impl IntoRequest<PatchObjectRequest>
) -> Result<Response<Object>, Status>
[src]

Updates an object's metadata.

pub async fn update_object<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateObjectRequest>
) -> Result<Response<Object>, Status>
[src]

Updates an object's metadata. Equivalent to PatchObject, but always replaces all mutatable fields of the bucket with new values, reverting all unspecified fields to their default values.

pub async fn get_object_iam_policy<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetIamPolicyRequest>
) -> Result<Response<Policy>, Status>
[src]

Gets the IAM policy for the specified object.

pub async fn set_object_iam_policy<'_>(
    &'_ mut self,
    request: impl IntoRequest<SetIamPolicyRequest>
) -> Result<Response<Policy>, Status>
[src]

Updates an IAM policy for the specified object.

pub async fn test_object_iam_permissions<'_>(
    &'_ mut self,
    request: impl IntoRequest<TestIamPermissionsRequest>
) -> Result<Response<TestIamPermissionsResponse>, Status>
[src]

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

pub async fn watch_all_objects<'_>(
    &'_ mut self,
    request: impl IntoRequest<WatchAllObjectsRequest>
) -> Result<Response<Channel>, Status>
[src]

Watch for changes on all objects in a bucket.

pub async fn get_service_account<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetProjectServiceAccountRequest>
) -> Result<Response<ServiceAccount>, Status>
[src]

Retrieves the name of a project's Google Cloud Storage service account.

pub async fn create_hmac_key<'_>(
    &'_ mut self,
    request: impl IntoRequest<CreateHmacKeyRequest>
) -> Result<Response<CreateHmacKeyResponse>, Status>
[src]

Creates a new HMAC key for the given service account.

pub async fn delete_hmac_key<'_>(
    &'_ mut self,
    request: impl IntoRequest<DeleteHmacKeyRequest>
) -> Result<Response<()>, Status>
[src]

Deletes a given HMAC key. Key must be in an INACTIVE state.

pub async fn get_hmac_key<'_>(
    &'_ mut self,
    request: impl IntoRequest<GetHmacKeyRequest>
) -> Result<Response<HmacKeyMetadata>, Status>
[src]

Gets an existing HMAC key metadata for the given id.

pub async fn list_hmac_keys<'_>(
    &'_ mut self,
    request: impl IntoRequest<ListHmacKeysRequest>
) -> Result<Response<ListHmacKeysResponse>, Status>
[src]

Lists HMAC keys under a given project with the additional filters provided.

pub async fn update_hmac_key<'_>(
    &'_ mut self,
    request: impl IntoRequest<UpdateHmacKeyRequest>
) -> Result<Response<HmacKeyMetadata>, Status>
[src]

Updates a given HMAC key state between ACTIVE and INACTIVE.

Trait Implementations

impl<T: Clone> Clone for StorageClient<T>[src]

impl<T> Debug for StorageClient<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for StorageClient<T>

impl<T> Send for StorageClient<T> where
    T: Send

impl<T> Sync for StorageClient<T> where
    T: Sync

impl<T> Unpin for StorageClient<T> where
    T: Unpin

impl<T> !UnwindSafe for StorageClient<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]