C# Class Amazon.S3.Util.AmazonS3Util

Provides utilities used by the Amazon S3 client implementation. These utilities might be useful to consumers of the Amazon S3 library.
Exibir arquivo Open project: aws/aws-sdk-net

Public Methods

Method Description
BeginDeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName, AsyncCallback callback, object state ) : IAsyncCancelableResult

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

BeginDeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, Action updateCallback, AsyncCallback callback, object state ) : IAsyncCancelableResult

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

BeginDeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, AsyncCallback callback, object state ) : IAsyncCancelableResult

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

ConvertToS3StorageClass ( string value ) : S3StorageClass

Converts the string representing a storage class that would come back from a ListObjects request to the S3StorageClass enumeration.

DeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName ) : void

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

DeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions ) : void

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName ) : Task

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, CancellationToken token ) : Task

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions ) : Task

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, Action updateCallback, CancellationToken token ) : Task

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, CancellationToken token ) : Task

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.

DoesS3BucketExist ( IAmazonS3 s3Client, string bucketName ) : bool

Determines whether an S3 bucket exists or not. This is done by: 1. Creating a PreSigned Url for the bucket. To work with Signature V4 only regions, as well as Signature V4-optional regions, we keep the expiry to within the maximum for V4 (which is one week). 2. Making a HEAD request to the Url

DoesS3BucketExistAsync ( IAmazonS3 s3Client, string bucketName ) : System.Threading.Tasks.Task

Determines whether an S3 bucket exists or not. This is done by: 1. Creating a PreSigned Url for the bucket. To work with Signature V4 only regions, as well as Signature V4-optional regions, we keep the expiry to within the maximum for V4 (which is one week). 2. Making a HEAD request to the Url

EndDeleteS3BucketWithObjects ( IAsyncCancelableResult asyncCancelableResult ) : void

Finishes the asynchronous execution of the DeleteS3BucketWithObjects operation.

GenerateChecksumForContent ( string content, bool fBase64Encode ) : string

Generates an MD5 Digest for the string-based content

MakeStreamSeekable ( System input ) : Stream

Converts a non-seekable stream into a System.IO.MemoryStream. A MemoryStream's position can be moved arbitrarily

MemoryStreams use byte arrays as their backing store. Please use this judicially as it is likely that a very large stream will cause system resources to be used up.

MimeTypeFromExtension ( string ext ) : string

Determines MIME type from a file extension

PostUpload ( S3PostUploadRequest request ) : S3PostUploadResponse

Upload data to Amazon S3 using HTTP POST.

For more information,

SetObjectStorageClass ( IAmazonS3 s3Client, string bucketName, string key, S3StorageClass sClass ) : void

Sets the storage class for the S3 Object to the value specified.

SetObjectStorageClass ( IAmazonS3 s3Client, string bucketName, string key, string version, S3StorageClass sClass ) : void

Sets the storage class for the S3 Object's Version to the value specified.

SetServerSideEncryption ( IAmazonS3 s3Client, string bucketName, string key, ServerSideEncryptionMethod method ) : void

Sets the server side encryption method for the S3 Object to the value specified.

SetServerSideEncryption ( IAmazonS3 s3Client, string bucketName, string key, string version, ServerSideEncryptionMethod method ) : void

Sets the server side encryption method for the S3 Object's Version to the value specified.

SetWebsiteRedirectLocation ( IAmazonS3 s3Client, string bucketName, string key, string websiteRedirectLocation ) : void

Sets the redirect location for the S3 Object's when being accessed through the S3 website endpoint.

UrlEncode ( string data, bool path ) : string

URL encodes a string. If the path property is specified, the accepted path characters {/+:} are not encoded.

ValidateV2Bucket ( string bucketName ) : bool

Version2 S3 buckets adhere to RFC 1035: Less than 255 characters, with each label less than 63 characters. Label must start with a letter Label must end with a letter or digit Label can have a string of letter, digits and hyphens in the middle. Although names can be case-sensitive, no significance is attached to the case. RFC 1123: Allow label to start with letter or digit (e.g. 3ware.com works) RFC 2181: No restrictions apart from the length restrictions. S3 V2 will start with RFCs 1035 and 1123 and impose the following additional restrictions: Length between 3 and 63 characters (to allow headroom for upper-level domains, as well as to avoid separate length restrictions for bucket-name and its labels Only lower-case to avoid user confusion. No dotted-decimal IPv4-like strings

Private Methods

Method Description
AddQueryStringParameter ( StringBuilder queryString, string parameterName, string parameterValue ) : void
AddQueryStringParameter ( StringBuilder queryString, string parameterName, string parameterValue, string>.IDictionary parameterMap ) : void
ComputeEncodedMD5FromEncodedString ( string base64EncodedString ) : string
DeleteS3BucketWithObjectsInternal ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, Action updateCallback, Amazon.S3.Util.AsyncCancelableResult asyncCancelableResult ) : void

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. The function deletes all the objects in the specified bucket and then deletes the bucket itself.

DeleteS3BucketWithObjectsInternalAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, Action updateCallback, CancellationToken token ) : Task

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. The function deletes all the objects in the specified bucket and then deletes the bucket itself.

InvokeDeleteS3BucketWithObjects ( object state, CancellationToken token ) : Task

Invokes the DeleteS3BucketWithObjectsInternal method.

InvokeDeleteS3BucketWithObjects ( object state ) : void

Invokes the DeleteS3BucketWithObjectsInternal method.

InvokeS3DeleteBucketWithObjectsUpdateCallback ( Action updateCallback, Amazon.S3.Util.S3DeleteBucketWithObjectsUpdate update ) : void

Invokes the callback which provides updated about the delete operation.

ParseAmzRestoreHeader ( string header, bool &restoreInProgress, System.DateTime &restoreExpiration ) : void
ParseExpiresHeader ( string rawValue, string requestId ) : DateTime?
SerializeTagSetToXml ( XmlWriter xmlWriter, List tagset ) : void
SerializeTagToXml ( XmlWriter xmlWriter, Tag tag ) : void
SerializeTaggingToXml ( Tagging tagging ) : string
SetMetadataHeaders ( IRequest request, MetadataCollection metadata ) : void
SetupForObjectModification ( IAmazonS3 s3Client, string bucketName, string key, string version, CopyObjectRequest &copyRequest, Amazon.S3.Model.PutACLRequest &putACLRequest ) : void

Sets up the request needed to make an exact copy of the object leaving the parent method the ability to change just the attribute being requested to change.

TagSetToQueryString ( List tags ) : string

Method Details

BeginDeleteS3BucketWithObjects() public static method

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static BeginDeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName, AsyncCallback callback, object state ) : IAsyncCancelableResult
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the AsyncState property.
return IAsyncCancelableResult

BeginDeleteS3BucketWithObjects() public static method

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static BeginDeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, Action updateCallback, AsyncCallback callback, object state ) : IAsyncCancelableResult
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
deleteOptions Amazon.S3.Util.S3DeleteBucketWithObjectsOptions >Options to control the behavior of the delete operation.
updateCallback Action An callback that is invoked to send updates while delete operation is in progress.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the AsyncState property.
return IAsyncCancelableResult

BeginDeleteS3BucketWithObjects() public static method

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static BeginDeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, AsyncCallback callback, object state ) : IAsyncCancelableResult
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
deleteOptions Amazon.S3.Util.S3DeleteBucketWithObjectsOptions Options to control the behavior of the delete operation.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes.
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback procedure using the AsyncState property.
return IAsyncCancelableResult

ConvertToS3StorageClass() public static method

Converts the string representing a storage class that would come back from a ListObjects request to the S3StorageClass enumeration.
public static ConvertToS3StorageClass ( string value ) : S3StorageClass
value string Amazon S3 string values for storage class
return S3StorageClass

DeleteS3BucketWithObjects() public static method

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static DeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName ) : void
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
return void

DeleteS3BucketWithObjects() public static method

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static DeleteS3BucketWithObjects ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions ) : void
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
deleteOptions Amazon.S3.Util.S3DeleteBucketWithObjectsOptions Options to control the behavior of the delete operation.
return void

DeleteS3BucketWithObjectsAsync() public static method

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName ) : Task
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
return Task

DeleteS3BucketWithObjectsAsync() public static method

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, CancellationToken token ) : Task
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
token CancellationToken token to check if the operation has been request to cancel.
return Task

DeleteS3BucketWithObjectsAsync() public static method

Deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions ) : Task
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
deleteOptions Amazon.S3.Util.S3DeleteBucketWithObjectsOptions Options to control the behavior of the delete operation.
return Task

DeleteS3BucketWithObjectsAsync() public static method

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, Action updateCallback, CancellationToken token ) : Task
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
deleteOptions Amazon.S3.Util.S3DeleteBucketWithObjectsOptions >Options to control the behavior of the delete operation.
updateCallback Action An callback that is invoked to send updates while delete operation is in progress.
token CancellationToken token to check if the operation has been request to cancel.
return Task

DeleteS3BucketWithObjectsAsync() public static method

Initiates the asynchronous execution of the DeleteS3BucketWithObjects operation. DeleteS3BucketWithObjects deletes an S3 bucket which contains objects. An S3 bucket which contains objects cannot be deleted until all the objects in it are deleted. This method deletes all the objects in the specified bucket and then deletes the bucket itself.
public static DeleteS3BucketWithObjectsAsync ( IAmazonS3 s3Client, string bucketName, Amazon.S3.Util.S3DeleteBucketWithObjectsOptions deleteOptions, CancellationToken token ) : Task
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The bucket to be deleted.
deleteOptions Amazon.S3.Util.S3DeleteBucketWithObjectsOptions Options to control the behavior of the delete operation.
token CancellationToken token to check if the operation has been request to cancel.
return Task

DoesS3BucketExist() public static method

Determines whether an S3 bucket exists or not. This is done by: 1. Creating a PreSigned Url for the bucket. To work with Signature V4 only regions, as well as Signature V4-optional regions, we keep the expiry to within the maximum for V4 (which is one week). 2. Making a HEAD request to the Url
public static DoesS3BucketExist ( IAmazonS3 s3Client, string bucketName ) : bool
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The name of the bucket to check.
return bool

DoesS3BucketExistAsync() public static method

Determines whether an S3 bucket exists or not. This is done by: 1. Creating a PreSigned Url for the bucket. To work with Signature V4 only regions, as well as Signature V4-optional regions, we keep the expiry to within the maximum for V4 (which is one week). 2. Making a HEAD request to the Url
public static DoesS3BucketExistAsync ( IAmazonS3 s3Client, string bucketName ) : System.Threading.Tasks.Task
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The name of the bucket to check.
return System.Threading.Tasks.Task

EndDeleteS3BucketWithObjects() public static method

Finishes the asynchronous execution of the DeleteS3BucketWithObjects operation.
public static EndDeleteS3BucketWithObjects ( IAsyncCancelableResult asyncCancelableResult ) : void
asyncCancelableResult IAsyncCancelableResult The IAsyncCancelableResult returned by the call to BeginDeleteS3BucketWithObjects.
return void

GenerateChecksumForContent() public static method

Generates an MD5 Digest for the string-based content
public static GenerateChecksumForContent ( string content, bool fBase64Encode ) : string
content string The content for which the MD5 Digest needs /// to be computed. ///
fBase64Encode bool Whether the returned checksum should be /// base64 encoded. ///
return string

MakeStreamSeekable() public static method

Converts a non-seekable stream into a System.IO.MemoryStream. A MemoryStream's position can be moved arbitrarily
MemoryStreams use byte arrays as their backing store. Please use this judicially as it is likely that a very large stream will cause system resources to be used up.
public static MakeStreamSeekable ( System input ) : Stream
input System The stream to be converted
return System.IO.Stream

MimeTypeFromExtension() public static method

Determines MIME type from a file extension
public static MimeTypeFromExtension ( string ext ) : string
ext string The extension of the file
return string

PostUpload() public static method

Upload data to Amazon S3 using HTTP POST.
For more information,
Thrown if the service returns an error
public static PostUpload ( S3PostUploadRequest request ) : S3PostUploadResponse
request S3PostUploadRequest Request object which describes the data to POST
return S3PostUploadResponse

SetObjectStorageClass() public static method

Sets the storage class for the S3 Object to the value specified.
public static SetObjectStorageClass ( IAmazonS3 s3Client, string bucketName, string key, S3StorageClass sClass ) : void
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The name of the bucket in which the key is stored
key string The key of the S3 Object whose storage class needs changing
sClass S3StorageClass The new Storage Class for the object
return void

SetObjectStorageClass() public static method

Sets the storage class for the S3 Object's Version to the value specified.
public static SetObjectStorageClass ( IAmazonS3 s3Client, string bucketName, string key, string version, S3StorageClass sClass ) : void
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The name of the bucket in which the key is stored
key string The key of the S3 Object whose storage class needs changing
version string The version of the S3 Object whose storage class needs changing
sClass S3StorageClass The new Storage Class for the object
return void

SetServerSideEncryption() public static method

Sets the server side encryption method for the S3 Object to the value specified.
public static SetServerSideEncryption ( IAmazonS3 s3Client, string bucketName, string key, ServerSideEncryptionMethod method ) : void
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The name of the bucket in which the key is stored
key string The key of the S3 Object
method ServerSideEncryptionMethod The server side encryption method
return void

SetServerSideEncryption() public static method

Sets the server side encryption method for the S3 Object's Version to the value specified.
public static SetServerSideEncryption ( IAmazonS3 s3Client, string bucketName, string key, string version, ServerSideEncryptionMethod method ) : void
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The name of the bucket in which the key is stored
key string The key of the S3 Object
version string The version of the S3 Object
method ServerSideEncryptionMethod The server side encryption method
return void

SetWebsiteRedirectLocation() public static method

Sets the redirect location for the S3 Object's when being accessed through the S3 website endpoint.
public static SetWebsiteRedirectLocation ( IAmazonS3 s3Client, string bucketName, string key, string websiteRedirectLocation ) : void
s3Client IAmazonS3 The Amazon S3 Client to use for S3 specific operations.
bucketName string The name of the bucket in which the key is stored
key string The key of the S3 Object
websiteRedirectLocation string The redirect location
return void

UrlEncode() public static method

URL encodes a string. If the path property is specified, the accepted path characters {/+:} are not encoded.
public static UrlEncode ( string data, bool path ) : string
data string The string to encode
path bool Whether the string is a URL path or not
return string

ValidateV2Bucket() public static method

Version2 S3 buckets adhere to RFC 1035: Less than 255 characters, with each label less than 63 characters. Label must start with a letter Label must end with a letter or digit Label can have a string of letter, digits and hyphens in the middle. Although names can be case-sensitive, no significance is attached to the case. RFC 1123: Allow label to start with letter or digit (e.g. 3ware.com works) RFC 2181: No restrictions apart from the length restrictions. S3 V2 will start with RFCs 1035 and 1123 and impose the following additional restrictions: Length between 3 and 63 characters (to allow headroom for upper-level domains, as well as to avoid separate length restrictions for bucket-name and its labels Only lower-case to avoid user confusion. No dotted-decimal IPv4-like strings
public static ValidateV2Bucket ( string bucketName ) : bool
bucketName string The BucketName to validate if V2 addressing should be used
return bool