s3_facade.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 #pragma once
17 
18 #include <aws/s3/S3Client.h>
19 
20 namespace Aws
21 {
22 namespace S3
23 {
24 
25 class S3Facade
26 {
27 public:
33  explicit S3Facade(const bool enable_encryption);
34 
41  explicit S3Facade(const bool enable_encryption, const Aws::Client::ClientConfiguration & config);
42 
49  explicit S3Facade(const bool enable_encryption, std::unique_ptr<Aws::S3::S3Client> s3_client);
50 
51  virtual ~S3Facade() = default;
52 
53  S3Facade(const S3Facade & other) = delete;
54  S3Facade & operator=(const S3Facade & other) = delete;
55 
66  virtual Model::PutObjectOutcome PutObject(const std::string& file_path, const std::string& bucket, const std::string& key);
67 
68 private:
69  Aws::Client::ClientConfiguration config_;
70  std::unique_ptr<Aws::S3::S3Client> s3_client_;
71  const bool enable_encryption_;
72 };
73 
74 } // namespace S3
75 } // namespace Aws
virtual Model::PutObjectOutcome PutObject(const std::string &file_path, const std::string &bucket, const std::string &key)
Call s3 PutObject api to upload file to s3.
Definition: s3_facade.cpp:47
std::unique_ptr< Aws::S3::S3Client > s3_client_
Definition: s3_facade.h:70
Aws::Client::ClientConfiguration config_
Definition: s3_facade.h:69
S3Facade(const bool enable_encryption)
Definition: s3_facade.cpp:32
virtual ~S3Facade()=default
const bool enable_encryption_
Definition: s3_facade.h:71
S3Facade & operator=(const S3Facade &other)=delete


s3_common
Author(s): AWS RoboMaker
autogenerated on Tue Jun 1 2021 02:51:29