Interface LogGroupProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
LogGroupProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:13.486Z") @Stability(Stable) public interface LogGroupProps extends software.amazon.jsii.JsiiSerializable
Properties for a LogGroup.

Example:

 Repository repository = Repository.Builder.create(this, "TestRepository")
         .repositoryName("test-agent-runtime")
         .build();
 AgentRuntimeArtifact agentRuntimeArtifact = AgentRuntimeArtifact.fromEcrRepository(repository, "v1.0.0");
 // Use a /aws/vendedlogs/ log group for same-account delivery without explicit resource policy
 LogGroup logGroup = LogGroup.Builder.create(this, "RuntimeLogGroup")
         .logGroupName("/aws/vendedlogs/bedrock-agentcore/my-runtime")
         .build();
 Runtime.Builder.create(this, "test-runtime")
         .runtimeName("test_runtime")
         .agentRuntimeArtifact(agentRuntimeArtifact)
         .tracingEnabled(true)
         .loggingConfigs(List.of(LoggingConfig.builder()
                 .logType(LogType.APPLICATION_LOGS)
                 .destination(LoggingDestination.cloudWatchLogs(logGroup))
                 .build()))
         .manageDeliveryResourcePolicy(false)
         .build();
 
  • Method Details

    • getDataProtectionPolicy

      @Stability(Stable) @Nullable default DataProtectionPolicy getDataProtectionPolicy()
      Data Protection Policy for this log group.

      Default: - no data protection policy

    • getDeletionProtectionEnabled

      @Stability(Stable) @Nullable default Boolean 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

      @Stability(Stable) @Nullable default IKeyRef getEncryptionKey()
      The KMS customer managed key to encrypt the log group with.

      Default: Server-side encryption managed by the CloudWatch Logs service

    • getFieldIndexPolicies

      @Stability(Stable) @Nullable default List<FieldIndexPolicy> getFieldIndexPolicies()
      Field Index Policies for this log group.

      Default: - no field index policies for this log group.

    • getLogGroupClass

      @Stability(Stable) @Nullable default LogGroupClass 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

      @Stability(Stable) @Nullable default String getLogGroupName()
      Name of the log group.

      Default: Automatically generated

    • getRemovalPolicy

      @Stability(Stable) @Nullable default RemovalPolicy 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

      @Stability(Stable) @Nullable default RetentionDays 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

      @Stability(Stable) static LogGroupProps.Builder builder()
      Returns:
      a LogGroupProps.Builder of LogGroupProps