public GetBucketLocation ( GetBucketLocationRequest request ) : GetBucketLocationResponse | ||
request | GetBucketLocationRequest | Container for the necessary parameters to execute the GetBucketLocation service method. |
return | GetBucketLocationResponse |
public GetBucketLocationResponse GetBucketLocation(GetBucketLocationRequest request)
{
var marshaller = new GetBucketLocationRequestMarshaller();
var unmarshaller = GetBucketLocationResponseUnmarshaller.Instance;
return Invoke<GetBucketLocationRequest,GetBucketLocationResponse>(request, marshaller, unmarshaller);
}
AmazonS3Client::GetBucketLocation ( string bucketName ) : GetBucketLocationResponse |
public void TestLocation() { foreach (var location in new S3Region[] { S3Region.USW1, S3Region.EUC1 }) { string bucketName = null; var region = RegionEndpoint.GetBySystemName(location.Value); using (var client = new AmazonS3Client(region)) { try { bucketName = UtilityMethods.SDK_TEST_PREFIX + DateTime.Now.Ticks; client.PutBucket(new PutBucketRequest { BucketName = bucketName, BucketRegion = location }); var returnedLocation = client.GetBucketLocation(new GetBucketLocationRequest { BucketName = bucketName }).Location; Assert.AreEqual(location, returnedLocation); } finally { if (bucketName != null) AmazonS3Util.DeleteS3BucketWithObjects(client, bucketName); } } } }