Amazon.S3.Util.BucketRegionDetector.GetBucketRegionNoPipelineAsync C# (CSharp) 메소드

GetBucketRegionNoPipelineAsync() 개인적인 정적인 메소드

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.
private static GetBucketRegionNoPipelineAsync ( string bucketName, ImmutableCredentials credentials ) : Task
bucketName string
credentials Amazon.Runtime.ImmutableCredentials
리턴 Task
        private static async Task<string> GetBucketRegionNoPipelineAsync(string bucketName, ImmutableCredentials credentials)
        {
            var headBucketPreSignedUrl = GetHeadBucketPreSignedUrl(bucketName, credentials);
            using (var s3Client = GetUsEast1ClientFromCredentials(credentials))
            {
                return (await AmazonS3HttpUtil.GetHeadAsync(s3Client, s3Client.Config, headBucketPreSignedUrl,
                    HeaderKeys.XAmzBucketRegion).ConfigureAwait(false)).HeaderValue;
            }
        }
    }