简体   繁体   English

使用Cloud Storage客户端库的Google存储桶统计信息

[英]Google storage bucket stats using Cloud Storage Client Libraries

I have a web application that creates/deletes buckets, uploads/downloads objects from google storage and I am successfully using Google Apis Storage v1 and v1.Data in C#. 我有一个Web应用程序,可以创建/删除存储桶,从Google存储空间上载/下载对象,并且我已经在C#中成功使用Google Apis Storage v1和v1.Data。

I would like to know if there is a way to find out how much space a bucket has used using the Google Apis. 我想知道是否有一种方法可以找出使用Google Apis的存储桶已使用了多少空间。 I was thinking something like StorageClient.GetBucket would return this information but it doesn't seem to. 我在想像StorageClient.GetBucket这样的东西会返回此信息,但似乎没有。

All the help documentation seems to point to the gsutil but I can't use that as this is for a web application. 所有帮助文档似乎都指向gsutil,但我不能使用它,因为这是针对Web应用程序的。 So to clarify I am using Cloud Storage Client Libraries 因此要澄清一下,我正在使用云存储客户端库

I want to be able to look at any given moment how much space has been used for a particular bucket, using the Google.Storage.Apis (which isn't the XML API or JSON API) 我希望能够在任何时候使用Google.Storage.Apis(不是XML API或JSON API)查看特定存储桶已使用了多少空间。

Any help would be very much appreciated. 任何帮助将不胜感激。

You can set up bucket logging per Bucket Logging Doc , which will generate a file once a day with the total size (in bytes) of the buckets you defined. 您可以为每个“ 存储桶日志记录文档”设置存储桶日志记录 ,这将每天生成一次文件,其中包含您定义的存储桶的总大小(以字节为单位)。

And you've created a feature request as FR/37237171 at the issue tracker. 您已经在问题跟踪器中创建了功能请求FR / 37237171

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 创建文件夹 google cloud storage bucket .NET Client Library - Create folder google cloud storage bucket .NET Client Library Google云端存储:删除存储桶中的内容 - Google Cloud Storage: Deleting contents of a bucket 使用服务帐户将文件上传到Google Merchant Center中生成的Google Cloud Storage存储桶 - Upload file using Service Account to Google Cloud Storage bucket that was generated in Google Merchant Center Google Cloud Storage .Net客户端库文档? - Google Cloud Storage .Net Client Library Documentation? Google Cloud Storage .Net 客户端批量上传 - Google Cloud Storage .Net Client Bulk Upload 使用来自C#的Json文件中的服务帐户的Google云存储桶 - Google cloud storage bucket using service account in Json file from C# 使用RestSharp或C#从Google云存储桶中获取文件 - Get File from Google cloud storage bucket using RestSharp or C# 如何从 C# 访问谷歌云存储桶 - How to access Google cloud storage bucket from c# 使用 C# 拉出 Cloud Storage 存储桶 - Pulling out of a Cloud Storage bucket using C# Google Cloud Storage不会更新现有的默认Content-Disposition,而是使用.NET Client Libraries创建新的Content-Disposition元数据 - Google Cloud Storage not updating the existing default Content-Disposition but creating a new Content-Disposition metadata with .NET Client Libraries
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM