AddEndpointOptions Struct
Options for adding an endpoint to the runtime.
| Source | aws-bedrockagentcore/lib/runtime/runtime.ts |
|---|---|
| Type last changed |
Example
ts
const repository = new ecr.Repository(this, "TestRepository", {
repositoryName: "test-agent-runtime",
});
const agentRuntimeArtifactNew = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, "v2.0.0");
const runtime = new agentcore.Runtime(this, "MyAgentRuntime", {
runtimeName: "myAgent",
agentRuntimeArtifact: agentRuntimeArtifactNew,
});
const stagingEndpoint = runtime.addEndpoint("staging", {
version: "2",
description: "Staging environment for testing new version"
});
python
repository = ecr.Repository(self, "TestRepository",
repository_name="test-agent-runtime"
)
agent_runtime_artifact_new = agentcore.AgentRuntimeArtifact.from_ecr_repository(repository, "v2.0.0")
runtime = agentcore.Runtime(self, "MyAgentRuntime",
runtime_name="myAgent",
agent_runtime_artifact=agent_runtime_artifact_new
)
staging_endpoint = runtime.add_endpoint("staging",
version="2",
description="Staging environment for testing new version"
)
java
Repository repository = Repository.Builder.create(this, "TestRepository")
.repositoryName("test-agent-runtime")
.build();
AgentRuntimeArtifact agentRuntimeArtifactNew = AgentRuntimeArtifact.fromEcrRepository(repository, "v2.0.0");
Runtime runtime = Runtime.Builder.create(this, "MyAgentRuntime")
.runtimeName("myAgent")
.agentRuntimeArtifact(agentRuntimeArtifactNew)
.build();
RuntimeEndpoint stagingEndpoint = runtime.addEndpoint("staging", AddEndpointOptions.builder()
.version("2")
.description("Staging environment for testing new version")
.build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
var repository = new Repository(this, "TestRepository", new RepositoryProps {
RepositoryName = "test-agent-runtime"
});
var agentRuntimeArtifactNew = AgentRuntimeArtifact.FromEcrRepository(repository, "v2.0.0");
var runtime = new Runtime(this, "MyAgentRuntime", new RuntimeProps {
RuntimeName = "myAgent",
AgentRuntimeArtifact = agentRuntimeArtifactNew
});
var stagingEndpoint = runtime.AddEndpoint("staging", new AddEndpointOptions {
Version = "2",
Description = "Staging environment for testing new version"
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
repository := ecr.NewRepository(this, jsii.String("TestRepository"), &RepositoryProps{
RepositoryName: jsii.String("test-agent-runtime"),
})
agentRuntimeArtifactNew := agentcore.AgentRuntimeArtifact_FromEcrRepository(repository, jsii.String("v2.0.0"))
runtime := agentcore.NewRuntime(this, jsii.String("MyAgentRuntime"), &RuntimeProps{
RuntimeName: jsii.String("myAgent"),
AgentRuntimeArtifact: agentRuntimeArtifactNew,
})
stagingEndpoint := runtime.AddEndpoint(jsii.String("staging"), &AddEndpointOptions{
Version: jsii.String("2"),
Description: jsii.String("Staging environment for testing new version"),
})
Properties
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #Description for the endpoint, Must be between 1 and 1200 characters.
Default: No description
versionoptionalstringversionoptionalstrversionoptionalStringVersionoptionalstringVersionoptional*string = 1 #Override the runtime version for this endpoint.