Class TargetObjectKeyFormat

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.s3.TargetObjectKeyFormat
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-27T16:51:04.748Z") @Stability(Stable) public abstract class TargetObjectKeyFormat extends software.amazon.jsii.JsiiObject
The key format for the log object.

Example:

 Bucket accessLogsBucket = new Bucket(this, "AccessLogsBucket");
 Bucket bucket = Bucket.Builder.create(this, "MyBucket")
         .serverAccessLogsBucket(accessLogsBucket)
         .serverAccessLogsPrefix("logs")
         // You can use a simple prefix with `TargetObjectKeyFormat.simplePrefix()`, but it is the same even if you do not specify `targetObjectKeyFormat` property.
         .targetObjectKeyFormat(TargetObjectKeyFormat.simplePrefix())
         .build();
 
  • Constructor Details

    • TargetObjectKeyFormat

      protected TargetObjectKeyFormat(software.amazon.jsii.JsiiObjectRef objRef)
    • TargetObjectKeyFormat

      protected TargetObjectKeyFormat(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • TargetObjectKeyFormat

      @Stability(Stable) protected TargetObjectKeyFormat()
  • Method Details

    • partitionedPrefix

      @Stability(Stable) @NotNull public static TargetObjectKeyFormat partitionedPrefix(@Nullable PartitionDateSource dateSource)
      Use partitioned prefix for log objects. If you do not specify the dateSource argument, the default is EventTime.

      The partitioned prefix format as follow: [DestinationPrefix][SourceAccountId]/​[SourceRegion]/​[SourceBucket]/​[YYYY]/​[MM]/​[DD]/​[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]

      Parameters:
      dateSource -
    • partitionedPrefix

      @Stability(Stable) @NotNull public static TargetObjectKeyFormat partitionedPrefix()
      Use partitioned prefix for log objects. If you do not specify the dateSource argument, the default is EventTime.

      The partitioned prefix format as follow: [DestinationPrefix][SourceAccountId]/​[SourceRegion]/​[SourceBucket]/​[YYYY]/​[MM]/​[DD]/​[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]

    • simplePrefix

      @Stability(Stable) @NotNull public static TargetObjectKeyFormat simplePrefix()
      Use the simple prefix for log objects.

      The simple prefix format as follow: [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString]