aws-sdk-for-java

AWS SDK for Java

import java.io.IOException;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.s3.S3ClientOptions;
import com.amazonaws.services.s3.model.Bucket;

public class S3 {
    public static void main(String[] args) throws IOException {
        String s3endpoint = "<s3-endpoint>";
        String accessKeyId = "<access-key-id>";
        String accessKeySecret = "<secret-key-id>";

        AmazonS3 s3Client = new AmazonS3Client(new BasicAWSCredentials(accessKeyId,accessKeySecret));
        s3Client.setEndpoint(s3endpoint);
        s3Client.getObject("<bucket-name>", "<object-name>")
    }

}

个结果匹配 ""

    无结果匹配 ""