Record Class CloudWatchLogClientOptions
java.lang.Object
java.lang.Record
codes.grow.packages.cloudwatchlogs.CloudWatchLogClientOptions
- Record Components:
group- log group (null:config.logGroup, required)stream- log stream (null:config.logStream; created on first use)createGroup- create a missing log group on the first export (default false)batchOptions- batching options (null:BatchOptions.defaults())resource- resource attributes (service.name, …) added to every recordredaction- redaction applied before records leave the process (null: defaults)
public record CloudWatchLogClientOptions(String group, String stream, boolean createGroup, BatchOptions batchOptions, Map<String,Object> resource, RedactionProcessor redaction)
extends Record
Options of
CloudWatchLogsClient.logClient.-
Constructor Summary
ConstructorsConstructorDescriptionCloudWatchLogClientOptions(String group, String stream, boolean createGroup, BatchOptions batchOptions, Map<String, Object> resource, RedactionProcessor redaction) Applies defaults. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebatchOptionsrecord component.booleanReturns the value of thecreateGrouprecord component.static CloudWatchLogClientOptionsdefaults()Options with every default.final booleanIndicates whether some other object is "equal to" this one.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theredactionrecord component.resource()Returns the value of theresourcerecord component.stream()Returns the value of thestreamrecord component.final StringtoString()Returns a string representation of this record class.withBatchOptions(BatchOptions value) Returns a copy with other batching options.withCreateGroup(boolean value) Returns a copy that creates a missing group.withRedaction(RedactionProcessor value) Returns a copy with another redaction processor.withResource(Map<String, Object> value) Returns a copy with other resource attributes.withTarget(String groupName, String streamName) Returns a copy with another group and stream.
-
Constructor Details
-
CloudWatchLogClientOptions
public CloudWatchLogClientOptions(String group, String stream, boolean createGroup, BatchOptions batchOptions, Map<String, Object> resource, RedactionProcessor redaction) Applies defaults.- Parameters:
group- groupstream- streamcreateGroup- create the groupbatchOptions- batching optionsresource- resource attributesredaction- redaction
-
-
Method Details
-
defaults
Options with every default.- Returns:
- the options
-
withTarget
Returns a copy with another group and stream.- Parameters:
groupName- group (null: default)streamName- stream (null: default)- Returns:
- the copy
-
withCreateGroup
Returns a copy that creates a missing group.- Parameters:
value- flag- Returns:
- the copy
-
withBatchOptions
Returns a copy with other batching options.- Parameters:
value- options- Returns:
- the copy
-
withResource
Returns a copy with other resource attributes.- Parameters:
value- attributes- Returns:
- the copy
-
withRedaction
Returns a copy with another redaction processor.- Parameters:
value- processor- Returns:
- the copy
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
group
Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
stream
Returns the value of thestreamrecord component.- Returns:
- the value of the
streamrecord component
-
createGroup
public boolean createGroup()Returns the value of thecreateGrouprecord component.- Returns:
- the value of the
createGrouprecord component
-
batchOptions
Returns the value of thebatchOptionsrecord component.- Returns:
- the value of the
batchOptionsrecord component
-
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
redaction
Returns the value of theredactionrecord component.- Returns:
- the value of the
redactionrecord component
-