Class CloudWatchLogsClient.Builder
java.lang.Object
codes.grow.packages.cloudwatchlogs.CloudWatchLogsClient.Builder
- Enclosing class:
CloudWatchLogsClient
Builder that configures and creates a client in one chain.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configuration and the client.config(Consumer<CloudWatchLogsConfig.Builder> change) Changes the configuration builder in place (everyCloudWatchLogsConfig.Buildersetter is available).Sets the connect timeout.credentials(String accessKeyId, String secretAccessKey) Sets static credentials.Fills unset fields from an environment reader.Adds a header sent with every request.Sets the request hooks.Sets the logger.Sets the default log group.Sets the log stream of the log client.Sets the proxy URL.Sets the AWS region.Sets the per-attempt timeout.retry(RetryPolicy retry) Sets the retry policy.tls(TlsOptions tls) Sets the TLS options.Sets the total timeout per call.Sets the endpoint override.userAgentSuffix(String suffix) Sets the User-Agent suffix.
-
Method Details
-
fromEnv
Fills unset fields from an environment reader.- Parameters:
env- reader, e.g.EnvReader.system()- Returns:
- this builder
-
config
Changes the configuration builder in place (everyCloudWatchLogsConfig.Buildersetter is available).- Parameters:
change- the change- Returns:
- this builder
-
url
Sets the endpoint override.- Parameters:
url- URL- Returns:
- this builder
-
region
Sets the AWS region.- Parameters:
region- region- Returns:
- this builder
-
credentials
Sets static credentials.- Parameters:
accessKeyId- access key idsecretAccessKey- secret access key- Returns:
- this builder
-
logGroup
Sets the default log group.- Parameters:
group- group name- Returns:
- this builder
-
logStream
Sets the log stream of the log client.- Parameters:
stream- stream name- Returns:
- this builder
-
connectTimeout
Sets the connect timeout.- Parameters:
d- value- Returns:
- this builder
-
requestTimeout
Sets the per-attempt timeout.- Parameters:
d- value- Returns:
- this builder
-
totalTimeout
Sets the total timeout per call.- Parameters:
d- value- Returns:
- this builder
-
retry
Sets the retry policy.- Parameters:
retry- value- Returns:
- this builder
-
tls
Sets the TLS options.- Parameters:
tls- value- Returns:
- this builder
-
proxy
Sets the proxy URL.- Parameters:
proxy- value- Returns:
- this builder
-
userAgentSuffix
Sets the User-Agent suffix.- Parameters:
suffix- value- Returns:
- this builder
-
hooks
Sets the request hooks.- Parameters:
hooks- value- Returns:
- this builder
-
logger
Sets the logger.- Parameters:
logger- value- Returns:
- this builder
-
header
Adds a header sent with every request.- Parameters:
name- header namevalue- header value- Returns:
- this builder
-
build
Builds the configuration and the client.- Returns:
- a new client
- Throws:
ConfigException- when the configuration is invalid
-