com.amazon.redshift.core

## Class IamHelper

- java.lang.Object
- - com.amazon.redshift.core.IdpAuthHelper
  - - com.amazon.redshift.core.IamHelper

    public final class IamHelper
    extends IdpAuthHelper

### Field Summary

Fields
`static int` `GET_CLUSTER_CREDENTIALS_IAM_V2_API`
`static int` `GET_CLUSTER_CREDENTIALS_JWT_V2_API`
`static int` `GET_CLUSTER_CREDENTIALS_SAML_V2_API`
`static int` `GET_CLUSTER_CREDENTIALS_V1_API`
`static int` `GET_SERVERLESS_CREDENTIALS_V1_API`

### Fields inherited from class com.amazon.redshift.core.IdpAuthHelper

`JWT_PLUGIN, SAML_PLUGIN`

### Method Summary

All Methods Static Methods Concrete Methods
`static Properties` `setIAMProperties(Properties info, RedshiftJDBCSettings settings, RedshiftLogger log)` Helper function to handle IAM connection properties.

### Methods inherited from class com.amazon.redshift.core.IdpAuthHelper

`setAuthProperties`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### GET_CLUSTER_CREDENTIALS_V1_API

    public static final int GET_CLUSTER_CREDENTIALS_V1_API

See Also:
  Constant Field Values

#### GET_CLUSTER_CREDENTIALS_IAM_V2_API

    public static final int GET_CLUSTER_CREDENTIALS_IAM_V2_API

See Also:
  Constant Field Values

#### GET_CLUSTER_CREDENTIALS_SAML_V2_API

    public static final int GET_CLUSTER_CREDENTIALS_SAML_V2_API

See Also:
  Constant Field Values

#### GET_CLUSTER_CREDENTIALS_JWT_V2_API

    public static final int GET_CLUSTER_CREDENTIALS_JWT_V2_API

See Also:
  Constant Field Values

#### GET_SERVERLESS_CREDENTIALS_V1_API

    public static final int GET_SERVERLESS_CREDENTIALS_V1_API

See Also:
  Constant Field Values

### Method Detail

#### setIAMProperties

    public static Properties setIAMProperties(Properties info,
                                              RedshiftJDBCSettings settings,
                                              RedshiftLogger log)
                                       throws RedshiftException

Helper function to handle IAM connection properties. If any IAM related connection property is specified, all other required IAM properties must be specified too or else it throws an error.

Parameters:
  `info` - Redshift client settings used to authenticate if connection should be granted.
  `settings` - Redshift IAM settings
  `log` - Redshift logger
Returns:
  New property object with properties from auth profile and given input info properties, if auth profile found. Otherwise same property object as info return.
Throws:
  `RedshiftException` - If an error occurs.