LogRetentionProps

class aws_cdk.aws_logs.LogRetentionProps(*, log_group_name, retention, log_group_region=None, log_retention_retry_options=None, role=None)

Bases: object

Construction properties for a LogRetention.

Parameters
  • log_group_name (str) – The log group name.

  • retention (RetentionDays) – The number of days log events are kept in CloudWatch Logs.

  • log_group_region (Optional[str]) – The region where the log group should be created. Default: - same region as the stack

  • log_retention_retry_options (Optional[LogRetentionRetryOptions]) – Retry options for all AWS API calls. Default: - AWS SDK default retry options

  • role (Optional[IRole]) – The IAM role for the Lambda function associated with the custom resource. Default: - A new role is created

Attributes

log_group_name

The log group name.

Return type

str

log_group_region

The region where the log group should be created.

Default
  • same region as the stack

Return type

Optional[str]

log_retention_retry_options

Retry options for all AWS API calls.

Default
  • AWS SDK default retry options

Return type

Optional[LogRetentionRetryOptions]

retention

The number of days log events are kept in CloudWatch Logs.

Return type

RetentionDays

role

The IAM role for the Lambda function associated with the custom resource.

Default
  • A new role is created

Return type

Optional[IRole]