Hazelcast C++ Client
Hazelcast C++ Client Library
client_aws_config.h
1 /*
2  * Copyright (c) 2008-2022, Hazelcast, Inc. 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  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include <string>
19 #include <ostream>
20 #include <stdint.h>
21 
22 #include "hazelcast/util/export.h"
23 
24 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
25 #pragma warning(push)
26 #pragma warning(disable : 4251) // for dll export
27 #endif
28 
29 namespace hazelcast {
30 namespace client {
31 namespace config {
53 class HAZELCAST_API client_aws_config
54 {
55 public:
64  const std::string& get_access_key() const;
65 
75  client_aws_config& set_access_key(const std::string& access_key);
83  const std::string& get_secret_key() const;
84 
94  client_aws_config& set_secret_key(const std::string& secret_key);
95 
104  const std::string& get_region() const;
114  client_aws_config& set_region(const std::string& region);
115 
121  const std::string& get_host_header() const;
130  client_aws_config& set_host_header(const std::string& host_header);
131 
138  client_aws_config& set_enabled(bool enabled);
144  bool is_enabled() const;
145 
154  client_aws_config& set_security_group_name(
155  const std::string& security_group_name);
156 
164  const std::string& get_security_group_name() const;
165 
174  client_aws_config& set_tag_key(const std::string& tag_key);
175 
181  const std::string& get_tag_key() const;
182 
192  client_aws_config& set_tag_value(const std::string& tag_value);
193 
199  const std::string& get_tag_value() const;
200 
207  const std::string& get_iam_role() const;
208 
216  client_aws_config& set_iam_role(const std::string& iam_role);
217 
225  bool is_inside_aws() const;
226 
233  client_aws_config& set_inside_aws(bool inside_aws);
234 
235 private:
236  bool enabled_;
237  std::string access_key_;
238  std::string secret_key_;
239  std::string region_;
240  std::string security_group_name_;
241  std::string tag_key_;
242  std::string tag_value_;
243  std::string host_header_;
244  std::string iam_role_;
245 
246  bool inside_aws_;
247 };
248 
249 std::ostream HAZELCAST_API&
250 operator<<(std::ostream& out, const client_aws_config& config);
251 } // namespace config
252 } // namespace client
253 } // namespace hazelcast
254 
255 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
256 #pragma warning(pop)
257 #endif
The client_aws_config contains the configuration for client to connect to nodes in aws environment.