Hazelcast C++ Client
Public Member Functions | List of all members
hazelcast::client::config::ClientAwsConfig Class Reference

The ClientAwsConfig contains the configuration for client to connect to nodes in aws environment. More...

#include <ClientAwsConfig.h>

Public Member Functions

const std::string & getAccessKey () const
 Gets the access key to access AWS. More...
 
ClientAwsConfigsetAccessKey (const std::string &accessKey)
 Sets the access key to access AWS. More...
 
const std::string & getSecretKey () const
 Gets the secret key to access AWS. More...
 
ClientAwsConfigsetSecretKey (const std::string &secretKey)
 Sets the secret key to access AWS. More...
 
const std::string & getRegion () const
 Gets the region where the EC2 instances running the Hazelcast members will be running. More...
 
ClientAwsConfigsetRegion (const std::string &region)
 Sets the region where the EC2 instances running the Hazelcast members will be running. More...
 
const std::string & getHostHeader () const
 Gets the host header; the address where the EC2 API can be found. More...
 
ClientAwsConfigsetHostHeader (const std::string &hostHeader)
 Sets the host header; the address where the EC2 API can be found. More...
 
ClientAwsConfigsetEnabled (bool enabled)
 Enables or disables the aws join mechanism. More...
 
bool isEnabled () const
 Checks if the aws join mechanism is enabled. More...
 
ClientAwsConfigsetSecurityGroupName (const std::string &securityGroupName)
 Sets the security group name. More...
 
const std::string & getSecurityGroupName () const
 Gets the security group name. More...
 
ClientAwsConfigsetTagKey (const std::string &tagKey)
 Sets the tag key. More...
 
const std::string & getTagKey () const
 Gets the tag key. More...
 
ClientAwsConfigsetTagValue (const std::string &tagValue)
 Sets the tag value. More...
 
const std::string & getTagValue () const
 Gets the tag value. More...
 
const std::string & getIamRole () const
 Gets the iamRole name. More...
 
ClientAwsConfigsetIamRole (const std::string &iamRole)
 Sets the tag value. More...
 
bool isInsideAws () const
 If client is inside aws, it will use private ip addresses directly, otherwise it will convert private ip addresses to public addresses internally by calling AWS API. More...
 
ClientAwsConfigsetInsideAws (bool insideAws)
 Set to true if client is inside aws environment Default value is false. More...
 

Detailed Description

The ClientAwsConfig contains the configuration for client to connect to nodes in aws environment.

The ClientAwsConfig contains the configuration for AWS join mechanism.

what happens behind the scenes is that data about the running AWS instances in a specific region are downloaded using the accesskey/secretkey and are potential Hazelcast members.

Filtering

There are 2 mechanisms for filtering out AWS instances and these mechanisms can be combined (AND).

  1. If a securityGroup is configured, only instances within that security group are selected.
  2. If a tag key/value is set, only instances with that tag key/value will be selected.

Member Function Documentation

◆ getAccessKey()

const std::string & hazelcast::client::config::ClientAwsConfig::getAccessKey ( ) const

Gets the access key to access AWS.

Returns empty string if no access key is configured.

Returns
the access key to access AWS
See also
#setAccessKey(std::string)

◆ getHostHeader()

const std::string & hazelcast::client::config::ClientAwsConfig::getHostHeader ( ) const

Gets the host header; the address where the EC2 API can be found.

Returns
the host header; the address where the EC2 API can be found

◆ getIamRole()

const std::string & hazelcast::client::config::ClientAwsConfig::getIamRole ( ) const

Gets the iamRole name.

Returns
the iamRole. empty string if nothing is returned.
See also
#setIamRole(std::string) (int32_t)

◆ getRegion()

const std::string & hazelcast::client::config::ClientAwsConfig::getRegion ( ) const

Gets the region where the EC2 instances running the Hazelcast members will be running.

Returns
the region where the EC2 instances running the Hazelcast members will be running
See also
#setRegion(std::string)

◆ getSecretKey()

const std::string & hazelcast::client::config::ClientAwsConfig::getSecretKey ( ) const

Gets the secret key to access AWS.

Returns empty string if no access key is configured.

Returns
the secret key.
See also
#setSecretKey(std::string)

◆ getSecurityGroupName()

const std::string & hazelcast::client::config::ClientAwsConfig::getSecurityGroupName ( ) const

Gets the security group name.

If nothing has been configured, empty string is returned.

Returns
the security group name; empty string if nothing has been configured

◆ getTagKey()

const std::string & hazelcast::client::config::ClientAwsConfig::getTagKey ( ) const

Gets the tag key.

If nothing is specified, empty string is returned.

Returns
the tag key. empty string if nothing is returned.

◆ getTagValue()

const std::string & hazelcast::client::config::ClientAwsConfig::getTagValue ( ) const

Gets the tag value.

If nothing is specified, empty string is returned.

Returns
the tag value. empty string if nothing is returned.

◆ isEnabled()

bool hazelcast::client::config::ClientAwsConfig::isEnabled ( ) const

Checks if the aws join mechanism is enabled.

Returns
true if enabled, false otherwise.

◆ isInsideAws()

bool hazelcast::client::config::ClientAwsConfig::isInsideAws ( ) const

If client is inside aws, it will use private ip addresses directly, otherwise it will convert private ip addresses to public addresses internally by calling AWS API.

Returns
bool true if client is inside aws environment.

◆ setAccessKey()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setAccessKey ( const std::string &  accessKey)

Sets the access key to access AWS.

Parameters
accessKeythe access key to access AWS
Returns
the updated ClientAwsConfig.
Exceptions
IllegalArgumentExceptionif accessKey is empty.
See also
getAccessKey()
#setSecretKey(std::string)

◆ setEnabled()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setEnabled ( bool  enabled)

Enables or disables the aws join mechanism.

Parameters
enabledtrue if enabled, false otherwise.
Returns
the updated ClientAwsConfig.

◆ setHostHeader()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setHostHeader ( const std::string &  hostHeader)

Sets the host header; the address where the EC2 API can be found.

Parameters
hostHeaderthe new host header; the address where the EC2 API can be found
Returns
the updated ClientAwsConfig
Exceptions
IllegalArgumentExceptionif hostHeader is an empty string.

◆ setIamRole()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setIamRole ( const std::string &  iamRole)

Sets the tag value.

See the filtering section above for more information.

Parameters
iamRolethe IAM Role name.
Returns
the updated ClientAwsConfig.
See also
getIamRole()

◆ setInsideAws()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setInsideAws ( bool  insideAws)

Set to true if client is inside aws environment Default value is false.

Parameters
insideAwsisInsideAws

◆ setRegion()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setRegion ( const std::string &  region)

Sets the region where the EC2 instances running the Hazelcast members will be running.

Parameters
regionthe region where the EC2 instances running the Hazelcast members will be running
Returns
the updated ClientAwsConfig
Exceptions
IllegalArgumentExceptionif region is empty.

◆ setSecretKey()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setSecretKey ( const std::string &  secretKey)

Sets the secret key to access AWS.

Parameters
secretKeythe secret key to access AWS
Returns
the updated ClientAwsConfig.
Exceptions
IllegalArgumentExceptionif secretKey is empty.
See also
getSecretKey()
#setAccessKey(std::string)

◆ setSecurityGroupName()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setSecurityGroupName ( const std::string &  securityGroupName)

Sets the security group name.

See the filtering section above for more information.

Parameters
securityGroupNamethe security group name.
Returns
the updated ClientAwsConfig.
See also
getSecurityGroupName()

◆ setTagKey()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setTagKey ( const std::string &  tagKey)

Sets the tag key.

See the filtering section above for more information.

Parameters
tagKeythe tag key. See the filtering section above for more information.
Returns
the updated ClientAwsConfig.
See also
#setTagKey(std::string)

◆ setTagValue()

ClientAwsConfig & hazelcast::client::config::ClientAwsConfig::setTagValue ( const std::string &  tagValue)

Sets the tag value.

See the filtering section above for more information.

Parameters
tagValuethe tag value. See the filtering section above for more information.
Returns
the updated ClientAwsConfig.
See also
#setTagKey(std::string)
getTagValue()

The documentation for this class was generated from the following files: