org.jclouds.s3.options
Class PutBucketOptions

java.lang.Object
  extended by org.jclouds.http.options.BaseHttpRequestOptions
      extended by org.jclouds.s3.options.PutBucketOptions
All Implemented Interfaces:
org.jclouds.http.options.HttpRequestOptions

public class PutBucketOptions
extends org.jclouds.http.options.BaseHttpRequestOptions

Contains options supported in the REST API for the PUT bucket operation.

Usage

The recommended way to instantiate a PutBucketOptions object is to statically import PutBucketOptions.Builder.* and invoke a static creation method followed by an instance mutator (if needed):

import static org.jclouds.s3.commands.options.PutBucketOptions.Builder.* import static org.jclouds.s3.domain.S3Bucket.Metadata.LocationConstraint.*; import org.jclouds.s3.S3Client;

S3Client connection = // get connection Future createdInEu = connection.putBucketIfNotExists("bucketName",createIn(EU));

Author:
Adrian Cole
See Also:

Nested Class Summary
static class PutBucketOptions.Builder
           
 
Field Summary
 
Fields inherited from class org.jclouds.http.options.BaseHttpRequestOptions
formParameters, headers, matrixParameters, pathSuffix, payload, queryParameters
 
Constructor Summary
PutBucketOptions()
           
 
Method Summary
 com.google.common.collect.Multimap<String,String> buildRequestHeaders()
           
 CannedAccessPolicy getAcl()
           
 void setHeaderTag(String headerTag)
           
 PutBucketOptions withBucketAcl(CannedAccessPolicy acl)
          Override the default ACL (private) with the specified one.
 
Methods inherited from class org.jclouds.http.options.BaseHttpRequestOptions
buildFormParameters, buildMatrixParameters, buildPathSuffix, buildQueryParameters, buildStringPayload, equals, getFirstFormOrNull, getFirstHeaderOrNull, getFirstMatrixOrNull, getFirstQueryOrNull, hashCode, replaceHeader, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PutBucketOptions

public PutBucketOptions()
Method Detail

setHeaderTag

@Inject
public void setHeaderTag(@Named(value="jclouds.aws.header.tag")
                                String headerTag)

buildRequestHeaders

public com.google.common.collect.Multimap<String,String> buildRequestHeaders()
Specified by:
buildRequestHeaders in interface org.jclouds.http.options.HttpRequestOptions
Overrides:
buildRequestHeaders in class org.jclouds.http.options.BaseHttpRequestOptions

withBucketAcl

public PutBucketOptions withBucketAcl(CannedAccessPolicy acl)
Override the default ACL (private) with the specified one.

See Also:
CannedAccessPolicy

getAcl

public CannedAccessPolicy getAcl()
See Also:
withBucketAcl(org.jclouds.s3.domain.CannedAccessPolicy)


Copyright © 2009-2012 jclouds. All Rights Reserved.