Class DataSourceConfig
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
Use the static factory methods to create data source configurations:
DataSourceConfig.fromAgentRuntimeEndpoint()for AgentCore Runtime (recommended)DataSourceConfig.fromAgentRuntimeEndpointName()for AgentCore Runtime using endpoint name stringDataSourceConfig.fromCloudWatchLogs()for external agents or custom log groups
Example:
// CloudWatch Logs data source (for external agents)
DataSourceConfig dataSource = DataSourceConfig.fromCloudWatchLogs(CloudWatchLogsDataSourceConfig.builder()
.logGroupNames(List.of("/aws/my-external-agent/logs"))
.serviceNames(List.of("my-external-agent"))
.build());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDataSourceConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedDataSourceConfig(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind()Binds the data source configuration to produce the L1 property.static DataSourceConfigCreates a data source configuration from an AgentCore Runtime and optional endpoint.static DataSourceConfigfromAgentRuntimeEndpoint(IBedrockAgentRuntime runtime, IRuntimeEndpoint endpoint) Creates a data source configuration from an AgentCore Runtime and optional endpoint.static DataSourceConfigfromAgentRuntimeEndpointName(IBedrockAgentRuntime runtime, String endpointName) Creates a data source configuration from an AgentCore Runtime and an endpoint name string.static DataSourceConfigCreates a CloudWatch Logs data source configuration.The CloudWatch Logs configuration.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
DataSourceConfig
protected DataSourceConfig(software.amazon.jsii.JsiiObjectRef objRef) -
DataSourceConfig
protected DataSourceConfig(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromAgentRuntimeEndpoint
@Stability(Stable) @NotNull public static DataSourceConfig fromAgentRuntimeEndpoint(@NotNull IBedrockAgentRuntime runtime, @Nullable IRuntimeEndpoint endpoint) Creates a data source configuration from an AgentCore Runtime and optional endpoint.This is the recommended way to configure evaluation for AgentCore Runtime agents. It automatically derives the CloudWatch log group and service name from the runtime and endpoint.
Example:
// Using a specific endpoint Runtime runtime; RuntimeEndpoint endpoint = runtime.addEndpoint("PROD"); DataSourceConfig dataSource = DataSourceConfig.fromAgentRuntimeEndpoint(runtime, endpoint);- Parameters:
runtime-- The AgentCore Runtime construct.
endpoint-- The RuntimeEndpoint construct.
- Returns:
- A DataSourceConfig instance
-
fromAgentRuntimeEndpoint
@Stability(Stable) @NotNull public static DataSourceConfig fromAgentRuntimeEndpoint(@NotNull IBedrockAgentRuntime runtime) Creates a data source configuration from an AgentCore Runtime and optional endpoint.This is the recommended way to configure evaluation for AgentCore Runtime agents. It automatically derives the CloudWatch log group and service name from the runtime and endpoint.
Example:
// Using a specific endpoint Runtime runtime; RuntimeEndpoint endpoint = runtime.addEndpoint("PROD"); DataSourceConfig dataSource = DataSourceConfig.fromAgentRuntimeEndpoint(runtime, endpoint);- Parameters:
runtime-- The AgentCore Runtime construct.
- Returns:
- A DataSourceConfig instance
-
fromAgentRuntimeEndpointName
@Stability(Stable) @NotNull public static DataSourceConfig fromAgentRuntimeEndpointName(@NotNull IBedrockAgentRuntime runtime, @NotNull String endpointName) Creates a data source configuration from an AgentCore Runtime and an endpoint name string.Use this method when you want to reference an endpoint by name without having a construct reference. For construct references, prefer
fromAgentRuntimeEndpoint().Example:
Runtime runtime; DataSourceConfig dataSource = DataSourceConfig.fromAgentRuntimeEndpointName(runtime, "PROD");
- Parameters:
runtime-- The AgentCore Runtime construct.
endpointName-- The name of the runtime endpoint.
- Returns:
- A DataSourceConfig instance
-
fromCloudWatchLogs
@Stability(Stable) @NotNull public static DataSourceConfig fromCloudWatchLogs(@NotNull CloudWatchLogsDataSourceConfig config) Creates a CloudWatch Logs data source configuration.Use this when your agent traces are stored in CloudWatch Logs, such as for external agents or when you need to specify log groups directly.
Example:
DataSourceConfig dataSource = DataSourceConfig.fromCloudWatchLogs(CloudWatchLogsDataSourceConfig.builder() .logGroupNames(List.of("/aws/bedrock-agentcore/runtimes/myRuntime-abc123-DEFAULT")) .serviceNames(List.of("myRuntime.DEFAULT")) .build());- Parameters:
config-- The CloudWatch Logs data source configuration.
- Returns:
- A DataSourceConfig instance
-
bind
Binds the data source configuration to produce the L1 property. -
getCloudWatchLogsConfig
The CloudWatch Logs configuration.
-