interface LogRetentionProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Logs.LogRetentionProps |
Java | software.amazon.awscdk.services.logs.LogRetentionProps |
Python | aws_cdk.aws_logs.LogRetentionProps |
TypeScript (source) | @aws-cdk/aws-logs » LogRetentionProps |
Construction properties for a LogRetention.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as iam from '@aws-cdk/aws-iam';
import * as logs from '@aws-cdk/aws-logs';
import * as cdk from '@aws-cdk/core';
declare const role: iam.Role;
const logRetentionProps: logs.LogRetentionProps = {
logGroupName: 'logGroupName',
retention: logs.RetentionDays.ONE_DAY,
// the properties below are optional
logGroupRegion: 'logGroupRegion',
logRetentionRetryOptions: {
base: cdk.Duration.minutes(30),
maxRetries: 123,
},
role: role,
};
Properties
Name | Type | Description |
---|---|---|
log | string | The log group name. |
retention | Retention | The number of days log events are kept in CloudWatch Logs. |
log | string | The region where the log group should be created. |
log | Log | Retry options for all AWS API calls. |
role? | IRole | The IAM role for the Lambda function associated with the custom resource. |
logGroupName
Type:
string
The log group name.
retention
Type:
Retention
The number of days log events are kept in CloudWatch Logs.
logGroupRegion?
Type:
string
(optional, default: same region as the stack)
The region where the log group should be created.
logRetentionRetryOptions?
Type:
Log
(optional, default: AWS SDK default retry options)
Retry options for all AWS API calls.
role?
Type:
IRole
(optional, default: A new role is created)
The IAM role for the Lambda function associated with the custom resource.