aws-sdk-personalizeevents 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/lib/aws-sdk-personalizeevents.rb +47 -0
- data/lib/aws-sdk-personalizeevents/client.rb +334 -0
- data/lib/aws-sdk-personalizeevents/client_api.rb +70 -0
- data/lib/aws-sdk-personalizeevents/customizations.rb +0 -0
- data/lib/aws-sdk-personalizeevents/errors.rb +30 -0
- data/lib/aws-sdk-personalizeevents/resource.rb +23 -0
- data/lib/aws-sdk-personalizeevents/types.rb +134 -0
- metadata +88 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 1eb891f95dd34f42bc9e55e0274f82e01b38b035
|
|
4
|
+
data.tar.gz: e081bdc03680a112f9032689d3946c159b5be6a7
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b19a22b8ca1d2c8b7fe2e805da37fc4b773fcd9ba37bab56d955b469a214e59960b61b36d6fd210159444de1bbe9e2d6cac602a6e9372ee0b286453de1e82cc2
|
|
7
|
+
data.tar.gz: 95ff3ba16e318d543bc5bda8b4daf752cfedd688db68fb39476967af8c44db2bfedc447ad897c0e523e56d6a163cee2b9bb05da1b5ea4b4c20154d4b0004e69a
|
|
@@ -0,0 +1,47 @@
|
|
|
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/master/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
require 'aws-sdk-core'
|
|
9
|
+
require 'aws-sigv4'
|
|
10
|
+
|
|
11
|
+
require_relative 'aws-sdk-personalizeevents/types'
|
|
12
|
+
require_relative 'aws-sdk-personalizeevents/client_api'
|
|
13
|
+
require_relative 'aws-sdk-personalizeevents/client'
|
|
14
|
+
require_relative 'aws-sdk-personalizeevents/errors'
|
|
15
|
+
require_relative 'aws-sdk-personalizeevents/resource'
|
|
16
|
+
require_relative 'aws-sdk-personalizeevents/customizations'
|
|
17
|
+
|
|
18
|
+
# This module provides support for Amazon Personalize Events. This module is available in the
|
|
19
|
+
# `aws-sdk-personalizeevents` gem.
|
|
20
|
+
#
|
|
21
|
+
# # Client
|
|
22
|
+
#
|
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
|
25
|
+
# structure.
|
|
26
|
+
#
|
|
27
|
+
# See {Client} for more information.
|
|
28
|
+
#
|
|
29
|
+
# # Errors
|
|
30
|
+
#
|
|
31
|
+
# Errors returned from Amazon Personalize Events all
|
|
32
|
+
# extend {Errors::ServiceError}.
|
|
33
|
+
#
|
|
34
|
+
# begin
|
|
35
|
+
# # do stuff
|
|
36
|
+
# rescue Aws::PersonalizeEvents::Errors::ServiceError
|
|
37
|
+
# # rescues all service API errors
|
|
38
|
+
# end
|
|
39
|
+
#
|
|
40
|
+
# See {Errors} for more information.
|
|
41
|
+
#
|
|
42
|
+
# @service
|
|
43
|
+
module Aws::PersonalizeEvents
|
|
44
|
+
|
|
45
|
+
GEM_VERSION = '1.0.0'
|
|
46
|
+
|
|
47
|
+
end
|
|
@@ -0,0 +1,334 @@
|
|
|
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/master/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
|
18
|
+
require 'aws-sdk-core/plugins/endpoint_discovery.rb'
|
|
19
|
+
require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
|
20
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
|
21
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
|
22
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
|
23
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
|
24
|
+
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
25
|
+
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
|
26
|
+
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
|
27
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
|
28
|
+
require 'aws-sdk-core/plugins/protocols/rest_json.rb'
|
|
29
|
+
|
|
30
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:personalizeevents)
|
|
31
|
+
|
|
32
|
+
module Aws::PersonalizeEvents
|
|
33
|
+
class Client < Seahorse::Client::Base
|
|
34
|
+
|
|
35
|
+
include Aws::ClientStubs
|
|
36
|
+
|
|
37
|
+
@identifier = :personalizeevents
|
|
38
|
+
|
|
39
|
+
set_api(ClientApi::API)
|
|
40
|
+
|
|
41
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
|
42
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
|
43
|
+
add_plugin(Aws::Plugins::Logging)
|
|
44
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
|
45
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
|
46
|
+
add_plugin(Aws::Plugins::UserAgent)
|
|
47
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
|
48
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
|
49
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
|
50
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
|
51
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
|
52
|
+
add_plugin(Aws::Plugins::EndpointPattern)
|
|
53
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
|
54
|
+
add_plugin(Aws::Plugins::StubResponses)
|
|
55
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
|
56
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
|
57
|
+
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
|
58
|
+
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
|
59
|
+
add_plugin(Aws::Plugins::TransferEncoding)
|
|
60
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
|
61
|
+
add_plugin(Aws::Plugins::Protocols::RestJson)
|
|
62
|
+
|
|
63
|
+
# @overload initialize(options)
|
|
64
|
+
# @param [Hash] options
|
|
65
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
|
66
|
+
# Your AWS credentials. This can be an instance of any one of the
|
|
67
|
+
# following classes:
|
|
68
|
+
#
|
|
69
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
|
70
|
+
# credentials.
|
|
71
|
+
#
|
|
72
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
|
73
|
+
# from an EC2 IMDS on an EC2 instance.
|
|
74
|
+
#
|
|
75
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
|
76
|
+
# shared file, such as `~/.aws/config`.
|
|
77
|
+
#
|
|
78
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
|
79
|
+
#
|
|
80
|
+
# When `:credentials` are not configured directly, the following
|
|
81
|
+
# locations will be searched for credentials:
|
|
82
|
+
#
|
|
83
|
+
# * `Aws.config[:credentials]`
|
|
84
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
|
85
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
|
86
|
+
# * `~/.aws/credentials`
|
|
87
|
+
# * `~/.aws/config`
|
|
88
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
|
89
|
+
# very aggressive. Construct and pass an instance of
|
|
90
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
|
91
|
+
# timeouts.
|
|
92
|
+
#
|
|
93
|
+
# @option options [required, String] :region
|
|
94
|
+
# The AWS region to connect to. The configured `:region` is
|
|
95
|
+
# used to determine the service `:endpoint`. When not passed,
|
|
96
|
+
# a default `:region` is search for in the following locations:
|
|
97
|
+
#
|
|
98
|
+
# * `Aws.config[:region]`
|
|
99
|
+
# * `ENV['AWS_REGION']`
|
|
100
|
+
# * `ENV['AMAZON_REGION']`
|
|
101
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
|
102
|
+
# * `~/.aws/credentials`
|
|
103
|
+
# * `~/.aws/config`
|
|
104
|
+
#
|
|
105
|
+
# @option options [String] :access_key_id
|
|
106
|
+
#
|
|
107
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
|
108
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
|
109
|
+
# the background every 60 secs (default). Defaults to `false`.
|
|
110
|
+
#
|
|
111
|
+
# @option options [Boolean] :client_side_monitoring (false)
|
|
112
|
+
# When `true`, client-side metrics will be collected for all API requests from
|
|
113
|
+
# this client.
|
|
114
|
+
#
|
|
115
|
+
# @option options [String] :client_side_monitoring_client_id ("")
|
|
116
|
+
# Allows you to provide an identifier for this client which will be attached to
|
|
117
|
+
# all generated client side metrics. Defaults to an empty string.
|
|
118
|
+
#
|
|
119
|
+
# @option options [Integer] :client_side_monitoring_port (31000)
|
|
120
|
+
# Required for publishing client metrics. The port that the client side monitoring
|
|
121
|
+
# agent is running on, where client metrics will be published via UDP.
|
|
122
|
+
#
|
|
123
|
+
# @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
|
|
124
|
+
# Allows you to provide a custom client-side monitoring publisher class. By default,
|
|
125
|
+
# will use the Client Side Monitoring Agent Publisher.
|
|
126
|
+
#
|
|
127
|
+
# @option options [Boolean] :convert_params (true)
|
|
128
|
+
# When `true`, an attempt is made to coerce request parameters into
|
|
129
|
+
# the required types.
|
|
130
|
+
#
|
|
131
|
+
# @option options [Boolean] :disable_host_prefix_injection (false)
|
|
132
|
+
# Set to true to disable SDK automatically adding host prefix
|
|
133
|
+
# to default service endpoint when available.
|
|
134
|
+
#
|
|
135
|
+
# @option options [String] :endpoint
|
|
136
|
+
# The client endpoint is normally constructed from the `:region`
|
|
137
|
+
# option. You should only configure an `:endpoint` when connecting
|
|
138
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
|
139
|
+
#
|
|
140
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
|
141
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
|
142
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
|
143
|
+
#
|
|
144
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
|
145
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
|
146
|
+
#
|
|
147
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
|
148
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
|
149
|
+
# Use this option to config the time interval in seconds for making
|
|
150
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
|
151
|
+
#
|
|
152
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
|
153
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
|
|
154
|
+
#
|
|
155
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
|
156
|
+
# The log formatter.
|
|
157
|
+
#
|
|
158
|
+
# @option options [Symbol] :log_level (:info)
|
|
159
|
+
# The log level to send messages to the `:logger` at.
|
|
160
|
+
#
|
|
161
|
+
# @option options [Logger] :logger
|
|
162
|
+
# The Logger instance to send log messages to. If this option
|
|
163
|
+
# is not set, logging will be disabled.
|
|
164
|
+
#
|
|
165
|
+
# @option options [String] :profile ("default")
|
|
166
|
+
# Used when loading credentials from the shared credentials file
|
|
167
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
|
168
|
+
#
|
|
169
|
+
# @option options [Float] :retry_base_delay (0.3)
|
|
170
|
+
# The base delay in seconds used by the default backoff function.
|
|
171
|
+
#
|
|
172
|
+
# @option options [Symbol] :retry_jitter (:none)
|
|
173
|
+
# 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.
|
|
174
|
+
#
|
|
175
|
+
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
|
176
|
+
#
|
|
177
|
+
# @option options [Integer] :retry_limit (3)
|
|
178
|
+
# The maximum number of times to retry failed requests. Only
|
|
179
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
|
180
|
+
# are retried. Generally, these are throttling errors, data
|
|
181
|
+
# checksum errors, networking errors, timeout errors and auth
|
|
182
|
+
# errors from expired credentials.
|
|
183
|
+
#
|
|
184
|
+
# @option options [Integer] :retry_max_delay (0)
|
|
185
|
+
# The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function.
|
|
186
|
+
#
|
|
187
|
+
# @option options [String] :secret_access_key
|
|
188
|
+
#
|
|
189
|
+
# @option options [String] :session_token
|
|
190
|
+
#
|
|
191
|
+
# @option options [Boolean] :stub_responses (false)
|
|
192
|
+
# Causes the client to return stubbed responses. By default
|
|
193
|
+
# fake responses are generated and returned. You can specify
|
|
194
|
+
# the response data to return or errors to raise by calling
|
|
195
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
|
196
|
+
#
|
|
197
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
|
198
|
+
# requests are made, and retries are disabled.
|
|
199
|
+
#
|
|
200
|
+
# @option options [Boolean] :validate_params (true)
|
|
201
|
+
# When `true`, request parameters are validated before
|
|
202
|
+
# sending the request.
|
|
203
|
+
#
|
|
204
|
+
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
|
205
|
+
# requests through. Formatted like 'http://proxy.com:123'.
|
|
206
|
+
#
|
|
207
|
+
# @option options [Float] :http_open_timeout (15) The number of
|
|
208
|
+
# seconds to wait when opening a HTTP session before rasing a
|
|
209
|
+
# `Timeout::Error`.
|
|
210
|
+
#
|
|
211
|
+
# @option options [Integer] :http_read_timeout (60) The default
|
|
212
|
+
# number of seconds to wait for response data. This value can
|
|
213
|
+
# safely be set
|
|
214
|
+
# per-request on the session yeidled by {#session_for}.
|
|
215
|
+
#
|
|
216
|
+
# @option options [Float] :http_idle_timeout (5) The number of
|
|
217
|
+
# seconds a connection is allowed to sit idble before it is
|
|
218
|
+
# considered stale. Stale connections are closed and removed
|
|
219
|
+
# from the pool before making a request.
|
|
220
|
+
#
|
|
221
|
+
# @option options [Float] :http_continue_timeout (1) The number of
|
|
222
|
+
# seconds to wait for a 100-continue response before sending the
|
|
223
|
+
# request body. This option has no effect unless the request has
|
|
224
|
+
# "Expect" header set to "100-continue". Defaults to `nil` which
|
|
225
|
+
# disables this behaviour. This value can safely be set per
|
|
226
|
+
# request on the session yeidled by {#session_for}.
|
|
227
|
+
#
|
|
228
|
+
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
|
229
|
+
# HTTP debug output will be sent to the `:logger`.
|
|
230
|
+
#
|
|
231
|
+
# @option options [Boolean] :ssl_verify_peer (true) When `true`,
|
|
232
|
+
# SSL peer certificates are verified when establishing a
|
|
233
|
+
# connection.
|
|
234
|
+
#
|
|
235
|
+
# @option options [String] :ssl_ca_bundle Full path to the SSL
|
|
236
|
+
# certificate authority bundle file that should be used when
|
|
237
|
+
# verifying peer certificates. If you do not pass
|
|
238
|
+
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
|
239
|
+
# will be used if available.
|
|
240
|
+
#
|
|
241
|
+
# @option options [String] :ssl_ca_directory Full path of the
|
|
242
|
+
# directory that contains the unbundled SSL certificate
|
|
243
|
+
# authority files for verifying peer certificates. If you do
|
|
244
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
|
245
|
+
# system default will be used if available.
|
|
246
|
+
#
|
|
247
|
+
def initialize(*args)
|
|
248
|
+
super
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# @!group API Operations
|
|
252
|
+
|
|
253
|
+
# Records user interaction event data.
|
|
254
|
+
#
|
|
255
|
+
# @option params [required, String] :tracking_id
|
|
256
|
+
# The tracking ID for the event. The ID is generated by a call to the
|
|
257
|
+
# [CreateEventTracker][1] API.
|
|
258
|
+
#
|
|
259
|
+
#
|
|
260
|
+
#
|
|
261
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/API_CreateEventTracker.html
|
|
262
|
+
#
|
|
263
|
+
# @option params [String] :user_id
|
|
264
|
+
# The user associated with the event.
|
|
265
|
+
#
|
|
266
|
+
# @option params [required, String] :session_id
|
|
267
|
+
# The session ID associated with the user's visit.
|
|
268
|
+
#
|
|
269
|
+
# @option params [required, Array<Types::Event>] :event_list
|
|
270
|
+
# A list of event data from the session.
|
|
271
|
+
#
|
|
272
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
|
273
|
+
#
|
|
274
|
+
# @example Request syntax with placeholder values
|
|
275
|
+
#
|
|
276
|
+
# resp = client.put_events({
|
|
277
|
+
# tracking_id: "StringType", # required
|
|
278
|
+
# user_id: "UserId",
|
|
279
|
+
# session_id: "StringType", # required
|
|
280
|
+
# event_list: [ # required
|
|
281
|
+
# {
|
|
282
|
+
# event_id: "StringType",
|
|
283
|
+
# event_type: "StringType", # required
|
|
284
|
+
# properties: "EventPropertiesJSON", # required
|
|
285
|
+
# sent_at: Time.now, # required
|
|
286
|
+
# },
|
|
287
|
+
# ],
|
|
288
|
+
# })
|
|
289
|
+
#
|
|
290
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-events-2018-03-22/PutEvents AWS API Documentation
|
|
291
|
+
#
|
|
292
|
+
# @overload put_events(params = {})
|
|
293
|
+
# @param [Hash] params ({})
|
|
294
|
+
def put_events(params = {}, options = {})
|
|
295
|
+
req = build_request(:put_events, params)
|
|
296
|
+
req.send_request(options)
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# @!endgroup
|
|
300
|
+
|
|
301
|
+
# @param params ({})
|
|
302
|
+
# @api private
|
|
303
|
+
def build_request(operation_name, params = {})
|
|
304
|
+
handlers = @handlers.for(operation_name)
|
|
305
|
+
context = Seahorse::Client::RequestContext.new(
|
|
306
|
+
operation_name: operation_name,
|
|
307
|
+
operation: config.api.operation(operation_name),
|
|
308
|
+
client: self,
|
|
309
|
+
params: params,
|
|
310
|
+
config: config)
|
|
311
|
+
context[:gem_name] = 'aws-sdk-personalizeevents'
|
|
312
|
+
context[:gem_version] = '1.0.0'
|
|
313
|
+
Seahorse::Client::Request.new(handlers, context)
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# @api private
|
|
317
|
+
# @deprecated
|
|
318
|
+
def waiter_names
|
|
319
|
+
[]
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
class << self
|
|
323
|
+
|
|
324
|
+
# @api private
|
|
325
|
+
attr_reader :identifier
|
|
326
|
+
|
|
327
|
+
# @api private
|
|
328
|
+
def errors_module
|
|
329
|
+
Errors
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
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/master/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
module Aws::PersonalizeEvents
|
|
9
|
+
# @api private
|
|
10
|
+
module ClientApi
|
|
11
|
+
|
|
12
|
+
include Seahorse::Model
|
|
13
|
+
|
|
14
|
+
Date = Shapes::TimestampShape.new(name: 'Date')
|
|
15
|
+
ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
|
|
16
|
+
Event = Shapes::StructureShape.new(name: 'Event')
|
|
17
|
+
EventList = Shapes::ListShape.new(name: 'EventList')
|
|
18
|
+
EventPropertiesJSON = Shapes::StringShape.new(name: 'EventPropertiesJSON')
|
|
19
|
+
InvalidInputException = Shapes::StructureShape.new(name: 'InvalidInputException')
|
|
20
|
+
PutEventsRequest = Shapes::StructureShape.new(name: 'PutEventsRequest')
|
|
21
|
+
StringType = Shapes::StringShape.new(name: 'StringType')
|
|
22
|
+
UserId = Shapes::StringShape.new(name: 'UserId')
|
|
23
|
+
|
|
24
|
+
Event.add_member(:event_id, Shapes::ShapeRef.new(shape: StringType, location_name: "eventId"))
|
|
25
|
+
Event.add_member(:event_type, Shapes::ShapeRef.new(shape: StringType, required: true, location_name: "eventType"))
|
|
26
|
+
Event.add_member(:properties, Shapes::ShapeRef.new(shape: EventPropertiesJSON, required: true, location_name: "properties", metadata: {"jsonvalue"=>true}))
|
|
27
|
+
Event.add_member(:sent_at, Shapes::ShapeRef.new(shape: Date, required: true, location_name: "sentAt"))
|
|
28
|
+
Event.struct_class = Types::Event
|
|
29
|
+
|
|
30
|
+
EventList.member = Shapes::ShapeRef.new(shape: Event)
|
|
31
|
+
|
|
32
|
+
InvalidInputException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "message"))
|
|
33
|
+
InvalidInputException.struct_class = Types::InvalidInputException
|
|
34
|
+
|
|
35
|
+
PutEventsRequest.add_member(:tracking_id, Shapes::ShapeRef.new(shape: StringType, required: true, location_name: "trackingId"))
|
|
36
|
+
PutEventsRequest.add_member(:user_id, Shapes::ShapeRef.new(shape: UserId, location_name: "userId"))
|
|
37
|
+
PutEventsRequest.add_member(:session_id, Shapes::ShapeRef.new(shape: StringType, required: true, location_name: "sessionId"))
|
|
38
|
+
PutEventsRequest.add_member(:event_list, Shapes::ShapeRef.new(shape: EventList, required: true, location_name: "eventList"))
|
|
39
|
+
PutEventsRequest.struct_class = Types::PutEventsRequest
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# @api private
|
|
43
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
|
44
|
+
|
|
45
|
+
api.version = "2018-03-22"
|
|
46
|
+
|
|
47
|
+
api.metadata = {
|
|
48
|
+
"apiVersion" => "2018-03-22",
|
|
49
|
+
"endpointPrefix" => "personalize-events",
|
|
50
|
+
"jsonVersion" => "1.1",
|
|
51
|
+
"protocol" => "rest-json",
|
|
52
|
+
"serviceFullName" => "Amazon Personalize Events",
|
|
53
|
+
"serviceId" => "Personalize Events",
|
|
54
|
+
"signatureVersion" => "v4",
|
|
55
|
+
"signingName" => "personalize",
|
|
56
|
+
"uid" => "personalize-events-2018-03-22",
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
api.add_operation(:put_events, Seahorse::Model::Operation.new.tap do |o|
|
|
60
|
+
o.name = "PutEvents"
|
|
61
|
+
o.http_method = "POST"
|
|
62
|
+
o.http_request_uri = "/events"
|
|
63
|
+
o.input = Shapes::ShapeRef.new(shape: PutEventsRequest)
|
|
64
|
+
o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
|
|
65
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidInputException)
|
|
66
|
+
end)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
end
|
|
70
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
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/master/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
module Aws::PersonalizeEvents
|
|
9
|
+
module Errors
|
|
10
|
+
|
|
11
|
+
extend Aws::Errors::DynamicErrors
|
|
12
|
+
|
|
13
|
+
class InvalidInputException < ServiceError
|
|
14
|
+
|
|
15
|
+
# @param [Seahorse::Client::RequestContext] context
|
|
16
|
+
# @param [String] message
|
|
17
|
+
# @param [Aws::PersonalizeEvents::Types::InvalidInputException] data
|
|
18
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
|
19
|
+
super(context, message, data)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# @return [String]
|
|
23
|
+
def message
|
|
24
|
+
@message || @data[:message]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
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/master/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
module Aws::PersonalizeEvents
|
|
9
|
+
class Resource
|
|
10
|
+
|
|
11
|
+
# @param options ({})
|
|
12
|
+
# @option options [Client] :client
|
|
13
|
+
def initialize(options = {})
|
|
14
|
+
@client = options[:client] || Client.new(options)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# @return [Client]
|
|
18
|
+
def client
|
|
19
|
+
@client
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,134 @@
|
|
|
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/master/CONTRIBUTING.md
|
|
5
|
+
#
|
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
|
7
|
+
|
|
8
|
+
module Aws::PersonalizeEvents
|
|
9
|
+
module Types
|
|
10
|
+
|
|
11
|
+
# Represents user interaction event information sent using the
|
|
12
|
+
# `PutEvents` API.
|
|
13
|
+
#
|
|
14
|
+
# @note When making an API call, you may pass Event
|
|
15
|
+
# data as a hash:
|
|
16
|
+
#
|
|
17
|
+
# {
|
|
18
|
+
# event_id: "StringType",
|
|
19
|
+
# event_type: "StringType", # required
|
|
20
|
+
# properties: "EventPropertiesJSON", # required
|
|
21
|
+
# sent_at: Time.now, # required
|
|
22
|
+
# }
|
|
23
|
+
#
|
|
24
|
+
# @!attribute [rw] event_id
|
|
25
|
+
# An ID associated with the event. If an event ID is not provided,
|
|
26
|
+
# Amazon Personalize generates a unique ID for the event. An event ID
|
|
27
|
+
# is not used as an input to the model. Amazon Personalize uses the
|
|
28
|
+
# event ID to distinquish unique events. Any subsequent events after
|
|
29
|
+
# the first with the same event ID are not used in model training.
|
|
30
|
+
# @return [String]
|
|
31
|
+
#
|
|
32
|
+
# @!attribute [rw] event_type
|
|
33
|
+
# The type of event. This property corresponds to the `EVENT_TYPE`
|
|
34
|
+
# field of the Interactions schema.
|
|
35
|
+
# @return [String]
|
|
36
|
+
#
|
|
37
|
+
# @!attribute [rw] properties
|
|
38
|
+
# A string map of event-specific data that you might choose to record.
|
|
39
|
+
# For example, if a user rates a movie on your site, you might send
|
|
40
|
+
# the movie ID and rating, and the number of movie ratings made by the
|
|
41
|
+
# user.
|
|
42
|
+
#
|
|
43
|
+
# Each item in the map consists of a key-value pair. For example,
|
|
44
|
+
#
|
|
45
|
+
# `\{"itemId": "movie1"\}`
|
|
46
|
+
#
|
|
47
|
+
# `\{"itemId": "movie2", "eventValue": "4.5"\}`
|
|
48
|
+
#
|
|
49
|
+
# `\{"itemId": "movie3", "eventValue": "3", "numberOfRatings": "12"\}`
|
|
50
|
+
#
|
|
51
|
+
# The keys use camel case names that match the fields in the
|
|
52
|
+
# Interactions schema. The `itemId` and `eventValue` keys correspond
|
|
53
|
+
# to the `ITEM_ID` and `EVENT_VALUE` fields. In the above example, the
|
|
54
|
+
# `eventType` might be 'MovieRating' with `eventValue` being the
|
|
55
|
+
# rating. The `numberOfRatings` would match the
|
|
56
|
+
# 'NUMBER\_OF\_RATINGS' field defined in the Interactions schema.
|
|
57
|
+
# @return [String]
|
|
58
|
+
#
|
|
59
|
+
# @!attribute [rw] sent_at
|
|
60
|
+
# The timestamp on the client side when the event occurred.
|
|
61
|
+
# @return [Time]
|
|
62
|
+
#
|
|
63
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-events-2018-03-22/Event AWS API Documentation
|
|
64
|
+
#
|
|
65
|
+
class Event < Struct.new(
|
|
66
|
+
:event_id,
|
|
67
|
+
:event_type,
|
|
68
|
+
:properties,
|
|
69
|
+
:sent_at)
|
|
70
|
+
include Aws::Structure
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Provide a valid value for the field or parameter.
|
|
74
|
+
#
|
|
75
|
+
# @!attribute [rw] message
|
|
76
|
+
# @return [String]
|
|
77
|
+
#
|
|
78
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-events-2018-03-22/InvalidInputException AWS API Documentation
|
|
79
|
+
#
|
|
80
|
+
class InvalidInputException < Struct.new(
|
|
81
|
+
:message)
|
|
82
|
+
include Aws::Structure
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# @note When making an API call, you may pass PutEventsRequest
|
|
86
|
+
# data as a hash:
|
|
87
|
+
#
|
|
88
|
+
# {
|
|
89
|
+
# tracking_id: "StringType", # required
|
|
90
|
+
# user_id: "UserId",
|
|
91
|
+
# session_id: "StringType", # required
|
|
92
|
+
# event_list: [ # required
|
|
93
|
+
# {
|
|
94
|
+
# event_id: "StringType",
|
|
95
|
+
# event_type: "StringType", # required
|
|
96
|
+
# properties: "EventPropertiesJSON", # required
|
|
97
|
+
# sent_at: Time.now, # required
|
|
98
|
+
# },
|
|
99
|
+
# ],
|
|
100
|
+
# }
|
|
101
|
+
#
|
|
102
|
+
# @!attribute [rw] tracking_id
|
|
103
|
+
# The tracking ID for the event. The ID is generated by a call to the
|
|
104
|
+
# [CreateEventTracker][1] API.
|
|
105
|
+
#
|
|
106
|
+
#
|
|
107
|
+
#
|
|
108
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/API_CreateEventTracker.html
|
|
109
|
+
# @return [String]
|
|
110
|
+
#
|
|
111
|
+
# @!attribute [rw] user_id
|
|
112
|
+
# The user associated with the event.
|
|
113
|
+
# @return [String]
|
|
114
|
+
#
|
|
115
|
+
# @!attribute [rw] session_id
|
|
116
|
+
# The session ID associated with the user's visit.
|
|
117
|
+
# @return [String]
|
|
118
|
+
#
|
|
119
|
+
# @!attribute [rw] event_list
|
|
120
|
+
# A list of event data from the session.
|
|
121
|
+
# @return [Array<Types::Event>]
|
|
122
|
+
#
|
|
123
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-events-2018-03-22/PutEventsRequest AWS API Documentation
|
|
124
|
+
#
|
|
125
|
+
class PutEventsRequest < Struct.new(
|
|
126
|
+
:tracking_id,
|
|
127
|
+
:user_id,
|
|
128
|
+
:session_id,
|
|
129
|
+
:event_list)
|
|
130
|
+
include Aws::Structure
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
end
|
|
134
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: aws-sdk-personalizeevents
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Amazon Web Services
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2019-06-10 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: aws-sdk-core
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '3'
|
|
20
|
+
- - ">="
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 3.53.0
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - "~>"
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '3'
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 3.53.0
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: aws-sigv4
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '1.1'
|
|
40
|
+
type: :runtime
|
|
41
|
+
prerelease: false
|
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '1.1'
|
|
47
|
+
description: Official AWS Ruby gem for Amazon Personalize Events. This gem is part
|
|
48
|
+
of the AWS SDK for Ruby.
|
|
49
|
+
email:
|
|
50
|
+
- trevrowe@amazon.com
|
|
51
|
+
executables: []
|
|
52
|
+
extensions: []
|
|
53
|
+
extra_rdoc_files: []
|
|
54
|
+
files:
|
|
55
|
+
- lib/aws-sdk-personalizeevents.rb
|
|
56
|
+
- lib/aws-sdk-personalizeevents/client.rb
|
|
57
|
+
- lib/aws-sdk-personalizeevents/client_api.rb
|
|
58
|
+
- lib/aws-sdk-personalizeevents/customizations.rb
|
|
59
|
+
- lib/aws-sdk-personalizeevents/errors.rb
|
|
60
|
+
- lib/aws-sdk-personalizeevents/resource.rb
|
|
61
|
+
- lib/aws-sdk-personalizeevents/types.rb
|
|
62
|
+
homepage: https://github.com/aws/aws-sdk-ruby
|
|
63
|
+
licenses:
|
|
64
|
+
- Apache-2.0
|
|
65
|
+
metadata:
|
|
66
|
+
source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-personalizeevents
|
|
67
|
+
changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-personalizeevents/CHANGELOG.md
|
|
68
|
+
post_install_message:
|
|
69
|
+
rdoc_options: []
|
|
70
|
+
require_paths:
|
|
71
|
+
- lib
|
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
73
|
+
requirements:
|
|
74
|
+
- - ">="
|
|
75
|
+
- !ruby/object:Gem::Version
|
|
76
|
+
version: '0'
|
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - ">="
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '0'
|
|
82
|
+
requirements: []
|
|
83
|
+
rubyforge_project:
|
|
84
|
+
rubygems_version: 2.5.2.3
|
|
85
|
+
signing_key:
|
|
86
|
+
specification_version: 4
|
|
87
|
+
summary: AWS SDK for Ruby - Amazon Personalize Events
|
|
88
|
+
test_files: []
|