aws-sdk-bedrockagentruntime 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-bedrockagentruntime/client.rb +928 -0
- data/lib/aws-sdk-bedrockagentruntime/client_api.rb +503 -0
- data/lib/aws-sdk-bedrockagentruntime/customizations.rb +0 -0
- data/lib/aws-sdk-bedrockagentruntime/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-bedrockagentruntime/endpoint_provider.rb +54 -0
- data/lib/aws-sdk-bedrockagentruntime/endpoints.rb +58 -0
- data/lib/aws-sdk-bedrockagentruntime/errors.rb +192 -0
- data/lib/aws-sdk-bedrockagentruntime/event_streams.rb +99 -0
- data/lib/aws-sdk-bedrockagentruntime/plugins/endpoints.rb +75 -0
- data/lib/aws-sdk-bedrockagentruntime/resource.rb +26 -0
- data/lib/aws-sdk-bedrockagentruntime/types.rb +1272 -0
- data/lib/aws-sdk-bedrockagentruntime.rb +58 -0
- metadata +95 -0
@@ -0,0 +1,503 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::BedrockAgentRuntime
|
11
|
+
# @api private
|
12
|
+
module ClientApi
|
13
|
+
|
14
|
+
include Seahorse::Model
|
15
|
+
|
16
|
+
AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
|
17
|
+
ActionGroupInvocationInput = Shapes::StructureShape.new(name: 'ActionGroupInvocationInput')
|
18
|
+
ActionGroupInvocationOutput = Shapes::StructureShape.new(name: 'ActionGroupInvocationOutput')
|
19
|
+
ActionGroupName = Shapes::StringShape.new(name: 'ActionGroupName')
|
20
|
+
ActionGroupOutputString = Shapes::StringShape.new(name: 'ActionGroupOutputString')
|
21
|
+
AgentAliasId = Shapes::StringShape.new(name: 'AgentAliasId')
|
22
|
+
AgentId = Shapes::StringShape.new(name: 'AgentId')
|
23
|
+
ApiPath = Shapes::StringShape.new(name: 'ApiPath')
|
24
|
+
Attribution = Shapes::StructureShape.new(name: 'Attribution')
|
25
|
+
BadGatewayException = Shapes::StructureShape.new(name: 'BadGatewayException')
|
26
|
+
BedrockModelArn = Shapes::StringShape.new(name: 'BedrockModelArn')
|
27
|
+
Boolean = Shapes::BooleanShape.new(name: 'Boolean')
|
28
|
+
Citation = Shapes::StructureShape.new(name: 'Citation')
|
29
|
+
Citations = Shapes::ListShape.new(name: 'Citations')
|
30
|
+
ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
|
31
|
+
ContentMap = Shapes::MapShape.new(name: 'ContentMap')
|
32
|
+
CreationMode = Shapes::StringShape.new(name: 'CreationMode')
|
33
|
+
DependencyFailedException = Shapes::StructureShape.new(name: 'DependencyFailedException')
|
34
|
+
Double = Shapes::FloatShape.new(name: 'Double')
|
35
|
+
FailureReasonString = Shapes::StringShape.new(name: 'FailureReasonString')
|
36
|
+
FailureTrace = Shapes::StructureShape.new(name: 'FailureTrace')
|
37
|
+
FinalResponse = Shapes::StructureShape.new(name: 'FinalResponse')
|
38
|
+
FinalResponseString = Shapes::StringShape.new(name: 'FinalResponseString')
|
39
|
+
GeneratedResponsePart = Shapes::StructureShape.new(name: 'GeneratedResponsePart')
|
40
|
+
InferenceConfiguration = Shapes::StructureShape.new(name: 'InferenceConfiguration')
|
41
|
+
InputText = Shapes::StringShape.new(name: 'InputText')
|
42
|
+
InternalServerException = Shapes::StructureShape.new(name: 'InternalServerException')
|
43
|
+
InvocationInput = Shapes::StructureShape.new(name: 'InvocationInput')
|
44
|
+
InvocationType = Shapes::StringShape.new(name: 'InvocationType')
|
45
|
+
InvokeAgentRequest = Shapes::StructureShape.new(name: 'InvokeAgentRequest')
|
46
|
+
InvokeAgentResponse = Shapes::StructureShape.new(name: 'InvokeAgentResponse')
|
47
|
+
KmsKeyArn = Shapes::StringShape.new(name: 'KmsKeyArn')
|
48
|
+
KnowledgeBaseId = Shapes::StringShape.new(name: 'KnowledgeBaseId')
|
49
|
+
KnowledgeBaseLookupInput = Shapes::StructureShape.new(name: 'KnowledgeBaseLookupInput')
|
50
|
+
KnowledgeBaseLookupInputString = Shapes::StringShape.new(name: 'KnowledgeBaseLookupInputString')
|
51
|
+
KnowledgeBaseLookupOutput = Shapes::StructureShape.new(name: 'KnowledgeBaseLookupOutput')
|
52
|
+
KnowledgeBaseQuery = Shapes::StructureShape.new(name: 'KnowledgeBaseQuery')
|
53
|
+
KnowledgeBaseQueryTextString = Shapes::StringShape.new(name: 'KnowledgeBaseQueryTextString')
|
54
|
+
KnowledgeBaseRetrievalConfiguration = Shapes::StructureShape.new(name: 'KnowledgeBaseRetrievalConfiguration')
|
55
|
+
KnowledgeBaseRetrievalResult = Shapes::StructureShape.new(name: 'KnowledgeBaseRetrievalResult')
|
56
|
+
KnowledgeBaseRetrievalResults = Shapes::ListShape.new(name: 'KnowledgeBaseRetrievalResults')
|
57
|
+
KnowledgeBaseRetrieveAndGenerateConfiguration = Shapes::StructureShape.new(name: 'KnowledgeBaseRetrieveAndGenerateConfiguration')
|
58
|
+
KnowledgeBaseVectorSearchConfiguration = Shapes::StructureShape.new(name: 'KnowledgeBaseVectorSearchConfiguration')
|
59
|
+
KnowledgeBaseVectorSearchConfigurationNumberOfResultsInteger = Shapes::IntegerShape.new(name: 'KnowledgeBaseVectorSearchConfigurationNumberOfResultsInteger')
|
60
|
+
LambdaArn = Shapes::StringShape.new(name: 'LambdaArn')
|
61
|
+
MaximumLength = Shapes::IntegerShape.new(name: 'MaximumLength')
|
62
|
+
MimeType = Shapes::StringShape.new(name: 'MimeType')
|
63
|
+
ModelInvocationInput = Shapes::StructureShape.new(name: 'ModelInvocationInput')
|
64
|
+
NextToken = Shapes::StringShape.new(name: 'NextToken')
|
65
|
+
NonBlankString = Shapes::StringShape.new(name: 'NonBlankString')
|
66
|
+
Observation = Shapes::StructureShape.new(name: 'Observation')
|
67
|
+
OrchestrationTrace = Shapes::UnionShape.new(name: 'OrchestrationTrace')
|
68
|
+
OutputString = Shapes::StringShape.new(name: 'OutputString')
|
69
|
+
Parameter = Shapes::StructureShape.new(name: 'Parameter')
|
70
|
+
Parameters = Shapes::ListShape.new(name: 'Parameters')
|
71
|
+
PartBody = Shapes::BlobShape.new(name: 'PartBody')
|
72
|
+
PayloadPart = Shapes::StructureShape.new(name: 'PayloadPart')
|
73
|
+
PostProcessingModelInvocationOutput = Shapes::StructureShape.new(name: 'PostProcessingModelInvocationOutput')
|
74
|
+
PostProcessingParsedResponse = Shapes::StructureShape.new(name: 'PostProcessingParsedResponse')
|
75
|
+
PostProcessingTrace = Shapes::UnionShape.new(name: 'PostProcessingTrace')
|
76
|
+
PreProcessingModelInvocationOutput = Shapes::StructureShape.new(name: 'PreProcessingModelInvocationOutput')
|
77
|
+
PreProcessingParsedResponse = Shapes::StructureShape.new(name: 'PreProcessingParsedResponse')
|
78
|
+
PreProcessingTrace = Shapes::UnionShape.new(name: 'PreProcessingTrace')
|
79
|
+
PromptSessionAttributesMap = Shapes::MapShape.new(name: 'PromptSessionAttributesMap')
|
80
|
+
PromptText = Shapes::StringShape.new(name: 'PromptText')
|
81
|
+
PromptType = Shapes::StringShape.new(name: 'PromptType')
|
82
|
+
Rationale = Shapes::StructureShape.new(name: 'Rationale')
|
83
|
+
RationaleString = Shapes::StringShape.new(name: 'RationaleString')
|
84
|
+
RepromptResponse = Shapes::StructureShape.new(name: 'RepromptResponse')
|
85
|
+
RequestBody = Shapes::StructureShape.new(name: 'RequestBody')
|
86
|
+
ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
|
87
|
+
ResponseStream = Shapes::StructureShape.new(name: 'ResponseStream')
|
88
|
+
RetrievalResultContent = Shapes::StructureShape.new(name: 'RetrievalResultContent')
|
89
|
+
RetrievalResultLocation = Shapes::StructureShape.new(name: 'RetrievalResultLocation')
|
90
|
+
RetrievalResultLocationType = Shapes::StringShape.new(name: 'RetrievalResultLocationType')
|
91
|
+
RetrievalResultS3Location = Shapes::StructureShape.new(name: 'RetrievalResultS3Location')
|
92
|
+
RetrieveAndGenerateConfiguration = Shapes::StructureShape.new(name: 'RetrieveAndGenerateConfiguration')
|
93
|
+
RetrieveAndGenerateInput = Shapes::StructureShape.new(name: 'RetrieveAndGenerateInput')
|
94
|
+
RetrieveAndGenerateInputTextString = Shapes::StringShape.new(name: 'RetrieveAndGenerateInputTextString')
|
95
|
+
RetrieveAndGenerateOutput = Shapes::StructureShape.new(name: 'RetrieveAndGenerateOutput')
|
96
|
+
RetrieveAndGenerateRequest = Shapes::StructureShape.new(name: 'RetrieveAndGenerateRequest')
|
97
|
+
RetrieveAndGenerateResponse = Shapes::StructureShape.new(name: 'RetrieveAndGenerateResponse')
|
98
|
+
RetrieveAndGenerateSessionConfiguration = Shapes::StructureShape.new(name: 'RetrieveAndGenerateSessionConfiguration')
|
99
|
+
RetrieveAndGenerateType = Shapes::StringShape.new(name: 'RetrieveAndGenerateType')
|
100
|
+
RetrieveRequest = Shapes::StructureShape.new(name: 'RetrieveRequest')
|
101
|
+
RetrieveResponse = Shapes::StructureShape.new(name: 'RetrieveResponse')
|
102
|
+
RetrievedReference = Shapes::StructureShape.new(name: 'RetrievedReference')
|
103
|
+
RetrievedReferences = Shapes::ListShape.new(name: 'RetrievedReferences')
|
104
|
+
ServiceQuotaExceededException = Shapes::StructureShape.new(name: 'ServiceQuotaExceededException')
|
105
|
+
SessionAttributesMap = Shapes::MapShape.new(name: 'SessionAttributesMap')
|
106
|
+
SessionId = Shapes::StringShape.new(name: 'SessionId')
|
107
|
+
SessionState = Shapes::StructureShape.new(name: 'SessionState')
|
108
|
+
Source = Shapes::StringShape.new(name: 'Source')
|
109
|
+
Span = Shapes::StructureShape.new(name: 'Span')
|
110
|
+
SpanEndInteger = Shapes::IntegerShape.new(name: 'SpanEndInteger')
|
111
|
+
SpanStartInteger = Shapes::IntegerShape.new(name: 'SpanStartInteger')
|
112
|
+
StopSequences = Shapes::ListShape.new(name: 'StopSequences')
|
113
|
+
String = Shapes::StringShape.new(name: 'String')
|
114
|
+
Temperature = Shapes::FloatShape.new(name: 'Temperature')
|
115
|
+
TextResponsePart = Shapes::StructureShape.new(name: 'TextResponsePart')
|
116
|
+
ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
|
117
|
+
TopK = Shapes::IntegerShape.new(name: 'TopK')
|
118
|
+
TopP = Shapes::FloatShape.new(name: 'TopP')
|
119
|
+
Trace = Shapes::UnionShape.new(name: 'Trace')
|
120
|
+
TraceId = Shapes::StringShape.new(name: 'TraceId')
|
121
|
+
TraceKnowledgeBaseId = Shapes::StringShape.new(name: 'TraceKnowledgeBaseId')
|
122
|
+
TracePart = Shapes::StructureShape.new(name: 'TracePart')
|
123
|
+
Type = Shapes::StringShape.new(name: 'Type')
|
124
|
+
ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
|
125
|
+
Verb = Shapes::StringShape.new(name: 'Verb')
|
126
|
+
|
127
|
+
AccessDeniedException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
|
128
|
+
AccessDeniedException.struct_class = Types::AccessDeniedException
|
129
|
+
|
130
|
+
ActionGroupInvocationInput.add_member(:action_group_name, Shapes::ShapeRef.new(shape: ActionGroupName, location_name: "actionGroupName"))
|
131
|
+
ActionGroupInvocationInput.add_member(:verb, Shapes::ShapeRef.new(shape: Verb, location_name: "verb"))
|
132
|
+
ActionGroupInvocationInput.add_member(:api_path, Shapes::ShapeRef.new(shape: ApiPath, location_name: "apiPath"))
|
133
|
+
ActionGroupInvocationInput.add_member(:parameters, Shapes::ShapeRef.new(shape: Parameters, location_name: "parameters"))
|
134
|
+
ActionGroupInvocationInput.add_member(:request_body, Shapes::ShapeRef.new(shape: RequestBody, location_name: "requestBody"))
|
135
|
+
ActionGroupInvocationInput.struct_class = Types::ActionGroupInvocationInput
|
136
|
+
|
137
|
+
ActionGroupInvocationOutput.add_member(:text, Shapes::ShapeRef.new(shape: ActionGroupOutputString, location_name: "text"))
|
138
|
+
ActionGroupInvocationOutput.struct_class = Types::ActionGroupInvocationOutput
|
139
|
+
|
140
|
+
Attribution.add_member(:citations, Shapes::ShapeRef.new(shape: Citations, location_name: "citations"))
|
141
|
+
Attribution.struct_class = Types::Attribution
|
142
|
+
|
143
|
+
BadGatewayException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
|
144
|
+
BadGatewayException.add_member(:resource_name, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "resourceName"))
|
145
|
+
BadGatewayException.struct_class = Types::BadGatewayException
|
146
|
+
|
147
|
+
Citation.add_member(:generated_response_part, Shapes::ShapeRef.new(shape: GeneratedResponsePart, location_name: "generatedResponsePart"))
|
148
|
+
Citation.add_member(:retrieved_references, Shapes::ShapeRef.new(shape: RetrievedReferences, location_name: "retrievedReferences"))
|
149
|
+
Citation.struct_class = Types::Citation
|
150
|
+
|
151
|
+
Citations.member = Shapes::ShapeRef.new(shape: Citation)
|
152
|
+
|
153
|
+
ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
|
154
|
+
ConflictException.struct_class = Types::ConflictException
|
155
|
+
|
156
|
+
ContentMap.key = Shapes::ShapeRef.new(shape: String)
|
157
|
+
ContentMap.value = Shapes::ShapeRef.new(shape: Parameters)
|
158
|
+
|
159
|
+
DependencyFailedException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
|
160
|
+
DependencyFailedException.add_member(:resource_name, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "resourceName"))
|
161
|
+
DependencyFailedException.struct_class = Types::DependencyFailedException
|
162
|
+
|
163
|
+
FailureTrace.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
|
164
|
+
FailureTrace.add_member(:failure_reason, Shapes::ShapeRef.new(shape: FailureReasonString, location_name: "failureReason"))
|
165
|
+
FailureTrace.struct_class = Types::FailureTrace
|
166
|
+
|
167
|
+
FinalResponse.add_member(:text, Shapes::ShapeRef.new(shape: FinalResponseString, location_name: "text"))
|
168
|
+
FinalResponse.struct_class = Types::FinalResponse
|
169
|
+
|
170
|
+
GeneratedResponsePart.add_member(:text_response_part, Shapes::ShapeRef.new(shape: TextResponsePart, location_name: "textResponsePart"))
|
171
|
+
GeneratedResponsePart.struct_class = Types::GeneratedResponsePart
|
172
|
+
|
173
|
+
InferenceConfiguration.add_member(:temperature, Shapes::ShapeRef.new(shape: Temperature, location_name: "temperature"))
|
174
|
+
InferenceConfiguration.add_member(:top_p, Shapes::ShapeRef.new(shape: TopP, location_name: "topP"))
|
175
|
+
InferenceConfiguration.add_member(:top_k, Shapes::ShapeRef.new(shape: TopK, location_name: "topK"))
|
176
|
+
InferenceConfiguration.add_member(:maximum_length, Shapes::ShapeRef.new(shape: MaximumLength, location_name: "maximumLength"))
|
177
|
+
InferenceConfiguration.add_member(:stop_sequences, Shapes::ShapeRef.new(shape: StopSequences, location_name: "stopSequences"))
|
178
|
+
InferenceConfiguration.struct_class = Types::InferenceConfiguration
|
179
|
+
|
180
|
+
InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
|
181
|
+
InternalServerException.struct_class = Types::InternalServerException
|
182
|
+
|
183
|
+
InvocationInput.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
|
184
|
+
InvocationInput.add_member(:invocation_type, Shapes::ShapeRef.new(shape: InvocationType, location_name: "invocationType"))
|
185
|
+
InvocationInput.add_member(:action_group_invocation_input, Shapes::ShapeRef.new(shape: ActionGroupInvocationInput, location_name: "actionGroupInvocationInput"))
|
186
|
+
InvocationInput.add_member(:knowledge_base_lookup_input, Shapes::ShapeRef.new(shape: KnowledgeBaseLookupInput, location_name: "knowledgeBaseLookupInput"))
|
187
|
+
InvocationInput.struct_class = Types::InvocationInput
|
188
|
+
|
189
|
+
InvokeAgentRequest.add_member(:session_state, Shapes::ShapeRef.new(shape: SessionState, location_name: "sessionState"))
|
190
|
+
InvokeAgentRequest.add_member(:agent_id, Shapes::ShapeRef.new(shape: AgentId, required: true, location: "uri", location_name: "agentId"))
|
191
|
+
InvokeAgentRequest.add_member(:agent_alias_id, Shapes::ShapeRef.new(shape: AgentAliasId, required: true, location: "uri", location_name: "agentAliasId"))
|
192
|
+
InvokeAgentRequest.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, required: true, location: "uri", location_name: "sessionId"))
|
193
|
+
InvokeAgentRequest.add_member(:end_session, Shapes::ShapeRef.new(shape: Boolean, location_name: "endSession"))
|
194
|
+
InvokeAgentRequest.add_member(:enable_trace, Shapes::ShapeRef.new(shape: Boolean, location_name: "enableTrace"))
|
195
|
+
InvokeAgentRequest.add_member(:input_text, Shapes::ShapeRef.new(shape: InputText, required: true, location_name: "inputText"))
|
196
|
+
InvokeAgentRequest.struct_class = Types::InvokeAgentRequest
|
197
|
+
|
198
|
+
InvokeAgentResponse.add_member(:completion, Shapes::ShapeRef.new(shape: ResponseStream, required: true, eventstream: true, location_name: "completion"))
|
199
|
+
InvokeAgentResponse.add_member(:content_type, Shapes::ShapeRef.new(shape: MimeType, required: true, location: "header", location_name: "x-amzn-bedrock-agent-content-type"))
|
200
|
+
InvokeAgentResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, required: true, location: "header", location_name: "x-amz-bedrock-agent-session-id"))
|
201
|
+
InvokeAgentResponse.struct_class = Types::InvokeAgentResponse
|
202
|
+
InvokeAgentResponse[:payload] = :completion
|
203
|
+
InvokeAgentResponse[:payload_member] = InvokeAgentResponse.member(:completion)
|
204
|
+
|
205
|
+
KnowledgeBaseLookupInput.add_member(:text, Shapes::ShapeRef.new(shape: KnowledgeBaseLookupInputString, location_name: "text"))
|
206
|
+
KnowledgeBaseLookupInput.add_member(:knowledge_base_id, Shapes::ShapeRef.new(shape: TraceKnowledgeBaseId, location_name: "knowledgeBaseId"))
|
207
|
+
KnowledgeBaseLookupInput.struct_class = Types::KnowledgeBaseLookupInput
|
208
|
+
|
209
|
+
KnowledgeBaseLookupOutput.add_member(:retrieved_references, Shapes::ShapeRef.new(shape: RetrievedReferences, location_name: "retrievedReferences"))
|
210
|
+
KnowledgeBaseLookupOutput.struct_class = Types::KnowledgeBaseLookupOutput
|
211
|
+
|
212
|
+
KnowledgeBaseQuery.add_member(:text, Shapes::ShapeRef.new(shape: KnowledgeBaseQueryTextString, required: true, location_name: "text"))
|
213
|
+
KnowledgeBaseQuery.struct_class = Types::KnowledgeBaseQuery
|
214
|
+
|
215
|
+
KnowledgeBaseRetrievalConfiguration.add_member(:vector_search_configuration, Shapes::ShapeRef.new(shape: KnowledgeBaseVectorSearchConfiguration, required: true, location_name: "vectorSearchConfiguration"))
|
216
|
+
KnowledgeBaseRetrievalConfiguration.struct_class = Types::KnowledgeBaseRetrievalConfiguration
|
217
|
+
|
218
|
+
KnowledgeBaseRetrievalResult.add_member(:content, Shapes::ShapeRef.new(shape: RetrievalResultContent, required: true, location_name: "content"))
|
219
|
+
KnowledgeBaseRetrievalResult.add_member(:location, Shapes::ShapeRef.new(shape: RetrievalResultLocation, location_name: "location"))
|
220
|
+
KnowledgeBaseRetrievalResult.add_member(:score, Shapes::ShapeRef.new(shape: Double, location_name: "score"))
|
221
|
+
KnowledgeBaseRetrievalResult.struct_class = Types::KnowledgeBaseRetrievalResult
|
222
|
+
|
223
|
+
KnowledgeBaseRetrievalResults.member = Shapes::ShapeRef.new(shape: KnowledgeBaseRetrievalResult)
|
224
|
+
|
225
|
+
KnowledgeBaseRetrieveAndGenerateConfiguration.add_member(:knowledge_base_id, Shapes::ShapeRef.new(shape: KnowledgeBaseId, required: true, location_name: "knowledgeBaseId"))
|
226
|
+
KnowledgeBaseRetrieveAndGenerateConfiguration.add_member(:model_arn, Shapes::ShapeRef.new(shape: BedrockModelArn, required: true, location_name: "modelArn"))
|
227
|
+
KnowledgeBaseRetrieveAndGenerateConfiguration.struct_class = Types::KnowledgeBaseRetrieveAndGenerateConfiguration
|
228
|
+
|
229
|
+
KnowledgeBaseVectorSearchConfiguration.add_member(:number_of_results, Shapes::ShapeRef.new(shape: KnowledgeBaseVectorSearchConfigurationNumberOfResultsInteger, required: true, location_name: "numberOfResults"))
|
230
|
+
KnowledgeBaseVectorSearchConfiguration.struct_class = Types::KnowledgeBaseVectorSearchConfiguration
|
231
|
+
|
232
|
+
ModelInvocationInput.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
|
233
|
+
ModelInvocationInput.add_member(:text, Shapes::ShapeRef.new(shape: PromptText, location_name: "text"))
|
234
|
+
ModelInvocationInput.add_member(:type, Shapes::ShapeRef.new(shape: PromptType, location_name: "type"))
|
235
|
+
ModelInvocationInput.add_member(:inference_configuration, Shapes::ShapeRef.new(shape: InferenceConfiguration, location_name: "inferenceConfiguration"))
|
236
|
+
ModelInvocationInput.add_member(:override_lambda, Shapes::ShapeRef.new(shape: LambdaArn, location_name: "overrideLambda"))
|
237
|
+
ModelInvocationInput.add_member(:prompt_creation_mode, Shapes::ShapeRef.new(shape: CreationMode, location_name: "promptCreationMode"))
|
238
|
+
ModelInvocationInput.add_member(:parser_mode, Shapes::ShapeRef.new(shape: CreationMode, location_name: "parserMode"))
|
239
|
+
ModelInvocationInput.struct_class = Types::ModelInvocationInput
|
240
|
+
|
241
|
+
Observation.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
|
242
|
+
Observation.add_member(:type, Shapes::ShapeRef.new(shape: Type, location_name: "type"))
|
243
|
+
Observation.add_member(:action_group_invocation_output, Shapes::ShapeRef.new(shape: ActionGroupInvocationOutput, location_name: "actionGroupInvocationOutput"))
|
244
|
+
Observation.add_member(:knowledge_base_lookup_output, Shapes::ShapeRef.new(shape: KnowledgeBaseLookupOutput, location_name: "knowledgeBaseLookupOutput"))
|
245
|
+
Observation.add_member(:final_response, Shapes::ShapeRef.new(shape: FinalResponse, location_name: "finalResponse"))
|
246
|
+
Observation.add_member(:reprompt_response, Shapes::ShapeRef.new(shape: RepromptResponse, location_name: "repromptResponse"))
|
247
|
+
Observation.struct_class = Types::Observation
|
248
|
+
|
249
|
+
OrchestrationTrace.add_member(:rationale, Shapes::ShapeRef.new(shape: Rationale, location_name: "rationale"))
|
250
|
+
OrchestrationTrace.add_member(:invocation_input, Shapes::ShapeRef.new(shape: InvocationInput, location_name: "invocationInput"))
|
251
|
+
OrchestrationTrace.add_member(:observation, Shapes::ShapeRef.new(shape: Observation, location_name: "observation"))
|
252
|
+
OrchestrationTrace.add_member(:model_invocation_input, Shapes::ShapeRef.new(shape: ModelInvocationInput, location_name: "modelInvocationInput"))
|
253
|
+
OrchestrationTrace.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
254
|
+
OrchestrationTrace.add_member_subclass(:rationale, Types::OrchestrationTrace::Rationale)
|
255
|
+
OrchestrationTrace.add_member_subclass(:invocation_input, Types::OrchestrationTrace::InvocationInput)
|
256
|
+
OrchestrationTrace.add_member_subclass(:observation, Types::OrchestrationTrace::Observation)
|
257
|
+
OrchestrationTrace.add_member_subclass(:model_invocation_input, Types::OrchestrationTrace::ModelInvocationInput)
|
258
|
+
OrchestrationTrace.add_member_subclass(:unknown, Types::OrchestrationTrace::Unknown)
|
259
|
+
OrchestrationTrace.struct_class = Types::OrchestrationTrace
|
260
|
+
|
261
|
+
Parameter.add_member(:name, Shapes::ShapeRef.new(shape: String, location_name: "name"))
|
262
|
+
Parameter.add_member(:type, Shapes::ShapeRef.new(shape: String, location_name: "type"))
|
263
|
+
Parameter.add_member(:value, Shapes::ShapeRef.new(shape: String, location_name: "value"))
|
264
|
+
Parameter.struct_class = Types::Parameter
|
265
|
+
|
266
|
+
Parameters.member = Shapes::ShapeRef.new(shape: Parameter)
|
267
|
+
|
268
|
+
PayloadPart.add_member(:bytes, Shapes::ShapeRef.new(shape: PartBody, location_name: "bytes"))
|
269
|
+
PayloadPart.add_member(:attribution, Shapes::ShapeRef.new(shape: Attribution, location_name: "attribution"))
|
270
|
+
PayloadPart.struct_class = Types::PayloadPart
|
271
|
+
|
272
|
+
PostProcessingModelInvocationOutput.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
|
273
|
+
PostProcessingModelInvocationOutput.add_member(:parsed_response, Shapes::ShapeRef.new(shape: PostProcessingParsedResponse, location_name: "parsedResponse"))
|
274
|
+
PostProcessingModelInvocationOutput.struct_class = Types::PostProcessingModelInvocationOutput
|
275
|
+
|
276
|
+
PostProcessingParsedResponse.add_member(:text, Shapes::ShapeRef.new(shape: OutputString, location_name: "text"))
|
277
|
+
PostProcessingParsedResponse.struct_class = Types::PostProcessingParsedResponse
|
278
|
+
|
279
|
+
PostProcessingTrace.add_member(:model_invocation_input, Shapes::ShapeRef.new(shape: ModelInvocationInput, location_name: "modelInvocationInput"))
|
280
|
+
PostProcessingTrace.add_member(:model_invocation_output, Shapes::ShapeRef.new(shape: PostProcessingModelInvocationOutput, location_name: "modelInvocationOutput"))
|
281
|
+
PostProcessingTrace.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
282
|
+
PostProcessingTrace.add_member_subclass(:model_invocation_input, Types::PostProcessingTrace::ModelInvocationInput)
|
283
|
+
PostProcessingTrace.add_member_subclass(:model_invocation_output, Types::PostProcessingTrace::ModelInvocationOutput)
|
284
|
+
PostProcessingTrace.add_member_subclass(:unknown, Types::PostProcessingTrace::Unknown)
|
285
|
+
PostProcessingTrace.struct_class = Types::PostProcessingTrace
|
286
|
+
|
287
|
+
PreProcessingModelInvocationOutput.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
|
288
|
+
PreProcessingModelInvocationOutput.add_member(:parsed_response, Shapes::ShapeRef.new(shape: PreProcessingParsedResponse, location_name: "parsedResponse"))
|
289
|
+
PreProcessingModelInvocationOutput.struct_class = Types::PreProcessingModelInvocationOutput
|
290
|
+
|
291
|
+
PreProcessingParsedResponse.add_member(:rationale, Shapes::ShapeRef.new(shape: RationaleString, location_name: "rationale"))
|
292
|
+
PreProcessingParsedResponse.add_member(:is_valid, Shapes::ShapeRef.new(shape: Boolean, location_name: "isValid"))
|
293
|
+
PreProcessingParsedResponse.struct_class = Types::PreProcessingParsedResponse
|
294
|
+
|
295
|
+
PreProcessingTrace.add_member(:model_invocation_input, Shapes::ShapeRef.new(shape: ModelInvocationInput, location_name: "modelInvocationInput"))
|
296
|
+
PreProcessingTrace.add_member(:model_invocation_output, Shapes::ShapeRef.new(shape: PreProcessingModelInvocationOutput, location_name: "modelInvocationOutput"))
|
297
|
+
PreProcessingTrace.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
298
|
+
PreProcessingTrace.add_member_subclass(:model_invocation_input, Types::PreProcessingTrace::ModelInvocationInput)
|
299
|
+
PreProcessingTrace.add_member_subclass(:model_invocation_output, Types::PreProcessingTrace::ModelInvocationOutput)
|
300
|
+
PreProcessingTrace.add_member_subclass(:unknown, Types::PreProcessingTrace::Unknown)
|
301
|
+
PreProcessingTrace.struct_class = Types::PreProcessingTrace
|
302
|
+
|
303
|
+
PromptSessionAttributesMap.key = Shapes::ShapeRef.new(shape: String)
|
304
|
+
PromptSessionAttributesMap.value = Shapes::ShapeRef.new(shape: String)
|
305
|
+
|
306
|
+
Rationale.add_member(:trace_id, Shapes::ShapeRef.new(shape: TraceId, location_name: "traceId"))
|
307
|
+
Rationale.add_member(:text, Shapes::ShapeRef.new(shape: RationaleString, location_name: "text"))
|
308
|
+
Rationale.struct_class = Types::Rationale
|
309
|
+
|
310
|
+
RepromptResponse.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "text"))
|
311
|
+
RepromptResponse.add_member(:source, Shapes::ShapeRef.new(shape: Source, location_name: "source"))
|
312
|
+
RepromptResponse.struct_class = Types::RepromptResponse
|
313
|
+
|
314
|
+
RequestBody.add_member(:content, Shapes::ShapeRef.new(shape: ContentMap, location_name: "content"))
|
315
|
+
RequestBody.struct_class = Types::RequestBody
|
316
|
+
|
317
|
+
ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
|
318
|
+
ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
|
319
|
+
|
320
|
+
ResponseStream.add_member(:chunk, Shapes::ShapeRef.new(shape: PayloadPart, event: true, location_name: "chunk"))
|
321
|
+
ResponseStream.add_member(:trace, Shapes::ShapeRef.new(shape: TracePart, event: true, location_name: "trace"))
|
322
|
+
ResponseStream.add_member(:internal_server_exception, Shapes::ShapeRef.new(shape: InternalServerException, location_name: "internalServerException"))
|
323
|
+
ResponseStream.add_member(:validation_exception, Shapes::ShapeRef.new(shape: ValidationException, location_name: "validationException"))
|
324
|
+
ResponseStream.add_member(:resource_not_found_exception, Shapes::ShapeRef.new(shape: ResourceNotFoundException, location_name: "resourceNotFoundException"))
|
325
|
+
ResponseStream.add_member(:service_quota_exceeded_exception, Shapes::ShapeRef.new(shape: ServiceQuotaExceededException, location_name: "serviceQuotaExceededException"))
|
326
|
+
ResponseStream.add_member(:throttling_exception, Shapes::ShapeRef.new(shape: ThrottlingException, location_name: "throttlingException"))
|
327
|
+
ResponseStream.add_member(:access_denied_exception, Shapes::ShapeRef.new(shape: AccessDeniedException, location_name: "accessDeniedException"))
|
328
|
+
ResponseStream.add_member(:conflict_exception, Shapes::ShapeRef.new(shape: ConflictException, location_name: "conflictException"))
|
329
|
+
ResponseStream.add_member(:dependency_failed_exception, Shapes::ShapeRef.new(shape: DependencyFailedException, location_name: "dependencyFailedException"))
|
330
|
+
ResponseStream.add_member(:bad_gateway_exception, Shapes::ShapeRef.new(shape: BadGatewayException, location_name: "badGatewayException"))
|
331
|
+
ResponseStream.struct_class = Types::ResponseStream
|
332
|
+
|
333
|
+
RetrievalResultContent.add_member(:text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "text"))
|
334
|
+
RetrievalResultContent.struct_class = Types::RetrievalResultContent
|
335
|
+
|
336
|
+
RetrievalResultLocation.add_member(:type, Shapes::ShapeRef.new(shape: RetrievalResultLocationType, required: true, location_name: "type"))
|
337
|
+
RetrievalResultLocation.add_member(:s3_location, Shapes::ShapeRef.new(shape: RetrievalResultS3Location, location_name: "s3Location"))
|
338
|
+
RetrievalResultLocation.struct_class = Types::RetrievalResultLocation
|
339
|
+
|
340
|
+
RetrievalResultS3Location.add_member(:uri, Shapes::ShapeRef.new(shape: String, location_name: "uri"))
|
341
|
+
RetrievalResultS3Location.struct_class = Types::RetrievalResultS3Location
|
342
|
+
|
343
|
+
RetrieveAndGenerateConfiguration.add_member(:type, Shapes::ShapeRef.new(shape: RetrieveAndGenerateType, required: true, location_name: "type"))
|
344
|
+
RetrieveAndGenerateConfiguration.add_member(:knowledge_base_configuration, Shapes::ShapeRef.new(shape: KnowledgeBaseRetrieveAndGenerateConfiguration, location_name: "knowledgeBaseConfiguration"))
|
345
|
+
RetrieveAndGenerateConfiguration.struct_class = Types::RetrieveAndGenerateConfiguration
|
346
|
+
|
347
|
+
RetrieveAndGenerateInput.add_member(:text, Shapes::ShapeRef.new(shape: RetrieveAndGenerateInputTextString, required: true, location_name: "text"))
|
348
|
+
RetrieveAndGenerateInput.struct_class = Types::RetrieveAndGenerateInput
|
349
|
+
|
350
|
+
RetrieveAndGenerateOutput.add_member(:text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "text"))
|
351
|
+
RetrieveAndGenerateOutput.struct_class = Types::RetrieveAndGenerateOutput
|
352
|
+
|
353
|
+
RetrieveAndGenerateRequest.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, location_name: "sessionId"))
|
354
|
+
RetrieveAndGenerateRequest.add_member(:input, Shapes::ShapeRef.new(shape: RetrieveAndGenerateInput, required: true, location_name: "input"))
|
355
|
+
RetrieveAndGenerateRequest.add_member(:retrieve_and_generate_configuration, Shapes::ShapeRef.new(shape: RetrieveAndGenerateConfiguration, location_name: "retrieveAndGenerateConfiguration"))
|
356
|
+
RetrieveAndGenerateRequest.add_member(:session_configuration, Shapes::ShapeRef.new(shape: RetrieveAndGenerateSessionConfiguration, location_name: "sessionConfiguration"))
|
357
|
+
RetrieveAndGenerateRequest.struct_class = Types::RetrieveAndGenerateRequest
|
358
|
+
|
359
|
+
RetrieveAndGenerateResponse.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, required: true, location_name: "sessionId"))
|
360
|
+
RetrieveAndGenerateResponse.add_member(:output, Shapes::ShapeRef.new(shape: RetrieveAndGenerateOutput, required: true, location_name: "output"))
|
361
|
+
RetrieveAndGenerateResponse.add_member(:citations, Shapes::ShapeRef.new(shape: Citations, location_name: "citations"))
|
362
|
+
RetrieveAndGenerateResponse.struct_class = Types::RetrieveAndGenerateResponse
|
363
|
+
|
364
|
+
RetrieveAndGenerateSessionConfiguration.add_member(:kms_key_arn, Shapes::ShapeRef.new(shape: KmsKeyArn, required: true, location_name: "kmsKeyArn"))
|
365
|
+
RetrieveAndGenerateSessionConfiguration.struct_class = Types::RetrieveAndGenerateSessionConfiguration
|
366
|
+
|
367
|
+
RetrieveRequest.add_member(:knowledge_base_id, Shapes::ShapeRef.new(shape: KnowledgeBaseId, required: true, location: "uri", location_name: "knowledgeBaseId"))
|
368
|
+
RetrieveRequest.add_member(:retrieval_query, Shapes::ShapeRef.new(shape: KnowledgeBaseQuery, required: true, location_name: "retrievalQuery"))
|
369
|
+
RetrieveRequest.add_member(:retrieval_configuration, Shapes::ShapeRef.new(shape: KnowledgeBaseRetrievalConfiguration, location_name: "retrievalConfiguration"))
|
370
|
+
RetrieveRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "nextToken"))
|
371
|
+
RetrieveRequest.struct_class = Types::RetrieveRequest
|
372
|
+
|
373
|
+
RetrieveResponse.add_member(:retrieval_results, Shapes::ShapeRef.new(shape: KnowledgeBaseRetrievalResults, required: true, location_name: "retrievalResults"))
|
374
|
+
RetrieveResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: NextToken, location_name: "nextToken"))
|
375
|
+
RetrieveResponse.struct_class = Types::RetrieveResponse
|
376
|
+
|
377
|
+
RetrievedReference.add_member(:content, Shapes::ShapeRef.new(shape: RetrievalResultContent, location_name: "content"))
|
378
|
+
RetrievedReference.add_member(:location, Shapes::ShapeRef.new(shape: RetrievalResultLocation, location_name: "location"))
|
379
|
+
RetrievedReference.struct_class = Types::RetrievedReference
|
380
|
+
|
381
|
+
RetrievedReferences.member = Shapes::ShapeRef.new(shape: RetrievedReference)
|
382
|
+
|
383
|
+
ServiceQuotaExceededException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
|
384
|
+
ServiceQuotaExceededException.struct_class = Types::ServiceQuotaExceededException
|
385
|
+
|
386
|
+
SessionAttributesMap.key = Shapes::ShapeRef.new(shape: String)
|
387
|
+
SessionAttributesMap.value = Shapes::ShapeRef.new(shape: String)
|
388
|
+
|
389
|
+
SessionState.add_member(:session_attributes, Shapes::ShapeRef.new(shape: SessionAttributesMap, location_name: "sessionAttributes"))
|
390
|
+
SessionState.add_member(:prompt_session_attributes, Shapes::ShapeRef.new(shape: PromptSessionAttributesMap, location_name: "promptSessionAttributes"))
|
391
|
+
SessionState.struct_class = Types::SessionState
|
392
|
+
|
393
|
+
Span.add_member(:start, Shapes::ShapeRef.new(shape: SpanStartInteger, location_name: "start"))
|
394
|
+
Span.add_member(:end, Shapes::ShapeRef.new(shape: SpanEndInteger, location_name: "end"))
|
395
|
+
Span.struct_class = Types::Span
|
396
|
+
|
397
|
+
StopSequences.member = Shapes::ShapeRef.new(shape: String)
|
398
|
+
|
399
|
+
TextResponsePart.add_member(:text, Shapes::ShapeRef.new(shape: String, location_name: "text"))
|
400
|
+
TextResponsePart.add_member(:span, Shapes::ShapeRef.new(shape: Span, location_name: "span"))
|
401
|
+
TextResponsePart.struct_class = Types::TextResponsePart
|
402
|
+
|
403
|
+
ThrottlingException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
|
404
|
+
ThrottlingException.struct_class = Types::ThrottlingException
|
405
|
+
|
406
|
+
Trace.add_member(:pre_processing_trace, Shapes::ShapeRef.new(shape: PreProcessingTrace, location_name: "preProcessingTrace"))
|
407
|
+
Trace.add_member(:orchestration_trace, Shapes::ShapeRef.new(shape: OrchestrationTrace, location_name: "orchestrationTrace"))
|
408
|
+
Trace.add_member(:post_processing_trace, Shapes::ShapeRef.new(shape: PostProcessingTrace, location_name: "postProcessingTrace"))
|
409
|
+
Trace.add_member(:failure_trace, Shapes::ShapeRef.new(shape: FailureTrace, location_name: "failureTrace"))
|
410
|
+
Trace.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
|
411
|
+
Trace.add_member_subclass(:pre_processing_trace, Types::Trace::PreProcessingTrace)
|
412
|
+
Trace.add_member_subclass(:orchestration_trace, Types::Trace::OrchestrationTrace)
|
413
|
+
Trace.add_member_subclass(:post_processing_trace, Types::Trace::PostProcessingTrace)
|
414
|
+
Trace.add_member_subclass(:failure_trace, Types::Trace::FailureTrace)
|
415
|
+
Trace.add_member_subclass(:unknown, Types::Trace::Unknown)
|
416
|
+
Trace.struct_class = Types::Trace
|
417
|
+
|
418
|
+
TracePart.add_member(:agent_id, Shapes::ShapeRef.new(shape: AgentId, location_name: "agentId"))
|
419
|
+
TracePart.add_member(:agent_alias_id, Shapes::ShapeRef.new(shape: AgentAliasId, location_name: "agentAliasId"))
|
420
|
+
TracePart.add_member(:session_id, Shapes::ShapeRef.new(shape: SessionId, location_name: "sessionId"))
|
421
|
+
TracePart.add_member(:trace, Shapes::ShapeRef.new(shape: Trace, location_name: "trace"))
|
422
|
+
TracePart.struct_class = Types::TracePart
|
423
|
+
|
424
|
+
ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: NonBlankString, location_name: "message"))
|
425
|
+
ValidationException.struct_class = Types::ValidationException
|
426
|
+
|
427
|
+
|
428
|
+
# @api private
|
429
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
430
|
+
|
431
|
+
api.version = "2023-07-26"
|
432
|
+
|
433
|
+
api.metadata = {
|
434
|
+
"apiVersion" => "2023-07-26",
|
435
|
+
"endpointPrefix" => "bedrock-agent-runtime",
|
436
|
+
"jsonVersion" => "1.1",
|
437
|
+
"protocol" => "rest-json",
|
438
|
+
"serviceFullName" => "Agents for Amazon Bedrock Runtime",
|
439
|
+
"serviceId" => "Bedrock Agent Runtime",
|
440
|
+
"signatureVersion" => "v4",
|
441
|
+
"signingName" => "bedrock",
|
442
|
+
"uid" => "bedrock-agent-runtime-2023-07-26",
|
443
|
+
}
|
444
|
+
|
445
|
+
api.add_operation(:invoke_agent, Seahorse::Model::Operation.new.tap do |o|
|
446
|
+
o.name = "InvokeAgent"
|
447
|
+
o.http_method = "POST"
|
448
|
+
o.http_request_uri = "/agents/{agentId}/agentAliases/{agentAliasId}/sessions/{sessionId}/text"
|
449
|
+
o.input = Shapes::ShapeRef.new(shape: InvokeAgentRequest)
|
450
|
+
o.output = Shapes::ShapeRef.new(shape: InvokeAgentResponse)
|
451
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
452
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
453
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
454
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
455
|
+
o.errors << Shapes::ShapeRef.new(shape: DependencyFailedException)
|
456
|
+
o.errors << Shapes::ShapeRef.new(shape: BadGatewayException)
|
457
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
458
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
459
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
|
460
|
+
end)
|
461
|
+
|
462
|
+
api.add_operation(:retrieve, Seahorse::Model::Operation.new.tap do |o|
|
463
|
+
o.name = "Retrieve"
|
464
|
+
o.http_method = "POST"
|
465
|
+
o.http_request_uri = "/knowledgebases/{knowledgeBaseId}/retrieve"
|
466
|
+
o.input = Shapes::ShapeRef.new(shape: RetrieveRequest)
|
467
|
+
o.output = Shapes::ShapeRef.new(shape: RetrieveResponse)
|
468
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
469
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
470
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
471
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
472
|
+
o.errors << Shapes::ShapeRef.new(shape: DependencyFailedException)
|
473
|
+
o.errors << Shapes::ShapeRef.new(shape: BadGatewayException)
|
474
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
475
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
476
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
|
477
|
+
o[:pager] = Aws::Pager.new(
|
478
|
+
tokens: {
|
479
|
+
"next_token" => "next_token"
|
480
|
+
}
|
481
|
+
)
|
482
|
+
end)
|
483
|
+
|
484
|
+
api.add_operation(:retrieve_and_generate, Seahorse::Model::Operation.new.tap do |o|
|
485
|
+
o.name = "RetrieveAndGenerate"
|
486
|
+
o.http_method = "POST"
|
487
|
+
o.http_request_uri = "/retrieveAndGenerate"
|
488
|
+
o.input = Shapes::ShapeRef.new(shape: RetrieveAndGenerateRequest)
|
489
|
+
o.output = Shapes::ShapeRef.new(shape: RetrieveAndGenerateResponse)
|
490
|
+
o.errors << Shapes::ShapeRef.new(shape: ConflictException)
|
491
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
492
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationException)
|
493
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
|
494
|
+
o.errors << Shapes::ShapeRef.new(shape: DependencyFailedException)
|
495
|
+
o.errors << Shapes::ShapeRef.new(shape: BadGatewayException)
|
496
|
+
o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
|
497
|
+
o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
|
498
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceQuotaExceededException)
|
499
|
+
end)
|
500
|
+
end
|
501
|
+
|
502
|
+
end
|
503
|
+
end
|
File without changes
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::BedrockAgentRuntime
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
54
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
55
|
+
if self[:use_dual_stack].nil?
|
56
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
57
|
+
end
|
58
|
+
self[:use_fips] = options[:use_fips]
|
59
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
60
|
+
if self[:use_fips].nil?
|
61
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
62
|
+
end
|
63
|
+
self[:endpoint] = options[:endpoint]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::BedrockAgentRuntime
|
11
|
+
class EndpointProvider
|
12
|
+
def resolve_endpoint(parameters)
|
13
|
+
region = parameters.region
|
14
|
+
use_dual_stack = parameters.use_dual_stack
|
15
|
+
use_fips = parameters.use_fips
|
16
|
+
endpoint = parameters.endpoint
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
18
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
20
|
+
end
|
21
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
25
|
+
end
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
29
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://bedrock-agent-runtime-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
36
|
+
return Aws::Endpoints::Endpoint.new(url: "https://bedrock-agent-runtime-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
37
|
+
end
|
38
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
39
|
+
end
|
40
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
41
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "https://bedrock-agent-runtime.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
43
|
+
end
|
44
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
45
|
+
end
|
46
|
+
return Aws::Endpoints::Endpoint.new(url: "https://bedrock-agent-runtime.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
47
|
+
end
|
48
|
+
end
|
49
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
50
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|