Package com.amazonaws.services.s3.model
Class CreateBucketRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.s3.model.CreateBucketRequest
-
- All Implemented Interfaces:
ReadLimitInfo
,S3AccelerateUnsupported
,Serializable
,Cloneable
public class CreateBucketRequest extends AmazonWebServiceRequest implements Serializable, S3AccelerateUnsupported
Provides options for creating an Amazon S3 bucket.- See Also:
DeleteBucketRequest
,CopyObjectRequest
, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description CreateBucketRequest(String bucketName)
Constructs a newCreateBucketRequest
, ready to be executed to create the specified bucket in theUS_Standard
region.CreateBucketRequest(String bucketName, Region region)
Constructs a newCreateBucketRequest
, ready to be executed to create the specified bucket in the specified region.CreateBucketRequest(String bucketName, String region)
Constructs a newCreateBucketRequest
, ready to be executed and create the specified bucket in the specified region.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessControlList
getAccessControlList()
Returns the optional access control list for the new bucket.String
getBucketName()
Gets the name of the Amazon S3 bucket to create.CannedAccessControlList
getCannedAcl()
Returns the optional Canned ACL to set for the new bucket.String
getRegion()
Gets the name of the Amazon S3 region in which this bucket will be created.void
setAccessControlList(AccessControlList accessControlList)
Sets the optional access control list for the new bucket.void
setBucketName(String bucketName)
Sets the name of the Amazon S3 bucket to create.void
setCannedAcl(CannedAccessControlList cannedAcl)
Sets the optional Canned ACL to set for the new bucket.void
setRegion(String region)
Sets the name of the Amazon S3 region in which this bucket will be created.CreateBucketRequest
withAccessControlList(AccessControlList accessControlList)
Sets the optional access control list for the new bucket.CreateBucketRequest
withCannedAcl(CannedAccessControlList cannedAcl)
Sets the optional Canned ACL to set for the new bucket, and returns this updated object so that additional method calls can be chained together.-
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
clone, copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
-
-
-
Constructor Detail
-
CreateBucketRequest
public CreateBucketRequest(String bucketName)
Constructs a newCreateBucketRequest
, ready to be executed to create the specified bucket in theUS_Standard
region.- Parameters:
bucketName
- The name of the Amazon S3 bucket to create.- See Also:
CreateBucketRequest(String, Region)
,CreateBucketRequest(String, String)
-
CreateBucketRequest
public CreateBucketRequest(String bucketName, Region region)
Constructs a newCreateBucketRequest
, ready to be executed to create the specified bucket in the specified region.- Parameters:
bucketName
- The name of the Amazon S3 bucket to create.region
- The region in which to create this bucket. This must match the region of the endpoint the client is configured against unless the client is configured against the US Standard endpoint (s3.amazonaws.com).- See Also:
CreateBucketRequest(String)
,CreateBucketRequest(String, String)
-
CreateBucketRequest
public CreateBucketRequest(String bucketName, String region)
Constructs a newCreateBucketRequest
, ready to be executed and create the specified bucket in the specified region.- Parameters:
bucketName
- The name of the Amazon S3 bucket to create.region
- The region in which to create this bucket. This must match the region of the endpoint the client is configured against unless the client is configured against the US Standard endpoint (s3.amazonaws.com).- See Also:
CreateBucketRequest(String)
,CreateBucketRequest(String, Region)
-
-
Method Detail
-
setBucketName
public void setBucketName(String bucketName)
Sets the name of the Amazon S3 bucket to create.- Parameters:
bucketName
- The name of the Amazon S3 bucket to create.- See Also:
getBucketName()
-
getBucketName
public String getBucketName()
Gets the name of the Amazon S3 bucket to create.- Returns:
- The name of the Amazon S3 bucket to create.
- See Also:
setBucketName(String)
-
setRegion
public void setRegion(String region)
Sets the name of the Amazon S3 region in which this bucket will be created.- Parameters:
region
- The region in which to create this bucket. This must match the region of the endpoint the client is configured against unless the client is configured against the US Standard endpoint (s3.amazonaws.com).- See Also:
getRegion()
-
getRegion
public String getRegion()
Gets the name of the Amazon S3 region in which this bucket will be created.- Returns:
- The name of the Amazon S3 region in which this bucket will be created.
- See Also:
setRegion(String)
-
getCannedAcl
public CannedAccessControlList getCannedAcl()
Returns the optional Canned ACL to set for the new bucket.- Returns:
- The optional Canned ACL to set for the new bucket.
-
setCannedAcl
public void setCannedAcl(CannedAccessControlList cannedAcl)
Sets the optional Canned ACL to set for the new bucket.- Parameters:
cannedAcl
- The optional Canned ACL to set for the new bucket.
-
withCannedAcl
public CreateBucketRequest withCannedAcl(CannedAccessControlList cannedAcl)
Sets the optional Canned ACL to set for the new bucket, and returns this updated object so that additional method calls can be chained together.- Parameters:
cannedAcl
- The optional Canned ACL to set for the new bucket.- Returns:
- This updated object, so that additional method calls can be chained together.
-
getAccessControlList
public AccessControlList getAccessControlList()
Returns the optional access control list for the new bucket. If specified, cannedAcl will be ignored.
-
setAccessControlList
public void setAccessControlList(AccessControlList accessControlList)
Sets the optional access control list for the new bucket. If specified, cannedAcl will be ignored.- Parameters:
accessControlList
- The access control list for the new bucket.
-
withAccessControlList
public CreateBucketRequest withAccessControlList(AccessControlList accessControlList)
Sets the optional access control list for the new bucket. If specified, cannedAcl will be ignored. Returns thisCreateBucketRequest
, enabling additional method calls to be chained together.- Parameters:
accessControlList
- The access control list for the new bucket.
-
-