cloudwatchlogs_put_index_policy: Creates or updates a field index policy for the specified log...

View source: R/cloudwatchlogs_operations.R

cloudwatchlogs_put_index_policyR Documentation

Creates or updates a field index policy for the specified log group

Description

Creates or updates a field index policy for the specified log group. Only log groups in the Standard log class support field index policies. For more information about log classes, see Log classes.

See https://www.paws-r-sdk.com/docs/cloudwatchlogs_put_index_policy/ for full documentation.

Usage

cloudwatchlogs_put_index_policy(logGroupIdentifier, policyDocument)

Arguments

logGroupIdentifier

[required] Specify either the log group name or log group ARN to apply this field index policy to. If you specify an ARN, use the format arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at the end.

policyDocument

[required] The index policy document, in JSON format. The following is an example of an index policy document that creates two indexes, RequestId and TransactionId.

⁠"policyDocument": "{ "Fields": [ "RequestId", "TransactionId" ] }"⁠

The policy document must include at least one field index. For more information about the fields that can be included and other restrictions, see Field index syntax and quotas.


paws.management documentation built on April 3, 2025, 10:39 p.m.