Allows you to configure a period of retention for which a log group should retain log events.
put-retention-policy
--log-group-name <value>
--retention-in-days <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
--log-group-name (string)
The name of the log group.
--retention-in-days (integer)
The number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.
--cli-input-json (string)
The 'PutDestination' command supports the ability to accept all of the parameter input from a file using --cli-input-json and performs a service operation on it. The JSON string provided follows the format specified in generate-cli-skeleton.If you provide any input values in the CLI, these values override the JSON values.
Note : You cannot pass arbitrary binary values using a JSON-provided value as the string, as it will be taken literally.
generate-cli-skeleton (string)
This parameter either accepts:
Objective: To create a retention period of 3 days for a log group called "company-logs".
aws logs put-retention-policy --log-group-name company-logs --retention-in-days 3
EventLog Analyzer, a one-stop log management solution, collects, analyzes, correlates, and archives log data from you on-premises as well as cloud network.With its in-depth log analysis capability, EventLog Analyzer helps enterprises to thwart security threats in real-time, spot anomalous user behaviors, and manage security incidents effectively. Want to know how our solution helps you protect your cloud environment? Check out.
Download now© 2020 Zoho Corporation Pvt. Ltd. All rights reserved.