uk.gov.nationalarchives.aws.utils.stepfunction.StepFunctionClients.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stepfunction-utils_2.13 Show documentation
Show all versions of stepfunction-utils_2.13 Show documentation
A project containing useful methods for interacting with Step Functions
package uk.gov.nationalarchives.aws.utils.stepfunction
import software.amazon.awssdk.http.nio.netty.NettyNioAsyncHttpClient
import software.amazon.awssdk.regions.Region
import software.amazon.awssdk.services.sfn.SfnAsyncClient
import java.net.URI
object StepFunctionClients {
def sfnAsyncClient(endpointPath: String): SfnAsyncClient = {
val httpClient = NettyNioAsyncHttpClient.builder.build
SfnAsyncClient.builder
.region(Region.EU_WEST_2)
.endpointOverride(URI.create(endpointPath))
.httpClient(httpClient)
.build
}
}