Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.s3
Class S3ClientOptions

java.lang.Object
  extended by com.amazonaws.services.s3.S3ClientOptions

public class S3ClientOptions
extends Object

S3 client configuration options such as the request access style.


Field Summary
static boolean DEFAULT_PATH_STYLE_ACCESS
          The default setting for use of path-style access
 
Constructor Summary
S3ClientOptions()
           
S3ClientOptions(S3ClientOptions other)
           
 
Method Summary
 boolean isPathStyleAccess()
           Returns whether the client uses path-style access for all requests.
 void setPathStyleAccess(boolean pathStyleAccess)
           Configures the client to use path-style access for all requests.
 S3ClientOptions withPathStyleAccess(boolean pathStyleAccess)
           Configures the client to use path-style access for all requests.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PATH_STYLE_ACCESS

public static final boolean DEFAULT_PATH_STYLE_ACCESS
The default setting for use of path-style access

See Also:
Constant Field Values
Constructor Detail

S3ClientOptions

public S3ClientOptions()

S3ClientOptions

public S3ClientOptions(S3ClientOptions other)
Method Detail

isPathStyleAccess

public boolean isPathStyleAccess()

Returns whether the client uses path-style access for all requests.

Amazon S3 supports virtual-hosted-style and path-style access in all Regions. The path-style syntax, however, requires that you use the region-specific endpoint when attempting to access a bucket.

The default behaviour is to detect which access style to use based on the configured endpoint (an IP will result in path-style access) and the bucket being accessed (some buckets are not valid DNS names). Setting this flag will result in path-style access being used for all requests.

Returns:
True is the client should always use path-style access

setPathStyleAccess

public void setPathStyleAccess(boolean pathStyleAccess)

Configures the client to use path-style access for all requests.

Amazon S3 supports virtual-hosted-style and path-style access in all Regions. The path-style syntax, however, requires that you use the region-specific endpoint when attempting to access a bucket.

The default behaviour is to detect which access style to use based on the configured endpoint (an IP will result in path-style access) and the bucket being accessed (some buckets are not valid DNS names). Setting this flag will result in path-style access being used for all requests.

Parameters:
pathStyleAccess - True to always use path-style access.

withPathStyleAccess

public S3ClientOptions withPathStyleAccess(boolean pathStyleAccess)

Configures the client to use path-style access for all requests.

Amazon S3 supports virtual-hosted-style and path-style access in all Regions. The path-style syntax, however, requires that you use the region-specific endpoint when attempting to access a bucket.

The default behaviour is to detect which access style to use based on the configured endpoint (an IP will result in path-style access) and the bucket being accessed (some buckets are not valid DNS names). Setting this flag will result in path-style access being used for all requests.

Parameters:
pathStyleAccess - True to always use path-style access.
Returns:
The updated S3ClientOptions object with the new path-style access setting.


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.