# AddEndpointOptions

Options for adding an endpoint to the runtime.

Used as argument in: [Runtime.addEndpoint](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.Runtime.html#addendpoint)

- Source: [`aws-bedrockagentcore/lib/runtime/runtime.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/runtime/runtime.ts#L209)
- Type last changed: v2.255.0 · 19 May 2026

## Example

TypeScript:

```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:

```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:

```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());
```

C# / .NET:

```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"
});
```

Golang:

```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

- `description`: string — Description for the endpoint, Must be between 1 and 1200 characters.

  **Default:** No description

- `version`: string = 1 — Override the runtime version for this endpoint.
