Interface ILogRetentionProps
Construction properties for a LogRetention.
Namespace: Amazon.CDK.AWS.Logs
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ILogRetentionProps
Syntax (vb)
Public Interface ILogRetentionProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.IAM;
using Amazon.CDK.AWS.Logs;
Role role;
var logRetentionProps = new LogRetentionProps {
LogGroupName = "logGroupName",
Retention = RetentionDays.ONE_DAY,
// the properties below are optional
LogGroupRegion = "logGroupRegion",
LogRetentionRetryOptions = new LogRetentionRetryOptions {
Base = Duration.Minutes(30),
MaxRetries = 123
},
RemovalPolicy = RemovalPolicy.DESTROY,
Role = role
};
Synopsis
Properties
LogGroupName | The log group name. |
LogGroupRegion | The region where the log group should be created. |
LogRetentionRetryOptions | Retry options for all AWS API calls. |
RemovalPolicy | The removalPolicy for the log group when the stack is deleted. |
Retention | The number of days log events are kept in CloudWatch Logs. |
Role | The IAM role for the Lambda function associated with the custom resource. |
Properties
LogGroupName
The log group name.
string LogGroupName { get; }
Property Value
System.String
LogGroupRegion
The region where the log group should be created.
virtual string LogGroupRegion { get; }
Property Value
System.String
Remarks
Default: - same region as the stack
LogRetentionRetryOptions
Retry options for all AWS API calls.
virtual ILogRetentionRetryOptions LogRetentionRetryOptions { get; }
Property Value
Remarks
Default: - AWS SDK default retry options
RemovalPolicy
The removalPolicy for the log group when the stack is deleted.
virtual Nullable<RemovalPolicy> RemovalPolicy { get; }
Property Value
System.Nullable<RemovalPolicy>
Remarks
Default: RemovalPolicy.RETAIN
Retention
The number of days log events are kept in CloudWatch Logs.
RetentionDays Retention { get; }
Property Value
Role
The IAM role for the Lambda function associated with the custom resource.
virtual IRole Role { get; }
Property Value
Remarks
Default: - A new role is created