agentcore_cli.models.runtime
agentcore_cli.models.runtime
¶
Runtime models for AgentCore Platform CLI.
This module defines models related to agent runtimes, their versions, and endpoints.
AgentRuntime
¶
Bases: ResourceBase
Configuration for an agent runtime.
Agent runtimes are associated with ECR repositories where their container images are stored. Each runtime can have multiple versions, each pointing to different image tags.
Source code in agentcore_cli/models/runtime.py
Python | |
---|---|
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
ensure_default_endpoint(model)
¶
Ensure the DEFAULT endpoint exists and points to latest version.
Note: AWS AgentCore automatically creates and manages the DEFAULT endpoint. This validator ensures our model reflects this AWS behavior.
Source code in agentcore_cli/models/runtime.py
get_version_container_uri(version_id, ecr_repository)
¶
Get the full container URI for a specific version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version_id
|
str
|
Version identifier |
required |
ecr_repository
|
ECRRepository
|
ECR repository configuration |
required |
Returns:
Type | Description |
---|---|
str | None
|
Full container URI or None if version not found |
Source code in agentcore_cli/models/runtime.py
validate_runtime_name(v)
classmethod
¶
Validate agent runtime name format.
Source code in agentcore_cli/models/runtime.py
validate_version_repository_consistency(model)
¶
Validate that all versions reference valid ECR repositories.
Source code in agentcore_cli/models/runtime.py
AgentRuntimeEndpoint
¶
Bases: BaseAgentCoreModel
An endpoint for accessing a specific version of an agent runtime.
Source code in agentcore_cli/models/runtime.py
validate_endpoint_name(v)
classmethod
¶
Validate endpoint name format.
Source code in agentcore_cli/models/runtime.py
AgentRuntimeVersion
¶
Bases: BaseAgentCoreModel
A specific version of an agent runtime.
Each version references a specific ECR repository and image tag. The container URI is constructed from the repository + tag combination.
Source code in agentcore_cli/models/runtime.py
container_uri
property
¶
Get the full container URI by combining repository and tag.
Note: This requires access to the ECR repository configuration to build the full URI. Use get_container_uri() method with repository config for the complete URI.
is_immutable
property
¶
Check if this version is in an immutable state.
According to AWS documentation, versions are immutable once created, but status can change during creation/update process.
short_version
property
¶
Get a shortened version of the version ID for display.
get_container_uri(ecr_repository)
¶
Get the full container URI using the ECR repository configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ecr_repository
|
ECRRepository
|
ECR repository configuration |
required |
Returns:
Type | Description |
---|---|
str
|
Full container URI: registry/repository:tag |
Source code in agentcore_cli/models/runtime.py
Python | |
---|---|
AuthorizerConfig
¶
Bases: BaseAgentCoreModel
Authorizer configuration for AgentCore runtime.
Source code in agentcore_cli/models/runtime.py
CustomJWTAuthorizer
¶
Bases: BaseAgentCoreModel
JWT authorizer configuration for AgentCore runtime.
Source code in agentcore_cli/models/runtime.py
WorkloadIdentity
¶
Bases: BaseAgentCoreModel
Workload identity details for AgentCore runtime.