AWS SDK for .NET Documentation
DoesS3BucketExist Method (bucketName, s3Client)
Amazon
►
Amazon.S3.Util
►
AmazonS3Util
►
DoesS3BucketExist(String, AmazonS3)
C#
Did this page help you?
Yes
No
Tell us about it...
Determines whether an S3 bucket exists or not. This is done by: 1. Creating a PreSigned Url for the bucket (with an expiry date at the end of this decade) 2. Making a HEAD request to the Url
Declaration Syntax
C#
public
static
bool
DoesS3BucketExist
(
string
bucketName
,
AmazonS3
s3Client
)
Parameters
bucketName
(
String
)
The name of the bucket to check.
s3Client
(
AmazonS3
)
The Amazon S3 Client to use for S3 specific operations.
Return Value
Assembly:
AWSSDK
(Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)