Modifier and Type | Field and Description |
---|---|
static String |
AWS_CLIENT_CONFIG_PREFIX
The prefix used for properties that should be applied to
ClientConfiguration . |
Constructor and Description |
---|
AWSUtil() |
Modifier and Type | Method and Description |
---|---|
static com.amazonaws.services.kinesis.AmazonKinesis |
createKinesisClient(Properties configProps)
Creates an AmazonKinesis client.
|
static com.amazonaws.services.kinesis.AmazonKinesis |
createKinesisClient(Properties configProps,
com.amazonaws.ClientConfiguration awsClientConfig)
Creates an Amazon Kinesis Client.
|
static com.amazonaws.auth.AWSCredentialsProvider |
getCredentialsProvider(Properties configProps)
Return a
AWSCredentialsProvider instance corresponding to the configuration
properties. |
static StartingPosition |
getStartingPosition(SequenceNumber sequenceNumber,
Properties configProps)
|
static boolean |
isValidRegion(String region)
Checks whether or not a region ID is valid.
|
static void |
setAwsClientConfigProperties(com.amazonaws.ClientConfiguration config,
Properties configProps)
Set all prefixed properties on
ClientConfiguration . |
public static final String AWS_CLIENT_CONFIG_PREFIX
ClientConfiguration
.public static com.amazonaws.services.kinesis.AmazonKinesis createKinesisClient(Properties configProps)
configProps
- configuration properties containing the access key, secret key, and regionpublic static com.amazonaws.services.kinesis.AmazonKinesis createKinesisClient(Properties configProps, com.amazonaws.ClientConfiguration awsClientConfig)
configProps
- configuration properties containing the access key, secret key, and regionawsClientConfig
- preconfigured AWS SDK client configurationpublic static com.amazonaws.auth.AWSCredentialsProvider getCredentialsProvider(Properties configProps)
AWSCredentialsProvider
instance corresponding to the configuration
properties.configProps
- the configuration propertiespublic static boolean isValidRegion(String region)
region
- The AWS region ID to checkpublic static void setAwsClientConfigProperties(com.amazonaws.ClientConfiguration config, Properties configProps)
ClientConfiguration
.config
- configProps
- public static StartingPosition getStartingPosition(SequenceNumber sequenceNumber, Properties configProps)
StartingPosition
from the given SequenceNumber
and Properties
. In the case we are restating from a SentinelSequenceNumber.SENTINEL_AT_TIMESTAMP_SEQUENCE_NUM
, the date is parsed from the
properties.sequenceNumber
- the sequence number to resume fromconfigProps
- the properties to parse date fromCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.