Interface Location

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

@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)", date="2025-11-04T09:27:49.480Z") @Stability(Stable) public interface Location extends software.amazon.jsii.JsiiSerializable
An interface that represents the location of a specific object in an S3 Bucket.

Example:

 Bucket bucket = Bucket.Builder.create(this, "memoryBucket")
         .bucketName("test-memory")
         .removalPolicy(RemovalPolicy.DESTROY)
         .autoDeleteObjects(true)
         .build();
 Topic topic = new Topic(this, "topic");
 // Create a custom semantic memory strategy
 SelfManagedMemoryStrategy selfManagedStrategy = MemoryStrategy.usingSelfManaged(SelfManagedStrategyProps.builder()
         .name("selfManagedStrategy")
         .description("self managed memory strategy")
         .historicalContextWindowSize(5)
         .invocationConfiguration(InvocationConfiguration.builder()
                 .topic(topic)
                 .s3Location(Location.builder()
                         .bucketName(bucket.getBucketName())
                         .objectKey("memory/")
                         .build())
                 .build())
         .triggerConditions(TriggerConditions.builder()
                 .messageBasedTrigger(1)
                 .timeBasedTrigger(Duration.seconds(10))
                 .tokenBasedTrigger(100)
                 .build())
         .build());
 // Create memory with custom strategy
 Memory memory = Memory.Builder.create(this, "MyMemory")
         .memoryName("my-custom-memory")
         .description("Memory with custom strategy")
         .expirationDuration(Duration.days(90))
         .memoryStrategies(List.of(selfManagedStrategy))
         .build();
 
  • Method Details

    • getBucketName

      @Stability(Stable) @NotNull String getBucketName()
      The name of the S3 Bucket the object is in.
    • getObjectKey

      @Stability(Stable) @NotNull String getObjectKey()
      The path inside the Bucket where the object is located at.
    • getObjectVersion

      @Stability(Stable) @Nullable default String getObjectVersion()
      The S3 object version.
    • builder

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