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,140 @@
|
|
|
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
|
+
# @api private
|
|
13
|
+
module ClientApi
|
|
14
|
+
|
|
15
|
+
include Seahorse::Model
|
|
16
|
+
|
|
17
|
+
InputValidationError = Shapes::StructureShape.new(name: 'InputValidationError')
|
|
18
|
+
Integer = Shapes::IntegerShape.new(name: 'Integer')
|
|
19
|
+
InternalServerError = Shapes::StructureShape.new(name: 'InternalServerError')
|
|
20
|
+
InternalStreamFailure = Shapes::StructureShape.new(name: 'InternalStreamFailure')
|
|
21
|
+
InvokeEndpointWithBidirectionalStreamInput = Shapes::StructureShape.new(name: 'InvokeEndpointWithBidirectionalStreamInput')
|
|
22
|
+
InvokeEndpointWithBidirectionalStreamInputEndpointNameString = Shapes::StringShape.new(name: 'InvokeEndpointWithBidirectionalStreamInputEndpointNameString')
|
|
23
|
+
InvokeEndpointWithBidirectionalStreamInputModelInvocationPathString = Shapes::StringShape.new(name: 'InvokeEndpointWithBidirectionalStreamInputModelInvocationPathString')
|
|
24
|
+
InvokeEndpointWithBidirectionalStreamInputModelQueryStringString = Shapes::StringShape.new(name: 'InvokeEndpointWithBidirectionalStreamInputModelQueryStringString')
|
|
25
|
+
InvokeEndpointWithBidirectionalStreamInputTargetVariantString = Shapes::StringShape.new(name: 'InvokeEndpointWithBidirectionalStreamInputTargetVariantString')
|
|
26
|
+
InvokeEndpointWithBidirectionalStreamOutput = Shapes::StructureShape.new(name: 'InvokeEndpointWithBidirectionalStreamOutput')
|
|
27
|
+
InvokeEndpointWithBidirectionalStreamOutputInvokedProductionVariantString = Shapes::StringShape.new(name: 'InvokeEndpointWithBidirectionalStreamOutputInvokedProductionVariantString')
|
|
28
|
+
ModelError = Shapes::StructureShape.new(name: 'ModelError')
|
|
29
|
+
ModelStreamError = Shapes::StructureShape.new(name: 'ModelStreamError')
|
|
30
|
+
RequestPayloadPart = Shapes::StructureShape.new(name: 'RequestPayloadPart')
|
|
31
|
+
RequestPayloadPartCompletionStateString = Shapes::StringShape.new(name: 'RequestPayloadPartCompletionStateString')
|
|
32
|
+
RequestPayloadPartDataTypeString = Shapes::StringShape.new(name: 'RequestPayloadPartDataTypeString')
|
|
33
|
+
RequestStreamEvent = Shapes::StructureShape.new(name: 'RequestStreamEvent')
|
|
34
|
+
ResponsePayloadPart = Shapes::StructureShape.new(name: 'ResponsePayloadPart')
|
|
35
|
+
ResponsePayloadPartCompletionStateString = Shapes::StringShape.new(name: 'ResponsePayloadPartCompletionStateString')
|
|
36
|
+
ResponsePayloadPartDataTypeString = Shapes::StringShape.new(name: 'ResponsePayloadPartDataTypeString')
|
|
37
|
+
ResponseStreamEvent = Shapes::StructureShape.new(name: 'ResponseStreamEvent')
|
|
38
|
+
SensitiveBlob = Shapes::BlobShape.new(name: 'SensitiveBlob')
|
|
39
|
+
ServiceUnavailableError = Shapes::StructureShape.new(name: 'ServiceUnavailableError')
|
|
40
|
+
String = Shapes::StringShape.new(name: 'String')
|
|
41
|
+
|
|
42
|
+
InputValidationError.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
|
43
|
+
InputValidationError.add_member(:error_code, Shapes::ShapeRef.new(shape: String, location_name: "ErrorCode"))
|
|
44
|
+
InputValidationError.struct_class = Types::InputValidationError
|
|
45
|
+
|
|
46
|
+
InternalServerError.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
|
47
|
+
InternalServerError.add_member(:error_code, Shapes::ShapeRef.new(shape: String, location_name: "ErrorCode"))
|
|
48
|
+
InternalServerError.struct_class = Types::InternalServerError
|
|
49
|
+
|
|
50
|
+
InternalStreamFailure.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
|
51
|
+
InternalStreamFailure.struct_class = Types::InternalStreamFailure
|
|
52
|
+
|
|
53
|
+
InvokeEndpointWithBidirectionalStreamInput.add_member(:endpoint_name, Shapes::ShapeRef.new(shape: InvokeEndpointWithBidirectionalStreamInputEndpointNameString, required: true, location: "uri", location_name: "EndpointName"))
|
|
54
|
+
InvokeEndpointWithBidirectionalStreamInput.add_member(:body, Shapes::ShapeRef.new(shape: RequestStreamEvent, required: true, eventstream: true, location_name: "Body"))
|
|
55
|
+
InvokeEndpointWithBidirectionalStreamInput.add_member(:target_variant, Shapes::ShapeRef.new(shape: InvokeEndpointWithBidirectionalStreamInputTargetVariantString, location: "header", location_name: "X-Amzn-SageMaker-Target-Variant"))
|
|
56
|
+
InvokeEndpointWithBidirectionalStreamInput.add_member(:model_invocation_path, Shapes::ShapeRef.new(shape: InvokeEndpointWithBidirectionalStreamInputModelInvocationPathString, location: "header", location_name: "X-Amzn-SageMaker-Model-Invocation-Path"))
|
|
57
|
+
InvokeEndpointWithBidirectionalStreamInput.add_member(:model_query_string, Shapes::ShapeRef.new(shape: InvokeEndpointWithBidirectionalStreamInputModelQueryStringString, location: "header", location_name: "X-Amzn-SageMaker-Model-Query-String"))
|
|
58
|
+
InvokeEndpointWithBidirectionalStreamInput.struct_class = Types::InvokeEndpointWithBidirectionalStreamInput
|
|
59
|
+
InvokeEndpointWithBidirectionalStreamInput[:payload] = :body
|
|
60
|
+
InvokeEndpointWithBidirectionalStreamInput[:payload_member] = InvokeEndpointWithBidirectionalStreamInput.member(:body)
|
|
61
|
+
|
|
62
|
+
InvokeEndpointWithBidirectionalStreamOutput.add_member(:body, Shapes::ShapeRef.new(shape: ResponseStreamEvent, required: true, eventstream: true, location_name: "Body"))
|
|
63
|
+
InvokeEndpointWithBidirectionalStreamOutput.add_member(:invoked_production_variant, Shapes::ShapeRef.new(shape: InvokeEndpointWithBidirectionalStreamOutputInvokedProductionVariantString, location: "header", location_name: "X-Amzn-Invoked-Production-Variant"))
|
|
64
|
+
InvokeEndpointWithBidirectionalStreamOutput.struct_class = Types::InvokeEndpointWithBidirectionalStreamOutput
|
|
65
|
+
InvokeEndpointWithBidirectionalStreamOutput[:payload] = :body
|
|
66
|
+
InvokeEndpointWithBidirectionalStreamOutput[:payload_member] = InvokeEndpointWithBidirectionalStreamOutput.member(:body)
|
|
67
|
+
|
|
68
|
+
ModelError.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
|
69
|
+
ModelError.add_member(:original_status_code, Shapes::ShapeRef.new(shape: Integer, location_name: "OriginalStatusCode"))
|
|
70
|
+
ModelError.add_member(:original_message, Shapes::ShapeRef.new(shape: String, location_name: "OriginalMessage"))
|
|
71
|
+
ModelError.add_member(:log_stream_arn, Shapes::ShapeRef.new(shape: String, location_name: "LogStreamArn"))
|
|
72
|
+
ModelError.add_member(:error_code, Shapes::ShapeRef.new(shape: String, location_name: "ErrorCode"))
|
|
73
|
+
ModelError.struct_class = Types::ModelError
|
|
74
|
+
|
|
75
|
+
ModelStreamError.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
|
76
|
+
ModelStreamError.add_member(:error_code, Shapes::ShapeRef.new(shape: String, location_name: "ErrorCode"))
|
|
77
|
+
ModelStreamError.struct_class = Types::ModelStreamError
|
|
78
|
+
|
|
79
|
+
RequestPayloadPart.add_member(:bytes, Shapes::ShapeRef.new(shape: SensitiveBlob, eventpayload: true, eventpayload_type: 'blob', location_name: "Bytes", metadata: {"eventpayload" => true}))
|
|
80
|
+
RequestPayloadPart.add_member(:data_type, Shapes::ShapeRef.new(shape: RequestPayloadPartDataTypeString, eventheader: true, eventheader_type: 'string', location_name: "DataType", metadata: {"eventheader" => true}))
|
|
81
|
+
RequestPayloadPart.add_member(:completion_state, Shapes::ShapeRef.new(shape: RequestPayloadPartCompletionStateString, eventheader: true, eventheader_type: 'string', location_name: "CompletionState", metadata: {"eventheader" => true}))
|
|
82
|
+
RequestPayloadPart.add_member(:p, Shapes::ShapeRef.new(shape: String, eventheader: true, eventheader_type: 'string', location_name: "P", metadata: {"eventheader" => true}))
|
|
83
|
+
RequestPayloadPart.struct_class = Types::RequestPayloadPart
|
|
84
|
+
|
|
85
|
+
RequestStreamEvent.add_member(:payload_part, Shapes::ShapeRef.new(shape: RequestPayloadPart, event: true, location_name: "PayloadPart"))
|
|
86
|
+
RequestStreamEvent.struct_class = Types::RequestStreamEvent
|
|
87
|
+
|
|
88
|
+
ResponsePayloadPart.add_member(:bytes, Shapes::ShapeRef.new(shape: SensitiveBlob, eventpayload: true, eventpayload_type: 'blob', location_name: "Bytes", metadata: {"eventpayload" => true}))
|
|
89
|
+
ResponsePayloadPart.add_member(:data_type, Shapes::ShapeRef.new(shape: ResponsePayloadPartDataTypeString, eventheader: true, eventheader_type: 'string', location_name: "DataType", metadata: {"eventheader" => true}))
|
|
90
|
+
ResponsePayloadPart.add_member(:completion_state, Shapes::ShapeRef.new(shape: ResponsePayloadPartCompletionStateString, eventheader: true, eventheader_type: 'string', location_name: "CompletionState", metadata: {"eventheader" => true}))
|
|
91
|
+
ResponsePayloadPart.add_member(:p, Shapes::ShapeRef.new(shape: String, eventheader: true, eventheader_type: 'string', location_name: "P", metadata: {"eventheader" => true}))
|
|
92
|
+
ResponsePayloadPart.struct_class = Types::ResponsePayloadPart
|
|
93
|
+
|
|
94
|
+
ResponseStreamEvent.add_member(:payload_part, Shapes::ShapeRef.new(shape: ResponsePayloadPart, event: true, location_name: "PayloadPart"))
|
|
95
|
+
ResponseStreamEvent.add_member(:model_stream_error, Shapes::ShapeRef.new(shape: ModelStreamError, location_name: "ModelStreamError"))
|
|
96
|
+
ResponseStreamEvent.add_member(:internal_stream_failure, Shapes::ShapeRef.new(shape: InternalStreamFailure, location_name: "InternalStreamFailure"))
|
|
97
|
+
ResponseStreamEvent.struct_class = Types::ResponseStreamEvent
|
|
98
|
+
|
|
99
|
+
ServiceUnavailableError.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
|
|
100
|
+
ServiceUnavailableError.add_member(:error_code, Shapes::ShapeRef.new(shape: String, location_name: "ErrorCode"))
|
|
101
|
+
ServiceUnavailableError.struct_class = Types::ServiceUnavailableError
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
# @api private
|
|
105
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
|
106
|
+
|
|
107
|
+
api.version = "2025-10-01"
|
|
108
|
+
|
|
109
|
+
api.metadata = {
|
|
110
|
+
"apiVersion" => "2025-10-01",
|
|
111
|
+
"auth" => ["aws.auth#sigv4"],
|
|
112
|
+
"endpointPrefix" => "runtime.sagemaker",
|
|
113
|
+
"protocol" => "rest-json",
|
|
114
|
+
"protocolSettings" => {"h2" => "required"},
|
|
115
|
+
"protocols" => ["rest-json"],
|
|
116
|
+
"serviceFullName" => "Amazon SageMaker Runtime HTTP2",
|
|
117
|
+
"serviceId" => "SageMaker Runtime HTTP2",
|
|
118
|
+
"signatureVersion" => "v4",
|
|
119
|
+
"signingName" => "sagemaker",
|
|
120
|
+
"uid" => "sagemaker-runtime-http2-2025-10-01",
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
api.add_operation(:invoke_endpoint_with_bidirectional_stream, Seahorse::Model::Operation.new.tap do |o|
|
|
124
|
+
o.name = "InvokeEndpointWithBidirectionalStream"
|
|
125
|
+
o.http_method = "POST"
|
|
126
|
+
o.http_request_uri = "/endpoints/{EndpointName}/invocations-bidirectional-stream"
|
|
127
|
+
o.input = Shapes::ShapeRef.new(shape: InvokeEndpointWithBidirectionalStreamInput)
|
|
128
|
+
o.output = Shapes::ShapeRef.new(shape: InvokeEndpointWithBidirectionalStreamOutput)
|
|
129
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
|
|
130
|
+
o.errors << Shapes::ShapeRef.new(shape: InputValidationError)
|
|
131
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailableError)
|
|
132
|
+
o.errors << Shapes::ShapeRef.new(shape: ModelStreamError)
|
|
133
|
+
o.errors << Shapes::ShapeRef.new(shape: ModelError)
|
|
134
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalStreamFailure)
|
|
135
|
+
o.async = true
|
|
136
|
+
end)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
end
|
|
140
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
# Endpoint parameters used to influence endpoints per request.
|
|
12
|
+
#
|
|
13
|
+
# @!attribute use_dual_stack
|
|
14
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
|
15
|
+
#
|
|
16
|
+
# @return [boolean]
|
|
17
|
+
#
|
|
18
|
+
# @!attribute use_fips
|
|
19
|
+
# 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.
|
|
20
|
+
#
|
|
21
|
+
# @return [boolean]
|
|
22
|
+
#
|
|
23
|
+
# @!attribute endpoint
|
|
24
|
+
# Override the endpoint used to send this request
|
|
25
|
+
#
|
|
26
|
+
# @return [string]
|
|
27
|
+
#
|
|
28
|
+
# @!attribute region
|
|
29
|
+
# The AWS region used to dispatch the request.
|
|
30
|
+
#
|
|
31
|
+
# @return [string]
|
|
32
|
+
#
|
|
33
|
+
EndpointParameters = Struct.new(
|
|
34
|
+
:use_dual_stack,
|
|
35
|
+
:use_fips,
|
|
36
|
+
:endpoint,
|
|
37
|
+
:region,
|
|
38
|
+
) do
|
|
39
|
+
include Aws::Structure
|
|
40
|
+
|
|
41
|
+
# @api private
|
|
42
|
+
class << self
|
|
43
|
+
PARAM_MAP = {
|
|
44
|
+
'UseDualStack' => :use_dual_stack,
|
|
45
|
+
'UseFIPS' => :use_fips,
|
|
46
|
+
'Endpoint' => :endpoint,
|
|
47
|
+
'Region' => :region,
|
|
48
|
+
}.freeze
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def initialize(options = {})
|
|
52
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
|
53
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
|
54
|
+
self[:use_fips] = options[:use_fips]
|
|
55
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
|
56
|
+
self[:endpoint] = options[:endpoint]
|
|
57
|
+
self[:region] = options[:region]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def self.create(config, options={})
|
|
61
|
+
new({
|
|
62
|
+
use_dual_stack: config.use_dualstack_endpoint,
|
|
63
|
+
use_fips: config.use_fips_endpoint,
|
|
64
|
+
endpoint: (config.endpoint.to_s unless config.regional_endpoint),
|
|
65
|
+
region: config.region,
|
|
66
|
+
}.merge(options))
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
class EndpointProvider
|
|
12
|
+
def resolve_endpoint(parameters)
|
|
13
|
+
if Aws::Endpoints::Matchers.set?(parameters.endpoint)
|
|
14
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
|
|
15
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
|
16
|
+
end
|
|
17
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
18
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
|
19
|
+
end
|
|
20
|
+
return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
|
|
21
|
+
end
|
|
22
|
+
if Aws::Endpoints::Matchers.set?(parameters.region)
|
|
23
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
|
|
24
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
25
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
26
|
+
end
|
|
27
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
28
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
29
|
+
end
|
|
30
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
31
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
32
|
+
end
|
|
33
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
34
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
35
|
+
end
|
|
36
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
37
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
38
|
+
end
|
|
39
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
40
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
41
|
+
end
|
|
42
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
43
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
44
|
+
end
|
|
45
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-cn") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
46
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
47
|
+
end
|
|
48
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
49
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
50
|
+
end
|
|
51
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
52
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
53
|
+
end
|
|
54
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
55
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
56
|
+
end
|
|
57
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
58
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
59
|
+
end
|
|
60
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
61
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
62
|
+
end
|
|
63
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
64
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
65
|
+
end
|
|
66
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
67
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
68
|
+
end
|
|
69
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
70
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
71
|
+
end
|
|
72
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso-b") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
73
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
74
|
+
end
|
|
75
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso-b") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
76
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
77
|
+
end
|
|
78
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso-b") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
79
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
80
|
+
end
|
|
81
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso-b") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
82
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
83
|
+
end
|
|
84
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso-f") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
85
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
86
|
+
end
|
|
87
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso-f") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
88
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
89
|
+
end
|
|
90
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso-f") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
91
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
92
|
+
end
|
|
93
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-iso-f") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
94
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
95
|
+
end
|
|
96
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-eusc") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
97
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
98
|
+
end
|
|
99
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-eusc") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
100
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
101
|
+
end
|
|
102
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-eusc") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
103
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}:8443", headers: {}, properties: {})
|
|
104
|
+
end
|
|
105
|
+
if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-eusc") && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
106
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime-fips.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}:8443", headers: {}, properties: {})
|
|
107
|
+
end
|
|
108
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
109
|
+
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"))
|
|
110
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
|
111
|
+
end
|
|
112
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
|
113
|
+
end
|
|
114
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, false)
|
|
115
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
|
116
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
|
117
|
+
end
|
|
118
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
|
119
|
+
end
|
|
120
|
+
if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, false) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
|
|
121
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
|
122
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
|
123
|
+
end
|
|
124
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
|
125
|
+
end
|
|
126
|
+
return Aws::Endpoints::Endpoint.new(url: "https://runtime.sagemaker.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
|
130
|
+
raise ArgumentError, 'No endpoint could be resolved'
|
|
131
|
+
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
# @api private
|
|
13
|
+
module Endpoints
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def self.parameters_for_operation(context)
|
|
17
|
+
Aws::SageMakerRuntimeHTTP2::EndpointParameters.create(context.config)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,174 @@
|
|
|
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
|
+
|
|
12
|
+
# When SageMakerRuntimeHTTP2 returns an error response, the Ruby SDK constructs and raises an error.
|
|
13
|
+
# These errors all extend Aws::SageMakerRuntimeHTTP2::Errors::ServiceError < {Aws::Errors::ServiceError}
|
|
14
|
+
#
|
|
15
|
+
# You can rescue all SageMakerRuntimeHTTP2 errors using ServiceError:
|
|
16
|
+
#
|
|
17
|
+
# begin
|
|
18
|
+
# # do stuff
|
|
19
|
+
# rescue Aws::SageMakerRuntimeHTTP2::Errors::ServiceError
|
|
20
|
+
# # rescues all SageMakerRuntimeHTTP2 API errors
|
|
21
|
+
# end
|
|
22
|
+
#
|
|
23
|
+
#
|
|
24
|
+
# ## Request Context
|
|
25
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
|
26
|
+
# information about the request that generated the error.
|
|
27
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
|
28
|
+
#
|
|
29
|
+
# ## Error Classes
|
|
30
|
+
# * {InputValidationError}
|
|
31
|
+
# * {InternalServerError}
|
|
32
|
+
# * {InternalStreamFailure}
|
|
33
|
+
# * {ModelError}
|
|
34
|
+
# * {ModelStreamError}
|
|
35
|
+
# * {ServiceUnavailableError}
|
|
36
|
+
#
|
|
37
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
|
38
|
+
# if they are not defined above.
|
|
39
|
+
module Errors
|
|
40
|
+
|
|
41
|
+
extend Aws::Errors::DynamicErrors
|
|
42
|
+
|
|
43
|
+
class InputValidationError < ServiceError
|
|
44
|
+
|
|
45
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
46
|
+
# @param [String] message
|
|
47
|
+
# @param [Aws::SageMakerRuntimeHTTP2::Types::InputValidationError] data
|
|
48
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
49
|
+
super(context, message, data)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# @return [String]
|
|
53
|
+
def message
|
|
54
|
+
@message || @data[:message]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# @return [String]
|
|
58
|
+
def error_code
|
|
59
|
+
@data[:error_code]
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
class InternalServerError < ServiceError
|
|
64
|
+
|
|
65
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
66
|
+
# @param [String] message
|
|
67
|
+
# @param [Aws::SageMakerRuntimeHTTP2::Types::InternalServerError] data
|
|
68
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
69
|
+
super(context, message, data)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @return [String]
|
|
73
|
+
def message
|
|
74
|
+
@message || @data[:message]
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# @return [String]
|
|
78
|
+
def error_code
|
|
79
|
+
@data[:error_code]
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
class InternalStreamFailure < ServiceError
|
|
84
|
+
|
|
85
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
86
|
+
# @param [String] message
|
|
87
|
+
# @param [Aws::SageMakerRuntimeHTTP2::Types::InternalStreamFailure] data
|
|
88
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
89
|
+
super(context, message, data)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# @return [String]
|
|
93
|
+
def message
|
|
94
|
+
@message || @data[:message]
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
class ModelError < ServiceError
|
|
99
|
+
|
|
100
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
101
|
+
# @param [String] message
|
|
102
|
+
# @param [Aws::SageMakerRuntimeHTTP2::Types::ModelError] data
|
|
103
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
104
|
+
super(context, message, data)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @return [String]
|
|
108
|
+
def message
|
|
109
|
+
@message || @data[:message]
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @return [String]
|
|
113
|
+
def original_status_code
|
|
114
|
+
@data[:original_status_code]
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# @return [String]
|
|
118
|
+
def original_message
|
|
119
|
+
@data[:original_message]
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @return [String]
|
|
123
|
+
def log_stream_arn
|
|
124
|
+
@data[:log_stream_arn]
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# @return [String]
|
|
128
|
+
def error_code
|
|
129
|
+
@data[:error_code]
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
class ModelStreamError < ServiceError
|
|
134
|
+
|
|
135
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
136
|
+
# @param [String] message
|
|
137
|
+
# @param [Aws::SageMakerRuntimeHTTP2::Types::ModelStreamError] data
|
|
138
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
139
|
+
super(context, message, data)
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# @return [String]
|
|
143
|
+
def message
|
|
144
|
+
@message || @data[:message]
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @return [String]
|
|
148
|
+
def error_code
|
|
149
|
+
@data[:error_code]
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
class ServiceUnavailableError < ServiceError
|
|
154
|
+
|
|
155
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
156
|
+
# @param [String] message
|
|
157
|
+
# @param [Aws::SageMakerRuntimeHTTP2::Types::ServiceUnavailableError] data
|
|
158
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
159
|
+
super(context, message, data)
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# @return [String]
|
|
163
|
+
def message
|
|
164
|
+
@message || @data[:message]
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @return [String]
|
|
168
|
+
def error_code
|
|
169
|
+
@data[:error_code]
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
end
|
|
174
|
+
end
|
|
@@ -0,0 +1,93 @@
|
|
|
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 EventStreams
|
|
12
|
+
class RequestStreamEvent
|
|
13
|
+
|
|
14
|
+
def initialize
|
|
15
|
+
@event_emitter = Aws::EventEmitter.new
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# @option params [String, StringIO, File] :bytes
|
|
19
|
+
# The payload bytes.
|
|
20
|
+
#
|
|
21
|
+
# @option params [String] :data_type
|
|
22
|
+
# Data type header. Can be one of these possible values: "UTF8",
|
|
23
|
+
# "BINARY".
|
|
24
|
+
#
|
|
25
|
+
# @option params [String] :completion_state
|
|
26
|
+
# Completion state header. Can be one of these possible values:
|
|
27
|
+
# "PARTIAL", "COMPLETE".
|
|
28
|
+
#
|
|
29
|
+
# @option params [String] :p
|
|
30
|
+
# Padding string for alignment.
|
|
31
|
+
#
|
|
32
|
+
def signal_payload_part_event(params = {})
|
|
33
|
+
@event_emitter.emit(:payload_part, params)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def signal_end_stream
|
|
37
|
+
@event_emitter.emit(:end_stream, {})
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# @api private
|
|
41
|
+
# @return Aws::EventEmitter
|
|
42
|
+
attr_reader :event_emitter
|
|
43
|
+
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
class ResponseStreamEvent
|
|
47
|
+
|
|
48
|
+
def initialize
|
|
49
|
+
@event_emitter = Aws::EventEmitter.new
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def on_payload_part_event(&block)
|
|
53
|
+
@event_emitter.on(:payload_part, block) if block_given?
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def on_model_stream_error_event(&block)
|
|
57
|
+
@event_emitter.on(:model_stream_error, block) if block_given?
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def on_internal_stream_failure_event(&block)
|
|
61
|
+
@event_emitter.on(:internal_stream_failure, block) if block_given?
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def on_error_event(&block)
|
|
65
|
+
@event_emitter.on(:error, block) if block_given?
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def on_initial_response_event(&block)
|
|
69
|
+
@event_emitter.on(:initial_response, block) if block_given?
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def on_unknown_event(&block)
|
|
73
|
+
@event_emitter.on(:unknown_event, block) if block_given?
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def on_event(&block)
|
|
77
|
+
on_payload_part_event(&block)
|
|
78
|
+
on_model_stream_error_event(&block)
|
|
79
|
+
on_internal_stream_failure_event(&block)
|
|
80
|
+
on_error_event(&block)
|
|
81
|
+
on_initial_response_event(&block)
|
|
82
|
+
on_unknown_event(&block)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# @api private
|
|
86
|
+
# @return Aws::EventEmitter
|
|
87
|
+
attr_reader :event_emitter
|
|
88
|
+
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|