aws-sdk-sagemakerruntime 1.33.0 → 1.34.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-sagemakerruntime.rb +1 -1
- data/lib/aws-sdk-sagemakerruntime/client.rb +104 -1
- data/lib/aws-sdk-sagemakerruntime/client_api.rb +28 -0
- data/lib/aws-sdk-sagemakerruntime/types.rb +102 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed1916e9f012474ebf0d3866650b68e3f5ef6fdf8c6962f80d2bdb4e0db9cdb1
|
4
|
+
data.tar.gz: 39cfd66e0a81185f61ec2b08e5d64dcf6635dfcabc14fab0248151ccb728809a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27b89d3553cf700123da8c10e8aaa330558ac3623ff03fee4cb39efd9a04ed0034946a0d901bd1be0df61c8744cebe2fa1f40f0727b179e8dc968a8d8b416139
|
7
|
+
data.tar.gz: 73b6f0ad9241c9c446a51255d1bbd9d9a47dbe4aa63989967c65fd161c0d626bf30d8e52615e0fcb5b1947fb325a25f028b4999b6984f9d46f37c11cb9c1b3d0
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.34.0 (2021-08-18)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Amazon SageMaker Runtime now supports InvokeEndpointAsync to asynchronously invoke endpoints that were created with the AsyncInferenceConfig object in the EndpointConfig. Asynchronous invocations support larger payload sizes in Amazon S3 and longer processing times.
|
8
|
+
|
4
9
|
1.33.0 (2021-07-30)
|
5
10
|
------------------
|
6
11
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.34.0
|
@@ -477,6 +477,109 @@ module Aws::SageMakerRuntime
|
|
477
477
|
req.send_request(options)
|
478
478
|
end
|
479
479
|
|
480
|
+
# After you deploy a model into production using Amazon SageMaker
|
481
|
+
# hosting services, your client applications use this API to get
|
482
|
+
# inferences from the model hosted at the specified endpoint in an
|
483
|
+
# asynchronous manner.
|
484
|
+
#
|
485
|
+
# Inference requests sent to this API are enqueued for asynchronous
|
486
|
+
# processing. The processing of the inference request may or may not
|
487
|
+
# complete before the you receive a response from this API. The response
|
488
|
+
# from this API will not contain the result of the inference request but
|
489
|
+
# contain information about where you can locate it.
|
490
|
+
#
|
491
|
+
# Amazon SageMaker strips all `POST` headers except those supported by
|
492
|
+
# the API. Amazon SageMaker might add additional headers. You should not
|
493
|
+
# rely on the behavior of headers outside those enumerated in the
|
494
|
+
# request syntax.
|
495
|
+
#
|
496
|
+
# Calls to `InvokeEndpointAsync` are authenticated by using AWS
|
497
|
+
# Signature Version 4. For information, see [Authenticating Requests
|
498
|
+
# (AWS Signature Version 4)][1] in the *Amazon S3 API Reference*.
|
499
|
+
#
|
500
|
+
#
|
501
|
+
#
|
502
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
|
503
|
+
#
|
504
|
+
# @option params [required, String] :endpoint_name
|
505
|
+
# The name of the endpoint that you specified when you created the
|
506
|
+
# endpoint using the [ `CreateEndpoint` ][1] API.
|
507
|
+
#
|
508
|
+
#
|
509
|
+
#
|
510
|
+
# [1]: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html
|
511
|
+
#
|
512
|
+
# @option params [String] :content_type
|
513
|
+
# The MIME type of the input data in the request body.
|
514
|
+
#
|
515
|
+
# @option params [String] :accept
|
516
|
+
# The desired MIME type of the inference in the response.
|
517
|
+
#
|
518
|
+
# @option params [String] :custom_attributes
|
519
|
+
# Provides additional information about a request for an inference
|
520
|
+
# submitted to a model hosted at an Amazon SageMaker endpoint. The
|
521
|
+
# information is an opaque value that is forwarded verbatim. You could
|
522
|
+
# use this value, for example, to provide an ID that you can use to
|
523
|
+
# track a request or to provide other metadata that a service endpoint
|
524
|
+
# was programmed to process. The value must consist of no more than 1024
|
525
|
+
# visible US-ASCII characters as specified in [Section 3.3.6. Field
|
526
|
+
# Value Components][1] of the Hypertext Transfer Protocol (HTTP/1.1).
|
527
|
+
#
|
528
|
+
# The code in your model is responsible for setting or updating any
|
529
|
+
# custom attributes in the response. If your code does not set this
|
530
|
+
# value in the response, an empty value is returned. For example, if a
|
531
|
+
# custom attribute represents the trace ID, your model can prepend the
|
532
|
+
# custom attribute with `Trace ID`\: in your post-processing function.
|
533
|
+
#
|
534
|
+
# This feature is currently supported in the AWS SDKs but not in the
|
535
|
+
# Amazon SageMaker Python SDK.
|
536
|
+
#
|
537
|
+
#
|
538
|
+
#
|
539
|
+
# [1]: https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6
|
540
|
+
#
|
541
|
+
# @option params [String] :inference_id
|
542
|
+
# The identifier for the inference request. Amazon SageMaker will
|
543
|
+
# generate an identifier for you if none is specified.
|
544
|
+
#
|
545
|
+
# @option params [required, String] :input_location
|
546
|
+
# The Amazon S3 URI where the inference request payload is stored.
|
547
|
+
#
|
548
|
+
# @option params [Integer] :request_ttl_seconds
|
549
|
+
# Maximum age in seconds a request can be in the queue before it is
|
550
|
+
# marked as expired.
|
551
|
+
#
|
552
|
+
# @return [Types::InvokeEndpointAsyncOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
553
|
+
#
|
554
|
+
# * {Types::InvokeEndpointAsyncOutput#inference_id #inference_id} => String
|
555
|
+
# * {Types::InvokeEndpointAsyncOutput#output_location #output_location} => String
|
556
|
+
#
|
557
|
+
# @example Request syntax with placeholder values
|
558
|
+
#
|
559
|
+
# resp = client.invoke_endpoint_async({
|
560
|
+
# endpoint_name: "EndpointName", # required
|
561
|
+
# content_type: "Header",
|
562
|
+
# accept: "Header",
|
563
|
+
# custom_attributes: "CustomAttributesHeader",
|
564
|
+
# inference_id: "InferenceId",
|
565
|
+
# input_location: "InputLocationHeader", # required
|
566
|
+
# request_ttl_seconds: 1,
|
567
|
+
# })
|
568
|
+
#
|
569
|
+
# @example Response structure
|
570
|
+
#
|
571
|
+
# resp.inference_id #=> String
|
572
|
+
# resp.output_location #=> String
|
573
|
+
#
|
574
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.sagemaker-2017-05-13/InvokeEndpointAsync AWS API Documentation
|
575
|
+
#
|
576
|
+
# @overload invoke_endpoint_async(params = {})
|
577
|
+
# @param [Hash] params ({})
|
578
|
+
def invoke_endpoint_async(params = {}, options = {})
|
579
|
+
req = build_request(:invoke_endpoint_async, params)
|
580
|
+
req.send_request(options)
|
581
|
+
end
|
582
|
+
|
480
583
|
# @!endgroup
|
481
584
|
|
482
585
|
# @param params ({})
|
@@ -490,7 +593,7 @@ module Aws::SageMakerRuntime
|
|
490
593
|
params: params,
|
491
594
|
config: config)
|
492
595
|
context[:gem_name] = 'aws-sdk-sagemakerruntime'
|
493
|
-
context[:gem_version] = '1.
|
596
|
+
context[:gem_version] = '1.34.0'
|
494
597
|
Seahorse::Client::Request.new(handlers, context)
|
495
598
|
end
|
496
599
|
|
@@ -18,12 +18,16 @@ module Aws::SageMakerRuntime
|
|
18
18
|
EndpointName = Shapes::StringShape.new(name: 'EndpointName')
|
19
19
|
Header = Shapes::StringShape.new(name: 'Header')
|
20
20
|
InferenceId = Shapes::StringShape.new(name: 'InferenceId')
|
21
|
+
InputLocationHeader = Shapes::StringShape.new(name: 'InputLocationHeader')
|
21
22
|
InternalFailure = Shapes::StructureShape.new(name: 'InternalFailure')
|
23
|
+
InvokeEndpointAsyncInput = Shapes::StructureShape.new(name: 'InvokeEndpointAsyncInput')
|
24
|
+
InvokeEndpointAsyncOutput = Shapes::StructureShape.new(name: 'InvokeEndpointAsyncOutput')
|
22
25
|
InvokeEndpointInput = Shapes::StructureShape.new(name: 'InvokeEndpointInput')
|
23
26
|
InvokeEndpointOutput = Shapes::StructureShape.new(name: 'InvokeEndpointOutput')
|
24
27
|
LogStreamArn = Shapes::StringShape.new(name: 'LogStreamArn')
|
25
28
|
Message = Shapes::StringShape.new(name: 'Message')
|
26
29
|
ModelError = Shapes::StructureShape.new(name: 'ModelError')
|
30
|
+
RequestTTLSecondsHeader = Shapes::IntegerShape.new(name: 'RequestTTLSecondsHeader')
|
27
31
|
ServiceUnavailable = Shapes::StructureShape.new(name: 'ServiceUnavailable')
|
28
32
|
StatusCode = Shapes::IntegerShape.new(name: 'StatusCode')
|
29
33
|
TargetContainerHostnameHeader = Shapes::StringShape.new(name: 'TargetContainerHostnameHeader')
|
@@ -34,6 +38,19 @@ module Aws::SageMakerRuntime
|
|
34
38
|
InternalFailure.add_member(:message, Shapes::ShapeRef.new(shape: Message, location_name: "Message"))
|
35
39
|
InternalFailure.struct_class = Types::InternalFailure
|
36
40
|
|
41
|
+
InvokeEndpointAsyncInput.add_member(:endpoint_name, Shapes::ShapeRef.new(shape: EndpointName, required: true, location: "uri", location_name: "EndpointName"))
|
42
|
+
InvokeEndpointAsyncInput.add_member(:content_type, Shapes::ShapeRef.new(shape: Header, location: "header", location_name: "X-Amzn-SageMaker-Content-Type"))
|
43
|
+
InvokeEndpointAsyncInput.add_member(:accept, Shapes::ShapeRef.new(shape: Header, location: "header", location_name: "X-Amzn-SageMaker-Accept"))
|
44
|
+
InvokeEndpointAsyncInput.add_member(:custom_attributes, Shapes::ShapeRef.new(shape: CustomAttributesHeader, location: "header", location_name: "X-Amzn-SageMaker-Custom-Attributes"))
|
45
|
+
InvokeEndpointAsyncInput.add_member(:inference_id, Shapes::ShapeRef.new(shape: InferenceId, location: "header", location_name: "X-Amzn-SageMaker-Inference-Id"))
|
46
|
+
InvokeEndpointAsyncInput.add_member(:input_location, Shapes::ShapeRef.new(shape: InputLocationHeader, required: true, location: "header", location_name: "X-Amzn-SageMaker-InputLocation"))
|
47
|
+
InvokeEndpointAsyncInput.add_member(:request_ttl_seconds, Shapes::ShapeRef.new(shape: RequestTTLSecondsHeader, location: "header", location_name: "X-Amzn-SageMaker-RequestTTLSeconds"))
|
48
|
+
InvokeEndpointAsyncInput.struct_class = Types::InvokeEndpointAsyncInput
|
49
|
+
|
50
|
+
InvokeEndpointAsyncOutput.add_member(:inference_id, Shapes::ShapeRef.new(shape: Header, location_name: "InferenceId"))
|
51
|
+
InvokeEndpointAsyncOutput.add_member(:output_location, Shapes::ShapeRef.new(shape: Header, location: "header", location_name: "X-Amzn-SageMaker-OutputLocation"))
|
52
|
+
InvokeEndpointAsyncOutput.struct_class = Types::InvokeEndpointAsyncOutput
|
53
|
+
|
37
54
|
InvokeEndpointInput.add_member(:endpoint_name, Shapes::ShapeRef.new(shape: EndpointName, required: true, location: "uri", location_name: "EndpointName"))
|
38
55
|
InvokeEndpointInput.add_member(:body, Shapes::ShapeRef.new(shape: BodyBlob, required: true, location_name: "Body"))
|
39
56
|
InvokeEndpointInput.add_member(:content_type, Shapes::ShapeRef.new(shape: Header, location: "header", location_name: "Content-Type"))
|
@@ -96,6 +113,17 @@ module Aws::SageMakerRuntime
|
|
96
113
|
o.errors << Shapes::ShapeRef.new(shape: ValidationError)
|
97
114
|
o.errors << Shapes::ShapeRef.new(shape: ModelError)
|
98
115
|
end)
|
116
|
+
|
117
|
+
api.add_operation(:invoke_endpoint_async, Seahorse::Model::Operation.new.tap do |o|
|
118
|
+
o.name = "InvokeEndpointAsync"
|
119
|
+
o.http_method = "POST"
|
120
|
+
o.http_request_uri = "/endpoints/{EndpointName}/async-invocations"
|
121
|
+
o.input = Shapes::ShapeRef.new(shape: InvokeEndpointAsyncInput)
|
122
|
+
o.output = Shapes::ShapeRef.new(shape: InvokeEndpointAsyncOutput)
|
123
|
+
o.errors << Shapes::ShapeRef.new(shape: InternalFailure)
|
124
|
+
o.errors << Shapes::ShapeRef.new(shape: ServiceUnavailable)
|
125
|
+
o.errors << Shapes::ShapeRef.new(shape: ValidationError)
|
126
|
+
end)
|
99
127
|
end
|
100
128
|
|
101
129
|
end
|
@@ -23,6 +23,108 @@ module Aws::SageMakerRuntime
|
|
23
23
|
include Aws::Structure
|
24
24
|
end
|
25
25
|
|
26
|
+
# @note When making an API call, you may pass InvokeEndpointAsyncInput
|
27
|
+
# data as a hash:
|
28
|
+
#
|
29
|
+
# {
|
30
|
+
# endpoint_name: "EndpointName", # required
|
31
|
+
# content_type: "Header",
|
32
|
+
# accept: "Header",
|
33
|
+
# custom_attributes: "CustomAttributesHeader",
|
34
|
+
# inference_id: "InferenceId",
|
35
|
+
# input_location: "InputLocationHeader", # required
|
36
|
+
# request_ttl_seconds: 1,
|
37
|
+
# }
|
38
|
+
#
|
39
|
+
# @!attribute [rw] endpoint_name
|
40
|
+
# The name of the endpoint that you specified when you created the
|
41
|
+
# endpoint using the [ `CreateEndpoint` ][1] API.
|
42
|
+
#
|
43
|
+
#
|
44
|
+
#
|
45
|
+
# [1]: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html
|
46
|
+
# @return [String]
|
47
|
+
#
|
48
|
+
# @!attribute [rw] content_type
|
49
|
+
# The MIME type of the input data in the request body.
|
50
|
+
# @return [String]
|
51
|
+
#
|
52
|
+
# @!attribute [rw] accept
|
53
|
+
# The desired MIME type of the inference in the response.
|
54
|
+
# @return [String]
|
55
|
+
#
|
56
|
+
# @!attribute [rw] custom_attributes
|
57
|
+
# Provides additional information about a request for an inference
|
58
|
+
# submitted to a model hosted at an Amazon SageMaker endpoint. The
|
59
|
+
# information is an opaque value that is forwarded verbatim. You could
|
60
|
+
# use this value, for example, to provide an ID that you can use to
|
61
|
+
# track a request or to provide other metadata that a service endpoint
|
62
|
+
# was programmed to process. The value must consist of no more than
|
63
|
+
# 1024 visible US-ASCII characters as specified in [Section 3.3.6.
|
64
|
+
# Field Value Components][1] of the Hypertext Transfer Protocol
|
65
|
+
# (HTTP/1.1).
|
66
|
+
#
|
67
|
+
# The code in your model is responsible for setting or updating any
|
68
|
+
# custom attributes in the response. If your code does not set this
|
69
|
+
# value in the response, an empty value is returned. For example, if a
|
70
|
+
# custom attribute represents the trace ID, your model can prepend the
|
71
|
+
# custom attribute with `Trace ID`\: in your post-processing function.
|
72
|
+
#
|
73
|
+
# This feature is currently supported in the AWS SDKs but not in the
|
74
|
+
# Amazon SageMaker Python SDK.
|
75
|
+
#
|
76
|
+
#
|
77
|
+
#
|
78
|
+
# [1]: https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6
|
79
|
+
# @return [String]
|
80
|
+
#
|
81
|
+
# @!attribute [rw] inference_id
|
82
|
+
# The identifier for the inference request. Amazon SageMaker will
|
83
|
+
# generate an identifier for you if none is specified.
|
84
|
+
# @return [String]
|
85
|
+
#
|
86
|
+
# @!attribute [rw] input_location
|
87
|
+
# The Amazon S3 URI where the inference request payload is stored.
|
88
|
+
# @return [String]
|
89
|
+
#
|
90
|
+
# @!attribute [rw] request_ttl_seconds
|
91
|
+
# Maximum age in seconds a request can be in the queue before it is
|
92
|
+
# marked as expired.
|
93
|
+
# @return [Integer]
|
94
|
+
#
|
95
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.sagemaker-2017-05-13/InvokeEndpointAsyncInput AWS API Documentation
|
96
|
+
#
|
97
|
+
class InvokeEndpointAsyncInput < Struct.new(
|
98
|
+
:endpoint_name,
|
99
|
+
:content_type,
|
100
|
+
:accept,
|
101
|
+
:custom_attributes,
|
102
|
+
:inference_id,
|
103
|
+
:input_location,
|
104
|
+
:request_ttl_seconds)
|
105
|
+
SENSITIVE = [:custom_attributes]
|
106
|
+
include Aws::Structure
|
107
|
+
end
|
108
|
+
|
109
|
+
# @!attribute [rw] inference_id
|
110
|
+
# Identifier for an inference request. This will be the same as the
|
111
|
+
# `InferenceId` specified in the input. Amazon SageMaker will generate
|
112
|
+
# an identifier for you if you do not specify one.
|
113
|
+
# @return [String]
|
114
|
+
#
|
115
|
+
# @!attribute [rw] output_location
|
116
|
+
# The Amazon S3 URI where the inference response payload is stored.
|
117
|
+
# @return [String]
|
118
|
+
#
|
119
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/runtime.sagemaker-2017-05-13/InvokeEndpointAsyncOutput AWS API Documentation
|
120
|
+
#
|
121
|
+
class InvokeEndpointAsyncOutput < Struct.new(
|
122
|
+
:inference_id,
|
123
|
+
:output_location)
|
124
|
+
SENSITIVE = []
|
125
|
+
include Aws::Structure
|
126
|
+
end
|
127
|
+
|
26
128
|
# @note When making an API call, you may pass InvokeEndpointInput
|
27
129
|
# data as a hash:
|
28
130
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-sagemakerruntime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|