CreateBucket() public method

Creates a bucket in the default storage location automatically determined by Amazon.
public CreateBucket ( string bucketName ) : void
bucketName string The name of the bucket, which will be checked against /// the BucketNameChecking.Strict requirements.
return void
Esempio n. 1
0
        public S3Store()
        {
            _S3Service = new S3Service()
            {
                AccessKeyID = System.Environment.GetEnvironmentVariable("AMAZON_ACCESS_KEY_ID"),
                SecretAccessKey = System.Environment.GetEnvironmentVariable("AMAZON_SECRET_ACCESS_KEY")
            };

            if (_S3Service.QueryBucket(_bucketName) == BucketAccess.NoSuchBucket)
                _S3Service.CreateBucket(_bucketName);
        }