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();
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Location.Builderbuilder()The name of the S3 Bucket the object is in.The path inside the Bucket where the object is located at.default StringThe S3 object version.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getBucketName
The name of the S3 Bucket the object is in. -
getObjectKey
The path inside the Bucket where the object is located at. -
getObjectVersion
The S3 object version. -
builder
- Returns:
- a
Location.BuilderofLocation
-