com.hazelcast.config

## Class AwsConfig

- java.lang.Object
- - com.hazelcast.config.AliasedDiscoveryConfig<AwsConfig>
  - - com.hazelcast.config.AwsConfig

- All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable
  Direct Known Subclasses:
    ClientAwsConfig

      public class AwsConfig
      extends AliasedDiscoveryConfig<AwsConfig>

  The AWSConfig 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.
  Once Hazelcast has figured out which instances are available, it will use the private IP addresses of these instances to create a TCP/IP-cluster.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AwsConfig()`
    `AwsConfig(AwsConfig awsConfig)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAccessKey()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `int` | `getConnectionTimeoutSeconds()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `String` | `getHostHeader()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `String` | `getHzPort()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `String` | `getIamRole()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `int` | `getId()` Returns type identifier for this class.
    `String` | `getRegion()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `String` | `getSecretKey()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `String` | `getSecurityGroupName()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `String` | `getTagKey()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `String` | `getTagValue()` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `AwsConfig` | `setAccessKey(String accessKey)` Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
    `AwsConfig` | `setConnectionTimeoutSeconds(int connectionTimeoutSeconds)` Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
    `AwsConfig` | `setEnabled(boolean enabled)` Enables or disables the AWS join mechanism.
    `AwsConfig` | `setHostHeader(String hostHeader)` Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
    `AwsConfig` | `setIamRole(String iamRole)` Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
    `AwsConfig` | `setRegion(String region)` Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
    `AwsConfig` | `setSecretKey(String secretKey)` Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
    `AwsConfig` | `setSecurityGroupName(String securityGroupName)` Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
    `AwsConfig` | `setTagKey(String tagKey)` Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
    `AwsConfig` | `setTagValue(String tagValue)` Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead

    - ### Methods inherited from class com.hazelcast.config.AliasedDiscoveryConfig

      `equals, getFactoryId, getProperties, getProperty, getTag, hashCode, isEnabled, isUsePublicIp, readData, setProperty, setUsePublicIp, toString, writeData`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### AwsConfig

          public AwsConfig()

    - #### AwsConfig

          public AwsConfig(AwsConfig awsConfig)

  - ### Method Detail

    - #### getAccessKey

          @Deprecated
          public String getAccessKey()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      Gets the access key to access AWS. Returns null if no access key is configured.
      Returns:
        the access key to access AWS
      See Also:
        `setAccessKey(String)`

    - #### setAccessKey

          @Deprecated
          public AwsConfig setAccessKey(String accessKey)

      Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
      Sets the access key to access AWS.
      Parameters:
        `accessKey` - the access key to access AWS
      Returns:
        the updated AwsConfig
      Throws:
        `IllegalArgumentException` - if accessKey is `null` or empty
      See Also:
        `getAccessKey()`, `setSecretKey(String)`

    - #### getSecretKey

          @Deprecated
          public String getSecretKey()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      Gets the secret key to access AWS. Returns `null` if no access key is configured.
      Returns:
        the secret key
      See Also:
        `setSecretKey(String)`

    - #### setSecretKey

          @Deprecated
          public AwsConfig setSecretKey(String secretKey)

      Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
      Sets the secret key to access AWS.
      Parameters:
        `secretKey` - the secret key to access AWS
      Returns:
        the updated AwsConfig
      Throws:
        `IllegalArgumentException` - if secretKey is `null` or empty
      See Also:
        `getSecretKey()`, `setAccessKey(String)`

    - #### getRegion

          @Deprecated
          public String getRegion()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      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(String)`

    - #### setRegion

          @Deprecated
          public AwsConfig setRegion(String region)

      Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
      Sets the region where the EC2 instances running the Hazelcast members will be running.
      Parameters:
        `region` - the region where the EC2 instances running the Hazelcast members will be running
      Returns:
        the updated AwsConfig
      Throws:
        `IllegalArgumentException` - if region is `null` or empty

    - #### getHostHeader

          @Deprecated
          public String getHostHeader()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      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

    - #### setHostHeader

          @Deprecated
          public AwsConfig setHostHeader(String hostHeader)

      Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
      Sets the host header; the address where the EC2 API can be found.
      Parameters:
        `hostHeader` - the new host header; the address where the EC2 API can be found
      Returns:
        the updated AwsConfig
      Throws:
        `IllegalArgumentException` - if hostHeader is `null` or an empty string

    - #### getSecurityGroupName

          @Deprecated
          public String getSecurityGroupName()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      Gets the security group name. If nothing has been configured, `null` is returned.
      Returns:
        the security group name; `null` if nothing has been configured

    - #### setSecurityGroupName

          @Deprecated
          public AwsConfig setSecurityGroupName(String securityGroupName)

      Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
      Sets the security group name. See the filtering section above for more information.
      Parameters:
        `securityGroupName` - the security group name
      Returns:
        the updated AwsConfig
      See Also:
        `getSecurityGroupName()`

    - #### getTagKey

          @Deprecated
          public String getTagKey()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      Gets the tag key. If nothing is specified, `null` is returned.
      Returns:
        the tag key or `null` if nothing is returned

    - #### setTagKey

          public AwsConfig setTagKey(String tagKey)

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      Sets the tag key. See the filtering section above for more information.
      Parameters:
        `tagKey` - the tag key (see the filtering section above for more information)
      Returns:
        the updated AwsConfig
      See Also:
        `setTagKey(String)`

    - #### getTagValue

          @Deprecated
          public String getTagValue()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      Gets the tag value. If nothing is specified, `null` is returned.
      Returns:
        the tag value or `null` if nothing is returned

    - #### setTagValue

          @Deprecated
          public AwsConfig setTagValue(String tagValue)

      Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
      Sets the tag value. See the filtering section above for more information.
      Parameters:
        `tagValue` - the tag value (see the filtering section above for more information)
      Returns:
        the updated AwsConfig
      See Also:
        `setTagKey(String)`, `getTagValue()`

    - #### getConnectionTimeoutSeconds

          @Deprecated
          public int getConnectionTimeoutSeconds()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      Gets the connection timeout in seconds.
      Returns:
        the connectionTimeoutSeconds; connection timeout in seconds
      See Also:
        `setConnectionTimeoutSeconds(int)`

    - #### setConnectionTimeoutSeconds

          @Deprecated
          public AwsConfig setConnectionTimeoutSeconds(int connectionTimeoutSeconds)

      Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
      Sets the connect timeout in seconds. See `TcpIpConfig.setConnectionTimeoutSeconds(int)` for more information.
      Parameters:
        `connectionTimeoutSeconds` - the connectionTimeoutSeconds (connection timeout in seconds) to set
      Returns:
        the updated AwsConfig
      See Also:
        `getConnectionTimeoutSeconds()`, `TcpIpConfig.setConnectionTimeoutSeconds(int)`

    - #### getIamRole

          @Deprecated
          public String getIamRole()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      Gets the iamRole name
      Returns:
        the iamRole or `null` if nothing is returned
      See Also:
        `(int)`

    - #### setIamRole

          @Deprecated
          public AwsConfig setIamRole(String iamRole)

      Deprecated. use `AliasedDiscoveryConfig.setProperty(String, String)` instead
      Sets the tag value. See the filtering section above for more information.
      Parameters:
        `iamRole` - the IAM Role name
      Returns:
        the updated AwsConfig
      See Also:
        `getIamRole()`

    - #### getHzPort

          @Deprecated
          public String getHzPort()

      Deprecated. Use `AliasedDiscoveryConfig.getProperty(String)` instead.
      Gets Hazelcast port.

    - #### setEnabled

          public AwsConfig setEnabled(boolean enabled)

      Enables or disables the AWS join mechanism.
      Overrides:
        `setEnabled` in class `AliasedDiscoveryConfig<AwsConfig>`
      Parameters:
        `enabled` - `true` if enabled, `false` otherwise
      Returns:
        the updated AwsConfig

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Returns:
        type ID

Copyright © 2019. All rights reserved.