Class: Aws::BedrockAgentCore::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::BedrockAgentCore::Client
- Includes:
- ClientStubs
- Defined in:
- gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb
Overview
An API client for BedrockAgentCore. To construct a client, you need to configure a :region
and :credentials
.
client = Aws::BedrockAgentCore::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Base
API Operations collapse
-
#create_event(params = {}) ⇒ Types::CreateEventOutput
Creates an event in a memory store.
-
#delete_event(params = {}) ⇒ Types::DeleteEventOutput
Deletes an event from a memory store.
-
#delete_memory_record(params = {}) ⇒ Types::DeleteMemoryRecordOutput
Deletes a memory record from a memory store.
-
#get_browser_session(params = {}) ⇒ Types::GetBrowserSessionResponse
Retrieves detailed information about a specific browser session in Amazon Bedrock.
-
#get_code_interpreter_session(params = {}) ⇒ Types::GetCodeInterpreterSessionResponse
Retrieves detailed information about a specific code interpreter session in Amazon Bedrock.
-
#get_event(params = {}) ⇒ Types::GetEventOutput
Retrieves information about a specific event in a memory store.
-
#get_memory_record(params = {}) ⇒ Types::GetMemoryRecordOutput
Retrieves a specific memory record from a memory store.
-
#get_resource_api_key(params = {}) ⇒ Types::GetResourceApiKeyResponse
Retrieves an API Key associated with an API Key Credential Provider.
-
#get_resource_oauth_2_token(params = {}) ⇒ Types::GetResourceOauth2TokenResponse
Reaturns the Oauth2Token of the provided resource.
-
#get_workload_access_token(params = {}) ⇒ Types::GetWorkloadAccessTokenResponse
Obtains an Workload access token for agentic workloads not acting on behalf of user.
-
#get_workload_access_token_for_jwt(params = {}) ⇒ Types::GetWorkloadAccessTokenForJWTResponse
Obtains an Workload access token for agentic workloads acting on behalf of user with JWT token.
-
#get_workload_access_token_for_user_id(params = {}) ⇒ Types::GetWorkloadAccessTokenForUserIdResponse
Obtains an Workload access token for agentic workloads acting on behalf of user with User Id.
-
#invoke_agent_runtime(params = {}) ⇒ Types::InvokeAgentRuntimeResponse
Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time.
-
#invoke_code_interpreter(params = {}) ⇒ Types::InvokeCodeInterpreterResponse
Executes code within an active code interpreter session in Amazon Bedrock.
-
#list_actors(params = {}) ⇒ Types::ListActorsOutput
Lists all actors in a memory store.
-
#list_browser_sessions(params = {}) ⇒ Types::ListBrowserSessionsResponse
Retrieves a list of browser sessions in Amazon Bedrock that match the specified criteria.
-
#list_code_interpreter_sessions(params = {}) ⇒ Types::ListCodeInterpreterSessionsResponse
Retrieves a list of code interpreter sessions in Amazon Bedrock that match the specified criteria.
-
#list_events(params = {}) ⇒ Types::ListEventsOutput
Lists events in a memory store based on specified criteria.
-
#list_memory_records(params = {}) ⇒ Types::ListMemoryRecordsOutput
Lists memory records in a memory store based on specified criteria.
-
#list_sessions(params = {}) ⇒ Types::ListSessionsOutput
Lists sessions in a memory store based on specified criteria.
-
#retrieve_memory_records(params = {}) ⇒ Types::RetrieveMemoryRecordsOutput
Searches for and retrieves memory records from a memory store based on specified search criteria.
-
#start_browser_session(params = {}) ⇒ Types::StartBrowserSessionResponse
Creates and initializes a browser session in Amazon Bedrock.
-
#start_code_interpreter_session(params = {}) ⇒ Types::StartCodeInterpreterSessionResponse
Creates and initializes a code interpreter session in Amazon Bedrock.
-
#stop_browser_session(params = {}) ⇒ Types::StopBrowserSessionResponse
Terminates an active browser session in Amazon Bedrock.
-
#stop_code_interpreter_session(params = {}) ⇒ Types::StopCodeInterpreterSessionResponse
Terminates an active code interpreter session in Amazon Bedrock.
-
#update_browser_stream(params = {}) ⇒ Types::UpdateBrowserStreamResponse
Updates a browser stream.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
Methods included from ClientStubs
#api_requests, #stub_data, #stub_responses
Methods inherited from Seahorse::Client::Base
add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins
Methods included from Seahorse::Client::HandlerBuilder
#handle, #handle_request, #handle_response
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
487 488 489 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 487 def initialize(*args) super end |
Instance Method Details
#create_event(params = {}) ⇒ Types::CreateEventOutput
Creates an event in a memory store. Events represent interactions or activities that occur within a session and are associated with specific actors.
To use this operation, you must have the genesismemory:CreateEvent
permission.
This operation is subject to request rate limiting.
581 582 583 584 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 581 def create_event(params = {}, = {}) req = build_request(:create_event, params) req.send_request() end |
#delete_event(params = {}) ⇒ Types::DeleteEventOutput
Deletes an event from a memory store. When you delete an event, it is permanently removed.
To use this operation, you must have the genesismemory:DeleteEvent
permission.
625 626 627 628 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 625 def delete_event(params = {}, = {}) req = build_request(:delete_event, params) req.send_request() end |
#delete_memory_record(params = {}) ⇒ Types::DeleteMemoryRecordOutput
Deletes a memory record from a memory store. When you delete a memory record, it is permanently removed.
To use this operation, you must have the
genesismemory:DeleteMemoryRecord
permission.
662 663 664 665 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 662 def delete_memory_record(params = {}, = {}) req = build_request(:delete_memory_record, params) req.send_request() end |
#get_browser_session(params = {}) ⇒ Types::GetBrowserSessionResponse
Retrieves detailed information about a specific browser session in Amazon Bedrock. This operation returns the session's configuration, current status, associated streams, and metadata.
To get a browser session, you must specify both the browser identifier and the session ID. The response includes information about the session's viewport configuration, timeout settings, and stream endpoints.
The following operations are related to GetBrowserSession
:
736 737 738 739 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 736 def get_browser_session(params = {}, = {}) req = build_request(:get_browser_session, params) req.send_request() end |
#get_code_interpreter_session(params = {}) ⇒ Types::GetCodeInterpreterSessionResponse
Retrieves detailed information about a specific code interpreter session in Amazon Bedrock. This operation returns the session's configuration, current status, and metadata.
To get a code interpreter session, you must specify both the code interpreter identifier and the session ID. The response includes information about the session's timeout settings and current status.
The following operations are related to GetCodeInterpreterSession
:
799 800 801 802 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 799 def get_code_interpreter_session(params = {}, = {}) req = build_request(:get_code_interpreter_session, params) req.send_request() end |
#get_event(params = {}) ⇒ Types::GetEventOutput
Retrieves information about a specific event in a memory store.
To use this operation, you must have the genesismemory:GetEvent
permission.
851 852 853 854 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 851 def get_event(params = {}, = {}) req = build_request(:get_event, params) req.send_request() end |
#get_memory_record(params = {}) ⇒ Types::GetMemoryRecordOutput
Retrieves a specific memory record from a memory store.
To use this operation, you must have the
genesismemory:GetMemoryRecord
permission.
891 892 893 894 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 891 def get_memory_record(params = {}, = {}) req = build_request(:get_memory_record, params) req.send_request() end |
#get_resource_api_key(params = {}) ⇒ Types::GetResourceApiKeyResponse
Retrieves an API Key associated with an API Key Credential Provider
924 925 926 927 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 924 def get_resource_api_key(params = {}, = {}) req = build_request(:get_resource_api_key, params) req.send_request() end |
#get_resource_oauth_2_token(params = {}) ⇒ Types::GetResourceOauth2TokenResponse
Reaturns the Oauth2Token of the provided resource
988 989 990 991 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 988 def get_resource_oauth_2_token(params = {}, = {}) req = build_request(:get_resource_oauth_2_token, params) req.send_request() end |
#get_workload_access_token(params = {}) ⇒ Types::GetWorkloadAccessTokenResponse
Obtains an Workload access token for agentic workloads not acting on behalf of user.
1017 1018 1019 1020 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1017 def get_workload_access_token(params = {}, = {}) req = build_request(:get_workload_access_token, params) req.send_request() end |
#get_workload_access_token_for_jwt(params = {}) ⇒ Types::GetWorkloadAccessTokenForJWTResponse
Obtains an Workload access token for agentic workloads acting on behalf of user with JWT token
1050 1051 1052 1053 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1050 def get_workload_access_token_for_jwt(params = {}, = {}) req = build_request(:get_workload_access_token_for_jwt, params) req.send_request() end |
#get_workload_access_token_for_user_id(params = {}) ⇒ Types::GetWorkloadAccessTokenForUserIdResponse
Obtains an Workload access token for agentic workloads acting on behalf of user with User Id.
1083 1084 1085 1086 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1083 def get_workload_access_token_for_user_id(params = {}, = {}) req = build_request(:get_workload_access_token_for_user_id, params) req.send_request() end |
#invoke_agent_runtime(params = {}) ⇒ Types::InvokeAgentRuntimeResponse
Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time. The agent processes the request using the configured foundation model and any associated knowledge bases or action groups.
To invoke an agent runtime, you must specify the agent runtime ARN and provide a payload containing your request. You can optionally specify a qualifier to target a specific version or alias of the agent.
This operation supports streaming responses, allowing you to receive partial responses as they become available. We recommend using pagination to ensure that the operation returns quickly and successfully when processing large responses.
1204 1205 1206 1207 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1204 def invoke_agent_runtime(params = {}, = {}, &block) req = build_request(:invoke_agent_runtime, params) req.send_request(, &block) end |
#invoke_code_interpreter(params = {}) ⇒ Types::InvokeCodeInterpreterResponse
Executes code within an active code interpreter session in Amazon Bedrock. This operation processes the provided code, runs it in a secure environment, and returns the execution results including output, errors, and generated visualizations.
To execute code, you must specify the code interpreter identifier, session ID, and the code to run in the arguments parameter. The operation returns a stream containing the execution results, which can include text output, error messages, and data visualizations.
This operation is subject to request rate limiting based on your account's service quotas.
The following operations are related to InvokeCodeInterpreter
:
1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1494 def invoke_code_interpreter(params = {}, = {}, &block) params = params.dup event_stream_handler = case handler = params.delete(:event_stream_handler) when EventStreams::CodeInterpreterStreamOutput then handler when Proc then EventStreams::CodeInterpreterStreamOutput.new.tap(&handler) when nil then EventStreams::CodeInterpreterStreamOutput.new else msg = "expected :event_stream_handler to be a block or "\ "instance of Aws::BedrockAgentCore::EventStreams::CodeInterpreterStreamOutput"\ ", got `#{handler.inspect}` instead" raise ArgumentError, msg end yield(event_stream_handler) if block_given? req = build_request(:invoke_code_interpreter, params) req.context[:event_stream_handler] = event_stream_handler req.handlers.add(Aws::Binary::DecodeHandler, priority: 95) req.send_request(, &block) end |
#list_actors(params = {}) ⇒ Types::ListActorsOutput
Lists all actors in a memory store. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the genesismemory:ListActors
permission.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1560 1561 1562 1563 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1560 def list_actors(params = {}, = {}) req = build_request(:list_actors, params) req.send_request() end |
#list_browser_sessions(params = {}) ⇒ Types::ListBrowserSessionsResponse
Retrieves a list of browser sessions in Amazon Bedrock that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
You can filter the results by browser identifier and session status. The operation supports pagination to handle large result sets efficiently.
We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.
The following operations are related to ListBrowserSessions
:
1638 1639 1640 1641 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1638 def list_browser_sessions(params = {}, = {}) req = build_request(:list_browser_sessions, params) req.send_request() end |
#list_code_interpreter_sessions(params = {}) ⇒ Types::ListCodeInterpreterSessionsResponse
Retrieves a list of code interpreter sessions in Amazon Bedrock that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
You can filter the results by code interpreter identifier and session status. The operation supports pagination to handle large result sets efficiently.
We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.
The following operations are related to ListCodeInterpreterSessions
:
1717 1718 1719 1720 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1717 def list_code_interpreter_sessions(params = {}, = {}) req = build_request(:list_code_interpreter_sessions, params) req.send_request() end |
#list_events(params = {}) ⇒ Types::ListEventsOutput
Lists events in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the genesismemory:ListEvents
permission.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1799 1800 1801 1802 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1799 def list_events(params = {}, = {}) req = build_request(:list_events, params) req.send_request() end |
#list_memory_records(params = {}) ⇒ Types::ListMemoryRecordsOutput
Lists memory records in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:ListMemoryRecords
permission.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1864 1865 1866 1867 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1864 def list_memory_records(params = {}, = {}) req = build_request(:list_memory_records, params) req.send_request() end |
#list_sessions(params = {}) ⇒ Types::ListSessionsOutput
Lists sessions in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the genesismemory:ListSessions
permission.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1920 1921 1922 1923 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1920 def list_sessions(params = {}, = {}) req = build_request(:list_sessions, params) req.send_request() end |
#retrieve_memory_records(params = {}) ⇒ Types::RetrieveMemoryRecordsOutput
Searches for and retrieves memory records from a memory store based on specified search criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the
genesismemory:RetrieveMemoryRecords
permission.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
1991 1992 1993 1994 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 1991 def retrieve_memory_records(params = {}, = {}) req = build_request(:retrieve_memory_records, params) req.send_request() end |
#start_browser_session(params = {}) ⇒ Types::StartBrowserSessionResponse
Creates and initializes a browser session in Amazon Bedrock. The session enables agents to navigate and interact with web content, extract information from websites, and perform web-based tasks as part of their response generation.
To create a session, you must specify a browser identifier and a name.
You can also configure the viewport dimensions to control the visible
area of web content. The session remains active until it times out or
you explicitly stop it using the StopBrowserSession
operation.
The following operations are related to StartBrowserSession
:
2084 2085 2086 2087 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 2084 def start_browser_session(params = {}, = {}) req = build_request(:start_browser_session, params) req.send_request() end |
#start_code_interpreter_session(params = {}) ⇒ Types::StartCodeInterpreterSessionResponse
Creates and initializes a code interpreter session in Amazon Bedrock. The session enables agents to execute code as part of their response generation, supporting programming languages such as Python for data analysis, visualization, and computation tasks.
To create a session, you must specify a code interpreter identifier
and a name. The session remains active until it times out or you
explicitly stop it using the StopCodeInterpreterSession
operation.
The following operations are related to StartCodeInterpreterSession
:
2162 2163 2164 2165 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 2162 def start_code_interpreter_session(params = {}, = {}) req = build_request(:start_code_interpreter_session, params) req.send_request() end |
#stop_browser_session(params = {}) ⇒ Types::StopBrowserSessionResponse
Terminates an active browser session in Amazon Bedrock. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
To stop a browser session, you must specify both the browser
identifier and the session ID. Once stopped, a session cannot be
restarted; you must create a new session using StartBrowserSession
.
The following operations are related to StopBrowserSession
:
2225 2226 2227 2228 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 2225 def stop_browser_session(params = {}, = {}) req = build_request(:stop_browser_session, params) req.send_request() end |
#stop_code_interpreter_session(params = {}) ⇒ Types::StopCodeInterpreterSessionResponse
Terminates an active code interpreter session in Amazon Bedrock. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
To stop a code interpreter session, you must specify both the code
interpreter identifier and the session ID. Once stopped, a session
cannot be restarted; you must create a new session using
StartCodeInterpreterSession
.
The following operations are related to StopCodeInterpreterSession
:
2290 2291 2292 2293 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 2290 def stop_code_interpreter_session(params = {}, = {}) req = build_request(:stop_code_interpreter_session, params) req.send_request() end |
#update_browser_stream(params = {}) ⇒ Types::UpdateBrowserStreamResponse
Updates a browser stream. To use this operation, you must have permissions to perform the bedrock:UpdateBrowserStream action.
2349 2350 2351 2352 |
# File 'gems/aws-sdk-bedrockagentcore/lib/aws-sdk-bedrockagentcore/client.rb', line 2349 def update_browser_stream(params = {}, = {}) req = build_request(:update_browser_stream, params) req.send_request() end |