PlatformVersion Class
The platform version of the Agent Runtime.
| Source | aws-bedrockagentcore/lib/runtime/types.ts |
|---|---|
| Type last changed |
Example
ts
const repository = new ecr.Repository(this, 'TestRepository', {
repositoryName: 'test-agent-runtime',
});
const agentRuntimeArtifact = agentcore.AgentRuntimeArtifact.fromEcrRepository(repository, 'v1.0.0');
new agentcore.Runtime(this, 'test-runtime', {
runtimeName: 'test_runtime',
agentRuntimeArtifact: agentRuntimeArtifact,
platformVersion: agentcore.PlatformVersion.V2,
minimumMemory: cdk.Size.gibibytes(4),
});
python
repository = ecr.Repository(self, "TestRepository",
repository_name="test-agent-runtime"
)
agent_runtime_artifact = agentcore.AgentRuntimeArtifact.from_ecr_repository(repository, "v1.0.0")
agentcore.Runtime(self, "test-runtime",
runtime_name="test_runtime",
agent_runtime_artifact=agent_runtime_artifact,
platform_version=agentcore.PlatformVersion.V2,
minimum_memory=cdk.Size.gibibytes(4)
)
java
Repository repository = Repository.Builder.create(this, "TestRepository")
.repositoryName("test-agent-runtime")
.build();
AgentRuntimeArtifact agentRuntimeArtifact = AgentRuntimeArtifact.fromEcrRepository(repository, "v1.0.0");
Runtime.Builder.create(this, "test-runtime")
.runtimeName("test_runtime")
.agentRuntimeArtifact(agentRuntimeArtifact)
.platformVersion(PlatformVersion.V2)
.minimumMemory(Size.gibibytes(4))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
var repository = new Repository(this, "TestRepository", new RepositoryProps {
RepositoryName = "test-agent-runtime"
});
var agentRuntimeArtifact = AgentRuntimeArtifact.FromEcrRepository(repository, "v1.0.0");
new Runtime(this, "test-runtime", new RuntimeProps {
RuntimeName = "test_runtime",
AgentRuntimeArtifact = agentRuntimeArtifact,
PlatformVersion = PlatformVersion.V2,
MinimumMemory = Size.Gibibytes(4)
});
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"),
})
agentRuntimeArtifact := agentcore.AgentRuntimeArtifact_FromEcrRepository(repository, jsii.String("v1.0.0"))
agentcore.NewRuntime(this, jsii.String("test-runtime"), &RuntimeProps{
RuntimeName: jsii.String("test_runtime"),
AgentRuntimeArtifact: agentRuntimeArtifact,
PlatformVersion: agentcore.PlatformVersion_V2(),
MinimumMemory: cdk.Size_Gibibytes(jsii.Number(4)),
})
Properties
Platform version V1 (the create-time default).
Platform version V2 (the new AgentCore Runtime — elastic, optimized, consistently fast starts).
The platform version string value.
Methods
of(value: string): PlatformVersion // chainable@staticmethod def of(value: str) -> PlatformVersionpublic static PlatformVersion of(String value)public static PlatformVersion Of(string value)func Of(Value *string) PlatformVersion static #Use a custom platform version not yet defined in this class.
1 parameter
Parameters
valuevaluevaluevalueValue— The platform version string value.
toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string #Returns the string value.