Hazelcast C++ Client
Hazelcast C++ Client Library
Loading...
Searching...
No Matches
client_aws_config.h
1/*
2 * Copyright (c) 2008-2025, 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 <iosfwd>
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
29namespace hazelcast {
30namespace client {
31namespace config {
53class HAZELCAST_API client_aws_config
54{
55public:
56 client_aws_config();
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
235private:
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
249std::ostream HAZELCAST_API&
250operator<<(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.
const std::string & get_access_key() const
Gets the access key to access AWS.
Definition config.cpp:595
const std::string & get_tag_key() const
Gets the tag key.
Definition config.cpp:686
const std::string & get_security_group_name() const
Gets the security group name.
Definition config.cpp:673
const std::string & get_region() const
Gets the region where the EC2 instances running the Hazelcast members will be running.
Definition config.cpp:623
const std::string & get_host_header() const
Gets the host header; the address where the EC2 API can be found.
Definition config.cpp:637
client_aws_config & set_secret_key(const std::string &secret_key)
Sets the secret key to access AWS.
Definition config.cpp:615
client_aws_config & set_host_header(const std::string &host_header)
Sets the host header; the address where the EC2 API can be found.
Definition config.cpp:643
client_aws_config & set_tag_key(const std::string &tag_key)
Sets the tag key.
Definition config.cpp:679
client_aws_config & set_iam_role(const std::string &iam_role)
Sets the tag value.
Definition config.cpp:711
client_aws_config & set_inside_aws(bool inside_aws)
Set to true if client is inside aws environment Default value is false.
Definition config.cpp:724
client_aws_config & set_region(const std::string &region)
Sets the region where the EC2 instances running the Hazelcast members will be running.
Definition config.cpp:629
bool is_enabled() const
Checks if the aws join mechanism is enabled.
Definition config.cpp:659
bool is_inside_aws() const
If client is inside aws, it will use private ip addresses directly, otherwise it will convert private...
Definition config.cpp:718
const std::string & get_secret_key() const
Gets the secret key to access AWS.
Definition config.cpp:609
client_aws_config & set_enabled(bool enabled)
Enables or disables the aws join mechanism.
Definition config.cpp:651
const std::string & get_tag_value() const
Gets the tag value.
Definition config.cpp:699
client_aws_config & set_access_key(const std::string &access_key)
Sets the access key to access AWS.
Definition config.cpp:601
client_aws_config & set_tag_value(const std::string &tag_value)
Sets the tag value.
Definition config.cpp:692
const std::string & get_iam_role() const
Gets the iamRole name.
Definition config.cpp:705
client_aws_config & set_security_group_name(const std::string &security_group_name)
Sets the security group name.
Definition config.cpp:665