CustomResourceLogRetention Class
Manages log retention for AWS-vended custom resources.
This feature is currently experimental.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_logs as logs } from 'aws-cdk-lib';
import { custom_resources } from 'aws-cdk-lib';
const customResourceLogRetention = new custom_resources.CustomResourceLogRetention(logs.RetentionDays.ONE_DAY);
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_logs as logs
from aws_cdk import custom_resources
custom_resource_log_retention = custom_resources.CustomResourceLogRetention(logs.RetentionDays.ONE_DAY)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.logs.*;
import software.amazon.awscdk.customresources.*;
CustomResourceLogRetention customResourceLogRetention = new CustomResourceLogRetention(RetentionDays.ONE_DAY);
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Logs;
using Amazon.CDK.CustomResources;
var customResourceLogRetention = new CustomResourceLogRetention(RetentionDays.ONE_DAY);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
customResourceLogRetention := awscdk.Custom_resources.NewCustomResourceLogRetention(awscdk.Aws_logs.RetentionDays_ONE_DAY)
Initializer
ts
new CustomResourceLogRetention(setLogRetention: RetentionDays)
python
CustomResourceLogRetention(set_log_retention: RetentionDays)
java
new CustomResourceLogRetention(RetentionDays setLogRetention)
csharp
new CustomResourceLogRetention(RetentionDays setLogRetention)
go
NewCustomResourceLogRetention(SetLogRetention RetentionDays)
Methods
visit(node: IConstruct): voiddef visit(self, node: IConstruct) -> Nonepublic void visit(IConstruct node)public void Visit(IConstruct node)func Visit(Node IConstruct)#All aspects can visit an IConstruct.