Interface LogGroupProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
LogGroupProps.Jsii$Proxy
Example:
Role myRole;
AwsCustomResource.Builder.create(this, "Customized")
.role(myRole) // must be assumable by the `lambda.amazonaws.com` service principal
.timeout(Duration.minutes(10)) // defaults to 2 minutes
.memorySize(1025) // defaults to 512 if installLatestAwsSdk is true
.logGroup(LogGroup.Builder.create(this, "AwsCustomResourceLogs")
.retention(RetentionDays.ONE_DAY)
.build())
.functionName("my-custom-name") // defaults to a CloudFormation generated name
.removalPolicy(RemovalPolicy.RETAIN) // defaults to `RemovalPolicy.DESTROY`
.policy(AwsCustomResourcePolicy.fromSdkCalls(SdkCallsPolicyOptions.builder()
.resources(AwsCustomResourcePolicy.ANY_RESOURCE)
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forLogGroupPropsstatic final classAn implementation forLogGroupProps -
Method Summary
Modifier and TypeMethodDescriptionstatic LogGroupProps.Builderbuilder()default DataProtectionPolicyData Protection Policy for this log group.default BooleanIndicates whether deletion protection is enabled for this log group.default IKeyRefThe KMS customer managed key to encrypt the log group with.default List<FieldIndexPolicy> Field Index Policies for this log group.default LogGroupClassThe class of the log group.default StringName of the log group.default RemovalPolicyDetermine the removal policy of this log group.default RetentionDaysHow long, in days, the log contents will be retained.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDataProtectionPolicy
Data Protection Policy for this log group.Default: - no data protection policy
-
getDeletionProtectionEnabled
Indicates whether deletion protection is enabled for this log group.When enabled, deletion protection blocks all deletion operations until it is explicitly disabled.
Default: false
-
getEncryptionKey
The KMS customer managed key to encrypt the log group with.Default: Server-side encryption managed by the CloudWatch Logs service
-
getFieldIndexPolicies
Field Index Policies for this log group.Default: - no field index policies for this log group.
-
getLogGroupClass
The class of the log group. Possible values are: STANDARD and INFREQUENT_ACCESS.INFREQUENT_ACCESS class provides customers a cost-effective way to consolidate logs which supports querying using Logs Insights. The logGroupClass property cannot be changed once the log group is created.
Default: LogGroupClass.STANDARD
-
getLogGroupName
Name of the log group.Default: Automatically generated
-
getRemovalPolicy
Determine the removal policy of this log group.Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs.
Default: RemovalPolicy.Retain
-
getRetention
How long, in days, the log contents will be retained.To retain all logs, set this value to RetentionDays.INFINITE.
Default: RetentionDays.TWO_YEARS
-
builder
- Returns:
- a
LogGroupProps.BuilderofLogGroupProps
-