|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazon.s3.AWSAuthConnection
An interface into the S3 system. It is initially configured with authentication and connection parameters and exposes methods to access and manipulate S3 data.
Constructor Summary | |
AWSAuthConnection(java.lang.String awsAccessKeyId,
java.lang.String awsSecretAccessKey)
|
|
AWSAuthConnection(java.lang.String awsAccessKeyId,
java.lang.String awsSecretAccessKey,
boolean isSecure)
|
|
AWSAuthConnection(java.lang.String awsAccessKeyId,
java.lang.String awsSecretAccessKey,
boolean isSecure,
java.lang.String server)
|
|
AWSAuthConnection(java.lang.String awsAccessKeyId,
java.lang.String awsSecretAccessKey,
boolean isSecure,
java.lang.String server,
int port)
Create a new interface to interact with S3 with the given credential and connection parameters |
Method Summary | |
Response |
createBucket(java.lang.String bucket,
java.util.Map headers)
Creates a new bucket. |
Response |
delete(java.lang.String bucket,
java.lang.String key,
java.util.Map headers)
Deletes an object from S3. |
Response |
deleteBucket(java.lang.String bucket,
java.util.Map headers)
Deletes a bucket. |
GetResponse |
get(java.lang.String bucket,
java.lang.String key,
java.util.Map headers)
Reads an object from S3. |
GetResponse |
getACL(java.lang.String bucket,
java.lang.String key,
java.util.Map headers)
Get the ACL for a given object (or bucket, if key is null). |
GetResponse |
getBucketACL(java.lang.String bucket,
java.util.Map headers)
Get the ACL for a given bucket |
GetResponse |
getBucketLogging(java.lang.String bucket,
java.util.Map headers)
Get the logging xml document for a given bucket |
static java.lang.String |
httpDate()
Generate an rfc822 date for use in the Date HTTP header. |
ListAllMyBucketsResponse |
listAllMyBuckets(java.util.Map headers)
List all the buckets created by this account. |
ListBucketResponse |
listBucket(java.lang.String bucket,
java.lang.String prefix,
java.lang.String marker,
java.lang.Integer maxKeys,
java.util.Map headers)
Lists the contents of a bucket. |
ListBucketResponse |
listBucket(java.lang.String bucket,
java.lang.String prefix,
java.lang.String marker,
java.lang.Integer maxKeys,
java.lang.String delimiter,
java.util.Map headers)
Lists the contents of a bucket. |
Response |
put(java.lang.String bucket,
java.lang.String key,
S3Object object,
java.util.Map headers)
Writes an object to S3. |
Response |
putACL(java.lang.String bucket,
java.lang.String key,
java.lang.String aclXMLDoc,
java.util.Map headers)
Write a new ACL for a given object |
Response |
putBucketACL(java.lang.String bucket,
java.lang.String aclXMLDoc,
java.util.Map headers)
Write a new ACL for a given bucket |
Response |
putBucketLogging(java.lang.String bucket,
java.lang.String loggingXMLDoc,
java.util.Map headers)
Write a new logging xml document for a given bucket |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AWSAuthConnection(java.lang.String awsAccessKeyId, java.lang.String awsSecretAccessKey)
public AWSAuthConnection(java.lang.String awsAccessKeyId, java.lang.String awsSecretAccessKey, boolean isSecure)
public AWSAuthConnection(java.lang.String awsAccessKeyId, java.lang.String awsSecretAccessKey, boolean isSecure, java.lang.String server)
public AWSAuthConnection(java.lang.String awsAccessKeyId, java.lang.String awsSecretAccessKey, boolean isSecure, java.lang.String server, int port)
awsAccessKeyId
- The your user key into AWSawsSecretAccessKey
- The secret string used to generate signatures for authentication.isSecure
- True if the data should be encrypted on the wire on the way to or from S3.server
- Which host to connect to. Usually, this will be s3.amazonaws.comport
- Which port to use.Method Detail |
public Response createBucket(java.lang.String bucket, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucket to create.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public ListBucketResponse listBucket(java.lang.String bucket, java.lang.String prefix, java.lang.String marker, java.lang.Integer maxKeys, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucket to create.prefix
- All returned keys will start with this string (can be null).marker
- All returned keys will be lexographically greater than
this string (can be null).maxKeys
- The maximum number of keys to return (can be null).headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public ListBucketResponse listBucket(java.lang.String bucket, java.lang.String prefix, java.lang.String marker, java.lang.Integer maxKeys, java.lang.String delimiter, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucket to create.prefix
- All returned keys will start with this string (can be null).marker
- All returned keys will be lexographically greater than
this string (can be null).maxKeys
- The maximum number of keys to return (can be null).delimiter
- Keys that contain a string between the prefix and the first
occurrence of the delimiter will be rolled up into a single element.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public Response deleteBucket(java.lang.String bucket, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucket to delete.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public Response put(java.lang.String bucket, java.lang.String key, S3Object object, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucket to which the object will be added.key
- The name of the key to use.object
- An S3Object containing the data to write.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public GetResponse get(java.lang.String bucket, java.lang.String key, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucket where the object lives.key
- The name of the key to use.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public Response delete(java.lang.String bucket, java.lang.String key, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucket where the object lives.key
- The name of the key to use.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public GetResponse getBucketLogging(java.lang.String bucket, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucketheaders
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public Response putBucketLogging(java.lang.String bucket, java.lang.String loggingXMLDoc, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
loggingXMLDoc
- The xml representation of the logging configuration as a Stringbucket
- The name of the bucketheaders
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public GetResponse getBucketACL(java.lang.String bucket, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucket where the object lives.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public GetResponse getACL(java.lang.String bucket, java.lang.String key, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
bucket
- The name of the bucket where the object lives.key
- The name of the key to use.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public Response putBucketACL(java.lang.String bucket, java.lang.String aclXMLDoc, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
aclXMLDoc
- The xml representation of the ACL as a Stringbucket
- The name of the bucket where the object lives.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public Response putACL(java.lang.String bucket, java.lang.String key, java.lang.String aclXMLDoc, java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
aclXMLDoc
- The xml representation of the ACL as a Stringbucket
- The name of the bucket where the object lives.key
- The name of the key to use.headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public ListAllMyBucketsResponse listAllMyBuckets(java.util.Map headers) throws java.net.MalformedURLException, java.io.IOException
headers
- A Map of String to List of Strings representing the http
headers to pass (can be null).
java.net.MalformedURLException
java.io.IOException
public static java.lang.String httpDate()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |