Show / Hide Table of Contents

Class Location

An interface that represents the location of a specific object in an S3 Bucket.

Inheritance
object
Location
Implements
ILocation
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.S3
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Location : ILocation
Syntax (vb)
Public Class Location Implements ILocation
Remarks

ExampleMetadata: fixture=default infused

Examples
var bucket = new Bucket(this, "memoryBucket", new BucketProps {
                BucketName = "test-memory",
                RemovalPolicy = RemovalPolicy.DESTROY,
                AutoDeleteObjects = true
            });

            var topic = new Topic(this, "topic");

            // Create a custom semantic memory strategy
            var selfManagedStrategy = MemoryStrategy.UsingSelfManaged(new SelfManagedStrategyProps {
                Name = "selfManagedStrategy",
                Description = "self managed memory strategy",
                HistoricalContextWindowSize = 5,
                InvocationConfiguration = new InvocationConfiguration {
                    Topic = topic,
                    S3Location = new Location {
                        BucketName = bucket.BucketName,
                        ObjectKey = "memory/"
                    }
                },
                TriggerConditions = new TriggerConditions {
                    MessageBasedTrigger = 1,
                    TimeBasedTrigger = Duration.Seconds(10),
                    TokenBasedTrigger = 100
                }
            });

            // Create memory with custom strategy
            var memory = new Memory(this, "MyMemory", new MemoryProps {
                MemoryName = "my-custom-memory",
                Description = "Memory with custom strategy",
                ExpirationDuration = Duration.Days(90),
                MemoryStrategies = new [] { selfManagedStrategy }
            });

Synopsis

Constructors

Location()

An interface that represents the location of a specific object in an S3 Bucket.

Properties

BucketName

The name of the S3 Bucket the object is in.

ObjectKey

The path inside the Bucket where the object is located at.

ObjectVersion

The S3 object version.

Constructors

Location()

An interface that represents the location of a specific object in an S3 Bucket.

public Location()
Remarks

ExampleMetadata: fixture=default infused

Examples
var bucket = new Bucket(this, "memoryBucket", new BucketProps {
                BucketName = "test-memory",
                RemovalPolicy = RemovalPolicy.DESTROY,
                AutoDeleteObjects = true
            });

            var topic = new Topic(this, "topic");

            // Create a custom semantic memory strategy
            var selfManagedStrategy = MemoryStrategy.UsingSelfManaged(new SelfManagedStrategyProps {
                Name = "selfManagedStrategy",
                Description = "self managed memory strategy",
                HistoricalContextWindowSize = 5,
                InvocationConfiguration = new InvocationConfiguration {
                    Topic = topic,
                    S3Location = new Location {
                        BucketName = bucket.BucketName,
                        ObjectKey = "memory/"
                    }
                },
                TriggerConditions = new TriggerConditions {
                    MessageBasedTrigger = 1,
                    TimeBasedTrigger = Duration.Seconds(10),
                    TokenBasedTrigger = 100
                }
            });

            // Create memory with custom strategy
            var memory = new Memory(this, "MyMemory", new MemoryProps {
                MemoryName = "my-custom-memory",
                Description = "Memory with custom strategy",
                ExpirationDuration = Duration.Days(90),
                MemoryStrategies = new [] { selfManagedStrategy }
            });

Properties

BucketName

The name of the S3 Bucket the object is in.

public string BucketName { get; set; }
Property Value

string

Remarks

ExampleMetadata: fixture=default infused

ObjectKey

The path inside the Bucket where the object is located at.

public string ObjectKey { get; set; }
Property Value

string

Remarks

ExampleMetadata: fixture=default infused

ObjectVersion

The S3 object version.

public string? ObjectVersion { get; set; }
Property Value

string

Remarks

ExampleMetadata: fixture=default infused

Implements

ILocation
Back to top Generated by DocFX