aws-sdk-bedrockagentcore 1.19.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c047c703a0ae7e8f52fc6a21180661f2d490769b7839784702a4e12075fa7524
4
- data.tar.gz: b05100a80f4adeca168ba2b441e6f733d741c6809cfe5a17e0a943f5c7653c1f
3
+ metadata.gz: 6cf6efdb1b8b291989d092843e5e81a80a3c2b916143e8ff904352b48370257b
4
+ data.tar.gz: 750aef105630b948d1d83b8420432e371fe279136a51e201f4ec48277f5f7282
5
5
  SHA512:
6
- metadata.gz: b2b3fecd3b8dfe858fb8aedb18f71bd8134fb4f1cc54629204823abef71a6c4097cd842cc5d3b730cb96a1d253047943ed09b59b988c144a01085de22d274fcc
7
- data.tar.gz: 77788c54c669de649cfa1ca453103efa529a3c0b6b68d11baa1cc7669abb2b583c6f876b12ad0c608c1756534b8e58db175ba1da4062ac1a0502f16fa72cf3cf
6
+ metadata.gz: fa246e0407cb4393fb348a5ee50285372bd55418e712e5d3ce1572604a7d4876904638526a1b3350343b8b2115efa8a082d9b185a2ec947ebc9296db4ba784f0
7
+ data.tar.gz: 9e9ccdaabb657bcd1f9fdd03f109eb1b4ce2cbd5d0cbb97bf6f4c2a6a7d7d92f338e333964809234962fc365703f2eb5e9c4da5e7164053d115aab454d0bbb95
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.20.0 (2026-03-16)
5
+ ------------------
6
+
7
+ * Feature - Provide support to perform deterministic operations on agent runtime through shell command executions via the new InvokeAgentRuntimeCommand API
8
+
4
9
  1.19.0 (2026-02-10)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.19.0
1
+ 1.20.0
@@ -1456,9 +1456,11 @@ module Aws::BedrockAgentCore
1456
1456
  # Sends a request to an agent or tool hosted in an Amazon Bedrock
1457
1457
  # AgentCore Runtime and receives responses in real-time.
1458
1458
  #
1459
- # To invoke an agent you must specify the AgentCore Runtime ARN and
1460
- # provide a payload containing your request. You can optionally specify
1461
- # a qualifier to target a specific version or endpoint of the agent.
1459
+ # To invoke an agent, you can specify either the AgentCore Runtime ARN
1460
+ # or the agent ID with an account ID, and provide a payload containing
1461
+ # your request. When you use the agent ID instead of the full ARN, you
1462
+ # don't need to URL-encode the identifier. You can optionally specify a
1463
+ # qualifier to target a specific endpoint of the agent.
1462
1464
  #
1463
1465
  # This operation supports streaming responses, allowing you to receive
1464
1466
  # partial responses as they become available. We recommend using
@@ -1522,19 +1524,20 @@ module Aws::BedrockAgentCore
1522
1524
  # Additional context information for distributed tracing.
1523
1525
  #
1524
1526
  # @option params [required, String] :agent_runtime_arn
1525
- # The Amazon Web Services Resource Name (ARN) of the agent runtime to
1526
- # invoke. The ARN uniquely identifies the agent runtime resource in
1527
- # Amazon Bedrock AgentCore.
1527
+ # The identifier of the agent runtime to invoke. You can specify either
1528
+ # the full Amazon Web Services Resource Name (ARN) or the agent ID. If
1529
+ # you use the agent ID, you must also provide the `accountId` query
1530
+ # parameter.
1528
1531
  #
1529
1532
  # @option params [String] :qualifier
1530
- # The qualifier to use for the agent runtime. This can be a version
1531
- # number or an endpoint name that points to a specific version. If not
1532
- # specified, Amazon Bedrock AgentCore uses the default version of the
1533
- # agent runtime.
1533
+ # The qualifier to use for the agent runtime. This is an endpoint name
1534
+ # that points to a specific version. If not specified, Amazon Bedrock
1535
+ # AgentCore uses the default endpoint of the agent runtime.
1534
1536
  #
1535
1537
  # @option params [String] :account_id
1536
1538
  # The identifier of the Amazon Web Services account for the agent
1537
- # runtime resource.
1539
+ # runtime resource. This parameter is required when you specify an agent
1540
+ # ID instead of the full ARN for `agentRuntimeArn`.
1538
1541
  #
1539
1542
  # @option params [required, String, StringIO, File] :payload
1540
1543
  # The input data to send to the agent runtime. The format of this data
@@ -1596,6 +1599,302 @@ module Aws::BedrockAgentCore
1596
1599
  req.send_request(options, &block)
1597
1600
  end
1598
1601
 
1602
+ # Executes a command in a runtime session container. Returns streaming
1603
+ # output with contentStart, contentDelta, and contentStop events.
1604
+ #
1605
+ # @option params [String] :content_type
1606
+ # The MIME type of the input data in the request payload. This tells the
1607
+ # agent runtime how to interpret the payload data. Common values include
1608
+ # application/json for JSON data.
1609
+ #
1610
+ # @option params [String] :accept
1611
+ # The desired MIME type for the response from the agent runtime command.
1612
+ # This tells the agent runtime what format to use for the response data.
1613
+ # Common values include application/json for JSON data.
1614
+ #
1615
+ # @option params [String] :runtime_session_id
1616
+ # Runtime session identifier
1617
+ #
1618
+ # **A suitable default value is auto-generated.** You should normally
1619
+ # not need to pass this option.**
1620
+ #
1621
+ # @option params [String] :trace_id
1622
+ # The trace identifier for request tracking.
1623
+ #
1624
+ # @option params [String] :trace_parent
1625
+ # The parent trace information for distributed tracing.
1626
+ #
1627
+ # @option params [String] :trace_state
1628
+ # The trace state information for distributed tracing.
1629
+ #
1630
+ # @option params [String] :baggage
1631
+ # Additional context information for distributed tracing.
1632
+ #
1633
+ # @option params [required, String] :agent_runtime_arn
1634
+ # ARN of the agent runtime
1635
+ #
1636
+ # @option params [String] :qualifier
1637
+ # Version or alias qualifier
1638
+ #
1639
+ # @option params [String] :account_id
1640
+ # Account ID (12 digits)
1641
+ #
1642
+ # @option params [required, Types::InvokeAgentRuntimeCommandRequestBody] :body
1643
+ # Request body containing command and timeout
1644
+ #
1645
+ # @return [Types::InvokeAgentRuntimeCommandResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1646
+ #
1647
+ # * {Types::InvokeAgentRuntimeCommandResponse#runtime_session_id #runtime_session_id} => String
1648
+ # * {Types::InvokeAgentRuntimeCommandResponse#trace_id #trace_id} => String
1649
+ # * {Types::InvokeAgentRuntimeCommandResponse#trace_parent #trace_parent} => String
1650
+ # * {Types::InvokeAgentRuntimeCommandResponse#trace_state #trace_state} => String
1651
+ # * {Types::InvokeAgentRuntimeCommandResponse#baggage #baggage} => String
1652
+ # * {Types::InvokeAgentRuntimeCommandResponse#content_type #content_type} => String
1653
+ # * {Types::InvokeAgentRuntimeCommandResponse#status_code #status_code} => Integer
1654
+ # * {Types::InvokeAgentRuntimeCommandResponse#stream #stream} => Types::InvokeAgentRuntimeCommandStreamOutput
1655
+ #
1656
+ # @example EventStream Operation Example
1657
+ #
1658
+ # # You can process the event once it arrives immediately, or wait until the
1659
+ # # full response is complete and iterate through the eventstream enumerator.
1660
+ #
1661
+ # # To interact with event immediately, you need to register invoke_agent_runtime_command
1662
+ # # with callbacks. Callbacks can be registered for specific events or for all
1663
+ # # events, including error events.
1664
+ #
1665
+ # # Callbacks can be passed into the `:event_stream_handler` option or within a
1666
+ # # block statement attached to the #invoke_agent_runtime_command call directly. Hybrid
1667
+ # # pattern of both is also supported.
1668
+ #
1669
+ # # `:event_stream_handler` option takes in either a Proc object or
1670
+ # # Aws::BedrockAgentCore::EventStreams::InvokeAgentRuntimeCommandStreamOutput object.
1671
+ #
1672
+ # # Usage pattern a): Callbacks with a block attached to #invoke_agent_runtime_command
1673
+ # # Example for registering callbacks for all event types and an error event
1674
+ # client.invoke_agent_runtime_command(
1675
+ # # params input
1676
+ # ) do |stream|
1677
+ # stream.on_error_event do |event|
1678
+ # # catch unmodeled error event in the stream
1679
+ # raise event
1680
+ # # => Aws::Errors::EventError
1681
+ # # event.event_type => :error
1682
+ # # event.error_code => String
1683
+ # # event.error_message => String
1684
+ # end
1685
+ #
1686
+ # stream.on_event do |event|
1687
+ # # process all events arrive
1688
+ # puts event.event_type
1689
+ # # ...
1690
+ # end
1691
+ # end
1692
+ #
1693
+ # # Usage pattern b): Pass in `:event_stream_handler` for #invoke_agent_runtime_command
1694
+ # # 1) Create a Aws::BedrockAgentCore::EventStreams::InvokeAgentRuntimeCommandStreamOutput object
1695
+ # # Example for registering callbacks with specific events
1696
+ #
1697
+ # handler = Aws::BedrockAgentCore::EventStreams::InvokeAgentRuntimeCommandStreamOutput.new
1698
+ # handler.on_chunk_event do |event|
1699
+ # event # => Aws::BedrockAgentCore::Types::chunk
1700
+ # end
1701
+ # handler.on_access_denied_exception_event do |event|
1702
+ # event # => Aws::BedrockAgentCore::Types::accessDeniedException
1703
+ # end
1704
+ # handler.on_internal_server_exception_event do |event|
1705
+ # event # => Aws::BedrockAgentCore::Types::internalServerException
1706
+ # end
1707
+ # handler.on_resource_not_found_exception_event do |event|
1708
+ # event # => Aws::BedrockAgentCore::Types::resourceNotFoundException
1709
+ # end
1710
+ # handler.on_service_quota_exceeded_exception_event do |event|
1711
+ # event # => Aws::BedrockAgentCore::Types::serviceQuotaExceededException
1712
+ # end
1713
+ # handler.on_throttling_exception_event do |event|
1714
+ # event # => Aws::BedrockAgentCore::Types::throttlingException
1715
+ # end
1716
+ # handler.on_validation_exception_event do |event|
1717
+ # event # => Aws::BedrockAgentCore::Types::validationException
1718
+ # end
1719
+ # handler.on_runtime_client_error_event do |event|
1720
+ # event # => Aws::BedrockAgentCore::Types::runtimeClientError
1721
+ # end
1722
+ #
1723
+ # client.invoke_agent_runtime_command(
1724
+ # # params inputs
1725
+ # event_stream_handler: handler
1726
+ # )
1727
+ #
1728
+ # # 2) Use a Ruby Proc object
1729
+ # # Example for registering callbacks with specific events
1730
+ # handler = Proc.new do |stream|
1731
+ # stream.on_chunk_event do |event|
1732
+ # event # => Aws::BedrockAgentCore::Types::chunk
1733
+ # end
1734
+ # stream.on_access_denied_exception_event do |event|
1735
+ # event # => Aws::BedrockAgentCore::Types::accessDeniedException
1736
+ # end
1737
+ # stream.on_internal_server_exception_event do |event|
1738
+ # event # => Aws::BedrockAgentCore::Types::internalServerException
1739
+ # end
1740
+ # stream.on_resource_not_found_exception_event do |event|
1741
+ # event # => Aws::BedrockAgentCore::Types::resourceNotFoundException
1742
+ # end
1743
+ # stream.on_service_quota_exceeded_exception_event do |event|
1744
+ # event # => Aws::BedrockAgentCore::Types::serviceQuotaExceededException
1745
+ # end
1746
+ # stream.on_throttling_exception_event do |event|
1747
+ # event # => Aws::BedrockAgentCore::Types::throttlingException
1748
+ # end
1749
+ # stream.on_validation_exception_event do |event|
1750
+ # event # => Aws::BedrockAgentCore::Types::validationException
1751
+ # end
1752
+ # stream.on_runtime_client_error_event do |event|
1753
+ # event # => Aws::BedrockAgentCore::Types::runtimeClientError
1754
+ # end
1755
+ # end
1756
+ #
1757
+ # client.invoke_agent_runtime_command(
1758
+ # # params inputs
1759
+ # event_stream_handler: handler
1760
+ # )
1761
+ #
1762
+ # # Usage pattern c): Hybrid pattern of a) and b)
1763
+ # handler = Aws::BedrockAgentCore::EventStreams::InvokeAgentRuntimeCommandStreamOutput.new
1764
+ # handler.on_chunk_event do |event|
1765
+ # event # => Aws::BedrockAgentCore::Types::chunk
1766
+ # end
1767
+ # handler.on_access_denied_exception_event do |event|
1768
+ # event # => Aws::BedrockAgentCore::Types::accessDeniedException
1769
+ # end
1770
+ # handler.on_internal_server_exception_event do |event|
1771
+ # event # => Aws::BedrockAgentCore::Types::internalServerException
1772
+ # end
1773
+ # handler.on_resource_not_found_exception_event do |event|
1774
+ # event # => Aws::BedrockAgentCore::Types::resourceNotFoundException
1775
+ # end
1776
+ # handler.on_service_quota_exceeded_exception_event do |event|
1777
+ # event # => Aws::BedrockAgentCore::Types::serviceQuotaExceededException
1778
+ # end
1779
+ # handler.on_throttling_exception_event do |event|
1780
+ # event # => Aws::BedrockAgentCore::Types::throttlingException
1781
+ # end
1782
+ # handler.on_validation_exception_event do |event|
1783
+ # event # => Aws::BedrockAgentCore::Types::validationException
1784
+ # end
1785
+ # handler.on_runtime_client_error_event do |event|
1786
+ # event # => Aws::BedrockAgentCore::Types::runtimeClientError
1787
+ # end
1788
+ #
1789
+ # client.invoke_agent_runtime_command(
1790
+ # # params input
1791
+ # event_stream_handler: handler
1792
+ # ) do |stream|
1793
+ # stream.on_error_event do |event|
1794
+ # # catch unmodeled error event in the stream
1795
+ # raise event
1796
+ # # => Aws::Errors::EventError
1797
+ # # event.event_type => :error
1798
+ # # event.error_code => String
1799
+ # # event.error_message => String
1800
+ # end
1801
+ # end
1802
+ #
1803
+ # # You can also iterate through events after the response complete.
1804
+ # # Events are available at
1805
+ # resp.stream # => Enumerator
1806
+ # # For parameter input example, please refer to following request syntax.
1807
+ #
1808
+ # @example Request syntax with placeholder values
1809
+ #
1810
+ # resp = client.invoke_agent_runtime_command({
1811
+ # content_type: "MimeType",
1812
+ # accept: "MimeType",
1813
+ # runtime_session_id: "SessionType",
1814
+ # trace_id: "InvokeAgentRuntimeCommandRequestTraceIdString",
1815
+ # trace_parent: "InvokeAgentRuntimeCommandRequestTraceParentString",
1816
+ # trace_state: "InvokeAgentRuntimeCommandRequestTraceStateString",
1817
+ # baggage: "InvokeAgentRuntimeCommandRequestBaggageString",
1818
+ # agent_runtime_arn: "String", # required
1819
+ # qualifier: "String",
1820
+ # account_id: "InvokeAgentRuntimeCommandRequestAccountIdString",
1821
+ # body: { # required
1822
+ # command: "InvokeAgentRuntimeCommandRequestBodyCommandString", # required
1823
+ # timeout: 1,
1824
+ # },
1825
+ # })
1826
+ #
1827
+ # @example Response structure
1828
+ #
1829
+ # resp.runtime_session_id #=> String
1830
+ # resp.trace_id #=> String
1831
+ # resp.trace_parent #=> String
1832
+ # resp.trace_state #=> String
1833
+ # resp.baggage #=> String
1834
+ # resp.content_type #=> String
1835
+ # resp.status_code #=> Integer
1836
+ # # All events are available at resp.stream:
1837
+ # resp.stream #=> Enumerator
1838
+ # resp.stream.event_types #=> [:chunk, :access_denied_exception, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :validation_exception, :runtime_client_error]
1839
+ #
1840
+ # # For :chunk event available at #on_chunk_event callback and response eventstream enumerator:
1841
+ # event.content_delta.stdout #=> String
1842
+ # event.content_delta.stderr #=> String
1843
+ # event.content_stop.exit_code #=> Integer
1844
+ # event.content_stop.status #=> String, one of "COMPLETED", "TIMED_OUT"
1845
+ #
1846
+ # # For :access_denied_exception event available at #on_access_denied_exception_event callback and response eventstream enumerator:
1847
+ # event.message #=> String
1848
+ #
1849
+ # # For :internal_server_exception event available at #on_internal_server_exception_event callback and response eventstream enumerator:
1850
+ # event.message #=> String
1851
+ #
1852
+ # # For :resource_not_found_exception event available at #on_resource_not_found_exception_event callback and response eventstream enumerator:
1853
+ # event.message #=> String
1854
+ #
1855
+ # # For :service_quota_exceeded_exception event available at #on_service_quota_exceeded_exception_event callback and response eventstream enumerator:
1856
+ # event.message #=> String
1857
+ #
1858
+ # # For :throttling_exception event available at #on_throttling_exception_event callback and response eventstream enumerator:
1859
+ # event.message #=> String
1860
+ #
1861
+ # # For :validation_exception event available at #on_validation_exception_event callback and response eventstream enumerator:
1862
+ # event.message #=> String
1863
+ # event.reason #=> String, one of "CannotParse", "FieldValidationFailed", "IdempotentParameterMismatchException", "EventInOtherSession", "ResourceConflict"
1864
+ # event.field_list #=> Array
1865
+ # event.field_list[0].name #=> String
1866
+ # event.field_list[0].message #=> String
1867
+ #
1868
+ # # For :runtime_client_error event available at #on_runtime_client_error_event callback and response eventstream enumerator:
1869
+ # event.message #=> String
1870
+ #
1871
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/InvokeAgentRuntimeCommand AWS API Documentation
1872
+ #
1873
+ # @overload invoke_agent_runtime_command(params = {})
1874
+ # @param [Hash] params ({})
1875
+ def invoke_agent_runtime_command(params = {}, options = {}, &block)
1876
+ params = params.dup
1877
+ event_stream_handler = case handler = params.delete(:event_stream_handler)
1878
+ when EventStreams::InvokeAgentRuntimeCommandStreamOutput then handler
1879
+ when Proc then EventStreams::InvokeAgentRuntimeCommandStreamOutput.new.tap(&handler)
1880
+ when nil then EventStreams::InvokeAgentRuntimeCommandStreamOutput.new
1881
+ else
1882
+ msg = "expected :event_stream_handler to be a block or "\
1883
+ "instance of Aws::BedrockAgentCore::EventStreams::InvokeAgentRuntimeCommandStreamOutput"\
1884
+ ", got `#{handler.inspect}` instead"
1885
+ raise ArgumentError, msg
1886
+ end
1887
+
1888
+ yield(event_stream_handler) if block_given?
1889
+
1890
+ req = build_request(:invoke_agent_runtime_command, params)
1891
+
1892
+ req.context[:event_stream_handler] = event_stream_handler
1893
+ req.handlers.add(Aws::Binary::DecodeHandler, priority: 95)
1894
+
1895
+ req.send_request(options, &block)
1896
+ end
1897
+
1599
1898
  # Executes code within an active code interpreter session in Amazon
1600
1899
  # Bedrock AgentCore. This operation processes the provided code, runs it
1601
1900
  # in a secure environment, and returns the execution results including
@@ -2625,10 +2924,10 @@ module Aws::BedrockAgentCore
2625
2924
  # manage the session. The name does not need to be unique.
2626
2925
  #
2627
2926
  # @option params [Integer] :session_timeout_seconds
2628
- # The time in seconds after which the session automatically terminates
2629
- # if there is no activity. The default value is 3600 seconds (1 hour).
2630
- # The minimum allowed value is 60 seconds, and the maximum allowed value
2631
- # is 28800 seconds (8 hours).
2927
+ # The duration in seconds (time-to-live) after which the session
2928
+ # automatically terminates, regardless of ongoing activity. Defaults to
2929
+ # 3600 seconds (1 hour). Recommended minimum: 60 seconds. Maximum
2930
+ # allowed: 28,800 seconds (8 hours).
2632
2931
  #
2633
2932
  # @option params [Types::ViewPort] :view_port
2634
2933
  # The dimensions of the browser viewport for this session. This
@@ -2776,10 +3075,10 @@ module Aws::BedrockAgentCore
2776
3075
  # and manage the session. The name does not need to be unique.
2777
3076
  #
2778
3077
  # @option params [Integer] :session_timeout_seconds
2779
- # The time in seconds after which the session automatically terminates
2780
- # if there is no activity. The default value is 900 seconds (15
2781
- # minutes). The minimum allowed value is 60 seconds, and the maximum
2782
- # allowed value is 28800 seconds (8 hours).
3078
+ # The duration in seconds (time-to-live) after which the session
3079
+ # automatically terminates, regardless of ongoing activity. Defaults to
3080
+ # 900 seconds (15 minutes). Recommended minimum: 60 seconds. Maximum
3081
+ # allowed: 28,800 seconds (8 hours).
2783
3082
  #
2784
3083
  # @option params [String] :client_token
2785
3084
  # A unique, case-sensitive identifier to ensure that the API request
@@ -3142,7 +3441,7 @@ module Aws::BedrockAgentCore
3142
3441
  tracer: tracer
3143
3442
  )
3144
3443
  context[:gem_name] = 'aws-sdk-bedrockagentcore'
3145
- context[:gem_version] = '1.19.0'
3444
+ context[:gem_version] = '1.20.0'
3146
3445
  Seahorse::Client::Request.new(handlers, context)
3147
3446
  end
3148
3447
 
@@ -57,6 +57,7 @@ module Aws::BedrockAgentCore
57
57
  CodeInterpreterSessionSummary = Shapes::StructureShape.new(name: 'CodeInterpreterSessionSummary')
58
58
  CodeInterpreterSessionTimeout = Shapes::IntegerShape.new(name: 'CodeInterpreterSessionTimeout')
59
59
  CodeInterpreterStreamOutput = Shapes::StructureShape.new(name: 'CodeInterpreterStreamOutput')
60
+ CommandExecutionStatus = Shapes::StringShape.new(name: 'CommandExecutionStatus')
60
61
  CompleteResourceTokenAuthRequest = Shapes::StructureShape.new(name: 'CompleteResourceTokenAuthRequest')
61
62
  CompleteResourceTokenAuthResponse = Shapes::StructureShape.new(name: 'CompleteResourceTokenAuthResponse')
62
63
  ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
@@ -64,6 +65,9 @@ module Aws::BedrockAgentCore
64
65
  ContentBlock = Shapes::StructureShape.new(name: 'ContentBlock')
65
66
  ContentBlockList = Shapes::ListShape.new(name: 'ContentBlockList')
66
67
  ContentBlockType = Shapes::StringShape.new(name: 'ContentBlockType')
68
+ ContentDeltaEvent = Shapes::StructureShape.new(name: 'ContentDeltaEvent')
69
+ ContentStartEvent = Shapes::StructureShape.new(name: 'ContentStartEvent')
70
+ ContentStopEvent = Shapes::StructureShape.new(name: 'ContentStopEvent')
67
71
  ContentTextString = Shapes::StringShape.new(name: 'ContentTextString')
68
72
  Context = Shapes::UnionShape.new(name: 'Context')
69
73
  Conversational = Shapes::StructureShape.new(name: 'Conversational')
@@ -136,6 +140,16 @@ module Aws::BedrockAgentCore
136
140
  Integer = Shapes::IntegerShape.new(name: 'Integer')
137
141
  InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
138
142
  InvalidInputException = Shapes::StructureShape.new(name: 'InvalidInputException')
143
+ InvokeAgentRuntimeCommandRequest = Shapes::StructureShape.new(name: 'InvokeAgentRuntimeCommandRequest')
144
+ InvokeAgentRuntimeCommandRequestAccountIdString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeCommandRequestAccountIdString')
145
+ InvokeAgentRuntimeCommandRequestBaggageString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeCommandRequestBaggageString')
146
+ InvokeAgentRuntimeCommandRequestBody = Shapes::StructureShape.new(name: 'InvokeAgentRuntimeCommandRequestBody')
147
+ InvokeAgentRuntimeCommandRequestBodyCommandString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeCommandRequestBodyCommandString')
148
+ InvokeAgentRuntimeCommandRequestTraceIdString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeCommandRequestTraceIdString')
149
+ InvokeAgentRuntimeCommandRequestTraceParentString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeCommandRequestTraceParentString')
150
+ InvokeAgentRuntimeCommandRequestTraceStateString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeCommandRequestTraceStateString')
151
+ InvokeAgentRuntimeCommandResponse = Shapes::StructureShape.new(name: 'InvokeAgentRuntimeCommandResponse')
152
+ InvokeAgentRuntimeCommandStreamOutput = Shapes::StructureShape.new(name: 'InvokeAgentRuntimeCommandStreamOutput')
139
153
  InvokeAgentRuntimeRequest = Shapes::StructureShape.new(name: 'InvokeAgentRuntimeRequest')
140
154
  InvokeAgentRuntimeRequestAccountIdString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeRequestAccountIdString')
141
155
  InvokeAgentRuntimeRequestBaggageString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeRequestBaggageString')
@@ -216,6 +230,7 @@ module Aws::BedrockAgentCore
216
230
  ResourceLocation = Shapes::UnionShape.new(name: 'ResourceLocation')
217
231
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
218
232
  ResourceOauth2ReturnUrlType = Shapes::StringShape.new(name: 'ResourceOauth2ReturnUrlType')
233
+ ResponseChunk = Shapes::StructureShape.new(name: 'ResponseChunk')
219
234
  ResponseStream = Shapes::BlobShape.new(name: 'ResponseStream', streaming: true)
220
235
  RetrieveMemoryRecordsInput = Shapes::StructureShape.new(name: 'RetrieveMemoryRecordsInput')
221
236
  RetrieveMemoryRecordsOutput = Shapes::StructureShape.new(name: 'RetrieveMemoryRecordsOutput')
@@ -426,6 +441,16 @@ module Aws::BedrockAgentCore
426
441
 
427
442
  ContentBlockList.member = Shapes::ShapeRef.new(shape: ContentBlock)
428
443
 
444
+ ContentDeltaEvent.add_member(:stdout, Shapes::ShapeRef.new(shape: String, location_name: "stdout"))
445
+ ContentDeltaEvent.add_member(:stderr, Shapes::ShapeRef.new(shape: String, location_name: "stderr"))
446
+ ContentDeltaEvent.struct_class = Types::ContentDeltaEvent
447
+
448
+ ContentStartEvent.struct_class = Types::ContentStartEvent
449
+
450
+ ContentStopEvent.add_member(:exit_code, Shapes::ShapeRef.new(shape: Integer, required: true, location_name: "exitCode"))
451
+ ContentStopEvent.add_member(:status, Shapes::ShapeRef.new(shape: CommandExecutionStatus, required: true, location_name: "status"))
452
+ ContentStopEvent.struct_class = Types::ContentStopEvent
453
+
429
454
  Context.add_member(:span_context, Shapes::ShapeRef.new(shape: SpanContext, location_name: "spanContext"))
430
455
  Context.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
431
456
  Context.add_member_subclass(:span_context, Types::Context::SpanContext)
@@ -680,6 +705,47 @@ module Aws::BedrockAgentCore
680
705
  InvalidInputException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
681
706
  InvalidInputException.struct_class = Types::InvalidInputException
682
707
 
708
+ InvokeAgentRuntimeCommandRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "Content-Type"))
709
+ InvokeAgentRuntimeCommandRequest.add_member(:accept, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "Accept"))
710
+ InvokeAgentRuntimeCommandRequest.add_member(:runtime_session_id, Shapes::ShapeRef.new(shape: SessionType, location: "header", location_name: "X-Amzn-Bedrock-AgentCore-Runtime-Session-Id", metadata: {"idempotencyToken" => true}))
711
+ InvokeAgentRuntimeCommandRequest.add_member(:trace_id, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandRequestTraceIdString, location: "header", location_name: "X-Amzn-Trace-Id"))
712
+ InvokeAgentRuntimeCommandRequest.add_member(:trace_parent, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandRequestTraceParentString, location: "header", location_name: "traceparent"))
713
+ InvokeAgentRuntimeCommandRequest.add_member(:trace_state, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandRequestTraceStateString, location: "header", location_name: "tracestate"))
714
+ InvokeAgentRuntimeCommandRequest.add_member(:baggage, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandRequestBaggageString, location: "header", location_name: "baggage"))
715
+ InvokeAgentRuntimeCommandRequest.add_member(:agent_runtime_arn, Shapes::ShapeRef.new(shape: String, required: true, location: "uri", location_name: "agentRuntimeArn"))
716
+ InvokeAgentRuntimeCommandRequest.add_member(:qualifier, Shapes::ShapeRef.new(shape: String, location: "querystring", location_name: "qualifier"))
717
+ InvokeAgentRuntimeCommandRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandRequestAccountIdString, location: "querystring", location_name: "accountId"))
718
+ InvokeAgentRuntimeCommandRequest.add_member(:body, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandRequestBody, required: true, location_name: "body"))
719
+ InvokeAgentRuntimeCommandRequest.struct_class = Types::InvokeAgentRuntimeCommandRequest
720
+ InvokeAgentRuntimeCommandRequest[:payload] = :body
721
+ InvokeAgentRuntimeCommandRequest[:payload_member] = InvokeAgentRuntimeCommandRequest.member(:body)
722
+
723
+ InvokeAgentRuntimeCommandRequestBody.add_member(:command, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandRequestBodyCommandString, required: true, location_name: "command"))
724
+ InvokeAgentRuntimeCommandRequestBody.add_member(:timeout, Shapes::ShapeRef.new(shape: Integer, location_name: "timeout"))
725
+ InvokeAgentRuntimeCommandRequestBody.struct_class = Types::InvokeAgentRuntimeCommandRequestBody
726
+
727
+ InvokeAgentRuntimeCommandResponse.add_member(:runtime_session_id, Shapes::ShapeRef.new(shape: SessionId, location: "header", location_name: "X-Amzn-Bedrock-AgentCore-Runtime-Session-Id"))
728
+ InvokeAgentRuntimeCommandResponse.add_member(:trace_id, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "X-Amzn-Trace-Id"))
729
+ InvokeAgentRuntimeCommandResponse.add_member(:trace_parent, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "traceparent"))
730
+ InvokeAgentRuntimeCommandResponse.add_member(:trace_state, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "tracestate"))
731
+ InvokeAgentRuntimeCommandResponse.add_member(:baggage, Shapes::ShapeRef.new(shape: String, location: "header", location_name: "baggage"))
732
+ InvokeAgentRuntimeCommandResponse.add_member(:content_type, Shapes::ShapeRef.new(shape: String, required: true, location: "header", location_name: "Content-Type"))
733
+ InvokeAgentRuntimeCommandResponse.add_member(:status_code, Shapes::ShapeRef.new(shape: HttpResponseCode, location: "statusCode", location_name: "statusCode"))
734
+ InvokeAgentRuntimeCommandResponse.add_member(:stream, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandStreamOutput, required: true, eventstream: true, location_name: "stream"))
735
+ InvokeAgentRuntimeCommandResponse.struct_class = Types::InvokeAgentRuntimeCommandResponse
736
+ InvokeAgentRuntimeCommandResponse[:payload] = :stream
737
+ InvokeAgentRuntimeCommandResponse[:payload_member] = InvokeAgentRuntimeCommandResponse.member(:stream)
738
+
739
+ InvokeAgentRuntimeCommandStreamOutput.add_member(:chunk, Shapes::ShapeRef.new(shape: ResponseChunk, event: true, location_name: "chunk"))
740
+ InvokeAgentRuntimeCommandStreamOutput.add_member(:access_denied_exception, Shapes::ShapeRef.new(shape: AccessDeniedException, location_name: "accessDeniedException"))
741
+ InvokeAgentRuntimeCommandStreamOutput.add_member(:internal_server_exception, Shapes::ShapeRef.new(shape: InternalServerException, location_name: "internalServerException"))
742
+ InvokeAgentRuntimeCommandStreamOutput.add_member(:resource_not_found_exception, Shapes::ShapeRef.new(shape: ResourceNotFoundException, location_name: "resourceNotFoundException"))
743
+ InvokeAgentRuntimeCommandStreamOutput.add_member(:service_quota_exceeded_exception, Shapes::ShapeRef.new(shape: ServiceQuotaExceededException, location_name: "serviceQuotaExceededException"))
744
+ InvokeAgentRuntimeCommandStreamOutput.add_member(:throttling_exception, Shapes::ShapeRef.new(shape: ThrottlingException, location_name: "throttlingException"))
745
+ InvokeAgentRuntimeCommandStreamOutput.add_member(:validation_exception, Shapes::ShapeRef.new(shape: ValidationException, location_name: "validationException"))
746
+ InvokeAgentRuntimeCommandStreamOutput.add_member(:runtime_client_error, Shapes::ShapeRef.new(shape: RuntimeClientError, location_name: "runtimeClientError"))
747
+ InvokeAgentRuntimeCommandStreamOutput.struct_class = Types::InvokeAgentRuntimeCommandStreamOutput
748
+
683
749
  InvokeAgentRuntimeRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "Content-Type"))
684
750
  InvokeAgentRuntimeRequest.add_member(:accept, Shapes::ShapeRef.new(shape: MimeType, location: "header", location_name: "Accept"))
685
751
  InvokeAgentRuntimeRequest.add_member(:mcp_session_id, Shapes::ShapeRef.new(shape: StringType, location: "header", location_name: "Mcp-Session-Id"))
@@ -936,6 +1002,11 @@ module Aws::BedrockAgentCore
936
1002
  ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
937
1003
  ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
938
1004
 
1005
+ ResponseChunk.add_member(:content_start, Shapes::ShapeRef.new(shape: ContentStartEvent, location_name: "contentStart"))
1006
+ ResponseChunk.add_member(:content_delta, Shapes::ShapeRef.new(shape: ContentDeltaEvent, location_name: "contentDelta"))
1007
+ ResponseChunk.add_member(:content_stop, Shapes::ShapeRef.new(shape: ContentStopEvent, location_name: "contentStop"))
1008
+ ResponseChunk.struct_class = Types::ResponseChunk
1009
+
939
1010
  RetrieveMemoryRecordsInput.add_member(:memory_id, Shapes::ShapeRef.new(shape: MemoryId, required: true, location: "uri", location_name: "memoryId"))
940
1011
  RetrieveMemoryRecordsInput.add_member(:namespace, Shapes::ShapeRef.new(shape: Namespace, required: true, location_name: "namespace"))
941
1012
  RetrieveMemoryRecordsInput.add_member(:search_criteria, Shapes::ShapeRef.new(shape: SearchCriteria, required: true, location_name: "searchCriteria"))
@@ -1453,6 +1524,21 @@ module Aws::BedrockAgentCore
1453
1524
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1454
1525
  end)
1455
1526
 
1527
+ api.add_operation(:invoke_agent_runtime_command, Seahorse::Model::Operation.new.tap do |o|
1528
+ o.name = "InvokeAgentRuntimeCommand"
1529
+ o.http_method = "POST"
1530
+ o.http_request_uri = "/runtimes/{agentRuntimeArn}/commands"
1531
+ o.input = Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandRequest)
1532
+ o.output = Shapes::ShapeRef.new(shape: InvokeAgentRuntimeCommandResponse)
1533
+ o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
1534
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
1535
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
1536
+ o.errors << Shapes::ShapeRef.new(shape: RuntimeClientError)
1537
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1538
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1539
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1540
+ end)
1541
+
1456
1542
  api.add_operation(:invoke_code_interpreter, Seahorse::Model::Operation.new.tap do |o|
1457
1543
  o.name = "InvokeCodeInterpreter"
1458
1544
  o.http_method = "POST"
@@ -9,6 +9,75 @@
9
9
 
10
10
  module Aws::BedrockAgentCore
11
11
  module EventStreams
12
+ class InvokeAgentRuntimeCommandStreamOutput
13
+
14
+ def initialize
15
+ @event_emitter = Aws::EventEmitter.new
16
+ end
17
+
18
+ def on_chunk_event(&block)
19
+ @event_emitter.on(:chunk, block) if block_given?
20
+ end
21
+
22
+ def on_access_denied_exception_event(&block)
23
+ @event_emitter.on(:access_denied_exception, block) if block_given?
24
+ end
25
+
26
+ def on_internal_server_exception_event(&block)
27
+ @event_emitter.on(:internal_server_exception, block) if block_given?
28
+ end
29
+
30
+ def on_resource_not_found_exception_event(&block)
31
+ @event_emitter.on(:resource_not_found_exception, block) if block_given?
32
+ end
33
+
34
+ def on_service_quota_exceeded_exception_event(&block)
35
+ @event_emitter.on(:service_quota_exceeded_exception, block) if block_given?
36
+ end
37
+
38
+ def on_throttling_exception_event(&block)
39
+ @event_emitter.on(:throttling_exception, block) if block_given?
40
+ end
41
+
42
+ def on_validation_exception_event(&block)
43
+ @event_emitter.on(:validation_exception, block) if block_given?
44
+ end
45
+
46
+ def on_runtime_client_error_event(&block)
47
+ @event_emitter.on(:runtime_client_error, block) if block_given?
48
+ end
49
+
50
+ def on_error_event(&block)
51
+ @event_emitter.on(:error, block) if block_given?
52
+ end
53
+
54
+ def on_initial_response_event(&block)
55
+ @event_emitter.on(:initial_response, block) if block_given?
56
+ end
57
+
58
+ def on_unknown_event(&block)
59
+ @event_emitter.on(:unknown_event, block) if block_given?
60
+ end
61
+
62
+ def on_event(&block)
63
+ on_chunk_event(&block)
64
+ on_access_denied_exception_event(&block)
65
+ on_internal_server_exception_event(&block)
66
+ on_resource_not_found_exception_event(&block)
67
+ on_service_quota_exceeded_exception_event(&block)
68
+ on_throttling_exception_event(&block)
69
+ on_validation_exception_event(&block)
70
+ on_runtime_client_error_event(&block)
71
+ on_error_event(&block)
72
+ on_initial_response_event(&block)
73
+ on_unknown_event(&block)
74
+ end
75
+
76
+ # @api private
77
+ # @return Aws::EventEmitter
78
+ attr_reader :event_emitter
79
+
80
+ end
12
81
  class CodeInterpreterStreamOutput
13
82
 
14
83
  def initialize
@@ -587,6 +587,50 @@ module Aws::BedrockAgentCore
587
587
  include Aws::Structure
588
588
  end
589
589
 
590
+ # Content event containing stdout or stderr output
591
+ #
592
+ # @!attribute [rw] stdout
593
+ # Standard output content
594
+ # @return [String]
595
+ #
596
+ # @!attribute [rw] stderr
597
+ # Standard error content
598
+ # @return [String]
599
+ #
600
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ContentDeltaEvent AWS API Documentation
601
+ #
602
+ class ContentDeltaEvent < Struct.new(
603
+ :stdout,
604
+ :stderr)
605
+ SENSITIVE = []
606
+ include Aws::Structure
607
+ end
608
+
609
+ # First event indicating command execution has started
610
+ #
611
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ContentStartEvent AWS API Documentation
612
+ #
613
+ class ContentStartEvent < Aws::EmptyStructure; end
614
+
615
+ # Final event indicating command execution has completed
616
+ #
617
+ # @!attribute [rw] exit_code
618
+ # Exit code: 0 = success, -1 = platform error, &gt;0 = command error
619
+ # @return [Integer]
620
+ #
621
+ # @!attribute [rw] status
622
+ # Execution status
623
+ # @return [String]
624
+ #
625
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ContentStopEvent AWS API Documentation
626
+ #
627
+ class ContentStopEvent < Struct.new(
628
+ :exit_code,
629
+ :status)
630
+ SENSITIVE = []
631
+ include Aws::Structure
632
+ end
633
+
590
634
  # The contextual information associated with an evaluation, including
591
635
  # span context details that identify the specific traces and sessions
592
636
  # being evaluated within the agent's execution flow.
@@ -1776,6 +1820,149 @@ module Aws::BedrockAgentCore
1776
1820
  include Aws::Structure
1777
1821
  end
1778
1822
 
1823
+ # Request for InvokeAgentRuntimeCommand operation
1824
+ #
1825
+ # @!attribute [rw] content_type
1826
+ # The MIME type of the input data in the request payload. This tells
1827
+ # the agent runtime how to interpret the payload data. Common values
1828
+ # include application/json for JSON data.
1829
+ # @return [String]
1830
+ #
1831
+ # @!attribute [rw] accept
1832
+ # The desired MIME type for the response from the agent runtime
1833
+ # command. This tells the agent runtime what format to use for the
1834
+ # response data. Common values include application/json for JSON data.
1835
+ # @return [String]
1836
+ #
1837
+ # @!attribute [rw] runtime_session_id
1838
+ # Runtime session identifier
1839
+ #
1840
+ # **A suitable default value is auto-generated.** You should normally
1841
+ # not need to pass this option.
1842
+ # @return [String]
1843
+ #
1844
+ # @!attribute [rw] trace_id
1845
+ # The trace identifier for request tracking.
1846
+ # @return [String]
1847
+ #
1848
+ # @!attribute [rw] trace_parent
1849
+ # The parent trace information for distributed tracing.
1850
+ # @return [String]
1851
+ #
1852
+ # @!attribute [rw] trace_state
1853
+ # The trace state information for distributed tracing.
1854
+ # @return [String]
1855
+ #
1856
+ # @!attribute [rw] baggage
1857
+ # Additional context information for distributed tracing.
1858
+ # @return [String]
1859
+ #
1860
+ # @!attribute [rw] agent_runtime_arn
1861
+ # ARN of the agent runtime
1862
+ # @return [String]
1863
+ #
1864
+ # @!attribute [rw] qualifier
1865
+ # Version or alias qualifier
1866
+ # @return [String]
1867
+ #
1868
+ # @!attribute [rw] account_id
1869
+ # Account ID (12 digits)
1870
+ # @return [String]
1871
+ #
1872
+ # @!attribute [rw] body
1873
+ # Request body containing command and timeout
1874
+ # @return [Types::InvokeAgentRuntimeCommandRequestBody]
1875
+ #
1876
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/InvokeAgentRuntimeCommandRequest AWS API Documentation
1877
+ #
1878
+ class InvokeAgentRuntimeCommandRequest < Struct.new(
1879
+ :content_type,
1880
+ :accept,
1881
+ :runtime_session_id,
1882
+ :trace_id,
1883
+ :trace_parent,
1884
+ :trace_state,
1885
+ :baggage,
1886
+ :agent_runtime_arn,
1887
+ :qualifier,
1888
+ :account_id,
1889
+ :body)
1890
+ SENSITIVE = []
1891
+ include Aws::Structure
1892
+ end
1893
+
1894
+ # Request body for InvokeAgentRuntimeCommand
1895
+ #
1896
+ # @!attribute [rw] command
1897
+ # The command to execute in the runtime container
1898
+ # @return [String]
1899
+ #
1900
+ # @!attribute [rw] timeout
1901
+ # Command timeout in seconds (default: 300, min:1, max: 3600)
1902
+ # @return [Integer]
1903
+ #
1904
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/InvokeAgentRuntimeCommandRequestBody AWS API Documentation
1905
+ #
1906
+ class InvokeAgentRuntimeCommandRequestBody < Struct.new(
1907
+ :command,
1908
+ :timeout)
1909
+ SENSITIVE = []
1910
+ include Aws::Structure
1911
+ end
1912
+
1913
+ # Response for InvokeAgentRuntimeCommand operation
1914
+ #
1915
+ # @!attribute [rw] runtime_session_id
1916
+ # Runtime session identifier
1917
+ # @return [String]
1918
+ #
1919
+ # @!attribute [rw] trace_id
1920
+ # The trace identifier for request tracking.
1921
+ # @return [String]
1922
+ #
1923
+ # @!attribute [rw] trace_parent
1924
+ # The parent trace information for distributed tracing.
1925
+ # @return [String]
1926
+ #
1927
+ # @!attribute [rw] trace_state
1928
+ # The trace state information for distributed tracing.
1929
+ # @return [String]
1930
+ #
1931
+ # @!attribute [rw] baggage
1932
+ # Additional context information for distributed tracing.
1933
+ # @return [String]
1934
+ #
1935
+ # @!attribute [rw] content_type
1936
+ # The MIME type of the response data. This indicates how to interpret
1937
+ # the response data. Common values include application/json for JSON
1938
+ # data.
1939
+ # @return [String]
1940
+ #
1941
+ # @!attribute [rw] status_code
1942
+ # The HTTP status code of the response. A status code of 200 indicates
1943
+ # a successful operation. Other status codes indicate various error
1944
+ # conditions.
1945
+ # @return [Integer]
1946
+ #
1947
+ # @!attribute [rw] stream
1948
+ # Streaming output containing command execution events
1949
+ # @return [Types::InvokeAgentRuntimeCommandStreamOutput]
1950
+ #
1951
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/InvokeAgentRuntimeCommandResponse AWS API Documentation
1952
+ #
1953
+ class InvokeAgentRuntimeCommandResponse < Struct.new(
1954
+ :runtime_session_id,
1955
+ :trace_id,
1956
+ :trace_parent,
1957
+ :trace_state,
1958
+ :baggage,
1959
+ :content_type,
1960
+ :status_code,
1961
+ :stream)
1962
+ SENSITIVE = []
1963
+ include Aws::Structure
1964
+ end
1965
+
1779
1966
  # @!attribute [rw] content_type
1780
1967
  # The MIME type of the input data in the payload. This tells the agent
1781
1968
  # runtime how to interpret the payload data. Common values include
@@ -1824,21 +2011,22 @@ module Aws::BedrockAgentCore
1824
2011
  # @return [String]
1825
2012
  #
1826
2013
  # @!attribute [rw] agent_runtime_arn
1827
- # The Amazon Web Services Resource Name (ARN) of the agent runtime to
1828
- # invoke. The ARN uniquely identifies the agent runtime resource in
1829
- # Amazon Bedrock AgentCore.
2014
+ # The identifier of the agent runtime to invoke. You can specify
2015
+ # either the full Amazon Web Services Resource Name (ARN) or the agent
2016
+ # ID. If you use the agent ID, you must also provide the `accountId`
2017
+ # query parameter.
1830
2018
  # @return [String]
1831
2019
  #
1832
2020
  # @!attribute [rw] qualifier
1833
- # The qualifier to use for the agent runtime. This can be a version
1834
- # number or an endpoint name that points to a specific version. If not
1835
- # specified, Amazon Bedrock AgentCore uses the default version of the
1836
- # agent runtime.
2021
+ # The qualifier to use for the agent runtime. This is an endpoint name
2022
+ # that points to a specific version. If not specified, Amazon Bedrock
2023
+ # AgentCore uses the default endpoint of the agent runtime.
1837
2024
  # @return [String]
1838
2025
  #
1839
2026
  # @!attribute [rw] account_id
1840
2027
  # The identifier of the Amazon Web Services account for the agent
1841
- # runtime resource.
2028
+ # runtime resource. This parameter is required when you specify an
2029
+ # agent ID instead of the full ARN for `agentRuntimeArn`.
1842
2030
  # @return [String]
1843
2031
  #
1844
2032
  # @!attribute [rw] payload
@@ -2915,6 +3103,32 @@ module Aws::BedrockAgentCore
2915
3103
  include Aws::Structure
2916
3104
  end
2917
3105
 
3106
+ # Response chunk containing exactly one of: contentStart, contentDelta,
3107
+ # or contentStop
3108
+ #
3109
+ # @!attribute [rw] content_start
3110
+ # First chunk - indicates command execution has started
3111
+ # @return [Types::ContentStartEvent]
3112
+ #
3113
+ # @!attribute [rw] content_delta
3114
+ # Middle chunks - stdout/stderr output
3115
+ # @return [Types::ContentDeltaEvent]
3116
+ #
3117
+ # @!attribute [rw] content_stop
3118
+ # Last chunk - indicates command execution has completed
3119
+ # @return [Types::ContentStopEvent]
3120
+ #
3121
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/ResponseChunk AWS API Documentation
3122
+ #
3123
+ class ResponseChunk < Struct.new(
3124
+ :content_start,
3125
+ :content_delta,
3126
+ :content_stop,
3127
+ :event_type)
3128
+ SENSITIVE = []
3129
+ include Aws::Structure
3130
+ end
3131
+
2918
3132
  # @!attribute [rw] memory_id
2919
3133
  # The identifier of the AgentCore Memory resource from which to
2920
3134
  # retrieve memory records.
@@ -3022,7 +3236,8 @@ module Aws::BedrockAgentCore
3022
3236
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/RuntimeClientError AWS API Documentation
3023
3237
  #
3024
3238
  class RuntimeClientError < Struct.new(
3025
- :message)
3239
+ :message,
3240
+ :event_type)
3026
3241
  SENSITIVE = []
3027
3242
  include Aws::Structure
3028
3243
  end
@@ -3269,10 +3484,10 @@ module Aws::BedrockAgentCore
3269
3484
  # @return [String]
3270
3485
  #
3271
3486
  # @!attribute [rw] session_timeout_seconds
3272
- # The time in seconds after which the session automatically terminates
3273
- # if there is no activity. The default value is 3600 seconds (1 hour).
3274
- # The minimum allowed value is 60 seconds, and the maximum allowed
3275
- # value is 28800 seconds (8 hours).
3487
+ # The duration in seconds (time-to-live) after which the session
3488
+ # automatically terminates, regardless of ongoing activity. Defaults
3489
+ # to 3600 seconds (1 hour). Recommended minimum: 60 seconds. Maximum
3490
+ # allowed: 28,800 seconds (8 hours).
3276
3491
  # @return [Integer]
3277
3492
  #
3278
3493
  # @!attribute [rw] view_port
@@ -3380,10 +3595,10 @@ module Aws::BedrockAgentCore
3380
3595
  # @return [String]
3381
3596
  #
3382
3597
  # @!attribute [rw] session_timeout_seconds
3383
- # The time in seconds after which the session automatically terminates
3384
- # if there is no activity. The default value is 900 seconds (15
3385
- # minutes). The minimum allowed value is 60 seconds, and the maximum
3386
- # allowed value is 28800 seconds (8 hours).
3598
+ # The duration in seconds (time-to-live) after which the session
3599
+ # automatically terminates, regardless of ongoing activity. Defaults
3600
+ # to 900 seconds (15 minutes). Recommended minimum: 60 seconds.
3601
+ # Maximum allowed: 28,800 seconds (8 hours).
3387
3602
  # @return [Integer]
3388
3603
  #
3389
3604
  # @!attribute [rw] client_token
@@ -3914,7 +4129,8 @@ module Aws::BedrockAgentCore
3914
4129
  # @note UserIdentifier is a union - when making an API calls you must set exactly one of the members.
3915
4130
  #
3916
4131
  # @!attribute [rw] user_token
3917
- # The OAuth2.0 token issued by the user’s identity provider
4132
+ # The OAuth2.0 token issued by the user’s identity provider that was
4133
+ # used to generate the workload access token
3918
4134
  # @return [String]
3919
4135
  #
3920
4136
  # @!attribute [rw] user_id
@@ -4033,6 +4249,32 @@ module Aws::BedrockAgentCore
4033
4249
 
4034
4250
  end
4035
4251
 
4252
+ # Streaming output for InvokeAgentRuntimeCommand operation Delivers
4253
+ # typed events: contentStart (first), contentDelta (middle), contentStop
4254
+ # (last)
4255
+ #
4256
+ # EventStream is an Enumerator of Events.
4257
+ # #event_types #=> Array, returns all modeled event types in the stream
4258
+ #
4259
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/InvokeAgentRuntimeCommandStreamOutput AWS API Documentation
4260
+ #
4261
+ class InvokeAgentRuntimeCommandStreamOutput < Enumerator
4262
+
4263
+ def event_types
4264
+ [
4265
+ :chunk,
4266
+ :access_denied_exception,
4267
+ :internal_server_exception,
4268
+ :resource_not_found_exception,
4269
+ :service_quota_exceeded_exception,
4270
+ :throttling_exception,
4271
+ :validation_exception,
4272
+ :runtime_client_error
4273
+ ]
4274
+ end
4275
+
4276
+ end
4277
+
4036
4278
  end
4037
4279
  end
4038
4280
 
@@ -56,7 +56,7 @@ module Aws::BedrockAgentCore
56
56
  autoload :Endpoints, 'aws-sdk-bedrockagentcore/endpoints'
57
57
  autoload :EventStreams, 'aws-sdk-bedrockagentcore/event_streams'
58
58
 
59
- GEM_VERSION = '1.19.0'
59
+ GEM_VERSION = '1.20.0'
60
60
 
61
61
  end
62
62
 
data/sig/client.rbs CHANGED
@@ -405,6 +405,36 @@ module Aws
405
405
  ) ?{ (*untyped) -> void } -> _InvokeAgentRuntimeResponseSuccess
406
406
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeAgentRuntimeResponseSuccess
407
407
 
408
+ interface _InvokeAgentRuntimeCommandResponseSuccess
409
+ include ::Seahorse::Client::_ResponseSuccess[Types::InvokeAgentRuntimeCommandResponse]
410
+ def runtime_session_id: () -> ::String
411
+ def trace_id: () -> ::String
412
+ def trace_parent: () -> ::String
413
+ def trace_state: () -> ::String
414
+ def baggage: () -> ::String
415
+ def content_type: () -> ::String
416
+ def status_code: () -> ::Integer
417
+ def stream: () -> Types::InvokeAgentRuntimeCommandStreamOutput
418
+ end
419
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentCore/Client.html#invoke_agent_runtime_command-instance_method
420
+ def invoke_agent_runtime_command: (
421
+ ?content_type: ::String,
422
+ ?accept: ::String,
423
+ ?runtime_session_id: ::String,
424
+ ?trace_id: ::String,
425
+ ?trace_parent: ::String,
426
+ ?trace_state: ::String,
427
+ ?baggage: ::String,
428
+ agent_runtime_arn: ::String,
429
+ ?qualifier: ::String,
430
+ ?account_id: ::String,
431
+ body: {
432
+ command: ::String,
433
+ timeout: ::Integer?
434
+ }
435
+ ) ?{ (*untyped) -> void } -> _InvokeAgentRuntimeCommandResponseSuccess
436
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeAgentRuntimeCommandResponseSuccess
437
+
408
438
  interface _InvokeCodeInterpreterResponseSuccess
409
439
  include ::Seahorse::Client::_ResponseSuccess[Types::InvokeCodeInterpreterResponse]
410
440
  def session_id: () -> ::String
data/sig/types.rbs CHANGED
@@ -167,6 +167,21 @@ module Aws::BedrockAgentCore
167
167
  SENSITIVE: []
168
168
  end
169
169
 
170
+ class ContentDeltaEvent
171
+ attr_accessor stdout: ::String
172
+ attr_accessor stderr: ::String
173
+ SENSITIVE: []
174
+ end
175
+
176
+ class ContentStartEvent < Aws::EmptyStructure
177
+ end
178
+
179
+ class ContentStopEvent
180
+ attr_accessor exit_code: ::Integer
181
+ attr_accessor status: ("COMPLETED" | "TIMED_OUT")
182
+ SENSITIVE: []
183
+ end
184
+
170
185
  class Context
171
186
  attr_accessor span_context: Types::SpanContext
172
187
  attr_accessor unknown: untyped
@@ -508,6 +523,39 @@ module Aws::BedrockAgentCore
508
523
  SENSITIVE: []
509
524
  end
510
525
 
526
+ class InvokeAgentRuntimeCommandRequest
527
+ attr_accessor content_type: ::String
528
+ attr_accessor accept: ::String
529
+ attr_accessor runtime_session_id: ::String
530
+ attr_accessor trace_id: ::String
531
+ attr_accessor trace_parent: ::String
532
+ attr_accessor trace_state: ::String
533
+ attr_accessor baggage: ::String
534
+ attr_accessor agent_runtime_arn: ::String
535
+ attr_accessor qualifier: ::String
536
+ attr_accessor account_id: ::String
537
+ attr_accessor body: Types::InvokeAgentRuntimeCommandRequestBody
538
+ SENSITIVE: []
539
+ end
540
+
541
+ class InvokeAgentRuntimeCommandRequestBody
542
+ attr_accessor command: ::String
543
+ attr_accessor timeout: ::Integer
544
+ SENSITIVE: []
545
+ end
546
+
547
+ class InvokeAgentRuntimeCommandResponse
548
+ attr_accessor runtime_session_id: ::String
549
+ attr_accessor trace_id: ::String
550
+ attr_accessor trace_parent: ::String
551
+ attr_accessor trace_state: ::String
552
+ attr_accessor baggage: ::String
553
+ attr_accessor content_type: ::String
554
+ attr_accessor status_code: ::Integer
555
+ attr_accessor stream: Types::InvokeAgentRuntimeCommandStreamOutput
556
+ SENSITIVE: []
557
+ end
558
+
511
559
  class InvokeAgentRuntimeRequest
512
560
  attr_accessor content_type: ::String
513
561
  attr_accessor accept: ::String
@@ -834,6 +882,14 @@ module Aws::BedrockAgentCore
834
882
  SENSITIVE: []
835
883
  end
836
884
 
885
+ class ResponseChunk
886
+ attr_accessor content_start: Types::ContentStartEvent
887
+ attr_accessor content_delta: Types::ContentDeltaEvent
888
+ attr_accessor content_stop: Types::ContentStopEvent
889
+ attr_accessor event_type: untyped
890
+ SENSITIVE: []
891
+ end
892
+
837
893
  class RetrieveMemoryRecordsInput
838
894
  attr_accessor memory_id: ::String
839
895
  attr_accessor namespace: ::String
@@ -867,6 +923,7 @@ module Aws::BedrockAgentCore
867
923
 
868
924
  class RuntimeClientError
869
925
  attr_accessor message: ::String
926
+ attr_accessor event_type: untyped
870
927
  SENSITIVE: []
871
928
  end
872
929
 
@@ -1135,5 +1192,9 @@ module Aws::BedrockAgentCore
1135
1192
  class CodeInterpreterStreamOutput < Enumerator[untyped, untyped]
1136
1193
  def event_types: () -> [:result, :access_denied_exception, :conflict_exception, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :validation_exception]
1137
1194
  end
1195
+
1196
+ class InvokeAgentRuntimeCommandStreamOutput < Enumerator[untyped, untyped]
1197
+ def event_types: () -> [:chunk, :access_denied_exception, :internal_server_exception, :resource_not_found_exception, :service_quota_exceeded_exception, :throttling_exception, :validation_exception, :runtime_client_error]
1198
+ end
1138
1199
  end
1139
1200
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-bedrockagentcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services