CfnTransformerPropsMixin
- class aws_cdk.mixins_preview.aws_logs.mixins.CfnTransformerPropsMixin(props, *, strategy=None)
Bases:
MixinCreates or updates a log transformer for a single log group.
You use log transformers to transform log events into a different format, making them easier for you to process and analyze. You can also transform logs from different sources into standardized formats that contains relevant, source-specific information.
After you have created a transformer, CloudWatch Logs performs the transformations at the time of log ingestion. You can then refer to the transformed versions of the logs during operations such as querying with CloudWatch Logs Insights or creating metric filters or subscription filers.
You can also use a transformer to copy metadata from metadata keys into the log events themselves. This metadata can include log group name, log stream name, account ID and Region.
A transformer for a log group is a series of processors, where each processor applies one type of transformation to the log events ingested into this log group. The processors work one after another, in the order that you list them, like a pipeline. For more information about the available processors to use in a transformer, see Processors that you can use .
Having log events in standardized format enables visibility across your applications for your log analysis, reporting, and alarming needs. CloudWatch Logs provides transformation for common log types with out-of-the-box transformation templates for major AWS log sources such as VPC flow logs, Lambda, and Amazon RDS. You can use pre-built transformation templates or create custom transformation policies.
You can create transformers only for the log groups in the Standard log class.
You can also set up a transformer at the account level. For more information, see PutAccountPolicy . If there is both a log-group level transformer created with
PutTransformerand an account-level transformer that could apply to the same log group, the log group uses only the log-group level transformer. It ignores the account-level transformer.- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-transformer.html
- CloudformationResource:
AWS::Logs::Transformer
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins cfn_transformer_props_mixin = logs_mixins.CfnTransformerPropsMixin(logs_mixins.CfnTransformerMixinProps( log_group_identifier="logGroupIdentifier", transformer_config=[logs_mixins.CfnTransformerPropsMixin.ProcessorProperty( add_keys=logs_mixins.CfnTransformerPropsMixin.AddKeysProperty( entries=[logs_mixins.CfnTransformerPropsMixin.AddKeyEntryProperty( key="key", overwrite_if_exists=False, value="value" )] ), copy_value=logs_mixins.CfnTransformerPropsMixin.CopyValueProperty( entries=[logs_mixins.CfnTransformerPropsMixin.CopyValueEntryProperty( overwrite_if_exists=False, source="source", target="target" )] ), csv=logs_mixins.CfnTransformerPropsMixin.CsvProperty( columns=["columns"], delimiter="delimiter", quote_character="quoteCharacter", source="source" ), date_time_converter=logs_mixins.CfnTransformerPropsMixin.DateTimeConverterProperty( locale="locale", match_patterns=["matchPatterns"], source="source", source_timezone="sourceTimezone", target="target", target_format="targetFormat", target_timezone="targetTimezone" ), delete_keys=logs_mixins.CfnTransformerPropsMixin.DeleteKeysProperty( with_keys=["withKeys"] ), grok=logs_mixins.CfnTransformerPropsMixin.GrokProperty( match="match", source="source" ), list_to_map=logs_mixins.CfnTransformerPropsMixin.ListToMapProperty( flatten=False, flattened_element="flattenedElement", key="key", source="source", target="target", value_key="valueKey" ), lower_case_string=logs_mixins.CfnTransformerPropsMixin.LowerCaseStringProperty( with_keys=["withKeys"] ), move_keys=logs_mixins.CfnTransformerPropsMixin.MoveKeysProperty( entries=[logs_mixins.CfnTransformerPropsMixin.MoveKeyEntryProperty( overwrite_if_exists=False, source="source", target="target" )] ), parse_cloudfront=logs_mixins.CfnTransformerPropsMixin.ParseCloudfrontProperty( source="source" ), parse_json=logs_mixins.CfnTransformerPropsMixin.ParseJSONProperty( destination="destination", source="source" ), parse_key_value=logs_mixins.CfnTransformerPropsMixin.ParseKeyValueProperty( destination="destination", field_delimiter="fieldDelimiter", key_prefix="keyPrefix", key_value_delimiter="keyValueDelimiter", non_match_value="nonMatchValue", overwrite_if_exists=False, source="source" ), parse_postgres=logs_mixins.CfnTransformerPropsMixin.ParsePostgresProperty( source="source" ), parse_route53=logs_mixins.CfnTransformerPropsMixin.ParseRoute53Property( source="source" ), parse_to_ocsf=logs_mixins.CfnTransformerPropsMixin.ParseToOCSFProperty( event_source="eventSource", ocsf_version="ocsfVersion", source="source" ), parse_vpc=logs_mixins.CfnTransformerPropsMixin.ParseVPCProperty( source="source" ), parse_waf=logs_mixins.CfnTransformerPropsMixin.ParseWAFProperty( source="source" ), rename_keys=logs_mixins.CfnTransformerPropsMixin.RenameKeysProperty( entries=[logs_mixins.CfnTransformerPropsMixin.RenameKeyEntryProperty( key="key", overwrite_if_exists=False, rename_to="renameTo" )] ), split_string=logs_mixins.CfnTransformerPropsMixin.SplitStringProperty( entries=[logs_mixins.CfnTransformerPropsMixin.SplitStringEntryProperty( delimiter="delimiter", source="source" )] ), substitute_string=logs_mixins.CfnTransformerPropsMixin.SubstituteStringProperty( entries=[logs_mixins.CfnTransformerPropsMixin.SubstituteStringEntryProperty( from="from", source="source", to="to" )] ), trim_string=logs_mixins.CfnTransformerPropsMixin.TrimStringProperty( with_keys=["withKeys"] ), type_converter=logs_mixins.CfnTransformerPropsMixin.TypeConverterProperty( entries=[logs_mixins.CfnTransformerPropsMixin.TypeConverterEntryProperty( key="key", type="type" )] ), upper_case_string=logs_mixins.CfnTransformerPropsMixin.UpperCaseStringProperty( with_keys=["withKeys"] ) )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Logs::Transformer.- Parameters:
props (
Union[CfnTransformerMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['logGroupIdentifier', 'transformerConfig']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AddKeyEntryProperty
- class CfnTransformerPropsMixin.AddKeyEntryProperty(*, key=None, overwrite_if_exists=None, value=None)
Bases:
objectThis object defines one key that will be added with the addKeys processor.
- Parameters:
key (
Optional[str]) – The key of the new entry to be added to the log event.overwrite_if_exists (
Union[bool,IResolvable,None]) – Specifies whether to overwrite the value if the key already exists in the log event. If you omit this, the default isfalse.value (
Optional[str]) – The value of the new entry to be added to the log event.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins add_key_entry_property = logs_mixins.CfnTransformerPropsMixin.AddKeyEntryProperty( key="key", overwrite_if_exists=False, value="value" )
Attributes
- key
The key of the new entry to be added to the log event.
- overwrite_if_exists
Specifies whether to overwrite the value if the key already exists in the log event.
If you omit this, the default is
false.
- value
The value of the new entry to be added to the log event.
AddKeysProperty
- class CfnTransformerPropsMixin.AddKeysProperty(*, entries=None)
Bases:
objectThis processor adds new key-value pairs to the log event.
For more information about this processor including examples, see addKeys in the CloudWatch Logs User Guide .
- Parameters:
entries (
Union[IResolvable,Sequence[Union[IResolvable,AddKeyEntryProperty,Dict[str,Any]]],None]) – An array of objects, where each object contains the information about one key to add to the log event.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins add_keys_property = logs_mixins.CfnTransformerPropsMixin.AddKeysProperty( entries=[logs_mixins.CfnTransformerPropsMixin.AddKeyEntryProperty( key="key", overwrite_if_exists=False, value="value" )] )
Attributes
- entries
An array of objects, where each object contains the information about one key to add to the log event.
CopyValueEntryProperty
- class CfnTransformerPropsMixin.CopyValueEntryProperty(*, overwrite_if_exists=None, source=None, target=None)
Bases:
objectThis object defines one value to be copied with the copyValue processor.
- Parameters:
overwrite_if_exists (
Union[bool,IResolvable,None]) – Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default isfalse.source (
Optional[str]) – The key to copy.target (
Optional[str]) – The key of the field to copy the value to.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins copy_value_entry_property = logs_mixins.CfnTransformerPropsMixin.CopyValueEntryProperty( overwrite_if_exists=False, source="source", target="target" )
Attributes
- overwrite_if_exists
Specifies whether to overwrite the value if the destination key already exists.
If you omit this, the default is
false.
- source
The key to copy.
- target
The key of the field to copy the value to.
CopyValueProperty
- class CfnTransformerPropsMixin.CopyValueProperty(*, entries=None)
Bases:
objectThis processor copies values within a log event.
You can also use this processor to add metadata to log events by copying the values of the following metadata keys into the log events:
@logGroupName,@logGroupStream,@accountId,@regionName.For more information about this processor including examples, see copyValue in the CloudWatch Logs User Guide .
- Parameters:
entries (
Union[IResolvable,Sequence[Union[IResolvable,CopyValueEntryProperty,Dict[str,Any]]],None]) – An array ofCopyValueEntryobjects, where each object contains the information about one field value to copy.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins copy_value_property = logs_mixins.CfnTransformerPropsMixin.CopyValueProperty( entries=[logs_mixins.CfnTransformerPropsMixin.CopyValueEntryProperty( overwrite_if_exists=False, source="source", target="target" )] )
Attributes
- entries
An array of
CopyValueEntryobjects, where each object contains the information about one field value to copy.
CsvProperty
- class CfnTransformerPropsMixin.CsvProperty(*, columns=None, delimiter=None, quote_character=None, source=None)
Bases:
objectThe
CSVprocessor parses comma-separated values (CSV) from the log events into columns.For more information about this processor including examples, see csv in the CloudWatch Logs User Guide .
- Parameters:
columns (
Optional[Sequence[str]]) – An array of names to use for the columns in the transformed log event. If you omit this, default column names ([column_1, column_2 ...]) are used.delimiter (
Optional[str]) – The character used to separate each column in the original comma-separated value log event. If you omit this, the processor looks for the comma,character as the delimiter.quote_character (
Optional[str]) – The character used used as a text qualifier for a single column of data. If you omit this, the double quotation mark"character is used.source (
Optional[str]) – The path to the field in the log event that has the comma separated values to be parsed. If you omit this value, the whole log message is processed.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins csv_property = logs_mixins.CfnTransformerPropsMixin.CsvProperty( columns=["columns"], delimiter="delimiter", quote_character="quoteCharacter", source="source" )
Attributes
- columns
An array of names to use for the columns in the transformed log event.
If you omit this, default column names (
[column_1, column_2 ...]) are used.
- delimiter
The character used to separate each column in the original comma-separated value log event.
If you omit this, the processor looks for the comma
,character as the delimiter.
- quote_character
The character used used as a text qualifier for a single column of data.
If you omit this, the double quotation mark
"character is used.
- source
The path to the field in the log event that has the comma separated values to be parsed.
If you omit this value, the whole log message is processed.
DateTimeConverterProperty
- class CfnTransformerPropsMixin.DateTimeConverterProperty(*, locale=None, match_patterns=None, source=None, source_timezone=None, target=None, target_format=None, target_timezone=None)
Bases:
objectThis processor converts a datetime string into a format that you specify.
For more information about this processor including examples, see datetimeConverter in the CloudWatch Logs User Guide .
- Parameters:
locale (
Optional[str]) – The locale of the source field. If you omit this, the default oflocale.ROOTis used.match_patterns (
Optional[Sequence[str]]) – A list of patterns to match against thesourcefield.source (
Optional[str]) – The key to apply the date conversion to.source_timezone (
Optional[str]) – The time zone of the source field. If you omit this, the default used is the UTC zone.target (
Optional[str]) – The JSON field to store the result in.target_format (
Optional[str]) – The datetime format to use for the converted data in the target field. If you omit this, the default ofyyyy-MM-dd'T'HH:mm:ss.SSS'Zis used.target_timezone (
Optional[str]) – The time zone of the target field. If you omit this, the default used is the UTC zone.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins date_time_converter_property = logs_mixins.CfnTransformerPropsMixin.DateTimeConverterProperty( locale="locale", match_patterns=["matchPatterns"], source="source", source_timezone="sourceTimezone", target="target", target_format="targetFormat", target_timezone="targetTimezone" )
Attributes
- locale
The locale of the source field.
If you omit this, the default of
locale.ROOTis used.
- match_patterns
A list of patterns to match against the
sourcefield.
- source
The key to apply the date conversion to.
- source_timezone
The time zone of the source field.
If you omit this, the default used is the UTC zone.
- target
The JSON field to store the result in.
- target_format
The datetime format to use for the converted data in the target field.
If you omit this, the default of
yyyy-MM-dd'T'HH:mm:ss.SSS'Zis used.
- target_timezone
The time zone of the target field.
If you omit this, the default used is the UTC zone.
DeleteKeysProperty
- class CfnTransformerPropsMixin.DeleteKeysProperty(*, with_keys=None)
Bases:
objectThis processor deletes entries from a log event. These entries are key-value pairs.
For more information about this processor including examples, see deleteKeys in the CloudWatch Logs User Guide .
- Parameters:
with_keys (
Optional[Sequence[str]]) – The list of keys to delete.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins delete_keys_property = logs_mixins.CfnTransformerPropsMixin.DeleteKeysProperty( with_keys=["withKeys"] )
Attributes
- with_keys
The list of keys to delete.
GrokProperty
- class CfnTransformerPropsMixin.GrokProperty(*, match=None, source=None)
Bases:
objectThis processor uses pattern matching to parse and structure unstructured data.
This processor can also extract fields from log messages.
For more information about this processor including examples, see grok in the CloudWatch Logs User Guide .
- Parameters:
match (
Optional[str]) – The grok pattern to match against the log event. For a list of supported grok patterns, see Supported grok patterns .source (
Optional[str]) – The path to the field in the log event that you want to parse. If you omit this value, the whole log message is parsed.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins grok_property = logs_mixins.CfnTransformerPropsMixin.GrokProperty( match="match", source="source" )
Attributes
- match
The grok pattern to match against the log event.
For a list of supported grok patterns, see Supported grok patterns .
- source
The path to the field in the log event that you want to parse.
If you omit this value, the whole log message is parsed.
ListToMapProperty
- class CfnTransformerPropsMixin.ListToMapProperty(*, flatten=None, flattened_element=None, key=None, source=None, target=None, value_key=None)
Bases:
objectThis processor takes a list of objects that contain key fields, and converts them into a map of target keys.
For more information about this processor including examples, see listToMap in the CloudWatch Logs User Guide .
- Parameters:
flatten (
Union[bool,IResolvable,None]) – A Boolean value to indicate whether the list will be flattened into single items. Specifytrueto flatten the list. The default isfalseflattened_element (
Optional[str]) – If you setflattentotrue, useflattenedElementto specify which element,firstorlast, to keep. You must specify this parameter ifflattenistruekey (
Optional[str]) – The key of the field to be extracted as keys in the generated map.source (
Optional[str]) – The key in the log event that has a list of objects that will be converted to a map.target (
Optional[str]) – The key of the field that will hold the generated map.value_key (
Optional[str]) – If this is specified, the values that you specify in this parameter will be extracted from thesourceobjects and put into the values of the generated map. Otherwise, original objects in the source list will be put into the values of the generated map.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins list_to_map_property = logs_mixins.CfnTransformerPropsMixin.ListToMapProperty( flatten=False, flattened_element="flattenedElement", key="key", source="source", target="target", value_key="valueKey" )
Attributes
- flatten
A Boolean value to indicate whether the list will be flattened into single items.
Specify
trueto flatten the list. The default isfalse
- flattened_element
If you set
flattentotrue, useflattenedElementto specify which element,firstorlast, to keep.You must specify this parameter if
flattenistrue
- key
The key of the field to be extracted as keys in the generated map.
- source
The key in the log event that has a list of objects that will be converted to a map.
- target
The key of the field that will hold the generated map.
- value_key
If this is specified, the values that you specify in this parameter will be extracted from the
sourceobjects and put into the values of the generated map.Otherwise, original objects in the source list will be put into the values of the generated map.
LowerCaseStringProperty
- class CfnTransformerPropsMixin.LowerCaseStringProperty(*, with_keys=None)
Bases:
objectThis processor converts a string to lowercase.
For more information about this processor including examples, see lowerCaseString in the CloudWatch Logs User Guide .
- Parameters:
with_keys (
Optional[Sequence[str]]) – The array caontaining the keys of the fields to convert to lowercase.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins lower_case_string_property = logs_mixins.CfnTransformerPropsMixin.LowerCaseStringProperty( with_keys=["withKeys"] )
Attributes
- with_keys
The array caontaining the keys of the fields to convert to lowercase.
MoveKeyEntryProperty
- class CfnTransformerPropsMixin.MoveKeyEntryProperty(*, overwrite_if_exists=None, source=None, target=None)
Bases:
objectThis object defines one key that will be moved with the moveKey processor.
- Parameters:
overwrite_if_exists (
Union[bool,IResolvable,None]) – Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default isfalse.source (
Optional[str]) – The key to move.target (
Optional[str]) – The key to move to.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins move_key_entry_property = logs_mixins.CfnTransformerPropsMixin.MoveKeyEntryProperty( overwrite_if_exists=False, source="source", target="target" )
Attributes
- overwrite_if_exists
Specifies whether to overwrite the value if the destination key already exists.
If you omit this, the default is
false.
- source
The key to move.
MoveKeysProperty
- class CfnTransformerPropsMixin.MoveKeysProperty(*, entries=None)
Bases:
objectThis processor moves a key from one field to another. The original key is deleted.
For more information about this processor including examples, see moveKeys in the CloudWatch Logs User Guide .
- Parameters:
entries (
Union[IResolvable,Sequence[Union[IResolvable,MoveKeyEntryProperty,Dict[str,Any]]],None]) – An array of objects, where each object contains the information about one key to move.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins move_keys_property = logs_mixins.CfnTransformerPropsMixin.MoveKeysProperty( entries=[logs_mixins.CfnTransformerPropsMixin.MoveKeyEntryProperty( overwrite_if_exists=False, source="source", target="target" )] )
Attributes
- entries
An array of objects, where each object contains the information about one key to move.
ParseCloudfrontProperty
- class CfnTransformerPropsMixin.ParseCloudfrontProperty(*, source=None)
Bases:
objectThis processor parses CloudFront vended logs, extract fields, and convert them into JSON format.
Encoded field values are decoded. Values that are integers and doubles are treated as such. For more information about this processor including examples, see parseCloudfront
For more information about CloudFront log format, see Configure and use standard logs (access logs) .
If you use this processor, it must be the first processor in your transformer.
- Parameters:
source (
Optional[str]) – Omit this parameter and the whole log message will be processed by this processor. No other value than@messageis allowed forsource.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins parse_cloudfront_property = logs_mixins.CfnTransformerPropsMixin.ParseCloudfrontProperty( source="source" )
Attributes
- source
Omit this parameter and the whole log message will be processed by this processor.
No other value than
@messageis allowed forsource.
ParseJSONProperty
- class CfnTransformerPropsMixin.ParseJSONProperty(*, destination=None, source=None)
Bases:
objectThis processor parses log events that are in JSON format.
It can extract JSON key-value pairs and place them under a destination that you specify.
Additionally, because you must have at least one parse-type processor in a transformer, you can use
ParseJSONas that processor for JSON-format logs, so that you can also apply other processors, such as mutate processors, to these logs.For more information about this processor including examples, see parseJSON in the CloudWatch Logs User Guide .
- Parameters:
destination (
Optional[str]) – The location to put the parsed key value pair into. If you omit this parameter, it is placed under the root node.source (
Optional[str]) – Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example,store.book
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins parse_jSONProperty = logs_mixins.CfnTransformerPropsMixin.ParseJSONProperty( destination="destination", source="source" )
Attributes
- destination
The location to put the parsed key value pair into.
If you omit this parameter, it is placed under the root node.
- source
Path to the field in the log event that will be parsed.
Use dot notation to access child fields. For example,
store.book
ParseKeyValueProperty
- class CfnTransformerPropsMixin.ParseKeyValueProperty(*, destination=None, field_delimiter=None, key_prefix=None, key_value_delimiter=None, non_match_value=None, overwrite_if_exists=None, source=None)
Bases:
objectThis processor parses a specified field in the original log event into key-value pairs.
For more information about this processor including examples, see parseKeyValue in the CloudWatch Logs User Guide .
- Parameters:
destination (
Optional[str]) – The destination field to put the extracted key-value pairs into.field_delimiter (
Optional[str]) – The field delimiter string that is used between key-value pairs in the original log events. If you omit this, the ampersand&character is used.key_prefix (
Optional[str]) – If you want to add a prefix to all transformed keys, specify it here.key_value_delimiter (
Optional[str]) – The delimiter string to use between the key and value in each pair in the transformed log event. If you omit this, the equal=character is used.non_match_value (
Optional[str]) – A value to insert into the value field in the result, when a key-value pair is not successfully split.overwrite_if_exists (
Union[bool,IResolvable,None]) – Specifies whether to overwrite the value if the destination key already exists. If you omit this, the default isfalse.source (
Optional[str]) – Path to the field in the log event that will be parsed. Use dot notation to access child fields. For example,store.book
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins parse_key_value_property = logs_mixins.CfnTransformerPropsMixin.ParseKeyValueProperty( destination="destination", field_delimiter="fieldDelimiter", key_prefix="keyPrefix", key_value_delimiter="keyValueDelimiter", non_match_value="nonMatchValue", overwrite_if_exists=False, source="source" )
Attributes
- destination
The destination field to put the extracted key-value pairs into.
- field_delimiter
The field delimiter string that is used between key-value pairs in the original log events.
If you omit this, the ampersand
&character is used.
- key_prefix
If you want to add a prefix to all transformed keys, specify it here.
- key_value_delimiter
The delimiter string to use between the key and value in each pair in the transformed log event.
If you omit this, the equal
=character is used.
- non_match_value
A value to insert into the value field in the result, when a key-value pair is not successfully split.
- overwrite_if_exists
Specifies whether to overwrite the value if the destination key already exists.
If you omit this, the default is
false.
- source
Path to the field in the log event that will be parsed.
Use dot notation to access child fields. For example,
store.book
ParsePostgresProperty
- class CfnTransformerPropsMixin.ParsePostgresProperty(*, source=None)
Bases:
objectUse this processor to parse RDS for PostgreSQL vended logs, extract fields, and and convert them into a JSON format.
This processor always processes the entire log event message. For more information about this processor including examples, see parsePostGres .
For more information about RDS for PostgreSQL log format, see RDS for PostgreSQL database log filesTCP flag sequence . .. epigraph:
If you use this processor, it must be the first processor in your transformer.
- Parameters:
source (
Optional[str]) – Omit this parameter and the whole log message will be processed by this processor. No other value than@messageis allowed forsource.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins parse_postgres_property = logs_mixins.CfnTransformerPropsMixin.ParsePostgresProperty( source="source" )
Attributes
- source
Omit this parameter and the whole log message will be processed by this processor.
No other value than
@messageis allowed forsource.
ParseRoute53Property
- class CfnTransformerPropsMixin.ParseRoute53Property(*, source=None)
Bases:
objectUse this processor to parse Route 53 vended logs, extract fields, and and convert them into a JSON format.
This processor always processes the entire log event message. For more information about this processor including examples, see parseRoute53 . .. epigraph:
If you use this processor, it must be the first processor in your transformer.
- Parameters:
source (
Optional[str]) – Omit this parameter and the whole log message will be processed by this processor. No other value than@messageis allowed forsource.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins parse_route53_property = logs_mixins.CfnTransformerPropsMixin.ParseRoute53Property( source="source" )
Attributes
- source
Omit this parameter and the whole log message will be processed by this processor.
No other value than
@messageis allowed forsource.
ParseToOCSFProperty
- class CfnTransformerPropsMixin.ParseToOCSFProperty(*, event_source=None, ocsf_version=None, source=None)
Bases:
objectThis processor converts logs into Open Cybersecurity Schema Framework (OCSF) events.
For more information about this processor including examples, see parseToOCSF in the CloudWatch Logs User Guide .
- Parameters:
event_source (
Optional[str]) – Specify the service or process that produces the log events that will be converted with this processor.ocsf_version (
Optional[str]) – Specify which version of the OCSF schema to use for the transformed log events.source (
Optional[str]) – The path to the field in the log event that you want to parse. If you omit this value, the whole log message is parsed.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins parse_to_oCSFProperty = logs_mixins.CfnTransformerPropsMixin.ParseToOCSFProperty( event_source="eventSource", ocsf_version="ocsfVersion", source="source" )
Attributes
- event_source
Specify the service or process that produces the log events that will be converted with this processor.
- ocsf_version
Specify which version of the OCSF schema to use for the transformed log events.
- source
The path to the field in the log event that you want to parse.
If you omit this value, the whole log message is parsed.
ParseVPCProperty
- class CfnTransformerPropsMixin.ParseVPCProperty(*, source=None)
Bases:
objectUse this processor to parse Amazon VPC vended logs, extract fields, and and convert them into a JSON format.
This processor always processes the entire log event message.
This processor doesn’t support custom log formats, such as NAT gateway logs. For more information about custom log formats in Amazon VPC, see parseVPC For more information about this processor including examples, see parseVPC . .. epigraph:
If you use this processor, it must be the first processor in your transformer.
- Parameters:
source (
Optional[str]) – Omit this parameter and the whole log message will be processed by this processor. No other value than@messageis allowed forsource.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins parse_vPCProperty = logs_mixins.CfnTransformerPropsMixin.ParseVPCProperty( source="source" )
Attributes
- source
Omit this parameter and the whole log message will be processed by this processor.
No other value than
@messageis allowed forsource.
ParseWAFProperty
- class CfnTransformerPropsMixin.ParseWAFProperty(*, source=None)
Bases:
objectUse this processor to parse AWS WAF vended logs, extract fields, and and convert them into a JSON format.
This processor always processes the entire log event message. For more information about this processor including examples, see parseWAF .
For more information about AWS WAF log format, see Log examples for web ACL traffic . .. epigraph:
If you use this processor, it must be the first processor in your transformer.
- Parameters:
source (
Optional[str]) – Omit this parameter and the whole log message will be processed by this processor. No other value than@messageis allowed forsource.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins parse_wAFProperty = logs_mixins.CfnTransformerPropsMixin.ParseWAFProperty( source="source" )
Attributes
- source
Omit this parameter and the whole log message will be processed by this processor.
No other value than
@messageis allowed forsource.
ProcessorProperty
- class CfnTransformerPropsMixin.ProcessorProperty(*, add_keys=None, copy_value=None, csv=None, date_time_converter=None, delete_keys=None, grok=None, list_to_map=None, lower_case_string=None, move_keys=None, parse_cloudfront=None, parse_json=None, parse_key_value=None, parse_postgres=None, parse_route53=None, parse_to_ocsf=None, parse_vpc=None, parse_waf=None, rename_keys=None, split_string=None, substitute_string=None, trim_string=None, type_converter=None, upper_case_string=None)
Bases:
objectThis structure contains the information about one processor in a log transformer.
- Parameters:
add_keys (
Union[IResolvable,AddKeysProperty,Dict[str,Any],None]) –Use this parameter to include the addKeys processor in your transformer.
copy_value (
Union[IResolvable,CopyValueProperty,Dict[str,Any],None]) –Use this parameter to include the copyValue processor in your transformer.
csv (
Union[IResolvable,CsvProperty,Dict[str,Any],None]) –Use this parameter to include the CSV processor in your transformer.
date_time_converter (
Union[IResolvable,DateTimeConverterProperty,Dict[str,Any],None]) –Use this parameter to include the datetimeConverter processor in your transformer.
delete_keys (
Union[IResolvable,DeleteKeysProperty,Dict[str,Any],None]) –Use this parameter to include the deleteKeys processor in your transformer.
grok (
Union[IResolvable,GrokProperty,Dict[str,Any],None]) –Use this parameter to include the grok processor in your transformer.
list_to_map (
Union[IResolvable,ListToMapProperty,Dict[str,Any],None]) –Use this parameter to include the listToMap processor in your transformer.
lower_case_string (
Union[IResolvable,LowerCaseStringProperty,Dict[str,Any],None]) –Use this parameter to include the lowerCaseString processor in your transformer.
move_keys (
Union[IResolvable,MoveKeysProperty,Dict[str,Any],None]) –Use this parameter to include the moveKeys processor in your transformer.
parse_cloudfront (
Union[IResolvable,ParseCloudfrontProperty,Dict[str,Any],None]) –Use this parameter to include the parseCloudfront processor in your transformer. If you use this processor, it must be the first processor in your transformer.
parse_json (
Union[IResolvable,ParseJSONProperty,Dict[str,Any],None]) –Use this parameter to include the parseJSON processor in your transformer.
parse_key_value (
Union[IResolvable,ParseKeyValueProperty,Dict[str,Any],None]) –Use this parameter to include the parseKeyValue processor in your transformer.
parse_postgres (
Union[IResolvable,ParsePostgresProperty,Dict[str,Any],None]) –Use this parameter to include the parsePostGres processor in your transformer. If you use this processor, it must be the first processor in your transformer.
parse_route53 (
Union[IResolvable,ParseRoute53Property,Dict[str,Any],None]) –Use this parameter to include the parseRoute53 processor in your transformer. If you use this processor, it must be the first processor in your transformer.
parse_to_ocsf (
Union[IResolvable,ParseToOCSFProperty,Dict[str,Any],None]) – Use this parameter to convert logs into Open Cybersecurity Schema (OCSF) format.parse_vpc (
Union[IResolvable,ParseVPCProperty,Dict[str,Any],None]) –Use this parameter to include the parseVPC processor in your transformer. If you use this processor, it must be the first processor in your transformer.
parse_waf (
Union[IResolvable,ParseWAFProperty,Dict[str,Any],None]) –Use this parameter to include the parseWAF processor in your transformer. If you use this processor, it must be the first processor in your transformer.
rename_keys (
Union[IResolvable,RenameKeysProperty,Dict[str,Any],None]) – Use this parameter to include the renameKeys processor in your transformer.split_string (
Union[IResolvable,SplitStringProperty,Dict[str,Any],None]) – Use this parameter to include the splitString processor in your transformer.substitute_string (
Union[IResolvable,SubstituteStringProperty,Dict[str,Any],None]) – Use this parameter to include the substituteString processor in your transformer.trim_string (
Union[IResolvable,TrimStringProperty,Dict[str,Any],None]) – Use this parameter to include the trimString processor in your transformer.type_converter (
Union[IResolvable,TypeConverterProperty,Dict[str,Any],None]) – Use this parameter to include the typeConverter processor in your transformer.upper_case_string (
Union[IResolvable,UpperCaseStringProperty,Dict[str,Any],None]) – Use this parameter to include the upperCaseString processor in your transformer.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins processor_property = logs_mixins.CfnTransformerPropsMixin.ProcessorProperty( add_keys=logs_mixins.CfnTransformerPropsMixin.AddKeysProperty( entries=[logs_mixins.CfnTransformerPropsMixin.AddKeyEntryProperty( key="key", overwrite_if_exists=False, value="value" )] ), copy_value=logs_mixins.CfnTransformerPropsMixin.CopyValueProperty( entries=[logs_mixins.CfnTransformerPropsMixin.CopyValueEntryProperty( overwrite_if_exists=False, source="source", target="target" )] ), csv=logs_mixins.CfnTransformerPropsMixin.CsvProperty( columns=["columns"], delimiter="delimiter", quote_character="quoteCharacter", source="source" ), date_time_converter=logs_mixins.CfnTransformerPropsMixin.DateTimeConverterProperty( locale="locale", match_patterns=["matchPatterns"], source="source", source_timezone="sourceTimezone", target="target", target_format="targetFormat", target_timezone="targetTimezone" ), delete_keys=logs_mixins.CfnTransformerPropsMixin.DeleteKeysProperty( with_keys=["withKeys"] ), grok=logs_mixins.CfnTransformerPropsMixin.GrokProperty( match="match", source="source" ), list_to_map=logs_mixins.CfnTransformerPropsMixin.ListToMapProperty( flatten=False, flattened_element="flattenedElement", key="key", source="source", target="target", value_key="valueKey" ), lower_case_string=logs_mixins.CfnTransformerPropsMixin.LowerCaseStringProperty( with_keys=["withKeys"] ), move_keys=logs_mixins.CfnTransformerPropsMixin.MoveKeysProperty( entries=[logs_mixins.CfnTransformerPropsMixin.MoveKeyEntryProperty( overwrite_if_exists=False, source="source", target="target" )] ), parse_cloudfront=logs_mixins.CfnTransformerPropsMixin.ParseCloudfrontProperty( source="source" ), parse_json=logs_mixins.CfnTransformerPropsMixin.ParseJSONProperty( destination="destination", source="source" ), parse_key_value=logs_mixins.CfnTransformerPropsMixin.ParseKeyValueProperty( destination="destination", field_delimiter="fieldDelimiter", key_prefix="keyPrefix", key_value_delimiter="keyValueDelimiter", non_match_value="nonMatchValue", overwrite_if_exists=False, source="source" ), parse_postgres=logs_mixins.CfnTransformerPropsMixin.ParsePostgresProperty( source="source" ), parse_route53=logs_mixins.CfnTransformerPropsMixin.ParseRoute53Property( source="source" ), parse_to_ocsf=logs_mixins.CfnTransformerPropsMixin.ParseToOCSFProperty( event_source="eventSource", ocsf_version="ocsfVersion", source="source" ), parse_vpc=logs_mixins.CfnTransformerPropsMixin.ParseVPCProperty( source="source" ), parse_waf=logs_mixins.CfnTransformerPropsMixin.ParseWAFProperty( source="source" ), rename_keys=logs_mixins.CfnTransformerPropsMixin.RenameKeysProperty( entries=[logs_mixins.CfnTransformerPropsMixin.RenameKeyEntryProperty( key="key", overwrite_if_exists=False, rename_to="renameTo" )] ), split_string=logs_mixins.CfnTransformerPropsMixin.SplitStringProperty( entries=[logs_mixins.CfnTransformerPropsMixin.SplitStringEntryProperty( delimiter="delimiter", source="source" )] ), substitute_string=logs_mixins.CfnTransformerPropsMixin.SubstituteStringProperty( entries=[logs_mixins.CfnTransformerPropsMixin.SubstituteStringEntryProperty( from="from", source="source", to="to" )] ), trim_string=logs_mixins.CfnTransformerPropsMixin.TrimStringProperty( with_keys=["withKeys"] ), type_converter=logs_mixins.CfnTransformerPropsMixin.TypeConverterProperty( entries=[logs_mixins.CfnTransformerPropsMixin.TypeConverterEntryProperty( key="key", type="type" )] ), upper_case_string=logs_mixins.CfnTransformerPropsMixin.UpperCaseStringProperty( with_keys=["withKeys"] ) )
Attributes
- date_time_converter
Use this parameter to include the datetimeConverter processor in your transformer.
- delete_keys
Use this parameter to include the deleteKeys processor in your transformer.
- lower_case_string
Use this parameter to include the lowerCaseString processor in your transformer.
- parse_cloudfront
Use this parameter to include the parseCloudfront processor in your transformer.
If you use this processor, it must be the first processor in your transformer.
- parse_key_value
Use this parameter to include the parseKeyValue processor in your transformer.
- parse_postgres
Use this parameter to include the parsePostGres processor in your transformer.
If you use this processor, it must be the first processor in your transformer.
- parse_route53
Use this parameter to include the parseRoute53 processor in your transformer.
If you use this processor, it must be the first processor in your transformer.
- parse_to_ocsf
Use this parameter to convert logs into Open Cybersecurity Schema (OCSF) format.
- parse_vpc
Use this parameter to include the parseVPC processor in your transformer.
If you use this processor, it must be the first processor in your transformer.
- parse_waf
Use this parameter to include the parseWAF processor in your transformer.
If you use this processor, it must be the first processor in your transformer.
- rename_keys
Use this parameter to include the renameKeys processor in your transformer.
- split_string
Use this parameter to include the splitString processor in your transformer.
- substitute_string
Use this parameter to include the substituteString processor in your transformer.
- trim_string
Use this parameter to include the trimString processor in your transformer.
- type_converter
Use this parameter to include the typeConverter processor in your transformer.
- upper_case_string
Use this parameter to include the upperCaseString processor in your transformer.
RenameKeyEntryProperty
- class CfnTransformerPropsMixin.RenameKeyEntryProperty(*, key=None, overwrite_if_exists=None, rename_to=None)
Bases:
objectThis object defines one key that will be renamed with the renameKey processor.
- Parameters:
key (
Optional[str]) – The key to rename.overwrite_if_exists (
Union[bool,IResolvable,None]) – Specifies whether to overwrite the existing value if the destination key already exists. The default isfalserename_to (
Optional[str]) – The string to use for the new key name.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins rename_key_entry_property = logs_mixins.CfnTransformerPropsMixin.RenameKeyEntryProperty( key="key", overwrite_if_exists=False, rename_to="renameTo" )
Attributes
- key
The key to rename.
- overwrite_if_exists
Specifies whether to overwrite the existing value if the destination key already exists.
The default is
false
- rename_to
The string to use for the new key name.
RenameKeysProperty
- class CfnTransformerPropsMixin.RenameKeysProperty(*, entries=None)
Bases:
objectUse this processor to rename keys in a log event.
For more information about this processor including examples, see renameKeys in the CloudWatch Logs User Guide .
- Parameters:
entries (
Union[IResolvable,Sequence[Union[IResolvable,RenameKeyEntryProperty,Dict[str,Any]]],None]) – An array ofRenameKeyEntryobjects, where each object contains the information about a single key to rename.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins rename_keys_property = logs_mixins.CfnTransformerPropsMixin.RenameKeysProperty( entries=[logs_mixins.CfnTransformerPropsMixin.RenameKeyEntryProperty( key="key", overwrite_if_exists=False, rename_to="renameTo" )] )
Attributes
- entries
An array of
RenameKeyEntryobjects, where each object contains the information about a single key to rename.
SplitStringEntryProperty
- class CfnTransformerPropsMixin.SplitStringEntryProperty(*, delimiter=None, source=None)
Bases:
objectThis object defines one log field that will be split with the splitString processor.
- Parameters:
delimiter (
Optional[str]) – The separator characters to split the string entry on.source (
Optional[str]) – The key of the field to split.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins split_string_entry_property = logs_mixins.CfnTransformerPropsMixin.SplitStringEntryProperty( delimiter="delimiter", source="source" )
Attributes
- delimiter
The separator characters to split the string entry on.
- source
The key of the field to split.
SplitStringProperty
- class CfnTransformerPropsMixin.SplitStringProperty(*, entries=None)
Bases:
objectUse this processor to split a field into an array of strings using a delimiting character.
For more information about this processor including examples, see splitString in the CloudWatch Logs User Guide .
- Parameters:
entries (
Union[IResolvable,Sequence[Union[IResolvable,SplitStringEntryProperty,Dict[str,Any]]],None]) – An array ofSplitStringEntryobjects, where each object contains the information about one field to split.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins split_string_property = logs_mixins.CfnTransformerPropsMixin.SplitStringProperty( entries=[logs_mixins.CfnTransformerPropsMixin.SplitStringEntryProperty( delimiter="delimiter", source="source" )] )
Attributes
- entries
An array of
SplitStringEntryobjects, where each object contains the information about one field to split.
SubstituteStringEntryProperty
- class CfnTransformerPropsMixin.SubstituteStringEntryProperty(*, from_=None, source=None, to=None)
Bases:
objectThis object defines one log field key that will be replaced using the substituteString processor.
- Parameters:
from – The regular expression string to be replaced. Special regex characters such as [ and ] must be escaped using when using double quotes and with when using single quotes. For more information, see Class Pattern on the Oracle web site.
source (
Optional[str]) – The key to modify.to (
Optional[str]) – The string to be substituted for each match offrom.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins substitute_string_entry_property = logs_mixins.CfnTransformerPropsMixin.SubstituteStringEntryProperty( from="from", source="source", to="to" )
Attributes
- from_
The regular expression string to be replaced.
Special regex characters such as [ and ] must be escaped using when using double quotes and with when using single quotes. For more information, see Class Pattern on the Oracle web site.
- source
The key to modify.
- to
The string to be substituted for each match of
from.
SubstituteStringProperty
- class CfnTransformerPropsMixin.SubstituteStringProperty(*, entries=None)
Bases:
objectThis processor matches a key’s value against a regular expression and replaces all matches with a replacement string.
For more information about this processor including examples, see substituteString in the CloudWatch Logs User Guide .
- Parameters:
entries (
Union[IResolvable,Sequence[Union[IResolvable,SubstituteStringEntryProperty,Dict[str,Any]]],None]) – An array of objects, where each object contains the information about one key to match and replace.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins substitute_string_property = logs_mixins.CfnTransformerPropsMixin.SubstituteStringProperty( entries=[logs_mixins.CfnTransformerPropsMixin.SubstituteStringEntryProperty( from="from", source="source", to="to" )] )
Attributes
- entries
An array of objects, where each object contains the information about one key to match and replace.
TrimStringProperty
- class CfnTransformerPropsMixin.TrimStringProperty(*, with_keys=None)
Bases:
objectUse this processor to remove leading and trailing whitespace.
For more information about this processor including examples, see trimString in the CloudWatch Logs User Guide .
- Parameters:
with_keys (
Optional[Sequence[str]]) – The array containing the keys of the fields to trim.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins trim_string_property = logs_mixins.CfnTransformerPropsMixin.TrimStringProperty( with_keys=["withKeys"] )
Attributes
- with_keys
The array containing the keys of the fields to trim.
TypeConverterEntryProperty
- class CfnTransformerPropsMixin.TypeConverterEntryProperty(*, key=None, type=None)
Bases:
objectThis object defines one value type that will be converted using the typeConverter processor.
- Parameters:
key (
Optional[str]) – The key with the value that is to be converted to a different type.type (
Optional[str]) – The type to convert the field value to. Valid values areinteger,double,stringandboolean.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins type_converter_entry_property = logs_mixins.CfnTransformerPropsMixin.TypeConverterEntryProperty( key="key", type="type" )
Attributes
- key
The key with the value that is to be converted to a different type.
- type
The type to convert the field value to.
Valid values are
integer,double,stringandboolean.
TypeConverterProperty
- class CfnTransformerPropsMixin.TypeConverterProperty(*, entries=None)
Bases:
objectUse this processor to convert a value type associated with the specified key to the specified type.
It’s a casting processor that changes the types of the specified fields. Values can be converted into one of the following datatypes:
integer,double,stringandboolean.For more information about this processor including examples, see trimString in the CloudWatch Logs User Guide .
- Parameters:
entries (
Union[IResolvable,Sequence[Union[IResolvable,TypeConverterEntryProperty,Dict[str,Any]]],None]) – An array ofTypeConverterEntryobjects, where each object contains the information about one field to change the type of.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins type_converter_property = logs_mixins.CfnTransformerPropsMixin.TypeConverterProperty( entries=[logs_mixins.CfnTransformerPropsMixin.TypeConverterEntryProperty( key="key", type="type" )] )
Attributes
- entries
An array of
TypeConverterEntryobjects, where each object contains the information about one field to change the type of.
UpperCaseStringProperty
- class CfnTransformerPropsMixin.UpperCaseStringProperty(*, with_keys=None)
Bases:
objectThis processor converts a string field to uppercase.
For more information about this processor including examples, see upperCaseString in the CloudWatch Logs User Guide .
- Parameters:
with_keys (
Optional[Sequence[str]]) – The array of containing the keys of the field to convert to uppercase.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins upper_case_string_property = logs_mixins.CfnTransformerPropsMixin.UpperCaseStringProperty( with_keys=["withKeys"] )
Attributes
- with_keys
The array of containing the keys of the field to convert to uppercase.