Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   *
   *  http://aws.amazon.com/apache2.0
   *
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.s3.model;
 
Provides options for creating an Amazon S3 bucket.

 
 public class CreateBucketRequest extends AmazonWebServiceRequest {

    
The name of the Amazon S3 bucket to create.
 
     private String bucketName;

    
The name of the Amazon S3 region in which to create this bucket.
 
     private String region;

    
The optional Canned ACL to set for the new bucket. Ignored in favor of accessControlList, if present
 
     private CannedAccessControlList cannedAcl;

    
An optional access control list to apply to the new object. If specified, cannedAcl will be ignored.
 
     private AccessControlList accessControlList;
    
Constructs a new CreateBucketRequest, ready to be executed to create the specified bucket in the US_Standard region.

Parameters:
bucketName The name of the Amazon S3 bucket to create.
See also:
CreateBucketRequest.CreateBucketRequest(java.lang.String,com.amazonaws.services.s3.model.Region)
CreateBucketRequest.CreateBucketRequest(java.lang.String,java.lang.String)
 
     public CreateBucketRequest(String bucketName) {
         this(bucketName.);
     }

    
Constructs a new CreateBucketRequest, 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.
See also:
CreateBucketRequest.CreateBucketRequest(java.lang.String)
CreateBucketRequest.CreateBucketRequest(java.lang.String,java.lang.String)
 
     public CreateBucketRequest(String bucketNameRegion region) {
         this(bucketNameregion.toString());
     }

    
Constructs a new CreateBucketRequest, 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.
See also:
CreateBucketRequest.CreateBucketRequest(java.lang.String)
CreateBucketRequest.CreateBucketRequest(java.lang.String,com.amazonaws.services.s3.model.Region)
 
     public CreateBucketRequest(String bucketNameString region) {
         setBucketName(bucketName);
         setRegion(region);
     }

    
Sets the name of the Amazon S3 bucket to create.

Parameters:
bucketName The name of the Amazon S3 bucket to create.
See also:
getBucketName()
    public void setBucketName(String bucketName) {
        this. = bucketName;
    }

    
Gets the name of the Amazon S3 bucket to create.

Returns:
The name of the Amazon S3 bucket to create.
See also:
setBucketName(java.lang.String)
    public String getBucketName() {
        return ;
    }

    
Sets the name of the Amazon S3 region in which this bucket will be created.

Parameters:
region The name of the Amazon S3 region in which this bucket will be created.
See also:
getRegion()
    public void setRegion(String region) {
        this. = region;
    }

    
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(java.lang.String)
    public String getRegion() {
        return ;
    }

Returns the optional Canned ACL to set for the new bucket.

Returns:
The optional Canned ACL to set for the new bucket.
		return ;
	}

Sets the optional Canned ACL to set for the new bucket.

Parameters:
cannedAcl The optional Canned ACL to set for the new bucket.
	public void setCannedAcl(CannedAccessControlList cannedAcl) {
		this. = 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.
		setCannedAcl(cannedAcl);
		return this;
	}

    
Returns the optional access control list for the new bucket. If specified, cannedAcl will be ignored.
        return ;
    }
    
    
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.
    public void setAccessControlList(AccessControlList accessControlList) {
        this. = accessControlList;
    }
    
    
Sets the optional access control list for the new bucket. If specified, cannedAcl will be ignored. Returns this CreateBucketRequest, enabling additional method calls to be chained together.

Parameters:
accessControlList The access control list for the new bucket.
    public CreateBucketRequest withAccessControlList(AccessControlList accessControlList) {
        setAccessControlList(accessControlList);
        return this;
    }
New to GrepCode? Check out our FAQ X