aws-sdk-personalizeruntime 1.6.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6ed9cc5b73473ba875d506f9a49029e15443a902
4
- data.tar.gz: d77b631563143cda033c6cee2467d9e629c180ac
2
+ SHA256:
3
+ metadata.gz: 21445ed9e0086265a9e484b93dd74c073393ebf49bb5cbee65be9f9fadd7f0a8
4
+ data.tar.gz: 0acc83487dd628d8eb5185c2f72ea8e5d3d19852639a7f1edcee81717b99c2f7
5
5
  SHA512:
6
- metadata.gz: b7d03bd1d0bac34d2e3e18392e54ad999c7d2691376b2e9b2e98d3bfffa951ed3c9827179b64fa23087679d18870042848fd4c7739658766d0142d8d6c00aed3
7
- data.tar.gz: 9736217558d9eb59a7094fea5209eab37da83a5515c840713fd8ac311217860a619c628279a1f3a8f6503f25b90ab44a90a7d7a0338b62b73551ec76ae4f52a7
6
+ metadata.gz: b709e62499fa300ce0f60f943758077db5b1934753ad29a5df2e4adeb2bbb1dea277c2170e50723bba1bd30a340539201e789af55bc4b1ee5d7101a43dc86ae2
7
+ data.tar.gz: b84818876cde241df3f5a2e435782d83fb9e69f0c43f2dd37af74909ed8f698b414f33972c4a2ed947d1d1fd68f0c8677798bca275430916b765e41f2f9ba431
@@ -24,17 +24,20 @@ require_relative 'aws-sdk-personalizeruntime/customizations'
24
24
  # methods each accept a hash of request parameters and return a response
25
25
  # structure.
26
26
  #
27
+ # personalize_runtime = Aws::PersonalizeRuntime::Client.new
28
+ # resp = personalize_runtime.get_personalized_ranking(params)
29
+ #
27
30
  # See {Client} for more information.
28
31
  #
29
32
  # # Errors
30
33
  #
31
- # Errors returned from Amazon Personalize Runtime all
32
- # extend {Errors::ServiceError}.
34
+ # Errors returned from Amazon Personalize Runtime are defined in the
35
+ # {Errors} module and all extend {Errors::ServiceError}.
33
36
  #
34
37
  # begin
35
38
  # # do stuff
36
39
  # rescue Aws::PersonalizeRuntime::Errors::ServiceError
37
- # # rescues all service API errors
40
+ # # rescues all Amazon Personalize Runtime API errors
38
41
  # end
39
42
  #
40
43
  # See {Errors} for more information.
@@ -42,6 +45,6 @@ require_relative 'aws-sdk-personalizeruntime/customizations'
42
45
  # @service
43
46
  module Aws::PersonalizeRuntime
44
47
 
45
- GEM_VERSION = '1.6.0'
48
+ GEM_VERSION = '1.11.0'
46
49
 
47
50
  end
@@ -30,6 +30,18 @@ require 'aws-sdk-core/plugins/protocols/rest_json.rb'
30
30
  Aws::Plugins::GlobalConfiguration.add_identifier(:personalizeruntime)
31
31
 
32
32
  module Aws::PersonalizeRuntime
33
+ # An API client for PersonalizeRuntime. To construct a client, you need to configure a `:region` and `:credentials`.
34
+ #
35
+ # client = Aws::PersonalizeRuntime::Client.new(
36
+ # region: region_name,
37
+ # credentials: credentials,
38
+ # # ...
39
+ # )
40
+ #
41
+ # For details on configuring region and credentials see
42
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
43
+ #
44
+ # See {#initialize} for a full list of supported configuration options.
33
45
  class Client < Seahorse::Client::Base
34
46
 
35
47
  include Aws::ClientStubs
@@ -93,7 +105,7 @@ module Aws::PersonalizeRuntime
93
105
  # @option options [required, String] :region
94
106
  # The AWS region to connect to. The configured `:region` is
95
107
  # used to determine the service `:endpoint`. When not passed,
96
- # a default `:region` is search for in the following locations:
108
+ # a default `:region` is searched for in the following locations:
97
109
  #
98
110
  # * `Aws.config[:region]`
99
111
  # * `ENV['AWS_REGION']`
@@ -108,6 +120,12 @@ module Aws::PersonalizeRuntime
108
120
  # When set to `true`, a thread polling for endpoints will be running in
109
121
  # the background every 60 secs (default). Defaults to `false`.
110
122
  #
123
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
124
+ # Used only in `adaptive` retry mode. When true, the request will sleep
125
+ # until there is sufficent client side capacity to retry the request.
126
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
127
+ # not retry instead of sleeping.
128
+ #
111
129
  # @option options [Boolean] :client_side_monitoring (false)
112
130
  # When `true`, client-side metrics will be collected for all API requests from
113
131
  # this client.
@@ -132,6 +150,10 @@ module Aws::PersonalizeRuntime
132
150
  # When `true`, an attempt is made to coerce request parameters into
133
151
  # the required types.
134
152
  #
153
+ # @option options [Boolean] :correct_clock_skew (true)
154
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
155
+ # a clock skew correction and retry requests with skewed client clocks.
156
+ #
135
157
  # @option options [Boolean] :disable_host_prefix_injection (false)
136
158
  # Set to true to disable SDK automatically adding host prefix
137
159
  # to default service endpoint when available.
@@ -139,7 +161,7 @@ module Aws::PersonalizeRuntime
139
161
  # @option options [String] :endpoint
140
162
  # The client endpoint is normally constructed from the `:region`
141
163
  # option. You should only configure an `:endpoint` when connecting
142
- # to test endpoints. This should be avalid HTTP(S) URI.
164
+ # to test endpoints. This should be a valid HTTP(S) URI.
143
165
  #
144
166
  # @option options [Integer] :endpoint_cache_max_entries (1000)
145
167
  # Used for the maximum size limit of the LRU cache storing endpoints data
@@ -154,7 +176,7 @@ module Aws::PersonalizeRuntime
154
176
  # requests fetching endpoints information. Defaults to 60 sec.
155
177
  #
156
178
  # @option options [Boolean] :endpoint_discovery (false)
157
- # When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
179
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
158
180
  #
159
181
  # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
160
182
  # The log formatter.
@@ -166,15 +188,29 @@ module Aws::PersonalizeRuntime
166
188
  # The Logger instance to send log messages to. If this option
167
189
  # is not set, logging will be disabled.
168
190
  #
191
+ # @option options [Integer] :max_attempts (3)
192
+ # An integer representing the maximum number attempts that will be made for
193
+ # a single request, including the initial attempt. For example,
194
+ # setting this value to 5 will result in a request being retried up to
195
+ # 4 times. Used in `standard` and `adaptive` retry modes.
196
+ #
169
197
  # @option options [String] :profile ("default")
170
198
  # Used when loading credentials from the shared credentials file
171
199
  # at HOME/.aws/credentials. When not specified, 'default' is used.
172
200
  #
201
+ # @option options [Proc] :retry_backoff
202
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
203
+ # This option is only used in the `legacy` retry mode.
204
+ #
173
205
  # @option options [Float] :retry_base_delay (0.3)
174
- # The base delay in seconds used by the default backoff function.
206
+ # The base delay in seconds used by the default backoff function. This option
207
+ # is only used in the `legacy` retry mode.
175
208
  #
176
209
  # @option options [Symbol] :retry_jitter (:none)
177
- # A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number.
210
+ # A delay randomiser function used by the default backoff function.
211
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
212
+ # otherwise a Proc that takes and returns a number. This option is only used
213
+ # in the `legacy` retry mode.
178
214
  #
179
215
  # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
180
216
  #
@@ -182,11 +218,30 @@ module Aws::PersonalizeRuntime
182
218
  # The maximum number of times to retry failed requests. Only
183
219
  # ~ 500 level server errors and certain ~ 400 level client errors
184
220
  # are retried. Generally, these are throttling errors, data
185
- # checksum errors, networking errors, timeout errors and auth
186
- # errors from expired credentials.
221
+ # checksum errors, networking errors, timeout errors, auth errors,
222
+ # endpoint discovery, and errors from expired credentials.
223
+ # This option is only used in the `legacy` retry mode.
187
224
  #
188
225
  # @option options [Integer] :retry_max_delay (0)
189
- # The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
226
+ # The maximum number of seconds to delay between retries (0 for no limit)
227
+ # used by the default backoff function. This option is only used in the
228
+ # `legacy` retry mode.
229
+ #
230
+ # @option options [String] :retry_mode ("legacy")
231
+ # Specifies which retry algorithm to use. Values are:
232
+ #
233
+ # * `legacy` - The pre-existing retry behavior. This is default value if
234
+ # no retry mode is provided.
235
+ #
236
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
237
+ # This includes support for retry quotas, which limit the number of
238
+ # unsuccessful retries a client can make.
239
+ #
240
+ # * `adaptive` - An experimental retry mode that includes all the
241
+ # functionality of `standard` mode along with automatic client side
242
+ # throttling. This is a provisional mode that may change behavior
243
+ # in the future.
244
+ #
190
245
  #
191
246
  # @option options [String] :secret_access_key
192
247
  #
@@ -209,16 +264,15 @@ module Aws::PersonalizeRuntime
209
264
  # requests through. Formatted like 'http://proxy.com:123'.
210
265
  #
211
266
  # @option options [Float] :http_open_timeout (15) The number of
212
- # seconds to wait when opening a HTTP session before rasing a
267
+ # seconds to wait when opening a HTTP session before raising a
213
268
  # `Timeout::Error`.
214
269
  #
215
270
  # @option options [Integer] :http_read_timeout (60) The default
216
271
  # number of seconds to wait for response data. This value can
217
- # safely be set
218
- # per-request on the session yeidled by {#session_for}.
272
+ # safely be set per-request on the session.
219
273
  #
220
274
  # @option options [Float] :http_idle_timeout (5) The number of
221
- # seconds a connection is allowed to sit idble before it is
275
+ # seconds a connection is allowed to sit idle before it is
222
276
  # considered stale. Stale connections are closed and removed
223
277
  # from the pool before making a request.
224
278
  #
@@ -227,7 +281,7 @@ module Aws::PersonalizeRuntime
227
281
  # request body. This option has no effect unless the request has
228
282
  # "Expect" header set to "100-continue". Defaults to `nil` which
229
283
  # disables this behaviour. This value can safely be set per
230
- # request on the session yeidled by {#session_for}.
284
+ # request on the session.
231
285
  #
232
286
  # @option options [Boolean] :http_wire_trace (false) When `true`,
233
287
  # HTTP debug output will be sent to the `:logger`.
@@ -280,8 +334,7 @@ module Aws::PersonalizeRuntime
280
334
  # The contextual metadata to use when getting recommendations.
281
335
  # Contextual metadata includes any interaction information that might be
282
336
  # relevant when getting a user's recommendations, such as the user's
283
- # current location or device type. For more information, see Contextual
284
- # Metadata.
337
+ # current location or device type.
285
338
  #
286
339
  # @return [Types::GetPersonalizedRankingResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
287
340
  #
@@ -302,6 +355,7 @@ module Aws::PersonalizeRuntime
302
355
  #
303
356
  # resp.personalized_ranking #=> Array
304
357
  # resp.personalized_ranking[0].item_id #=> String
358
+ # resp.personalized_ranking[0].score #=> Float
305
359
  #
306
360
  # @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetPersonalizedRanking AWS API Documentation
307
361
  #
@@ -347,8 +401,11 @@ module Aws::PersonalizeRuntime
347
401
  # The contextual metadata to use when getting recommendations.
348
402
  # Contextual metadata includes any interaction information that might be
349
403
  # relevant when getting a user's recommendations, such as the user's
350
- # current location or device type. For more information, see Contextual
351
- # Metadata.
404
+ # current location or device type.
405
+ #
406
+ # @option params [String] :filter_arn
407
+ # The ARN of the filter to apply to the returned recommendations. For
408
+ # more information, see Using Filters with Amazon Personalize.
352
409
  #
353
410
  # @return [Types::GetRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
354
411
  #
@@ -364,12 +421,14 @@ module Aws::PersonalizeRuntime
364
421
  # context: {
365
422
  # "AttributeName" => "AttributeValue",
366
423
  # },
424
+ # filter_arn: "Arn",
367
425
  # })
368
426
  #
369
427
  # @example Response structure
370
428
  #
371
429
  # resp.item_list #=> Array
372
430
  # resp.item_list[0].item_id #=> String
431
+ # resp.item_list[0].score #=> Float
373
432
  #
374
433
  # @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetRecommendations AWS API Documentation
375
434
  #
@@ -393,7 +452,7 @@ module Aws::PersonalizeRuntime
393
452
  params: params,
394
453
  config: config)
395
454
  context[:gem_name] = 'aws-sdk-personalizeruntime'
396
- context[:gem_version] = '1.6.0'
455
+ context[:gem_version] = '1.11.0'
397
456
  Seahorse::Client::Request.new(handlers, context)
398
457
  end
399
458
 
@@ -27,6 +27,7 @@ module Aws::PersonalizeRuntime
27
27
  NumResults = Shapes::IntegerShape.new(name: 'NumResults')
28
28
  PredictedItem = Shapes::StructureShape.new(name: 'PredictedItem')
29
29
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
30
+ Score = Shapes::FloatShape.new(name: 'Score')
30
31
  UserID = Shapes::StringShape.new(name: 'UserID')
31
32
 
32
33
  Context.key = Shapes::ShapeRef.new(shape: AttributeName)
@@ -46,6 +47,7 @@ module Aws::PersonalizeRuntime
46
47
  GetRecommendationsRequest.add_member(:user_id, Shapes::ShapeRef.new(shape: UserID, location_name: "userId"))
47
48
  GetRecommendationsRequest.add_member(:num_results, Shapes::ShapeRef.new(shape: NumResults, location_name: "numResults"))
48
49
  GetRecommendationsRequest.add_member(:context, Shapes::ShapeRef.new(shape: Context, location_name: "context"))
50
+ GetRecommendationsRequest.add_member(:filter_arn, Shapes::ShapeRef.new(shape: Arn, location_name: "filterArn"))
49
51
  GetRecommendationsRequest.struct_class = Types::GetRecommendationsRequest
50
52
 
51
53
  GetRecommendationsResponse.add_member(:item_list, Shapes::ShapeRef.new(shape: ItemList, location_name: "itemList"))
@@ -59,6 +61,7 @@ module Aws::PersonalizeRuntime
59
61
  ItemList.member = Shapes::ShapeRef.new(shape: PredictedItem)
60
62
 
61
63
  PredictedItem.add_member(:item_id, Shapes::ShapeRef.new(shape: ItemID, location_name: "itemId"))
64
+ PredictedItem.add_member(:score, Shapes::ShapeRef.new(shape: Score, location_name: "score"))
62
65
  PredictedItem.struct_class = Types::PredictedItem
63
66
 
64
67
  ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
@@ -6,6 +6,30 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::PersonalizeRuntime
9
+
10
+ # When PersonalizeRuntime returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::PersonalizeRuntime::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all PersonalizeRuntime errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::PersonalizeRuntime::Errors::ServiceError
18
+ # # rescues all PersonalizeRuntime API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {InvalidInputException}
29
+ # * {ResourceNotFoundException}
30
+ #
31
+ # Additionally, error classes are dynamically generated for service errors based on the error code
32
+ # if they are not defined above.
9
33
  module Errors
10
34
 
11
35
  extend Aws::Errors::DynamicErrors
@@ -23,7 +47,6 @@ module Aws::PersonalizeRuntime
23
47
  def message
24
48
  @message || @data[:message]
25
49
  end
26
-
27
50
  end
28
51
 
29
52
  class ResourceNotFoundException < ServiceError
@@ -39,7 +62,6 @@ module Aws::PersonalizeRuntime
39
62
  def message
40
63
  @message || @data[:message]
41
64
  end
42
-
43
65
  end
44
66
 
45
67
  end
@@ -6,6 +6,7 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::PersonalizeRuntime
9
+
9
10
  class Resource
10
11
 
11
12
  # @param options ({})
@@ -40,8 +40,7 @@ module Aws::PersonalizeRuntime
40
40
  # The contextual metadata to use when getting recommendations.
41
41
  # Contextual metadata includes any interaction information that might
42
42
  # be relevant when getting a user's recommendations, such as the
43
- # user's current location or device type. For more information, see
44
- # Contextual Metadata.
43
+ # user's current location or device type.
45
44
  # @return [Hash<String,String>]
46
45
  #
47
46
  # @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetPersonalizedRankingRequest AWS API Documentation
@@ -77,6 +76,7 @@ module Aws::PersonalizeRuntime
77
76
  # context: {
78
77
  # "AttributeName" => "AttributeValue",
79
78
  # },
79
+ # filter_arn: "Arn",
80
80
  # }
81
81
  #
82
82
  # @!attribute [rw] campaign_arn
@@ -105,10 +105,14 @@ module Aws::PersonalizeRuntime
105
105
  # The contextual metadata to use when getting recommendations.
106
106
  # Contextual metadata includes any interaction information that might
107
107
  # be relevant when getting a user's recommendations, such as the
108
- # user's current location or device type. For more information, see
109
- # Contextual Metadata.
108
+ # user's current location or device type.
110
109
  # @return [Hash<String,String>]
111
110
  #
111
+ # @!attribute [rw] filter_arn
112
+ # The ARN of the filter to apply to the returned recommendations. For
113
+ # more information, see Using Filters with Amazon Personalize.
114
+ # @return [String]
115
+ #
112
116
  # @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetRecommendationsRequest AWS API Documentation
113
117
  #
114
118
  class GetRecommendationsRequest < Struct.new(
@@ -116,7 +120,8 @@ module Aws::PersonalizeRuntime
116
120
  :item_id,
117
121
  :user_id,
118
122
  :num_results,
119
- :context)
123
+ :context,
124
+ :filter_arn)
120
125
  include Aws::Structure
121
126
  end
122
127
 
@@ -152,10 +157,17 @@ module Aws::PersonalizeRuntime
152
157
  # The recommended item ID.
153
158
  # @return [String]
154
159
  #
160
+ # @!attribute [rw] score
161
+ # A numeric representation of the model's certainty that the item
162
+ # will be the next user selection. For more information on scoring
163
+ # logic, see how-scores-work.
164
+ # @return [Float]
165
+ #
155
166
  # @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/PredictedItem AWS API Documentation
156
167
  #
157
168
  class PredictedItem < Struct.new(
158
- :item_id)
169
+ :item_id,
170
+ :score)
159
171
  include Aws::Structure
160
172
  end
161
173
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-personalizeruntime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.11.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: 2019-12-19 00:00:00.000000000 Z
11
+ date: 2020-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  version: '0'
82
82
  requirements: []
83
83
  rubyforge_project:
84
- rubygems_version: 2.5.2.3
84
+ rubygems_version: 2.7.6.2
85
85
  signing_key:
86
86
  specification_version: 4
87
87
  summary: AWS SDK for Ruby - Amazon Personalize Runtime