RuntimeEndpoint

class aws_cdk.aws_bedrock_agentcore_alpha.RuntimeEndpoint(scope, id, *, agent_runtime_id, endpoint_name, agent_runtime_version=None, description=None, tags=None)

Bases: RuntimeEndpointBase

(experimental) Bedrock Agent Core Runtime Endpoint Provides a stable endpoint for invoking agent runtimes with versioning support.

See:

https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-endpoint.html

Stability:

experimental

Resource:

AWS::BedrockAgentCore::RuntimeEndpoint

ExampleMetadata:

fixture=default infused

Example:

repository = ecr.Repository(self, "TestRepository",
    repository_name="test-agent-runtime"
)

runtime = agentcore.Runtime(self, "MyAgentRuntime",
    runtime_name="myAgent",
    agent_runtime_artifact=agentcore.AgentRuntimeArtifact.from_ecr_repository(repository, "v1.0.0")
)

prod_endpoint = runtime.add_endpoint("production",
    version="1",
    description="Stable production endpoint - pinned to v1"
)
Parameters:
  • scope (Construct)

  • id (str)

  • agent_runtime_id (str) – (experimental) The ID of the agent runtime to associate with this endpoint This is the unique identifier of the runtime resource Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,99}-[a-zA-Z0-9]{10}$.

  • endpoint_name (str) – (experimental) The name of the agent runtime endpoint Valid characters are a-z, A-Z, 0-9, _ (underscore) Must start with a letter and can be up to 48 characters long Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,47}$.

  • agent_runtime_version (Optional[str]) – (experimental) The version of the agent runtime to use for this endpoint If not specified, the endpoint will point to version “1” of the runtime. Pattern: ^([1-9][0-9]{0,4})$ Default: “1”

  • description (Optional[str]) – (experimental) Optional description for the agent runtime endpoint Length Minimum: 1 , Maximum: 256. Default: - No description

  • tags (Optional[Mapping[str, str]]) – (experimental) Tags for the agent runtime endpoint A list of key:value pairs of tags to apply to this RuntimeEndpoint resource Pattern: ^[a-zA-Z0-9s._:/=+@-]*$. Default: {} - no tags

Stability:

experimental

Methods

apply_removal_policy(policy)

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:

policy (RemovalPolicy)

Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Attributes

PROPERTY_INJECTION_ID = '@aws-cdk.aws-bedrock-agentcore-alpha.RuntimeEndpoint'
agent_runtime_arn

(experimental) The ARN of the agent runtime associated with this endpoint.

Returns:

a token representing the ARN of the agent runtime

Stability:

experimental

Attribute:

true

agent_runtime_endpoint_arn

(experimental) The ARN of the agent runtime endpoint.

Returns:

a token representing the ARN of this agent runtime endpoint

Stability:

experimental

Attribute:

true

agent_runtime_id

(experimental) The ID of the agent runtime associated with this endpoint.

Stability:

experimental

agent_runtime_version

(experimental) The version of the agent runtime used by this endpoint.

Stability:

experimental

created_at

(experimental) The timestamp when the endpoint was created.

Returns:

a token representing the creation timestamp of this endpoint

Stability:

experimental

Attribute:

true

description

(experimental) Optional description for the endpoint.

Stability:

experimental

endpoint_id

(experimental) The unique identifier of the runtime endpoint.

Returns:

a token representing the ID of this endpoint

Stability:

experimental

Attribute:

true

endpoint_name

(experimental) The name of the endpoint.

Returns:

a token representing the name of this endpoint

Stability:

experimental

Attribute:

true

env

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

last_updated_at

(experimental) When this endpoint was last updated.

Returns:

a token representing the last update timestamp of this endpoint

Stability:

experimental

Attribute:

true

live_version

(experimental) The live version of the endpoint.

Returns:

a token representing the live version of this endpoint

Stability:

experimental

Attribute:

true

node

The tree node.

stack

The stack in which this resource is defined.

status

(experimental) The status of the endpoint.

Returns:

a token representing the status of this endpoint

Stability:

experimental

Attribute:

true

target_version

(experimental) The target version of the endpoint.

Returns:

a token representing the target version of this endpoint

Stability:

experimental

Attribute:

true

Static Methods

classmethod from_runtime_endpoint_attributes(scope, id, *, agent_runtime_arn, agent_runtime_endpoint_arn, endpoint_name, created_at=None, description=None, endpoint_id=None, last_updated_at=None, live_version=None, status=None, target_version=None)

(experimental) Import an existing Agent Runtime Endpoint using attributes This allows you to reference an Agent Runtime Endpoint that was created outside of CDK.

Parameters:
  • scope (Construct) – The construct scope.

  • id (str) – The construct id.

  • agent_runtime_arn (str) – (experimental) The ARN of the parent agent runtime.

  • agent_runtime_endpoint_arn (str) – (experimental) The ARN of the runtime endpoint.

  • endpoint_name (str) – (experimental) The name of the runtime endpoint.

  • created_at (Optional[str]) – (experimental) When the endpoint was created. Default: - Creation time not available

  • description (Optional[str]) – (experimental) The description of the runtime endpoint. Default: - No description

  • endpoint_id (Optional[str]) – (experimental) The unique identifier of the runtime endpoint. Default: - Endpoint ID not available

  • last_updated_at (Optional[str]) – (experimental) When the endpoint was last updated. Default: - Last update time not available

  • live_version (Optional[str]) – (experimental) The live version of the agent runtime that is currently serving requests. Default: - Live version not available

  • status (Optional[str]) – (experimental) The current status of the runtime endpoint. Default: - Status not available

  • target_version (Optional[str]) – (experimental) The target version the endpoint is transitioning to (during updates). Default: - Target version not available

Return type:

IRuntimeEndpoint

Returns:

An IRuntimeEndpoint instance representing the imported endpoint

Stability:

experimental

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

classmethod is_owned_resource(construct)

Returns true if the construct was created by CDK, and false otherwise.

Parameters:

construct (IConstruct)

Return type:

bool

classmethod is_resource(construct)

Check whether the given construct is a Resource.

Parameters:

construct (IConstruct)

Return type:

bool