Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using Google;
- using Google.Apis.Auth.OAuth2;
- using Google.Cloud.Storage.V1;
- namespace GoogleCloudStorage
- {
- class Program
- {
- private static readonly string _projectID = "72532143782";
- static void Main(string[] args)
- {
- var credential = GoogleCredential.FromFile("test2.json");
- var storageClient = StorageClient.Create(credential);
- foreach (var listBucket in storageClient.ListBuckets(_projectID))
- {
- foreach (var accessControl in listBucket.Acl)
- {
- Console.WriteLine(accessControl.Role);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement