Class ConnectorStackProvider
- java.lang.Object
-
- com.amazonaws.athena.connector.integ.ConnectorStackProvider
-
public abstract class ConnectorStackProvider extends Object
Responsible for providing a CloudFormation stack for the connector being tested.
-
-
Constructor Summary
Constructors Constructor Description ConnectorStackProvider(String stackName, TestConfig testConfig)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Optional<software.amazon.awscdk.services.iam.PolicyDocument>
getAccessPolicy()
Must be overridden to facilitate getting the lambda function's IAM access policy.protected String
getLambdaFunctionName()
Gets the name of the lambda function generated by the Integration-Test module.protected org.testng.internal.collections.Pair<software.amazon.awscdk.core.App,software.amazon.awscdk.core.Stack>
getStack()
Gets the CloudFormation stack programmatically using AWS CDK.protected abstract void
setEnvironmentVars(Map environmentVars)
Must be overridden to facilitate the setting of the lambda function's environment variables key-value pairs (e.g.protected abstract void
setSpecificResource(software.amazon.awscdk.core.Stack stack)
Must be overridden (can be a no-op) to facilitate the creation of a connector-specific CloudFormation stack resource (e.g.
-
-
-
Constructor Detail
-
ConnectorStackProvider
public ConnectorStackProvider(String stackName, TestConfig testConfig)
-
-
Method Detail
-
getAccessPolicy
protected abstract Optional<software.amazon.awscdk.services.iam.PolicyDocument> getAccessPolicy()
Must be overridden to facilitate getting the lambda function's IAM access policy. The latter sets up access to multiple connector-specific AWS services (e.g. DynamoDB, Elasticsearch etc...)- Returns:
- A policy document object.
-
setEnvironmentVars
protected abstract void setEnvironmentVars(Map environmentVars)
Must be overridden to facilitate the setting of the lambda function's environment variables key-value pairs (e.g. "connection_string":"redshift://jdbc:redshift://..."). See individual connector for the expected list of environment variables.
-
setSpecificResource
protected abstract void setSpecificResource(software.amazon.awscdk.core.Stack stack)
Must be overridden (can be a no-op) to facilitate the creation of a connector-specific CloudFormation stack resource (e.g. DB table) using AWS CDK.- Parameters:
stack
- The current CloudFormation stack.
-
getLambdaFunctionName
protected String getLambdaFunctionName()
Gets the name of the lambda function generated by the Integration-Test module.- Returns:
- The name of the lambda function.
-
getStack
protected org.testng.internal.collections.Pair<software.amazon.awscdk.core.App,software.amazon.awscdk.core.Stack> getStack()
Gets the CloudFormation stack programmatically using AWS CDK.- Returns:
- CloudFormation stack object.
-
-