Google Cloud Storage Java Programming Model: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
=External= | |||
* Examples: https://github.com/googleapis/google-cloud-java/tree/master/google-cloud-examples/src/main/java/com/google/cloud/examples/storage | |||
=Internal= | =Internal= | ||
* [[Google Cloud Programmatic Access#Subjects|Google Cloud Programmatic Access]] | * [[Google Cloud Programmatic Access#Subjects|Google Cloud Programmatic Access]] |
Latest revision as of 22:58, 3 September 2021
External
Internal
Overview
ServiceAccountCredentials serviceAccountCredentials;
Storage storageService = StorageOptions.newBuilder().setCredentials(serviceAccountCredentials).build().getService();
Bucket by Name
ServiceAccountCredentials serviceAccountCredentials;
storageService.get(bucketName, options);
// or
storageService.get(bucketName);
List Buckets
Page<Bucket> buckets = storageService.list();
Local Testing
Storage storage = LocalStorageHelper.getOptions().getService();