/** * Lists the buckets belonging to the service user. * <p> * This method cannot be performed by anonymous services, and will fail with an exception * if the service is not authenticated. * * @return * the list of buckets owned by the service user. * @throws ServiceException */ public StorageBucket[] listAllBuckets() throws ServiceException { assertAuthenticatedConnection("List all buckets"); StorageBucket[] buckets = listAllBucketsImpl(); MxDelegate.getInstance().registerStorageBucketMBeans(buckets); return buckets; }
/** * Lists the buckets belonging to the service user. * <p> * This method cannot be performed by anonymous services, and will fail with an exception * if the service is not authenticated. * * @return * the list of buckets owned by the service user. * @throws ServiceException */ public StorageBucket[] listAllBuckets() throws ServiceException { assertAuthenticatedConnection("List all buckets"); StorageBucket[] buckets = listAllBucketsImpl(); MxDelegate.getInstance().registerStorageBucketMBeans(buckets); return buckets; }
/** * List all buckets in a given project * @param projectId The ID of the project being listed * @return a list of {@link GSBucket} * @throws ServiceException Service error */ public GSBucket[] listAllBuckets(String projectId) throws ServiceException { assertAuthenticatedConnection("List all buckets"); StorageBucket[] buckets = listAllBucketsImpl(projectId); MxDelegate.getInstance().registerStorageBucketMBeans(buckets); return GSBucket.cast(buckets); }
/** * List all buckets in a given project * @param projectId The ID of the project being listed * @return a list of {@link GSBucket} * @throws ServiceException Service error */ public GSBucket[] listAllBuckets(String projectId) throws ServiceException { assertAuthenticatedConnection("List all buckets"); StorageBucket[] buckets = listAllBucketsImpl(projectId); MxDelegate.getInstance().registerStorageBucketMBeans(buckets); return GSBucket.cast(buckets); }