Does anyone konw how to add custom endpoint using s3 net API??
Detail:https://github.com/aws/aws-sdk-net/issues/1283
code Language:C#
the sServiceUrl value="192.168.199.216:7480"
when i call DoesS3BucketExist function,i reviced a Exception(System.UriFormatException)
This is my code
public IAmazonS3 CreateClient(string sAccessKeyId, string sAccessKeySecret, string sServiceUrl)
{
AmazonS3Client s3Client = null;
try
{
AmazonS3Config config = new AmazonS3Config();
config.ServiceURL = sServiceUrl;
config.UseHttp = false;
config.SignatureVersion = "v4";
AWSConfigsS3.UseSignatureVersion4 = true;
s3Client = new AmazonS3Client(
sAccessKeyId,
sAccessKeySecret,
config
);
}
catch (Exception ex)
{
LogHelper.WriteLog("AWS配置", ex, "创建AmazonS3Client失败!");
}
return s3Client;
}
public bool DoesBucketExist(string bucketName)
{
bool bIsExist;
if (this.Client != null)
{
bIsExist = this.Client.DoesS3BucketExist(bucketName);
}
else
{
bIsExist = false;
}
return bIsExist;
}
i want to set this property AWSConfigs.EndpointDefinition = @"c:pathtoendpoints.xml";
,but i don't know how to custom endpoints.json file.
it's so hard to me,maybe i need a god help me!Any Help will appreciated!