Hazelcast C++ Client
Hazelcast C++ Client Library
client_aws_config.h
1 /*
2  * Copyright (c) 2008-2021, 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 {
52  class HAZELCAST_API client_aws_config {
53  public:
61  const std::string &get_access_key() const;
62 
72  client_aws_config &set_access_key(const std::string &access_key);
79  const std::string &get_secret_key() const;
80 
90  client_aws_config &set_secret_key(const std::string &secret_key);
91 
98  const std::string &get_region() const;
106  client_aws_config &set_region(const std::string &region);
107 
113  const std::string &get_host_header() const;
121  client_aws_config &set_host_header(const std::string &host_header);
122 
129  client_aws_config &set_enabled(bool enabled);
135  bool is_enabled() const;
136 
144  client_aws_config &set_security_group_name(const std::string &security_group_name);
145 
151  const std::string &get_security_group_name() const;
152 
160  client_aws_config &set_tag_key(const std::string &tag_key);
161 
167  const std::string &get_tag_key() const;
168 
177  client_aws_config &set_tag_value(const std::string &tag_value);
178 
184  const std::string &get_tag_value() const;
185 
192  const std::string &get_iam_role() const;
193 
201  client_aws_config &set_iam_role(const std::string &iam_role);
202 
210  bool is_inside_aws() const;
211 
218  client_aws_config &set_inside_aws(bool inside_aws);
219  private:
220  bool enabled_;
221  std::string access_key_;
222  std::string secret_key_;
223  std::string region_;
224  std::string security_group_name_;
225  std::string tag_key_;
226  std::string tag_value_;
227  std::string host_header_;
228  std::string iam_role_;
229 
230  bool inside_aws_;
231  };
232 
233  std::ostream HAZELCAST_API &operator<<(std::ostream &out, const client_aws_config &config);
234  }
235  }
236 }
237 
238 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
239 #pragma warning(pop)
240 #endif
241 
242 
The client_aws_config contains the configuration for client to connect to nodes in aws environment.