aws-sdk-bedrockagentcore 1.7.0 → 1.8.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: 83c5ec56ae941fc1cd2bfed4a901b2e66b9aac7ab73f4997d179874635f339ba
4
- data.tar.gz: 5af4ae4d3c69cf6d96f14dd45186f5dfa08ebb6e847c00129fcf8d4cd1789271
3
+ metadata.gz: d6ccfa5ad928167e4be77b34b09bef4a604983d41996813928b8921ebcb95264
4
+ data.tar.gz: 2fbefce2f227120bae4e11501b3c20a46e735ae7a0da89f5c0c5ed180228beb7
5
5
  SHA512:
6
- metadata.gz: 14ae88b3431febcf7802a8502c700af4319ac53f6f81f88293a5d38d58c036fb8d1969227c22a7b71605b66421aa74d3db947fb1258a074707898f3c4d4410d1
7
- data.tar.gz: ef5e8434872c1ad9fefb7007e45b4736d43a7793aa04e0d3ec263ffb5180c1cf008929659b16b4a03fcab599f29a049800372fe6d95c7254c4947540bac9259a
6
+ metadata.gz: ac8b3510e6ae2886902b6e5e2870e69cd17702ebd5de6bd0e1b5d1848ba004586977643f8b090e9bb2aa28c7cd58490603a12aec05a7646b7abc371c6699eebd
7
+ data.tar.gz: e54c8869495942c4b331944dca6d5efad08a87365efb6a72c384ff320f1cd8ba4f416d59a02cec4afc86c5a0cbd2c1bb944ff0c2fd45496aeeea7ee27697f452
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.8.0 (2025-10-13)
5
+ ------------------
6
+
7
+ * Feature - Updated InvokeAgentRuntime API to accept account id optionally and added CompleteResourceTokenAuth API.
8
+
4
9
  1.7.0 (2025-10-10)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.7.0
1
+ 1.8.0
@@ -657,6 +657,41 @@ module Aws::BedrockAgentCore
657
657
  req.send_request(options)
658
658
  end
659
659
 
660
+ # Confirms the user authentication session for obtaining OAuth2.0 tokens
661
+ # for a resource.
662
+ #
663
+ # @option params [required, Types::UserIdentifier] :user_identifier
664
+ # The OAuth2.0 token or user ID that was used to generate the workload
665
+ # access token used for initiating the user authorization flow to
666
+ # retrieve OAuth2.0 tokens.
667
+ #
668
+ # @option params [required, String] :session_uri
669
+ # Unique identifier for the user's authentication session for
670
+ # retrieving OAuth2 tokens. This ID tracks the authorization flow state
671
+ # across multiple requests and responses during the OAuth2
672
+ # authentication process.
673
+ #
674
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
675
+ #
676
+ # @example Request syntax with placeholder values
677
+ #
678
+ # resp = client.complete_resource_token_auth({
679
+ # user_identifier: { # required
680
+ # user_token: "UserTokenType",
681
+ # user_id: "UserIdType",
682
+ # },
683
+ # session_uri: "RequestUri", # required
684
+ # })
685
+ #
686
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/CompleteResourceTokenAuth AWS API Documentation
687
+ #
688
+ # @overload complete_resource_token_auth(params = {})
689
+ # @param [Hash] params ({})
690
+ def complete_resource_token_auth(params = {}, options = {})
691
+ req = build_request(:complete_resource_token_auth, params)
692
+ req.send_request(options)
693
+ end
694
+
660
695
  # Creates an event in an AgentCore Memory resource. Events represent
661
696
  # interactions or activities that occur within a session and are
662
697
  # associated with specific actors.
@@ -1170,6 +1205,12 @@ module Aws::BedrockAgentCore
1170
1205
  # @option params [required, String] :oauth2_flow
1171
1206
  # The type of flow to be performed.
1172
1207
  #
1208
+ # @option params [String] :session_uri
1209
+ # Unique identifier for the user's authentication session for
1210
+ # retrieving OAuth2 tokens. This ID tracks the authorization flow state
1211
+ # across multiple requests and responses during the OAuth2
1212
+ # authentication process.
1213
+ #
1173
1214
  # @option params [String] :resource_oauth_2_return_url
1174
1215
  # The callback URL to redirect to after the OAuth 2.0 token retrieval is
1175
1216
  # complete. This URL must be one of the provided URLs configured for the
@@ -1184,10 +1225,18 @@ module Aws::BedrockAgentCore
1184
1225
  # the resource credential provider. These parameters are in addition to
1185
1226
  # the standard OAuth 2.0 flow parameters, and will not override them.
1186
1227
  #
1228
+ # @option params [String] :custom_state
1229
+ # An opaque string that will be sent back to the callback URL provided
1230
+ # in resourceOauth2ReturnUrl. This state should be used to protect the
1231
+ # callback URL of your application against CSRF attacks by ensuring the
1232
+ # response corresponds to the original request.
1233
+ #
1187
1234
  # @return [Types::GetResourceOauth2TokenResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1188
1235
  #
1189
1236
  # * {Types::GetResourceOauth2TokenResponse#authorization_url #authorization_url} => String
1190
1237
  # * {Types::GetResourceOauth2TokenResponse#access_token #access_token} => String
1238
+ # * {Types::GetResourceOauth2TokenResponse#session_uri #session_uri} => String
1239
+ # * {Types::GetResourceOauth2TokenResponse#session_status #session_status} => String
1191
1240
  #
1192
1241
  # @example Request syntax with placeholder values
1193
1242
  #
@@ -1196,17 +1245,21 @@ module Aws::BedrockAgentCore
1196
1245
  # resource_credential_provider_name: "CredentialProviderName", # required
1197
1246
  # scopes: ["ScopeType"], # required
1198
1247
  # oauth2_flow: "USER_FEDERATION", # required, accepts USER_FEDERATION, M2M
1248
+ # session_uri: "RequestUri",
1199
1249
  # resource_oauth_2_return_url: "ResourceOauth2ReturnUrlType",
1200
1250
  # force_authentication: false,
1201
1251
  # custom_parameters: {
1202
1252
  # "CustomRequestKeyType" => "CustomRequestValueType",
1203
1253
  # },
1254
+ # custom_state: "State",
1204
1255
  # })
1205
1256
  #
1206
1257
  # @example Response structure
1207
1258
  #
1208
1259
  # resp.authorization_url #=> String
1209
1260
  # resp.access_token #=> String
1261
+ # resp.session_uri #=> String
1262
+ # resp.session_status #=> String, one of "IN_PROGRESS", "FAILED"
1210
1263
  #
1211
1264
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetResourceOauth2Token AWS API Documentation
1212
1265
  #
@@ -1392,6 +1445,10 @@ module Aws::BedrockAgentCore
1392
1445
  # specified, Amazon Bedrock uses the default version of the agent
1393
1446
  # runtime.
1394
1447
  #
1448
+ # @option params [String] :account_id
1449
+ # The identifier of the Amazon Web Services account for the agent
1450
+ # runtime resource.
1451
+ #
1395
1452
  # @option params [required, String, StringIO, File] :payload
1396
1453
  # The input data to send to the agent runtime. The format of this data
1397
1454
  # depends on the specific agent configuration and must match the
@@ -1426,6 +1483,7 @@ module Aws::BedrockAgentCore
1426
1483
  # baggage: "InvokeAgentRuntimeRequestBaggageString",
1427
1484
  # agent_runtime_arn: "String", # required
1428
1485
  # qualifier: "String",
1486
+ # account_id: "InvokeAgentRuntimeRequestAccountIdString",
1429
1487
  # payload: "data", # required
1430
1488
  # })
1431
1489
  #
@@ -2724,7 +2782,7 @@ module Aws::BedrockAgentCore
2724
2782
  tracer: tracer
2725
2783
  )
2726
2784
  context[:gem_name] = 'aws-sdk-bedrockagentcore'
2727
- context[:gem_version] = '1.7.0'
2785
+ context[:gem_version] = '1.8.0'
2728
2786
  Seahorse::Client::Request.new(handlers, context)
2729
2787
  end
2730
2788
 
@@ -21,6 +21,7 @@ module Aws::BedrockAgentCore
21
21
  ActorSummaryList = Shapes::ListShape.new(name: 'ActorSummaryList')
22
22
  AgentCard = Shapes::DocumentShape.new(name: 'AgentCard', document: true)
23
23
  ApiKeyType = Shapes::StringShape.new(name: 'ApiKeyType')
24
+ AuthorizationUrlType = Shapes::StringShape.new(name: 'AuthorizationUrlType')
24
25
  AutomationStream = Shapes::StructureShape.new(name: 'AutomationStream')
25
26
  AutomationStreamStatus = Shapes::StringShape.new(name: 'AutomationStreamStatus')
26
27
  AutomationStreamUpdate = Shapes::StructureShape.new(name: 'AutomationStreamUpdate')
@@ -51,6 +52,8 @@ module Aws::BedrockAgentCore
51
52
  CodeInterpreterSessionSummary = Shapes::StructureShape.new(name: 'CodeInterpreterSessionSummary')
52
53
  CodeInterpreterSessionTimeout = Shapes::IntegerShape.new(name: 'CodeInterpreterSessionTimeout')
53
54
  CodeInterpreterStreamOutput = Shapes::StructureShape.new(name: 'CodeInterpreterStreamOutput')
55
+ CompleteResourceTokenAuthRequest = Shapes::StructureShape.new(name: 'CompleteResourceTokenAuthRequest')
56
+ CompleteResourceTokenAuthResponse = Shapes::StructureShape.new(name: 'CompleteResourceTokenAuthResponse')
54
57
  ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
55
58
  Content = Shapes::UnionShape.new(name: 'Content')
56
59
  ContentBlock = Shapes::StructureShape.new(name: 'ContentBlock')
@@ -104,6 +107,7 @@ module Aws::BedrockAgentCore
104
107
  InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
105
108
  InvalidInputException = Shapes::StructureShape.new(name: 'InvalidInputException')
106
109
  InvokeAgentRuntimeRequest = Shapes::StructureShape.new(name: 'InvokeAgentRuntimeRequest')
110
+ InvokeAgentRuntimeRequestAccountIdString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeRequestAccountIdString')
107
111
  InvokeAgentRuntimeRequestBaggageString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeRequestBaggageString')
108
112
  InvokeAgentRuntimeRequestTraceIdString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeRequestTraceIdString')
109
113
  InvokeAgentRuntimeRequestTraceParentString = Shapes::StringShape.new(name: 'InvokeAgentRuntimeRequestTraceParentString')
@@ -164,6 +168,7 @@ module Aws::BedrockAgentCore
164
168
  PayloadTypeList = Shapes::ListShape.new(name: 'PayloadTypeList')
165
169
  ProgrammingLanguage = Shapes::StringShape.new(name: 'ProgrammingLanguage')
166
170
  RequestIdentifier = Shapes::StringShape.new(name: 'RequestIdentifier')
171
+ RequestUri = Shapes::StringShape.new(name: 'RequestUri')
167
172
  ResourceContent = Shapes::StructureShape.new(name: 'ResourceContent')
168
173
  ResourceContentType = Shapes::StringShape.new(name: 'ResourceContentType')
169
174
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
@@ -182,6 +187,7 @@ module Aws::BedrockAgentCore
182
187
  ServiceException = Shapes::StructureShape.new(name: 'ServiceException')
183
188
  ServiceQuotaExceededException = Shapes::StructureShape.new(name: 'ServiceQuotaExceededException')
184
189
  SessionId = Shapes::StringShape.new(name: 'SessionId')
190
+ SessionStatus = Shapes::StringShape.new(name: 'SessionStatus')
185
191
  SessionSummary = Shapes::StructureShape.new(name: 'SessionSummary')
186
192
  SessionSummaryList = Shapes::ListShape.new(name: 'SessionSummaryList')
187
193
  SessionType = Shapes::StringShape.new(name: 'SessionType')
@@ -193,6 +199,7 @@ module Aws::BedrockAgentCore
193
199
  StartCodeInterpreterSessionRequestTraceIdString = Shapes::StringShape.new(name: 'StartCodeInterpreterSessionRequestTraceIdString')
194
200
  StartCodeInterpreterSessionRequestTraceParentString = Shapes::StringShape.new(name: 'StartCodeInterpreterSessionRequestTraceParentString')
195
201
  StartCodeInterpreterSessionResponse = Shapes::StructureShape.new(name: 'StartCodeInterpreterSessionResponse')
202
+ State = Shapes::StringShape.new(name: 'State')
196
203
  StopBrowserSessionRequest = Shapes::StructureShape.new(name: 'StopBrowserSessionRequest')
197
204
  StopBrowserSessionRequestTraceIdString = Shapes::StringShape.new(name: 'StopBrowserSessionRequestTraceIdString')
198
205
  StopBrowserSessionRequestTraceParentString = Shapes::StringShape.new(name: 'StopBrowserSessionRequestTraceParentString')
@@ -218,6 +225,7 @@ module Aws::BedrockAgentCore
218
225
  UpdateBrowserStreamRequest = Shapes::StructureShape.new(name: 'UpdateBrowserStreamRequest')
219
226
  UpdateBrowserStreamResponse = Shapes::StructureShape.new(name: 'UpdateBrowserStreamResponse')
220
227
  UserIdType = Shapes::StringShape.new(name: 'UserIdType')
228
+ UserIdentifier = Shapes::UnionShape.new(name: 'UserIdentifier')
221
229
  UserTokenType = Shapes::StringShape.new(name: 'UserTokenType')
222
230
  ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
223
231
  ValidationExceptionField = Shapes::StructureShape.new(name: 'ValidationExceptionField')
@@ -316,6 +324,12 @@ module Aws::BedrockAgentCore
316
324
  CodeInterpreterStreamOutput.add_member(:validation_exception, Shapes::ShapeRef.new(shape: ValidationException, location_name: "validationException"))
317
325
  CodeInterpreterStreamOutput.struct_class = Types::CodeInterpreterStreamOutput
318
326
 
327
+ CompleteResourceTokenAuthRequest.add_member(:user_identifier, Shapes::ShapeRef.new(shape: UserIdentifier, required: true, location_name: "userIdentifier"))
328
+ CompleteResourceTokenAuthRequest.add_member(:session_uri, Shapes::ShapeRef.new(shape: RequestUri, required: true, location_name: "sessionUri"))
329
+ CompleteResourceTokenAuthRequest.struct_class = Types::CompleteResourceTokenAuthRequest
330
+
331
+ CompleteResourceTokenAuthResponse.struct_class = Types::CompleteResourceTokenAuthResponse
332
+
319
333
  ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
320
334
  ConflictException.struct_class = Types::ConflictException
321
335
 
@@ -464,13 +478,17 @@ module Aws::BedrockAgentCore
464
478
  GetResourceOauth2TokenRequest.add_member(:resource_credential_provider_name, Shapes::ShapeRef.new(shape: CredentialProviderName, required: true, location_name: "resourceCredentialProviderName"))
465
479
  GetResourceOauth2TokenRequest.add_member(:scopes, Shapes::ShapeRef.new(shape: ScopesListType, required: true, location_name: "scopes"))
466
480
  GetResourceOauth2TokenRequest.add_member(:oauth2_flow, Shapes::ShapeRef.new(shape: Oauth2FlowType, required: true, location_name: "oauth2Flow"))
481
+ GetResourceOauth2TokenRequest.add_member(:session_uri, Shapes::ShapeRef.new(shape: RequestUri, location_name: "sessionUri"))
467
482
  GetResourceOauth2TokenRequest.add_member(:resource_oauth_2_return_url, Shapes::ShapeRef.new(shape: ResourceOauth2ReturnUrlType, location_name: "resourceOauth2ReturnUrl"))
468
483
  GetResourceOauth2TokenRequest.add_member(:force_authentication, Shapes::ShapeRef.new(shape: Boolean, location_name: "forceAuthentication"))
469
484
  GetResourceOauth2TokenRequest.add_member(:custom_parameters, Shapes::ShapeRef.new(shape: CustomRequestParametersType, location_name: "customParameters"))
485
+ GetResourceOauth2TokenRequest.add_member(:custom_state, Shapes::ShapeRef.new(shape: State, location_name: "customState"))
470
486
  GetResourceOauth2TokenRequest.struct_class = Types::GetResourceOauth2TokenRequest
471
487
 
472
- GetResourceOauth2TokenResponse.add_member(:authorization_url, Shapes::ShapeRef.new(shape: String, location_name: "authorizationUrl"))
488
+ GetResourceOauth2TokenResponse.add_member(:authorization_url, Shapes::ShapeRef.new(shape: AuthorizationUrlType, location_name: "authorizationUrl"))
473
489
  GetResourceOauth2TokenResponse.add_member(:access_token, Shapes::ShapeRef.new(shape: AccessTokenType, location_name: "accessToken"))
490
+ GetResourceOauth2TokenResponse.add_member(:session_uri, Shapes::ShapeRef.new(shape: RequestUri, location_name: "sessionUri"))
491
+ GetResourceOauth2TokenResponse.add_member(:session_status, Shapes::ShapeRef.new(shape: SessionStatus, location_name: "sessionStatus"))
474
492
  GetResourceOauth2TokenResponse.struct_class = Types::GetResourceOauth2TokenResponse
475
493
 
476
494
  GetWorkloadAccessTokenForJWTRequest.add_member(:workload_name, Shapes::ShapeRef.new(shape: WorkloadIdentityNameType, required: true, location_name: "workloadName"))
@@ -518,6 +536,7 @@ module Aws::BedrockAgentCore
518
536
  InvokeAgentRuntimeRequest.add_member(:baggage, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeRequestBaggageString, location: "header", location_name: "baggage"))
519
537
  InvokeAgentRuntimeRequest.add_member(:agent_runtime_arn, Shapes::ShapeRef.new(shape: String, required: true, location: "uri", location_name: "agentRuntimeArn"))
520
538
  InvokeAgentRuntimeRequest.add_member(:qualifier, Shapes::ShapeRef.new(shape: String, location: "querystring", location_name: "qualifier"))
539
+ InvokeAgentRuntimeRequest.add_member(:account_id, Shapes::ShapeRef.new(shape: InvokeAgentRuntimeRequestAccountIdString, location: "querystring", location_name: "accountId"))
521
540
  InvokeAgentRuntimeRequest.add_member(:payload, Shapes::ShapeRef.new(shape: Body, required: true, location_name: "payload"))
522
541
  InvokeAgentRuntimeRequest.struct_class = Types::InvokeAgentRuntimeRequest
523
542
  InvokeAgentRuntimeRequest[:payload] = :payload
@@ -859,6 +878,14 @@ module Aws::BedrockAgentCore
859
878
  UpdateBrowserStreamResponse.add_member(:updated_at, Shapes::ShapeRef.new(shape: DateTimestamp, required: true, location_name: "updatedAt"))
860
879
  UpdateBrowserStreamResponse.struct_class = Types::UpdateBrowserStreamResponse
861
880
 
881
+ UserIdentifier.add_member(:user_token, Shapes::ShapeRef.new(shape: UserTokenType, location_name: "userToken"))
882
+ UserIdentifier.add_member(:user_id, Shapes::ShapeRef.new(shape: UserIdType, location_name: "userId"))
883
+ UserIdentifier.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
884
+ UserIdentifier.add_member_subclass(:user_token, Types::UserIdentifier::UserToken)
885
+ UserIdentifier.add_member_subclass(:user_id, Types::UserIdentifier::UserId)
886
+ UserIdentifier.add_member_subclass(:unknown, Types::UserIdentifier::Unknown)
887
+ UserIdentifier.struct_class = Types::UserIdentifier
888
+
862
889
  ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
863
890
  ValidationException.add_member(:reason, Shapes::ShapeRef.new(shape: ValidationExceptionReason, required: true, location_name: "reason"))
864
891
  ValidationException.add_member(:field_list, Shapes::ShapeRef.new(shape: ValidationExceptionFieldList, location_name: "fieldList"))
@@ -935,6 +962,20 @@ module Aws::BedrockAgentCore
935
962
  o.errors << Shapes::ShapeRef.new(shape: ServiceException)
936
963
  end)
937
964
 
965
+ api.add_operation(:complete_resource_token_auth, Seahorse::Model::Operation.new.tap do |o|
966
+ o.name = "CompleteResourceTokenAuth"
967
+ o.http_method = "POST"
968
+ o.http_request_uri = "/identities/CompleteResourceTokenAuth"
969
+ o.input = Shapes::ShapeRef.new(shape: CompleteResourceTokenAuthRequest)
970
+ o.output = Shapes::ShapeRef.new(shape: CompleteResourceTokenAuthResponse)
971
+ o.errors << Shapes::ShapeRef.new(shape: UnauthorizedException)
972
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
973
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
974
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
975
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
976
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
977
+ end)
978
+
938
979
  api.add_operation(:create_event, Seahorse::Model::Operation.new.tap do |o|
939
980
  o.name = "CreateEvent"
940
981
  o.http_method = "POST"
@@ -404,6 +404,32 @@ module Aws::BedrockAgentCore
404
404
  include Aws::Structure
405
405
  end
406
406
 
407
+ # @!attribute [rw] user_identifier
408
+ # The OAuth2.0 token or user ID that was used to generate the workload
409
+ # access token used for initiating the user authorization flow to
410
+ # retrieve OAuth2.0 tokens.
411
+ # @return [Types::UserIdentifier]
412
+ #
413
+ # @!attribute [rw] session_uri
414
+ # Unique identifier for the user's authentication session for
415
+ # retrieving OAuth2 tokens. This ID tracks the authorization flow
416
+ # state across multiple requests and responses during the OAuth2
417
+ # authentication process.
418
+ # @return [String]
419
+ #
420
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/CompleteResourceTokenAuthRequest AWS API Documentation
421
+ #
422
+ class CompleteResourceTokenAuthRequest < Struct.new(
423
+ :user_identifier,
424
+ :session_uri)
425
+ SENSITIVE = []
426
+ include Aws::Structure
427
+ end
428
+
429
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/CompleteResourceTokenAuthResponse AWS API Documentation
430
+ #
431
+ class CompleteResourceTokenAuthResponse < Aws::EmptyStructure; end
432
+
407
433
  # The exception that occurs when the request conflicts with the current
408
434
  # state of the resource. This can happen when trying to modify a
409
435
  # resource that is currently being modified by another request, or when
@@ -1058,6 +1084,13 @@ module Aws::BedrockAgentCore
1058
1084
  # The type of flow to be performed.
1059
1085
  # @return [String]
1060
1086
  #
1087
+ # @!attribute [rw] session_uri
1088
+ # Unique identifier for the user's authentication session for
1089
+ # retrieving OAuth2 tokens. This ID tracks the authorization flow
1090
+ # state across multiple requests and responses during the OAuth2
1091
+ # authentication process.
1092
+ # @return [String]
1093
+ #
1061
1094
  # @!attribute [rw] resource_oauth_2_return_url
1062
1095
  # The callback URL to redirect to after the OAuth 2.0 token retrieval
1063
1096
  # is complete. This URL must be one of the provided URLs configured
@@ -1076,6 +1109,13 @@ module Aws::BedrockAgentCore
1076
1109
  # override them.
1077
1110
  # @return [Hash<String,String>]
1078
1111
  #
1112
+ # @!attribute [rw] custom_state
1113
+ # An opaque string that will be sent back to the callback URL provided
1114
+ # in resourceOauth2ReturnUrl. This state should be used to protect the
1115
+ # callback URL of your application against CSRF attacks by ensuring
1116
+ # the response corresponds to the original request.
1117
+ # @return [String]
1118
+ #
1079
1119
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetResourceOauth2TokenRequest AWS API Documentation
1080
1120
  #
1081
1121
  class GetResourceOauth2TokenRequest < Struct.new(
@@ -1083,10 +1123,12 @@ module Aws::BedrockAgentCore
1083
1123
  :resource_credential_provider_name,
1084
1124
  :scopes,
1085
1125
  :oauth2_flow,
1126
+ :session_uri,
1086
1127
  :resource_oauth_2_return_url,
1087
1128
  :force_authentication,
1088
- :custom_parameters)
1089
- SENSITIVE = [:workload_identity_token, :custom_parameters]
1129
+ :custom_parameters,
1130
+ :custom_state)
1131
+ SENSITIVE = [:workload_identity_token, :custom_parameters, :custom_state]
1090
1132
  include Aws::Structure
1091
1133
  end
1092
1134
 
@@ -1099,12 +1141,26 @@ module Aws::BedrockAgentCore
1099
1141
  # The OAuth 2.0 access token to use.
1100
1142
  # @return [String]
1101
1143
  #
1144
+ # @!attribute [rw] session_uri
1145
+ # Unique identifier for the user's authorization session for
1146
+ # retrieving OAuth2 tokens. This matches the sessionId from the
1147
+ # request and can be used to track the session state.
1148
+ # @return [String]
1149
+ #
1150
+ # @!attribute [rw] session_status
1151
+ # Status indicating whether the user's authorization session is in
1152
+ # progress or has failed. This helps determine the next steps in the
1153
+ # OAuth2 authentication flow.
1154
+ # @return [String]
1155
+ #
1102
1156
  # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/GetResourceOauth2TokenResponse AWS API Documentation
1103
1157
  #
1104
1158
  class GetResourceOauth2TokenResponse < Struct.new(
1105
1159
  :authorization_url,
1106
- :access_token)
1107
- SENSITIVE = [:access_token]
1160
+ :access_token,
1161
+ :session_uri,
1162
+ :session_status)
1163
+ SENSITIVE = [:authorization_url, :access_token]
1108
1164
  include Aws::Structure
1109
1165
  end
1110
1166
 
@@ -1308,6 +1364,11 @@ module Aws::BedrockAgentCore
1308
1364
  # runtime.
1309
1365
  # @return [String]
1310
1366
  #
1367
+ # @!attribute [rw] account_id
1368
+ # The identifier of the Amazon Web Services account for the agent
1369
+ # runtime resource.
1370
+ # @return [String]
1371
+ #
1311
1372
  # @!attribute [rw] payload
1312
1373
  # The input data to send to the agent runtime. The format of this data
1313
1374
  # depends on the specific agent configuration and must match the
@@ -1330,6 +1391,7 @@ module Aws::BedrockAgentCore
1330
1391
  :baggage,
1331
1392
  :agent_runtime_arn,
1332
1393
  :qualifier,
1394
+ :account_id,
1333
1395
  :payload)
1334
1396
  SENSITIVE = [:payload]
1335
1397
  include Aws::Structure
@@ -2899,6 +2961,36 @@ module Aws::BedrockAgentCore
2899
2961
  include Aws::Structure
2900
2962
  end
2901
2963
 
2964
+ # The OAuth2.0 token or user ID that was used to generate the workload
2965
+ # access token used for initiating the user authorization flow to
2966
+ # retrieve OAuth2.0 tokens.
2967
+ #
2968
+ # @note UserIdentifier is a union - when making an API calls you must set exactly one of the members.
2969
+ #
2970
+ # @!attribute [rw] user_token
2971
+ # The OAuth2.0 token issued by the user’s identity provider
2972
+ # @return [String]
2973
+ #
2974
+ # @!attribute [rw] user_id
2975
+ # The ID of the user for whom you have retrieved a workload access
2976
+ # token for
2977
+ # @return [String]
2978
+ #
2979
+ # @see http://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-2024-02-28/UserIdentifier AWS API Documentation
2980
+ #
2981
+ class UserIdentifier < Struct.new(
2982
+ :user_token,
2983
+ :user_id,
2984
+ :unknown)
2985
+ SENSITIVE = [:user_token]
2986
+ include Aws::Structure
2987
+ include Aws::Structure::Union
2988
+
2989
+ class UserToken < UserIdentifier; end
2990
+ class UserId < UserIdentifier; end
2991
+ class Unknown < UserIdentifier; end
2992
+ end
2993
+
2902
2994
  # The exception that occurs when the input fails to satisfy the
2903
2995
  # constraints specified by the service. Check the error message for
2904
2996
  # details about which input parameter is invalid and correct your
@@ -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.7.0'
59
+ GEM_VERSION = '1.8.0'
60
60
 
61
61
  end
62
62
 
data/sig/client.rbs CHANGED
@@ -142,6 +142,19 @@ module Aws
142
142
  ) -> _BatchUpdateMemoryRecordsResponseSuccess
143
143
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _BatchUpdateMemoryRecordsResponseSuccess
144
144
 
145
+ interface _CompleteResourceTokenAuthResponseSuccess
146
+ include ::Seahorse::Client::_ResponseSuccess[Types::CompleteResourceTokenAuthResponse]
147
+ end
148
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentCore/Client.html#complete_resource_token_auth-instance_method
149
+ def complete_resource_token_auth: (
150
+ user_identifier: {
151
+ user_token: ::String?,
152
+ user_id: ::String?
153
+ },
154
+ session_uri: ::String
155
+ ) -> _CompleteResourceTokenAuthResponseSuccess
156
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _CompleteResourceTokenAuthResponseSuccess
157
+
145
158
  interface _CreateEventResponseSuccess
146
159
  include ::Seahorse::Client::_ResponseSuccess[Types::CreateEventOutput]
147
160
  def event: () -> Types::Event
@@ -288,6 +301,8 @@ module Aws
288
301
  include ::Seahorse::Client::_ResponseSuccess[Types::GetResourceOauth2TokenResponse]
289
302
  def authorization_url: () -> ::String
290
303
  def access_token: () -> ::String
304
+ def session_uri: () -> ::String
305
+ def session_status: () -> ("IN_PROGRESS" | "FAILED")
291
306
  end
292
307
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/BedrockAgentCore/Client.html#get_resource_oauth_2_token-instance_method
293
308
  def get_resource_oauth_2_token: (
@@ -295,9 +310,11 @@ module Aws
295
310
  resource_credential_provider_name: ::String,
296
311
  scopes: Array[::String],
297
312
  oauth2_flow: ("USER_FEDERATION" | "M2M"),
313
+ ?session_uri: ::String,
298
314
  ?resource_oauth_2_return_url: ::String,
299
315
  ?force_authentication: bool,
300
- ?custom_parameters: Hash[::String, ::String]
316
+ ?custom_parameters: Hash[::String, ::String],
317
+ ?custom_state: ::String
301
318
  ) -> _GetResourceOauth2TokenResponseSuccess
302
319
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetResourceOauth2TokenResponseSuccess
303
320
 
@@ -360,6 +377,7 @@ module Aws
360
377
  ?baggage: ::String,
361
378
  agent_runtime_arn: ::String,
362
379
  ?qualifier: ::String,
380
+ ?account_id: ::String,
363
381
  payload: ::String
364
382
  ) ?{ (*untyped) -> void } -> _InvokeAgentRuntimeResponseSuccess
365
383
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeAgentRuntimeResponseSuccess
data/sig/types.rbs CHANGED
@@ -113,6 +113,15 @@ module Aws::BedrockAgentCore
113
113
  SENSITIVE: []
114
114
  end
115
115
 
116
+ class CompleteResourceTokenAuthRequest
117
+ attr_accessor user_identifier: Types::UserIdentifier
118
+ attr_accessor session_uri: ::String
119
+ SENSITIVE: []
120
+ end
121
+
122
+ class CompleteResourceTokenAuthResponse < Aws::EmptyStructure
123
+ end
124
+
116
125
  class ConflictException
117
126
  attr_accessor message: ::String
118
127
  attr_accessor event_type: untyped
@@ -305,16 +314,20 @@ module Aws::BedrockAgentCore
305
314
  attr_accessor resource_credential_provider_name: ::String
306
315
  attr_accessor scopes: ::Array[::String]
307
316
  attr_accessor oauth2_flow: ("USER_FEDERATION" | "M2M")
317
+ attr_accessor session_uri: ::String
308
318
  attr_accessor resource_oauth_2_return_url: ::String
309
319
  attr_accessor force_authentication: bool
310
320
  attr_accessor custom_parameters: ::Hash[::String, ::String]
311
- SENSITIVE: [:workload_identity_token]
321
+ attr_accessor custom_state: ::String
322
+ SENSITIVE: [:workload_identity_token, :custom_state]
312
323
  end
313
324
 
314
325
  class GetResourceOauth2TokenResponse
315
326
  attr_accessor authorization_url: ::String
316
327
  attr_accessor access_token: ::String
317
- SENSITIVE: [:access_token]
328
+ attr_accessor session_uri: ::String
329
+ attr_accessor session_status: ("IN_PROGRESS" | "FAILED")
330
+ SENSITIVE: [:authorization_url, :access_token]
318
331
  end
319
332
 
320
333
  class GetWorkloadAccessTokenForJWTRequest
@@ -380,6 +393,7 @@ module Aws::BedrockAgentCore
380
393
  attr_accessor baggage: ::String
381
394
  attr_accessor agent_runtime_arn: ::String
382
395
  attr_accessor qualifier: ::String
396
+ attr_accessor account_id: ::String
383
397
  attr_accessor payload: ::String
384
398
  SENSITIVE: [:payload]
385
399
  end
@@ -823,6 +837,20 @@ module Aws::BedrockAgentCore
823
837
  SENSITIVE: []
824
838
  end
825
839
 
840
+ class UserIdentifier
841
+ attr_accessor user_token: ::String
842
+ attr_accessor user_id: ::String
843
+ attr_accessor unknown: untyped
844
+ SENSITIVE: [:user_token]
845
+
846
+ class UserToken < UserIdentifier
847
+ end
848
+ class UserId < UserIdentifier
849
+ end
850
+ class Unknown < UserIdentifier
851
+ end
852
+ end
853
+
826
854
  class ValidationException
827
855
  attr_accessor message: ::String
828
856
  attr_accessor reason: ("CannotParse" | "FieldValidationFailed" | "IdempotentParameterMismatchException" | "EventInOtherSession" | "ResourceConflict")
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.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services