C# Class Amazon.S3.Util.BucketRegionDetector

Class to manage and cache the correct region for buckets accessed without an explicit region.
Show file Open project: aws/aws-sdk-net Class Usage Examples

Private Methods

Method Description
BucketRegionDetector ( ) : Amazon.Runtime
CheckRegionAndUpdateCache ( AmazonS3Uri requestedBucketUri, string actualRegion ) : string
DetectMismatchWithHeadBucketFallback ( AmazonS3Uri requestedBucketUri, AmazonServiceException serviceException, ImmutableCredentials credentials ) : string

Detects if the signature is malformed, and the requested bucket is in a Region different from the Region of the request.

DetectMismatchWithHeadBucketFallbackAsync ( AmazonS3Uri requestedBucketUri, AmazonServiceException serviceException, ImmutableCredentials credentials ) : Task

Detects if the signature is malformed, and the requested bucket is in a Region different from the Region of the request.

GetBucketRegionNoPipeline ( string bucketName, ImmutableCredentials credentials ) : string

Use a HEAD bucket request to get the region for the given bucket. This method creates an AmazonS3Client from the credentials passed in. It's critical that the AmazonS3Client is not used to make any requests that will be routed through the pipeline.

GetBucketRegionNoPipelineAsync ( string bucketName, ImmutableCredentials credentials ) : Task

Use a HEAD bucket request to get the region for the given bucket. This method creates an AmazonS3Client from the credentials passed in. It's critical that the AmazonS3Client is not used to make any requests that will be routed through the pipeline.

GetCorrectRegion ( AmazonS3Uri requestedBucketUri, AmazonServiceException serviceException ) : string

Detects if the signature is malformed, and the requested bucket is in a Region different from the Region of the request.

GetCorrectRegion ( AmazonS3Uri requestedBucketUri, HttpStatusCode headBucketStatusCode, string xAmzBucketRegionHeaderValue ) : string

Detect a bucket region mismatch based on the x-amz-bucket-region header, and the status code provided.

GetHeadBucketPreSignedUrl ( string bucketName, ImmutableCredentials credentials ) : string
GetUsEast1ClientFromCredentials ( ImmutableCredentials credentials ) : AmazonS3Client