Skip to content

FieldIndex

Source code in docs_src/capo_cloudwatch_logs/types/field_index.py
class FieldIndex(TypedDict, closed=True):
    log_group_identifier: NotRequired[
        "capo_cloudwatch_logs.types.log_group_identifier.LogGroupIdentifier"
    ]
    """<p>If this field index appears in an index policy that applies only to a single log group, the ARN of that log group is displayed here.</p>"""
    field_index_name: NotRequired[
        "capo_cloudwatch_logs.types.field_index_name.FieldIndexName"
    ]
    """<p>The string that this field index matches.</p>"""
    last_scan_time: NotRequired["capo_cloudwatch_logs.types.timestamp.Timestamp"]
    """<p>The most recent time that CloudWatch Logs scanned ingested log events to search for this field index to improve the speed of future CloudWatch Logs Insights queries that search for this field index.</p>"""
    first_event_time: NotRequired["capo_cloudwatch_logs.types.timestamp.Timestamp"]
    """<p>The time and date of the earliest log event that matches this field index, after the index policy that contains it was created. </p>"""
    last_event_time: NotRequired["capo_cloudwatch_logs.types.timestamp.Timestamp"]
    """<p>The time and date of the most recent log event that matches this field index. </p>"""
    type: NotRequired["capo_cloudwatch_logs.types.index_type.IndexType"]
    """<p>The type of index. Specify <code>FACET</code> for facet-based indexing or <code>FIELD_INDEX</code> for field-based indexing. This determines how the field is indexed and can be queried.</p>"""
    index_category: NotRequired[
        "capo_cloudwatch_logs.types.index_category.IndexCategory"
    ]
    """<p>The category of the field index:</p> <ul> <li> <p> <code>DEFAULT</code>: Fields that CloudWatch Logs indexes by default. Examples include <code>@logStream</code> and <code>@data_format</code>.</p> </li> <li> <p> <code>CUSTOM</code>: Fields that you added manually to the field index policy. CloudWatch Logs always indexes these fields. These fields count toward the quota of 20 fields for each log group.</p> </li> <li> <p> <code>AUTO</code>: Fields that CloudWatch Logs indexes automatically based on your query patterns and usage. These fields do not count toward the field index quota. CloudWatch Logs might update these fields based on changes in your query patterns. To keep a field indexed permanently, add it to an account-level or log-group level field index policy.</p> </li> <li> <p> <code>INACTIVE</code>: Fields that CloudWatch Logs indexed before but does not index now. This happens if you remove a field from the field index policy or if CloudWatch Logs automatically selects a different field based on your queries.</p> </li> </ul> <p>For more information about automatically indexed fields, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatchLogs-Field-Indexing-Automatic.html">Automatically indexed fields</a>.</p>"""

field_index_name instance-attribute

field_index_name: NotRequired[FieldIndexName]

The string that this field index matches.

first_event_time instance-attribute

first_event_time: NotRequired[Timestamp]

The time and date of the earliest log event that matches this field index, after the index policy that contains it was created.

index_category instance-attribute

index_category: NotRequired[IndexCategory]

The category of the field index:

  • DEFAULT: Fields that CloudWatch Logs indexes by default. Examples include @logStream and @data_format.

  • CUSTOM: Fields that you added manually to the field index policy. CloudWatch Logs always indexes these fields. These fields count toward the quota of 20 fields for each log group.

  • AUTO: Fields that CloudWatch Logs indexes automatically based on your query patterns and usage. These fields do not count toward the field index quota. CloudWatch Logs might update these fields based on changes in your query patterns. To keep a field indexed permanently, add it to an account-level or log-group level field index policy.

  • INACTIVE: Fields that CloudWatch Logs indexed before but does not index now. This happens if you remove a field from the field index policy or if CloudWatch Logs automatically selects a different field based on your queries.

For more information about automatically indexed fields, see Automatically indexed fields.

last_event_time instance-attribute

last_event_time: NotRequired[Timestamp]

The time and date of the most recent log event that matches this field index.

last_scan_time instance-attribute

last_scan_time: NotRequired[Timestamp]

The most recent time that CloudWatch Logs scanned ingested log events to search for this field index to improve the speed of future CloudWatch Logs Insights queries that search for this field index.

log_group_identifier instance-attribute

log_group_identifier: NotRequired[LogGroupIdentifier]

If this field index appears in an index policy that applies only to a single log group, the ARN of that log group is displayed here.

type instance-attribute

type: NotRequired[IndexType]

The type of index. Specify FACET for facet-based indexing or FIELD_INDEX for field-based indexing. This determines how the field is indexed and can be queried.