Container for the parameters to the PutBucket operation.
Creates a new bucket.
Inheritance Hierarchy
System.Object
Amazon.Runtime.AmazonWebServiceRequest
Amazon.S3.Model.PutWithACLRequest
Amazon.S3.Model.PutBucketRequest
Amazon.Runtime.AmazonWebServiceRequest
Amazon.S3.Model.PutWithACLRequest
Amazon.S3.Model.PutBucketRequest
Namespace: Amazon.S3.Model
Assembly: AWSSDK.dll
Version: 2.0.0.3
Syntax
public class PutBucketRequest : PutWithACLRequest IRequestEvents
The PutBucketRequest type exposes the following members
Constructors
Name | Description | |
---|---|---|
![]() |
PutBucketRequest() |
Properties
Name | Description | |
---|---|---|
![]() |
BucketName | The name of the bucket to be created. |
![]() |
BucketRegion | The region locality for the bucket. |
![]() |
BucketRegionName | The bucket region locality expressed using the name of the region. When set, this will determine where your data will reside in S3. Valid values: us-east-1, us-west-1, us-west-2, eu-west-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, sa-east-1 |
![]() |
CannedACL | The canned ACL to apply to the bucket. |
![]() |
Grants |
Gets the access control lists (ACLs) for this request.
Please refer to |
![]() |
UseClientRegion | If set to true the bucket will be created in the same region as the configuration of the AmazonS3 client. Default: false. |
Examples
This example shows how to create a bucket in a specific region and with a canned ACL configuring the bucket to be public readable.
PutBucket sample
// Create a client AmazonS3Client client = new AmazonS3Client(); // Construct request PutBucketRequest request = new PutBucketRequest { BucketName = "SampleBucket", BucketRegion = S3Region.EU, // set region to EU CannedACL = S3CannedACL.PublicRead // make bucket publicly readable }; // Issue call PutBucketResponse response = client.PutBucket(request);
Version Information
.NET Framework:
Supported in: 4.5, 4.0, 3.5
.NET for Windows Store apps:
Supported in: Windows 8
.NET for Windows Phone:
Supported in: Window Phone 8