Hazelcast C++ Client
ClientAwsConfig.h
1 /*
2  * Copyright (c) 2008-2017, 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 #ifndef HAZELCAST_CLIENT_CONFIG_CLIENTAWSCONFIG_H_
17 #define HAZELCAST_CLIENT_CONFIG_CLIENTAWSCONFIG_H_
18 
19 #include <string>
20 #include <ostream>
21 #include <stdint.h>
22 
23 #include "hazelcast/util/HazelcastDll.h"
24 
25 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
26 #pragma warning(push)
27 #pragma warning(disable: 4251) //for dll export
28 #endif
29 
30 namespace hazelcast {
31  namespace client {
32  namespace config {
53  class HAZELCAST_API ClientAwsConfig {
54  public:
62  const std::string &getAccessKey() const;
63 
73  ClientAwsConfig &setAccessKey(const std::string &accessKey);
80  const std::string &getSecretKey() const;
81 
91  ClientAwsConfig &setSecretKey(const std::string &secretKey);
92 
99  const std::string &getRegion() const;
107  ClientAwsConfig &setRegion(const std::string &region);
108 
114  const std::string &getHostHeader() const;
122  ClientAwsConfig &setHostHeader(const std::string &hostHeader);
123 
130  ClientAwsConfig &setEnabled(bool enabled);
136  bool isEnabled() const;
137 
145  ClientAwsConfig &setSecurityGroupName(const std::string &securityGroupName);
146 
152  const std::string &getSecurityGroupName() const;
153 
161  ClientAwsConfig &setTagKey(const std::string &tagKey);
162 
168  const std::string &getTagKey() const;
169 
178  ClientAwsConfig &setTagValue(const std::string &tagValue);
179 
185  const std::string &getTagValue() const;
186 
193  const std::string &getIamRole() const;
194 
202  ClientAwsConfig &setIamRole(const std::string &iamRole);
203 
211  bool isInsideAws() const;
212 
219  ClientAwsConfig &setInsideAws(bool insideAws);
220  private:
221  bool enabled;
222  std::string accessKey;
223  std::string secretKey;
224  std::string region;
225  std::string securityGroupName;
226  std::string tagKey;
227  std::string tagValue;
228  std::string hostHeader;
229  std::string iamRole;
230 
231  bool insideAws;
232  };
233 
234  std::ostream HAZELCAST_API &operator<<(std::ostream &out, const ClientAwsConfig &config);
235  }
236  }
237 }
238 
239 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
240 #pragma warning(pop)
241 #endif
242 
243 #endif /* HAZELCAST_CLIENT_CONFIG_CLIENTAWSCONFIG_H_ */
The ClientAwsConfig contains the configuration for client to connect to nodes in aws environment...
Definition: ClientAwsConfig.h:53
Definition: MapEntryView.h:32