org.jclouds.googlecloudstorage.features
Interface BucketApi


public interface BucketApi

Provides access to Bucket entities via their REST API.

See Also:

Method Summary
 Bucket createBucket(String projectId, BucketTemplate bucketTemplate)
          Creates a new bucket
 Bucket createBucket(String projectId, BucketTemplate bucketTemplate, InsertBucketOptions options)
          Creates a new Bucket
 void deleteBucket(String bucketName)
          Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.
 void deleteBucket(String bucketName, DeleteBucketOptions options)
          Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.
 Bucket getBucket(String bucketName)
          Returns metadata for the specified bucket.
 Bucket getBucket(String bucketName, GetBucketOptions options)
          Returns metadata for the specified bucket
 ListPage<Bucket> listBucket(String projectId)
          Retrieves a list of buckets for a given project
 ListPage<Bucket> listBucket(String projectId, ListOptions options)
          Retrieves a list of buckets for a given project
 Bucket patchBucket(String bucketName, BucketTemplate bucketTemplate)
          Updates a bucket supporting patch semantics.
 Bucket patchBucket(String bucketName, BucketTemplate bucketTemplate, UpdateBucketOptions options)
          Updates a bucket supporting patch semantics.
 Bucket updateBucket(String bucketName, BucketTemplate bucketTemplate)
          Updates a bucket
 Bucket updateBucket(String bucketName, BucketTemplate bucketTemplate, UpdateBucketOptions options)
          Updates a bucket
 

Method Detail

getBucket

@Named(value="Bucket:get")
@Nullable
Bucket getBucket(String bucketName)
Returns metadata for the specified bucket.

Parameters:
bucketName - Name of the bucket
Returns:
a Bucket resource

getBucket

@Named(value="Bucket:get")
@Nullable
Bucket getBucket(String bucketName,
                                GetBucketOptions options)
Returns metadata for the specified bucket

Parameters:
bucketName - Name of the bucket
options - Supply GetBucketOptions with optional query parameters
Returns:
a Bucket resource

createBucket

@Named(value="Bucket:insert")
Bucket createBucket(String projectId,
                          BucketTemplate bucketTemplate)
Creates a new bucket

Parameters:
projectId - A valid API project identifier
bucketTemplate - supply a BucketTemplate resource
Returns:
If successful, this method returns a Bucket resource.

createBucket

@Named(value="Bucket:insert")
Bucket createBucket(String projectId,
                          BucketTemplate bucketTemplate,
                          InsertBucketOptions options)
Creates a new Bucket

Parameters:
projectId - A valid API project identifier
bucketTemplate - Supply a BucketTemplate resource
options - Supply InsertBucketOptions with optional query parameters
Returns:
If successful, this method returns a Bucket resource.

deleteBucket

@Named(value="Bucket:delete")
@Nullable
void deleteBucket(String bucketName)
Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.

Parameters:
bucketName - Name of the bucket

deleteBucket

@Named(value="Bucket:delete")
@Nullable
void deleteBucket(String bucketName,
                                 DeleteBucketOptions options)
Permanently deletes an empty Bucket.If bucket is not empty 409 error to indicate the conflict.

Parameters:
bucketName - Name of the bucket
options - Supply DeleteBucketOptions with optional query parameters

listBucket

@Named(value="Bucket:list")
@Nullable
ListPage<Bucket> listBucket(String projectId)
Retrieves a list of buckets for a given project

Parameters:
projectId - A valid API project identifier
Returns:
a ListPage

listBucket

@Named(value="Bucket:list")
@Nullable
ListPage<Bucket> listBucket(String projectId,
                                           ListOptions options)
Retrieves a list of buckets for a given project

Parameters:
projectId - A valid API project identifier
options - Supply ListOptions with optional query parameters

updateBucket

@Named(value="Bucket:update")
Bucket updateBucket(String bucketName,
                          BucketTemplate bucketTemplate)
Updates a bucket

Parameters:
bucketName - Name of the bucket
bucketTemplate - Supply a BucketTemplate resource with list of BucketAccessControls
Returns:
If successful, this method returns the updated Bucket resource.

updateBucket

@Named(value="Bucket:update")
Bucket updateBucket(String bucketName,
                          BucketTemplate bucketTemplate,
                          UpdateBucketOptions options)
Updates a bucket

Parameters:
bucketName - Name of the bucket
bucketTemplate - Supply a BucketTemplate resource with list of BucketAccessControls
options - Supply UpdateBucketOptions with optional query parameters
Returns:
If successful,this method returns the updated Bucket resource.

patchBucket

@Named(value="Bucket:patch")
Bucket patchBucket(String bucketName,
                         BucketTemplate bucketTemplate)
Updates a bucket supporting patch semantics.

Parameters:
bucketName - Name of the bucket
bucketTemplate - Supply a BucketTemplate resource with list of BucketAccessControls
Returns:
If successful, this method returns the updated Bucket resource.
See Also:

patchBucket

@Named(value="Bucket:patch")
Bucket patchBucket(String bucketName,
                         BucketTemplate bucketTemplate,
                         UpdateBucketOptions options)
Updates a bucket supporting patch semantics.

Parameters:
bucketName - Name of the bucket
bucketTemplate - Supply a BucketTemplate resource with list of BucketAccessControls
options - Supply UpdateBucketOptions with optional query parameters
Returns:
If successful, this method returns the updated Bucket resource.
See Also:


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.