aws-sdk-sagemakerruntimehttp2 1.0.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 +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/async_client.rb +662 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/client_api.rb +140 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/customizations.rb +0 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/endpoint_provider.rb +134 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/endpoints.rb +20 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/errors.rb +174 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/event_streams.rb +93 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/plugins/endpoints.rb +77 -0
- data/lib/aws-sdk-sagemakerruntimehttp2/types.rb +292 -0
- data/lib/aws-sdk-sagemakerruntimehttp2.rb +66 -0
- data/sig/async_client.rbs +87 -0
- data/sig/errors.rbs +42 -0
- data/sig/types.rbs +92 -0
- data/sig/waiters.rbs +13 -0
- metadata +95 -0
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
|
|
11
|
+
module Aws::SageMakerRuntimeHTTP2
|
|
12
|
+
module Plugins
|
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
|
14
|
+
option(
|
|
15
|
+
:endpoint_provider,
|
|
16
|
+
doc_type: 'Aws::SageMakerRuntimeHTTP2::EndpointProvider',
|
|
17
|
+
rbs_type: 'untyped',
|
|
18
|
+
docstring: <<~DOCS) do |_cfg|
|
|
19
|
+
The endpoint provider used to resolve endpoints. Any object that responds to
|
|
20
|
+
`#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
|
21
|
+
`Aws::SageMakerRuntimeHTTP2::EndpointParameters`.
|
|
22
|
+
DOCS
|
|
23
|
+
Aws::SageMakerRuntimeHTTP2::EndpointProvider.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# @api private
|
|
27
|
+
class Handler < Seahorse::Client::Handler
|
|
28
|
+
def call(context)
|
|
29
|
+
unless context[:discovered_endpoint]
|
|
30
|
+
params = Aws::SageMakerRuntimeHTTP2::Endpoints.parameters_for_operation(context)
|
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
|
32
|
+
|
|
33
|
+
context.http_request.endpoint = endpoint.url
|
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
|
35
|
+
|
|
36
|
+
context[:endpoint_params] = params
|
|
37
|
+
context[:endpoint_properties] = endpoint.properties
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
context[:auth_scheme] =
|
|
41
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
|
42
|
+
|
|
43
|
+
with_metrics(context) { @handler.call(context) }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
private
|
|
47
|
+
|
|
48
|
+
def with_metrics(context, &block)
|
|
49
|
+
metrics = []
|
|
50
|
+
metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
|
|
51
|
+
if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
|
|
52
|
+
metrics << 'SIGV4A_SIGNING'
|
|
53
|
+
end
|
|
54
|
+
if context.config.credentials&.credentials&.account_id
|
|
55
|
+
metrics << 'RESOLVED_ACCOUNT_ID'
|
|
56
|
+
end
|
|
57
|
+
Aws::Plugins::UserAgent.metric(*metrics, &block)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def apply_endpoint_headers(context, headers)
|
|
61
|
+
headers.each do |key, values|
|
|
62
|
+
value = values
|
|
63
|
+
.compact
|
|
64
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
|
65
|
+
.join(',')
|
|
66
|
+
|
|
67
|
+
context.http_request.headers[key] = value
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def add_handlers(handlers, _config)
|
|
73
|
+
handlers.add(Handler, step: :build, priority: 75)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,292 @@
|
|
|
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::SageMakerRuntimeHTTP2
|
|
11
|
+
module Types
|
|
12
|
+
|
|
13
|
+
# The input fails to satisfy the constraints specified by an AWS
|
|
14
|
+
# service.
|
|
15
|
+
#
|
|
16
|
+
# @!attribute [rw] message
|
|
17
|
+
# Error message.
|
|
18
|
+
# @return [String]
|
|
19
|
+
#
|
|
20
|
+
# @!attribute [rw] error_code
|
|
21
|
+
# Error code.
|
|
22
|
+
# @return [String]
|
|
23
|
+
#
|
|
24
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/InputValidationError AWS API Documentation
|
|
25
|
+
#
|
|
26
|
+
class InputValidationError < Struct.new(
|
|
27
|
+
:message,
|
|
28
|
+
:error_code)
|
|
29
|
+
SENSITIVE = []
|
|
30
|
+
include Aws::Structure
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# The request processing has failed because of an unknown error,
|
|
34
|
+
# exception or failure.
|
|
35
|
+
#
|
|
36
|
+
# @!attribute [rw] message
|
|
37
|
+
# Error message.
|
|
38
|
+
# @return [String]
|
|
39
|
+
#
|
|
40
|
+
# @!attribute [rw] error_code
|
|
41
|
+
# Error code.
|
|
42
|
+
# @return [String]
|
|
43
|
+
#
|
|
44
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/InternalServerError AWS API Documentation
|
|
45
|
+
#
|
|
46
|
+
class InternalServerError < Struct.new(
|
|
47
|
+
:message,
|
|
48
|
+
:error_code)
|
|
49
|
+
SENSITIVE = []
|
|
50
|
+
include Aws::Structure
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Internal stream failure that occurs during streaming.
|
|
54
|
+
#
|
|
55
|
+
# @!attribute [rw] message
|
|
56
|
+
# Error message.
|
|
57
|
+
# @return [String]
|
|
58
|
+
#
|
|
59
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/InternalStreamFailure AWS API Documentation
|
|
60
|
+
#
|
|
61
|
+
class InternalStreamFailure < Struct.new(
|
|
62
|
+
:message,
|
|
63
|
+
:event_type)
|
|
64
|
+
SENSITIVE = []
|
|
65
|
+
include Aws::Structure
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# @!attribute [rw] endpoint_name
|
|
69
|
+
# The name of the endpoint to invoke.
|
|
70
|
+
# @return [String]
|
|
71
|
+
#
|
|
72
|
+
# @!attribute [rw] body
|
|
73
|
+
# The request payload stream.
|
|
74
|
+
# @return [Types::RequestStreamEvent]
|
|
75
|
+
#
|
|
76
|
+
# @!attribute [rw] target_variant
|
|
77
|
+
# Target variant for the request.
|
|
78
|
+
# @return [String]
|
|
79
|
+
#
|
|
80
|
+
# @!attribute [rw] model_invocation_path
|
|
81
|
+
# Model invocation path.
|
|
82
|
+
# @return [String]
|
|
83
|
+
#
|
|
84
|
+
# @!attribute [rw] model_query_string
|
|
85
|
+
# Model query string.
|
|
86
|
+
# @return [String]
|
|
87
|
+
#
|
|
88
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/InvokeEndpointWithBidirectionalStreamInput AWS API Documentation
|
|
89
|
+
#
|
|
90
|
+
class InvokeEndpointWithBidirectionalStreamInput < Struct.new(
|
|
91
|
+
:endpoint_name,
|
|
92
|
+
:body,
|
|
93
|
+
:target_variant,
|
|
94
|
+
:model_invocation_path,
|
|
95
|
+
:model_query_string)
|
|
96
|
+
SENSITIVE = []
|
|
97
|
+
include Aws::Structure
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# @!attribute [rw] body
|
|
101
|
+
# The response payload stream.
|
|
102
|
+
# @return [Types::ResponseStreamEvent]
|
|
103
|
+
#
|
|
104
|
+
# @!attribute [rw] invoked_production_variant
|
|
105
|
+
# The invoked production variant.
|
|
106
|
+
# @return [String]
|
|
107
|
+
#
|
|
108
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/InvokeEndpointWithBidirectionalStreamOutput AWS API Documentation
|
|
109
|
+
#
|
|
110
|
+
class InvokeEndpointWithBidirectionalStreamOutput < Struct.new(
|
|
111
|
+
:body,
|
|
112
|
+
:invoked_production_variant)
|
|
113
|
+
SENSITIVE = []
|
|
114
|
+
include Aws::Structure
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# An error occurred while processing the model.
|
|
118
|
+
#
|
|
119
|
+
# @!attribute [rw] message
|
|
120
|
+
# Error message.
|
|
121
|
+
# @return [String]
|
|
122
|
+
#
|
|
123
|
+
# @!attribute [rw] original_status_code
|
|
124
|
+
# HTTP status code returned by model.
|
|
125
|
+
# @return [Integer]
|
|
126
|
+
#
|
|
127
|
+
# @!attribute [rw] original_message
|
|
128
|
+
# Original error message from the model.
|
|
129
|
+
# @return [String]
|
|
130
|
+
#
|
|
131
|
+
# @!attribute [rw] log_stream_arn
|
|
132
|
+
# CloudWatch log stream ARN.
|
|
133
|
+
# @return [String]
|
|
134
|
+
#
|
|
135
|
+
# @!attribute [rw] error_code
|
|
136
|
+
# Error code.
|
|
137
|
+
# @return [String]
|
|
138
|
+
#
|
|
139
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/ModelError AWS API Documentation
|
|
140
|
+
#
|
|
141
|
+
class ModelError < Struct.new(
|
|
142
|
+
:message,
|
|
143
|
+
:original_status_code,
|
|
144
|
+
:original_message,
|
|
145
|
+
:log_stream_arn,
|
|
146
|
+
:error_code)
|
|
147
|
+
SENSITIVE = []
|
|
148
|
+
include Aws::Structure
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Model stream error that occurs during streaming.
|
|
152
|
+
#
|
|
153
|
+
# @!attribute [rw] message
|
|
154
|
+
# Error message.
|
|
155
|
+
# @return [String]
|
|
156
|
+
#
|
|
157
|
+
# @!attribute [rw] error_code
|
|
158
|
+
# Error code.
|
|
159
|
+
# @return [String]
|
|
160
|
+
#
|
|
161
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/ModelStreamError AWS API Documentation
|
|
162
|
+
#
|
|
163
|
+
class ModelStreamError < Struct.new(
|
|
164
|
+
:message,
|
|
165
|
+
:error_code,
|
|
166
|
+
:event_type)
|
|
167
|
+
SENSITIVE = []
|
|
168
|
+
include Aws::Structure
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Request payload part structure.
|
|
172
|
+
#
|
|
173
|
+
# @!attribute [rw] bytes
|
|
174
|
+
# The payload bytes.
|
|
175
|
+
# @return [String]
|
|
176
|
+
#
|
|
177
|
+
# @!attribute [rw] data_type
|
|
178
|
+
# Data type header. Can be one of these possible values: "UTF8",
|
|
179
|
+
# "BINARY".
|
|
180
|
+
# @return [String]
|
|
181
|
+
#
|
|
182
|
+
# @!attribute [rw] completion_state
|
|
183
|
+
# Completion state header. Can be one of these possible values:
|
|
184
|
+
# "PARTIAL", "COMPLETE".
|
|
185
|
+
# @return [String]
|
|
186
|
+
#
|
|
187
|
+
# @!attribute [rw] p
|
|
188
|
+
# Padding string for alignment.
|
|
189
|
+
# @return [String]
|
|
190
|
+
#
|
|
191
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/RequestPayloadPart AWS API Documentation
|
|
192
|
+
#
|
|
193
|
+
class RequestPayloadPart < Struct.new(
|
|
194
|
+
:bytes,
|
|
195
|
+
:data_type,
|
|
196
|
+
:completion_state,
|
|
197
|
+
:p,
|
|
198
|
+
:event_type)
|
|
199
|
+
SENSITIVE = [:bytes]
|
|
200
|
+
include Aws::Structure
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Response payload part structure.
|
|
204
|
+
#
|
|
205
|
+
# @!attribute [rw] bytes
|
|
206
|
+
# The payload bytes.
|
|
207
|
+
# @return [String]
|
|
208
|
+
#
|
|
209
|
+
# @!attribute [rw] data_type
|
|
210
|
+
# Data type header. Can be one of these possible values: "UTF8",
|
|
211
|
+
# "BINARY".
|
|
212
|
+
# @return [String]
|
|
213
|
+
#
|
|
214
|
+
# @!attribute [rw] completion_state
|
|
215
|
+
# Completion state header. Can be one of these possible values:
|
|
216
|
+
# "PARTIAL", "COMPLETE".
|
|
217
|
+
# @return [String]
|
|
218
|
+
#
|
|
219
|
+
# @!attribute [rw] p
|
|
220
|
+
# Padding string for alignment.
|
|
221
|
+
# @return [String]
|
|
222
|
+
#
|
|
223
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/ResponsePayloadPart AWS API Documentation
|
|
224
|
+
#
|
|
225
|
+
class ResponsePayloadPart < Struct.new(
|
|
226
|
+
:bytes,
|
|
227
|
+
:data_type,
|
|
228
|
+
:completion_state,
|
|
229
|
+
:p,
|
|
230
|
+
:event_type)
|
|
231
|
+
SENSITIVE = [:bytes]
|
|
232
|
+
include Aws::Structure
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# The request has failed due to a temporary failure of the server.
|
|
236
|
+
#
|
|
237
|
+
# @!attribute [rw] message
|
|
238
|
+
# Error message.
|
|
239
|
+
# @return [String]
|
|
240
|
+
#
|
|
241
|
+
# @!attribute [rw] error_code
|
|
242
|
+
# Error code.
|
|
243
|
+
# @return [String]
|
|
244
|
+
#
|
|
245
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/ServiceUnavailableError AWS API Documentation
|
|
246
|
+
#
|
|
247
|
+
class ServiceUnavailableError < Struct.new(
|
|
248
|
+
:message,
|
|
249
|
+
:error_code)
|
|
250
|
+
SENSITIVE = []
|
|
251
|
+
include Aws::Structure
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Request stream event union.
|
|
255
|
+
#
|
|
256
|
+
# EventStream is an Enumerator of Events.
|
|
257
|
+
# #event_types #=> Array, returns all modeled event types in the stream
|
|
258
|
+
#
|
|
259
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/RequestStreamEvent AWS API Documentation
|
|
260
|
+
#
|
|
261
|
+
class RequestStreamEvent < Enumerator
|
|
262
|
+
|
|
263
|
+
def event_types
|
|
264
|
+
[
|
|
265
|
+
:payload_part
|
|
266
|
+
]
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Response stream event union.
|
|
272
|
+
#
|
|
273
|
+
# EventStream is an Enumerator of Events.
|
|
274
|
+
# #event_types #=> Array, returns all modeled event types in the stream
|
|
275
|
+
#
|
|
276
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-runtime-http2-2025-10-01/ResponseStreamEvent AWS API Documentation
|
|
277
|
+
#
|
|
278
|
+
class ResponseStreamEvent < Enumerator
|
|
279
|
+
|
|
280
|
+
def event_types
|
|
281
|
+
[
|
|
282
|
+
:payload_part,
|
|
283
|
+
:model_stream_error,
|
|
284
|
+
:internal_stream_failure
|
|
285
|
+
]
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
|
|
@@ -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
|
+
|
|
11
|
+
require 'aws-sdk-core'
|
|
12
|
+
require 'aws-sigv4'
|
|
13
|
+
|
|
14
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:sagemakerruntimehttp2)
|
|
15
|
+
|
|
16
|
+
# This module provides support for Amazon SageMaker Runtime HTTP2. This module is available in the
|
|
17
|
+
# `aws-sdk-sagemakerruntimehttp2` gem.
|
|
18
|
+
#
|
|
19
|
+
# # Async Client
|
|
20
|
+
#
|
|
21
|
+
# The {AsyncClient} class provides one asynchronous method for each API operation.
|
|
22
|
+
# Operation methods each accept a hash of request parameters and return an async
|
|
23
|
+
# response. For streaming operations, you can signal input events and register
|
|
24
|
+
# output event callbacks before waiting on the response.
|
|
25
|
+
#
|
|
26
|
+
# sage_maker_runtime_http2 = Aws::SageMakerRuntimeHTTP2::AsyncClient.new
|
|
27
|
+
# resp = sage_maker_runtime_http2.invoke_endpoint_with_bidirectional_stream(
|
|
28
|
+
# # params and input stream
|
|
29
|
+
# ) do |output_stream|
|
|
30
|
+
# # register callbacks for events
|
|
31
|
+
# end
|
|
32
|
+
#
|
|
33
|
+
# See {AsyncClient} for more information.
|
|
34
|
+
#
|
|
35
|
+
# # Errors
|
|
36
|
+
#
|
|
37
|
+
# Errors returned from Amazon SageMaker Runtime HTTP2 are defined in the
|
|
38
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
|
39
|
+
#
|
|
40
|
+
# begin
|
|
41
|
+
# # do stuff
|
|
42
|
+
# rescue Aws::SageMakerRuntimeHTTP2::Errors::ServiceError
|
|
43
|
+
# # rescues all Amazon SageMaker Runtime HTTP2 API errors
|
|
44
|
+
# end
|
|
45
|
+
#
|
|
46
|
+
# See {Errors} for more information.
|
|
47
|
+
#
|
|
48
|
+
# @!group service
|
|
49
|
+
module Aws::SageMakerRuntimeHTTP2
|
|
50
|
+
autoload :Types, 'aws-sdk-sagemakerruntimehttp2/types'
|
|
51
|
+
autoload :ClientApi, 'aws-sdk-sagemakerruntimehttp2/client_api'
|
|
52
|
+
module Plugins
|
|
53
|
+
autoload :Endpoints, 'aws-sdk-sagemakerruntimehttp2/plugins/endpoints.rb'
|
|
54
|
+
end
|
|
55
|
+
autoload :Errors, 'aws-sdk-sagemakerruntimehttp2/errors'
|
|
56
|
+
autoload :EndpointParameters, 'aws-sdk-sagemakerruntimehttp2/endpoint_parameters'
|
|
57
|
+
autoload :EndpointProvider, 'aws-sdk-sagemakerruntimehttp2/endpoint_provider'
|
|
58
|
+
autoload :Endpoints, 'aws-sdk-sagemakerruntimehttp2/endpoints'
|
|
59
|
+
autoload :AsyncClient, 'aws-sdk-sagemakerruntimehttp2/async_client'
|
|
60
|
+
autoload :EventStreams, 'aws-sdk-sagemakerruntimehttp2/event_streams'
|
|
61
|
+
|
|
62
|
+
GEM_VERSION = '1.0.0'
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
require_relative 'aws-sdk-sagemakerruntimehttp2/customizations'
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
|
2
|
+
#
|
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
module Aws
|
|
9
|
+
module SageMakerRuntimeHTTP2
|
|
10
|
+
class AsyncClient < ::Seahorse::Client::AsyncBase
|
|
11
|
+
include ::Aws::AsyncClientStubs
|
|
12
|
+
|
|
13
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SageMakerRuntimeHTTP2/AsyncClient.html#initialize-instance_method
|
|
14
|
+
def self.new: (
|
|
15
|
+
?credentials: untyped,
|
|
16
|
+
?region: String,
|
|
17
|
+
?access_key_id: String,
|
|
18
|
+
?account_id: String,
|
|
19
|
+
?adaptive_retry_wait_to_fill: bool,
|
|
20
|
+
?auth_scheme_preference: Array[String],
|
|
21
|
+
?convert_params: bool,
|
|
22
|
+
?correct_clock_skew: bool,
|
|
23
|
+
?defaults_mode: String,
|
|
24
|
+
?disable_request_compression: bool,
|
|
25
|
+
?endpoint: String,
|
|
26
|
+
?event_stream_handler: Proc,
|
|
27
|
+
?ignore_configured_endpoint_urls: bool,
|
|
28
|
+
?input_event_stream_handler: Proc,
|
|
29
|
+
?log_formatter: untyped,
|
|
30
|
+
?log_level: Symbol,
|
|
31
|
+
?logger: untyped,
|
|
32
|
+
?max_attempts: Integer,
|
|
33
|
+
?output_event_stream_handler: Proc,
|
|
34
|
+
?profile: String,
|
|
35
|
+
?request_checksum_calculation: String,
|
|
36
|
+
?request_min_compression_size_bytes: Integer,
|
|
37
|
+
?response_checksum_validation: String,
|
|
38
|
+
?retry_backoff: Proc,
|
|
39
|
+
?retry_base_delay: Float,
|
|
40
|
+
?retry_jitter: (:none | :equal | :full | ^(Integer) -> Integer),
|
|
41
|
+
?retry_limit: Integer,
|
|
42
|
+
?retry_max_delay: Integer,
|
|
43
|
+
?retry_mode: ("legacy" | "standard" | "adaptive"),
|
|
44
|
+
?sdk_ua_app_id: String,
|
|
45
|
+
?secret_access_key: String,
|
|
46
|
+
?session_token: String,
|
|
47
|
+
?sigv4a_signing_region_set: Array[String],
|
|
48
|
+
?stub_responses: untyped,
|
|
49
|
+
?telemetry_provider: Aws::Telemetry::TelemetryProviderBase,
|
|
50
|
+
?token_provider: untyped,
|
|
51
|
+
?use_dualstack_endpoint: bool,
|
|
52
|
+
?use_fips_endpoint: bool,
|
|
53
|
+
?validate_params: bool,
|
|
54
|
+
?endpoint_provider: untyped,
|
|
55
|
+
?connection_read_timeout: (Float | Integer),
|
|
56
|
+
?connection_timeout: (Float | Integer),
|
|
57
|
+
?enable_alpn: bool,
|
|
58
|
+
?max_concurrent_streams: (Float | Integer),
|
|
59
|
+
?read_chunk_size: (Float | Integer),
|
|
60
|
+
?http_wire_trace: bool,
|
|
61
|
+
?ssl_verify_peer: bool,
|
|
62
|
+
?ssl_ca_bundle: String,
|
|
63
|
+
?ssl_ca_directory: String,
|
|
64
|
+
?ssl_ca_store: String,
|
|
65
|
+
?raise_response_errors: bool
|
|
66
|
+
) -> instance
|
|
67
|
+
| (?Hash[Symbol, untyped]) -> instance
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
interface _InvokeEndpointWithBidirectionalStreamResponseSuccess
|
|
71
|
+
include ::Seahorse::Client::_ResponseSuccess[Types::InvokeEndpointWithBidirectionalStreamOutput]
|
|
72
|
+
def body: () -> Types::ResponseStreamEvent
|
|
73
|
+
def invoked_production_variant: () -> ::String
|
|
74
|
+
end
|
|
75
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SageMakerRuntimeHTTP2/AsyncClient.html#invoke_endpoint_with_bidirectional_stream-instance_method
|
|
76
|
+
def invoke_endpoint_with_bidirectional_stream: (
|
|
77
|
+
endpoint_name: ::String,
|
|
78
|
+
input_event_stream_handler: untyped,
|
|
79
|
+
output_event_stream_handler: untyped,
|
|
80
|
+
?target_variant: ::String,
|
|
81
|
+
?model_invocation_path: ::String,
|
|
82
|
+
?model_query_string: ::String
|
|
83
|
+
) ?{ (*untyped) -> void } -> _InvokeEndpointWithBidirectionalStreamResponseSuccess
|
|
84
|
+
| (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) ?{ (*untyped) -> void } -> _InvokeEndpointWithBidirectionalStreamResponseSuccess
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
data/sig/errors.rbs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
|
2
|
+
#
|
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
module Aws
|
|
9
|
+
module SageMakerRuntimeHTTP2
|
|
10
|
+
module Errors
|
|
11
|
+
class ServiceError < ::Aws::Errors::ServiceError
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
class InputValidationError < ::Aws::Errors::ServiceError
|
|
15
|
+
def message: () -> ::String
|
|
16
|
+
def error_code: () -> ::String
|
|
17
|
+
end
|
|
18
|
+
class InternalServerError < ::Aws::Errors::ServiceError
|
|
19
|
+
def message: () -> ::String
|
|
20
|
+
def error_code: () -> ::String
|
|
21
|
+
end
|
|
22
|
+
class InternalStreamFailure < ::Aws::Errors::ServiceError
|
|
23
|
+
def message: () -> ::String
|
|
24
|
+
end
|
|
25
|
+
class ModelError < ::Aws::Errors::ServiceError
|
|
26
|
+
def message: () -> ::String
|
|
27
|
+
def original_status_code: () -> ::String
|
|
28
|
+
def original_message: () -> ::String
|
|
29
|
+
def log_stream_arn: () -> ::String
|
|
30
|
+
def error_code: () -> ::String
|
|
31
|
+
end
|
|
32
|
+
class ModelStreamError < ::Aws::Errors::ServiceError
|
|
33
|
+
def message: () -> ::String
|
|
34
|
+
def error_code: () -> ::String
|
|
35
|
+
end
|
|
36
|
+
class ServiceUnavailableError < ::Aws::Errors::ServiceError
|
|
37
|
+
def message: () -> ::String
|
|
38
|
+
def error_code: () -> ::String
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
data/sig/types.rbs
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
|
2
|
+
#
|
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
module Aws::SageMakerRuntimeHTTP2
|
|
9
|
+
module Types
|
|
10
|
+
|
|
11
|
+
class InputValidationError
|
|
12
|
+
attr_accessor message: ::String
|
|
13
|
+
attr_accessor error_code: ::String
|
|
14
|
+
SENSITIVE: []
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
class InternalServerError
|
|
18
|
+
attr_accessor message: ::String
|
|
19
|
+
attr_accessor error_code: ::String
|
|
20
|
+
SENSITIVE: []
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
class InternalStreamFailure
|
|
24
|
+
attr_accessor message: ::String
|
|
25
|
+
attr_accessor event_type: untyped
|
|
26
|
+
SENSITIVE: []
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
class InvokeEndpointWithBidirectionalStreamInput
|
|
30
|
+
attr_accessor endpoint_name: ::String
|
|
31
|
+
attr_accessor body: Types::RequestStreamEvent
|
|
32
|
+
attr_accessor target_variant: ::String
|
|
33
|
+
attr_accessor model_invocation_path: ::String
|
|
34
|
+
attr_accessor model_query_string: ::String
|
|
35
|
+
SENSITIVE: []
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
class InvokeEndpointWithBidirectionalStreamOutput
|
|
39
|
+
attr_accessor body: Types::ResponseStreamEvent
|
|
40
|
+
attr_accessor invoked_production_variant: ::String
|
|
41
|
+
SENSITIVE: []
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
class ModelError
|
|
45
|
+
attr_accessor message: ::String
|
|
46
|
+
attr_accessor original_status_code: ::Integer
|
|
47
|
+
attr_accessor original_message: ::String
|
|
48
|
+
attr_accessor log_stream_arn: ::String
|
|
49
|
+
attr_accessor error_code: ::String
|
|
50
|
+
SENSITIVE: []
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
class ModelStreamError
|
|
54
|
+
attr_accessor message: ::String
|
|
55
|
+
attr_accessor error_code: ::String
|
|
56
|
+
attr_accessor event_type: untyped
|
|
57
|
+
SENSITIVE: []
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
class RequestPayloadPart
|
|
61
|
+
attr_accessor bytes: ::String
|
|
62
|
+
attr_accessor data_type: ::String
|
|
63
|
+
attr_accessor completion_state: ::String
|
|
64
|
+
attr_accessor p: ::String
|
|
65
|
+
attr_accessor event_type: untyped
|
|
66
|
+
SENSITIVE: [:bytes]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
class ResponsePayloadPart
|
|
70
|
+
attr_accessor bytes: ::String
|
|
71
|
+
attr_accessor data_type: ::String
|
|
72
|
+
attr_accessor completion_state: ::String
|
|
73
|
+
attr_accessor p: ::String
|
|
74
|
+
attr_accessor event_type: untyped
|
|
75
|
+
SENSITIVE: [:bytes]
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
class ServiceUnavailableError
|
|
79
|
+
attr_accessor message: ::String
|
|
80
|
+
attr_accessor error_code: ::String
|
|
81
|
+
SENSITIVE: []
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
class RequestStreamEvent < Enumerator[untyped, untyped]
|
|
85
|
+
def event_types: () -> [:payload_part]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
class ResponseStreamEvent < Enumerator[untyped, untyped]
|
|
89
|
+
def event_types: () -> [:payload_part, :model_stream_error, :internal_stream_failure]
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
data/sig/waiters.rbs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
|
2
|
+
#
|
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
module Aws
|
|
9
|
+
module SageMakerRuntimeHTTP2
|
|
10
|
+
module Waiters
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|