2017-11-03 5 views
1

9000 내가 좋아하는 뭔가를 시도했다. 우리는 경로 스타일 액세스해야 Minio에 액세스 할, 그러나어떻게 로컬 호스트에서 minio 서버에 연결하기 위해 AWS-SDK-CPP에서 엔드 포인트를 오버라이드 (override) :</p> <pre><code>Aws::Client::ClientConfiguration config; config.endpointOverride = Aws::String("localhost:9000"); </code></pre> <p>그것은 작동하지 않습니다

https://bucket-name/s3.amazonaws.com 

:

기본적으로 AWS-SDK-CPP는 가상 호스팅을 사용하는 것

AWS-SDK-JAVA에서
https://localhost:9000/minio/bucket-name 

, 있습니다 :

AmazonS3ClientBuilder.withPathStyleAccessEnabled(true) 

AWS-SDK-CPP에는 비슷한 것이 있습니까?

답변

1

경로 스타일과 가상 호스트 사이의 스위치는 S3Client 생성자에 있습니다

Aws::Client::ClientConfiguration config; 
config.endpointOverride = Aws::String("172.31.30.127:9000"); 
config.scheme = Aws::Http::Scheme::HTTP; 
auto client = Aws::MakeShared<S3Client>("sample_s3_client", config, false, false); 
: 같이

S3Client(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration(), bool signPayloads = false, bool useVirtualAdressing = true); 

차례를,