aws-sdk-personalizeruntime 1.43.0 → 1.44.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-personalizeruntime/client.rb +135 -4
- data/lib/aws-sdk-personalizeruntime/client_api.rb +49 -0
- data/lib/aws-sdk-personalizeruntime/endpoint_provider.rb +1 -1
- data/lib/aws-sdk-personalizeruntime/endpoints.rb +14 -0
- data/lib/aws-sdk-personalizeruntime/plugins/endpoints.rb +2 -0
- data/lib/aws-sdk-personalizeruntime/types.rb +158 -6
- data/lib/aws-sdk-personalizeruntime.rb +2 -2
- 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: 95fdb2eea021c7bd6a7db99aba515cd5e520d5d56fec875b413edb8e1c17339e
|
4
|
+
data.tar.gz: 66d62d7249fcf83927c0dafda1191aa5a50f54f89ccc4b026fb787a327be4003
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f88660b729e63fdf72e6edf0558d7e37c3a195338aed18aa6263c1cdd77f59e40a32caac88617b41277de53ade8378607f5df1af73333b747108ef3c15b0779
|
7
|
+
data.tar.gz: 166fbaec04411d3e60e5aaa17ca153a9592404b3c005a0b83c26a4c002aaab9eb6352639b45c31f84b31b6e05055bd30172874a50a34d7129206e2040aecff2b
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.44.0
|
@@ -388,6 +388,94 @@ module Aws::PersonalizeRuntime
|
|
388
388
|
|
389
389
|
# @!group API Operations
|
390
390
|
|
391
|
+
# Returns a list of recommended actions in sorted in descending order by
|
392
|
+
# prediction score. Use the `GetActionRecommendations` API if you have a
|
393
|
+
# custom campaign that deploys a solution version trained with a
|
394
|
+
# PERSONALIZED\_ACTIONS recipe.
|
395
|
+
#
|
396
|
+
# For more information about PERSONALIZED\_ACTIONS recipes, see
|
397
|
+
# [PERSONALIZED\_ACTIONS recipes][1]. For more information about getting
|
398
|
+
# action recommendations, see [Getting action recommendations][2].
|
399
|
+
#
|
400
|
+
#
|
401
|
+
#
|
402
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/nexts-best-action-recipes.html
|
403
|
+
# [2]: https://docs.aws.amazon.com/personalize/latest/dg/get-action-recommendations.html
|
404
|
+
#
|
405
|
+
# @option params [String] :campaign_arn
|
406
|
+
# The Amazon Resource Name (ARN) of the campaign to use for getting
|
407
|
+
# action recommendations. This campaign must deploy a solution version
|
408
|
+
# trained with a PERSONALIZED\_ACTIONS recipe.
|
409
|
+
#
|
410
|
+
# @option params [String] :user_id
|
411
|
+
# The user ID of the user to provide action recommendations for.
|
412
|
+
#
|
413
|
+
# @option params [Integer] :num_results
|
414
|
+
# The number of results to return. The default is 5. The maximum is 100.
|
415
|
+
#
|
416
|
+
# @option params [String] :filter_arn
|
417
|
+
# The ARN of the filter to apply to the returned recommendations. For
|
418
|
+
# more information, see [Filtering Recommendations][1].
|
419
|
+
#
|
420
|
+
# When using this parameter, be sure the filter resource is `ACTIVE`.
|
421
|
+
#
|
422
|
+
#
|
423
|
+
#
|
424
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/filter.html
|
425
|
+
#
|
426
|
+
# @option params [Hash<String,String>] :filter_values
|
427
|
+
# The values to use when filtering recommendations. For each placeholder
|
428
|
+
# parameter in your filter expression, provide the parameter name (in
|
429
|
+
# matching case) as a key and the filter value(s) as the corresponding
|
430
|
+
# value. Separate multiple values for one parameter with a comma.
|
431
|
+
#
|
432
|
+
# For filter expressions that use an `INCLUDE` element to include
|
433
|
+
# actions, you must provide values for all parameters that are defined
|
434
|
+
# in the expression. For filters with expressions that use an `EXCLUDE`
|
435
|
+
# element to exclude actions, you can omit the `filter-values`. In this
|
436
|
+
# case, Amazon Personalize doesn't use that portion of the expression
|
437
|
+
# to filter recommendations.
|
438
|
+
#
|
439
|
+
# For more information, see [Filtering recommendations and user
|
440
|
+
# segments][1].
|
441
|
+
#
|
442
|
+
#
|
443
|
+
#
|
444
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/filter.html
|
445
|
+
#
|
446
|
+
# @return [Types::GetActionRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
447
|
+
#
|
448
|
+
# * {Types::GetActionRecommendationsResponse#action_list #action_list} => Array<Types::PredictedAction>
|
449
|
+
# * {Types::GetActionRecommendationsResponse#recommendation_id #recommendation_id} => String
|
450
|
+
#
|
451
|
+
# @example Request syntax with placeholder values
|
452
|
+
#
|
453
|
+
# resp = client.get_action_recommendations({
|
454
|
+
# campaign_arn: "Arn",
|
455
|
+
# user_id: "UserID",
|
456
|
+
# num_results: 1,
|
457
|
+
# filter_arn: "Arn",
|
458
|
+
# filter_values: {
|
459
|
+
# "FilterAttributeName" => "FilterAttributeValue",
|
460
|
+
# },
|
461
|
+
# })
|
462
|
+
#
|
463
|
+
# @example Response structure
|
464
|
+
#
|
465
|
+
# resp.action_list #=> Array
|
466
|
+
# resp.action_list[0].action_id #=> String
|
467
|
+
# resp.action_list[0].score #=> Float
|
468
|
+
# resp.recommendation_id #=> String
|
469
|
+
#
|
470
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetActionRecommendations AWS API Documentation
|
471
|
+
#
|
472
|
+
# @overload get_action_recommendations(params = {})
|
473
|
+
# @param [Hash] params ({})
|
474
|
+
def get_action_recommendations(params = {}, options = {})
|
475
|
+
req = build_request(:get_action_recommendations, params)
|
476
|
+
req.send_request(options)
|
477
|
+
end
|
478
|
+
|
391
479
|
# Re-ranks a list of recommended items for the given user. The first
|
392
480
|
# item in the list is deemed the most likely item to be of interest to
|
393
481
|
# the user.
|
@@ -404,7 +492,8 @@ module Aws::PersonalizeRuntime
|
|
404
492
|
# @option params [required, Array<String>] :input_list
|
405
493
|
# A list of items (by `itemId`) to rank. If an item was not included in
|
406
494
|
# the training dataset, the item is appended to the end of the reranked
|
407
|
-
# list.
|
495
|
+
# list. If you are including metadata in recommendations, the maximum is
|
496
|
+
# 50. Otherwise, the maximum is 500.
|
408
497
|
#
|
409
498
|
# @option params [required, String] :user_id
|
410
499
|
# The user for which you want the campaign to provide a personalized
|
@@ -444,6 +533,20 @@ module Aws::PersonalizeRuntime
|
|
444
533
|
#
|
445
534
|
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/filter.html
|
446
535
|
#
|
536
|
+
# @option params [Hash<String,Array>] :metadata_columns
|
537
|
+
# If you enabled metadata in recommendations when you created or updated
|
538
|
+
# the campaign, specify metadata columns from your Items dataset to
|
539
|
+
# include in the personalized ranking. The map key is `ITEMS` and the
|
540
|
+
# value is a list of column names from your Items dataset. The maximum
|
541
|
+
# number of columns you can provide is 10.
|
542
|
+
#
|
543
|
+
# For information about enabling metadata for a campaign, see [Enabling
|
544
|
+
# metadata in recommendations for a campaign][1].
|
545
|
+
#
|
546
|
+
#
|
547
|
+
#
|
548
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html
|
549
|
+
#
|
447
550
|
# @return [Types::GetPersonalizedRankingResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
448
551
|
#
|
449
552
|
# * {Types::GetPersonalizedRankingResponse#personalized_ranking #personalized_ranking} => Array<Types::PredictedItem>
|
@@ -462,6 +565,9 @@ module Aws::PersonalizeRuntime
|
|
462
565
|
# filter_values: {
|
463
566
|
# "FilterAttributeName" => "FilterAttributeValue",
|
464
567
|
# },
|
568
|
+
# metadata_columns: {
|
569
|
+
# "DatasetType" => ["ColumnName"],
|
570
|
+
# },
|
465
571
|
# })
|
466
572
|
#
|
467
573
|
# @example Response structure
|
@@ -470,6 +576,8 @@ module Aws::PersonalizeRuntime
|
|
470
576
|
# resp.personalized_ranking[0].item_id #=> String
|
471
577
|
# resp.personalized_ranking[0].score #=> Float
|
472
578
|
# resp.personalized_ranking[0].promotion_name #=> String
|
579
|
+
# resp.personalized_ranking[0].metadata #=> Hash
|
580
|
+
# resp.personalized_ranking[0].metadata["ColumnName"] #=> String
|
473
581
|
# resp.recommendation_id #=> String
|
474
582
|
#
|
475
583
|
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetPersonalizedRanking AWS API Documentation
|
@@ -519,8 +627,9 @@ module Aws::PersonalizeRuntime
|
|
519
627
|
# Required for `USER_PERSONALIZATION` recipe type.
|
520
628
|
#
|
521
629
|
# @option params [Integer] :num_results
|
522
|
-
# The number of results to return. The default is 25.
|
523
|
-
#
|
630
|
+
# The number of results to return. The default is 25. If you are
|
631
|
+
# including metadata in recommendations, the maximum is 50. Otherwise,
|
632
|
+
# the maximum is 500.
|
524
633
|
#
|
525
634
|
# @option params [Hash<String,String>] :context
|
526
635
|
# The contextual metadata to use when getting recommendations.
|
@@ -568,6 +677,23 @@ module Aws::PersonalizeRuntime
|
|
568
677
|
# defines additional business rules that apply to a configurable subset
|
569
678
|
# of recommended items.
|
570
679
|
#
|
680
|
+
# @option params [Hash<String,Array>] :metadata_columns
|
681
|
+
# If you enabled metadata in recommendations when you created or updated
|
682
|
+
# the campaign or recommender, specify the metadata columns from your
|
683
|
+
# Items dataset to include in item recommendations. The map key is
|
684
|
+
# `ITEMS` and the value is a list of column names from your Items
|
685
|
+
# dataset. The maximum number of columns you can provide is 10.
|
686
|
+
#
|
687
|
+
# For information about enabling metadata for a campaign, see [Enabling
|
688
|
+
# metadata in recommendations for a campaign][1]. For information about
|
689
|
+
# enabling metadata for a recommender, see [Enabling metadata in
|
690
|
+
# recommendations for a recommender][2].
|
691
|
+
#
|
692
|
+
#
|
693
|
+
#
|
694
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html
|
695
|
+
# [2]: https://docs.aws.amazon.com/personalize/latest/dg/create-recommender-return-metadata.html
|
696
|
+
#
|
571
697
|
# @return [Types::GetRecommendationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
572
698
|
#
|
573
699
|
# * {Types::GetRecommendationsResponse#item_list #item_list} => Array<Types::PredictedItem>
|
@@ -598,6 +724,9 @@ module Aws::PersonalizeRuntime
|
|
598
724
|
# },
|
599
725
|
# },
|
600
726
|
# ],
|
727
|
+
# metadata_columns: {
|
728
|
+
# "DatasetType" => ["ColumnName"],
|
729
|
+
# },
|
601
730
|
# })
|
602
731
|
#
|
603
732
|
# @example Response structure
|
@@ -606,6 +735,8 @@ module Aws::PersonalizeRuntime
|
|
606
735
|
# resp.item_list[0].item_id #=> String
|
607
736
|
# resp.item_list[0].score #=> Float
|
608
737
|
# resp.item_list[0].promotion_name #=> String
|
738
|
+
# resp.item_list[0].metadata #=> Hash
|
739
|
+
# resp.item_list[0].metadata["ColumnName"] #=> String
|
609
740
|
# resp.recommendation_id #=> String
|
610
741
|
#
|
611
742
|
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetRecommendations AWS API Documentation
|
@@ -630,7 +761,7 @@ module Aws::PersonalizeRuntime
|
|
630
761
|
params: params,
|
631
762
|
config: config)
|
632
763
|
context[:gem_name] = 'aws-sdk-personalizeruntime'
|
633
|
-
context[:gem_version] = '1.
|
764
|
+
context[:gem_version] = '1.44.0'
|
634
765
|
Seahorse::Client::Request.new(handlers, context)
|
635
766
|
end
|
636
767
|
|
@@ -13,14 +13,22 @@ module Aws::PersonalizeRuntime
|
|
13
13
|
|
14
14
|
include Seahorse::Model
|
15
15
|
|
16
|
+
ActionID = Shapes::StringShape.new(name: 'ActionID')
|
17
|
+
ActionList = Shapes::ListShape.new(name: 'ActionList')
|
16
18
|
Arn = Shapes::StringShape.new(name: 'Arn')
|
17
19
|
AttributeName = Shapes::StringShape.new(name: 'AttributeName')
|
18
20
|
AttributeValue = Shapes::StringShape.new(name: 'AttributeValue')
|
21
|
+
ColumnName = Shapes::StringShape.new(name: 'ColumnName')
|
22
|
+
ColumnNamesList = Shapes::ListShape.new(name: 'ColumnNamesList')
|
23
|
+
ColumnValue = Shapes::StringShape.new(name: 'ColumnValue')
|
19
24
|
Context = Shapes::MapShape.new(name: 'Context')
|
25
|
+
DatasetType = Shapes::StringShape.new(name: 'DatasetType')
|
20
26
|
ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
|
21
27
|
FilterAttributeName = Shapes::StringShape.new(name: 'FilterAttributeName')
|
22
28
|
FilterAttributeValue = Shapes::StringShape.new(name: 'FilterAttributeValue')
|
23
29
|
FilterValues = Shapes::MapShape.new(name: 'FilterValues')
|
30
|
+
GetActionRecommendationsRequest = Shapes::StructureShape.new(name: 'GetActionRecommendationsRequest')
|
31
|
+
GetActionRecommendationsResponse = Shapes::StructureShape.new(name: 'GetActionRecommendationsResponse')
|
24
32
|
GetPersonalizedRankingRequest = Shapes::StructureShape.new(name: 'GetPersonalizedRankingRequest')
|
25
33
|
GetPersonalizedRankingResponse = Shapes::StructureShape.new(name: 'GetPersonalizedRankingResponse')
|
26
34
|
GetRecommendationsRequest = Shapes::StructureShape.new(name: 'GetRecommendationsRequest')
|
@@ -29,9 +37,12 @@ module Aws::PersonalizeRuntime
|
|
29
37
|
InvalidInputException = Shapes::StructureShape.new(name: 'InvalidInputException')
|
30
38
|
ItemID = Shapes::StringShape.new(name: 'ItemID')
|
31
39
|
ItemList = Shapes::ListShape.new(name: 'ItemList')
|
40
|
+
Metadata = Shapes::MapShape.new(name: 'Metadata')
|
41
|
+
MetadataColumns = Shapes::MapShape.new(name: 'MetadataColumns')
|
32
42
|
Name = Shapes::StringShape.new(name: 'Name')
|
33
43
|
NumResults = Shapes::IntegerShape.new(name: 'NumResults')
|
34
44
|
PercentPromotedItems = Shapes::IntegerShape.new(name: 'PercentPromotedItems')
|
45
|
+
PredictedAction = Shapes::StructureShape.new(name: 'PredictedAction')
|
35
46
|
PredictedItem = Shapes::StructureShape.new(name: 'PredictedItem')
|
36
47
|
Promotion = Shapes::StructureShape.new(name: 'Promotion')
|
37
48
|
PromotionList = Shapes::ListShape.new(name: 'PromotionList')
|
@@ -40,18 +51,34 @@ module Aws::PersonalizeRuntime
|
|
40
51
|
Score = Shapes::FloatShape.new(name: 'Score')
|
41
52
|
UserID = Shapes::StringShape.new(name: 'UserID')
|
42
53
|
|
54
|
+
ActionList.member = Shapes::ShapeRef.new(shape: PredictedAction)
|
55
|
+
|
56
|
+
ColumnNamesList.member = Shapes::ShapeRef.new(shape: ColumnName)
|
57
|
+
|
43
58
|
Context.key = Shapes::ShapeRef.new(shape: AttributeName)
|
44
59
|
Context.value = Shapes::ShapeRef.new(shape: AttributeValue)
|
45
60
|
|
46
61
|
FilterValues.key = Shapes::ShapeRef.new(shape: FilterAttributeName)
|
47
62
|
FilterValues.value = Shapes::ShapeRef.new(shape: FilterAttributeValue)
|
48
63
|
|
64
|
+
GetActionRecommendationsRequest.add_member(:campaign_arn, Shapes::ShapeRef.new(shape: Arn, location_name: "campaignArn"))
|
65
|
+
GetActionRecommendationsRequest.add_member(:user_id, Shapes::ShapeRef.new(shape: UserID, location_name: "userId"))
|
66
|
+
GetActionRecommendationsRequest.add_member(:num_results, Shapes::ShapeRef.new(shape: NumResults, location_name: "numResults"))
|
67
|
+
GetActionRecommendationsRequest.add_member(:filter_arn, Shapes::ShapeRef.new(shape: Arn, location_name: "filterArn"))
|
68
|
+
GetActionRecommendationsRequest.add_member(:filter_values, Shapes::ShapeRef.new(shape: FilterValues, location_name: "filterValues"))
|
69
|
+
GetActionRecommendationsRequest.struct_class = Types::GetActionRecommendationsRequest
|
70
|
+
|
71
|
+
GetActionRecommendationsResponse.add_member(:action_list, Shapes::ShapeRef.new(shape: ActionList, location_name: "actionList"))
|
72
|
+
GetActionRecommendationsResponse.add_member(:recommendation_id, Shapes::ShapeRef.new(shape: RecommendationID, location_name: "recommendationId"))
|
73
|
+
GetActionRecommendationsResponse.struct_class = Types::GetActionRecommendationsResponse
|
74
|
+
|
49
75
|
GetPersonalizedRankingRequest.add_member(:campaign_arn, Shapes::ShapeRef.new(shape: Arn, required: true, location_name: "campaignArn"))
|
50
76
|
GetPersonalizedRankingRequest.add_member(:input_list, Shapes::ShapeRef.new(shape: InputList, required: true, location_name: "inputList"))
|
51
77
|
GetPersonalizedRankingRequest.add_member(:user_id, Shapes::ShapeRef.new(shape: UserID, required: true, location_name: "userId"))
|
52
78
|
GetPersonalizedRankingRequest.add_member(:context, Shapes::ShapeRef.new(shape: Context, location_name: "context"))
|
53
79
|
GetPersonalizedRankingRequest.add_member(:filter_arn, Shapes::ShapeRef.new(shape: Arn, location_name: "filterArn"))
|
54
80
|
GetPersonalizedRankingRequest.add_member(:filter_values, Shapes::ShapeRef.new(shape: FilterValues, location_name: "filterValues"))
|
81
|
+
GetPersonalizedRankingRequest.add_member(:metadata_columns, Shapes::ShapeRef.new(shape: MetadataColumns, location_name: "metadataColumns"))
|
55
82
|
GetPersonalizedRankingRequest.struct_class = Types::GetPersonalizedRankingRequest
|
56
83
|
|
57
84
|
GetPersonalizedRankingResponse.add_member(:personalized_ranking, Shapes::ShapeRef.new(shape: ItemList, location_name: "personalizedRanking"))
|
@@ -67,6 +94,7 @@ module Aws::PersonalizeRuntime
|
|
67
94
|
GetRecommendationsRequest.add_member(:filter_values, Shapes::ShapeRef.new(shape: FilterValues, location_name: "filterValues"))
|
68
95
|
GetRecommendationsRequest.add_member(:recommender_arn, Shapes::ShapeRef.new(shape: Arn, location_name: "recommenderArn"))
|
69
96
|
GetRecommendationsRequest.add_member(:promotions, Shapes::ShapeRef.new(shape: PromotionList, location_name: "promotions"))
|
97
|
+
GetRecommendationsRequest.add_member(:metadata_columns, Shapes::ShapeRef.new(shape: MetadataColumns, location_name: "metadataColumns"))
|
70
98
|
GetRecommendationsRequest.struct_class = Types::GetRecommendationsRequest
|
71
99
|
|
72
100
|
GetRecommendationsResponse.add_member(:item_list, Shapes::ShapeRef.new(shape: ItemList, location_name: "itemList"))
|
@@ -80,9 +108,20 @@ module Aws::PersonalizeRuntime
|
|
80
108
|
|
81
109
|
ItemList.member = Shapes::ShapeRef.new(shape: PredictedItem)
|
82
110
|
|
111
|
+
Metadata.key = Shapes::ShapeRef.new(shape: ColumnName)
|
112
|
+
Metadata.value = Shapes::ShapeRef.new(shape: ColumnValue)
|
113
|
+
|
114
|
+
MetadataColumns.key = Shapes::ShapeRef.new(shape: DatasetType)
|
115
|
+
MetadataColumns.value = Shapes::ShapeRef.new(shape: ColumnNamesList)
|
116
|
+
|
117
|
+
PredictedAction.add_member(:action_id, Shapes::ShapeRef.new(shape: ActionID, location_name: "actionId"))
|
118
|
+
PredictedAction.add_member(:score, Shapes::ShapeRef.new(shape: Score, location_name: "score"))
|
119
|
+
PredictedAction.struct_class = Types::PredictedAction
|
120
|
+
|
83
121
|
PredictedItem.add_member(:item_id, Shapes::ShapeRef.new(shape: ItemID, location_name: "itemId"))
|
84
122
|
PredictedItem.add_member(:score, Shapes::ShapeRef.new(shape: Score, location_name: "score"))
|
85
123
|
PredictedItem.add_member(:promotion_name, Shapes::ShapeRef.new(shape: Name, location_name: "promotionName"))
|
124
|
+
PredictedItem.add_member(:metadata, Shapes::ShapeRef.new(shape: Metadata, location_name: "metadata"))
|
86
125
|
PredictedItem.struct_class = Types::PredictedItem
|
87
126
|
|
88
127
|
Promotion.add_member(:name, Shapes::ShapeRef.new(shape: Name, location_name: "name"))
|
@@ -114,6 +153,16 @@ module Aws::PersonalizeRuntime
|
|
114
153
|
"uid" => "personalize-runtime-2018-05-22",
|
115
154
|
}
|
116
155
|
|
156
|
+
api.add_operation(:get_action_recommendations, Seahorse::Model::Operation.new.tap do |o|
|
157
|
+
o.name = "GetActionRecommendations"
|
158
|
+
o.http_method = "POST"
|
159
|
+
o.http_request_uri = "/action-recommendations"
|
160
|
+
o.input = Shapes::ShapeRef.new(shape: GetActionRecommendationsRequest)
|
161
|
+
o.output = Shapes::ShapeRef.new(shape: GetActionRecommendationsResponse)
|
162
|
+
o.errors << Shapes::ShapeRef.new(shape: InvalidInputException)
|
163
|
+
o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
|
164
|
+
end)
|
165
|
+
|
117
166
|
api.add_operation(:get_personalized_ranking, Seahorse::Model::Operation.new.tap do |o|
|
118
167
|
o.name = "GetPersonalizedRanking"
|
119
168
|
o.http_method = "POST"
|
@@ -32,7 +32,7 @@ module Aws::PersonalizeRuntime
|
|
32
32
|
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
33
|
end
|
34
34
|
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
-
if Aws::Endpoints::Matchers.boolean_equals?(
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
|
36
36
|
return Aws::Endpoints::Endpoint.new(url: "https://personalize-runtime-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
37
37
|
end
|
38
38
|
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
@@ -12,6 +12,20 @@ module Aws::PersonalizeRuntime
|
|
12
12
|
# @api private
|
13
13
|
module Endpoints
|
14
14
|
|
15
|
+
class GetActionRecommendations
|
16
|
+
def self.build(context)
|
17
|
+
unless context.config.regional_endpoint
|
18
|
+
endpoint = context.config.endpoint.to_s
|
19
|
+
end
|
20
|
+
Aws::PersonalizeRuntime::EndpointParameters.new(
|
21
|
+
region: context.config.region,
|
22
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
23
|
+
use_fips: context.config.use_fips_endpoint,
|
24
|
+
endpoint: endpoint,
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
15
29
|
class GetPersonalizedRanking
|
16
30
|
def self.build(context)
|
17
31
|
unless context.config.regional_endpoint
|
@@ -56,6 +56,8 @@ module Aws::PersonalizeRuntime
|
|
56
56
|
|
57
57
|
def parameters_for_operation(context)
|
58
58
|
case context.operation_name
|
59
|
+
when :get_action_recommendations
|
60
|
+
Aws::PersonalizeRuntime::Endpoints::GetActionRecommendations.build(context)
|
59
61
|
when :get_personalized_ranking
|
60
62
|
Aws::PersonalizeRuntime::Endpoints::GetPersonalizedRanking.build(context)
|
61
63
|
when :get_recommendations
|
@@ -10,6 +10,90 @@
|
|
10
10
|
module Aws::PersonalizeRuntime
|
11
11
|
module Types
|
12
12
|
|
13
|
+
# @!attribute [rw] campaign_arn
|
14
|
+
# The Amazon Resource Name (ARN) of the campaign to use for getting
|
15
|
+
# action recommendations. This campaign must deploy a solution version
|
16
|
+
# trained with a PERSONALIZED\_ACTIONS recipe.
|
17
|
+
# @return [String]
|
18
|
+
#
|
19
|
+
# @!attribute [rw] user_id
|
20
|
+
# The user ID of the user to provide action recommendations for.
|
21
|
+
# @return [String]
|
22
|
+
#
|
23
|
+
# @!attribute [rw] num_results
|
24
|
+
# The number of results to return. The default is 5. The maximum is
|
25
|
+
# 100.
|
26
|
+
# @return [Integer]
|
27
|
+
#
|
28
|
+
# @!attribute [rw] filter_arn
|
29
|
+
# The ARN of the filter to apply to the returned recommendations. For
|
30
|
+
# more information, see [Filtering Recommendations][1].
|
31
|
+
#
|
32
|
+
# When using this parameter, be sure the filter resource is `ACTIVE`.
|
33
|
+
#
|
34
|
+
#
|
35
|
+
#
|
36
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/filter.html
|
37
|
+
# @return [String]
|
38
|
+
#
|
39
|
+
# @!attribute [rw] filter_values
|
40
|
+
# The values to use when filtering recommendations. For each
|
41
|
+
# placeholder parameter in your filter expression, provide the
|
42
|
+
# parameter name (in matching case) as a key and the filter value(s)
|
43
|
+
# as the corresponding value. Separate multiple values for one
|
44
|
+
# parameter with a comma.
|
45
|
+
#
|
46
|
+
# For filter expressions that use an `INCLUDE` element to include
|
47
|
+
# actions, you must provide values for all parameters that are defined
|
48
|
+
# in the expression. For filters with expressions that use an
|
49
|
+
# `EXCLUDE` element to exclude actions, you can omit the
|
50
|
+
# `filter-values`. In this case, Amazon Personalize doesn't use that
|
51
|
+
# portion of the expression to filter recommendations.
|
52
|
+
#
|
53
|
+
# For more information, see [Filtering recommendations and user
|
54
|
+
# segments][1].
|
55
|
+
#
|
56
|
+
#
|
57
|
+
#
|
58
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/filter.html
|
59
|
+
# @return [Hash<String,String>]
|
60
|
+
#
|
61
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetActionRecommendationsRequest AWS API Documentation
|
62
|
+
#
|
63
|
+
class GetActionRecommendationsRequest < Struct.new(
|
64
|
+
:campaign_arn,
|
65
|
+
:user_id,
|
66
|
+
:num_results,
|
67
|
+
:filter_arn,
|
68
|
+
:filter_values)
|
69
|
+
SENSITIVE = []
|
70
|
+
include Aws::Structure
|
71
|
+
end
|
72
|
+
|
73
|
+
# @!attribute [rw] action_list
|
74
|
+
# A list of action recommendations sorted in descending order by
|
75
|
+
# prediction score. There can be a maximum of 100 actions in the list.
|
76
|
+
# For information about action scores, see [How action recommendation
|
77
|
+
# scoring works][1].
|
78
|
+
#
|
79
|
+
#
|
80
|
+
#
|
81
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/how-action-recommendation-scoring-works.html
|
82
|
+
# @return [Array<Types::PredictedAction>]
|
83
|
+
#
|
84
|
+
# @!attribute [rw] recommendation_id
|
85
|
+
# The ID of the recommendation.
|
86
|
+
# @return [String]
|
87
|
+
#
|
88
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetActionRecommendationsResponse AWS API Documentation
|
89
|
+
#
|
90
|
+
class GetActionRecommendationsResponse < Struct.new(
|
91
|
+
:action_list,
|
92
|
+
:recommendation_id)
|
93
|
+
SENSITIVE = []
|
94
|
+
include Aws::Structure
|
95
|
+
end
|
96
|
+
|
13
97
|
# @!attribute [rw] campaign_arn
|
14
98
|
# The Amazon Resource Name (ARN) of the campaign to use for generating
|
15
99
|
# the personalized ranking.
|
@@ -18,7 +102,8 @@ module Aws::PersonalizeRuntime
|
|
18
102
|
# @!attribute [rw] input_list
|
19
103
|
# A list of items (by `itemId`) to rank. If an item was not included
|
20
104
|
# in the training dataset, the item is appended to the end of the
|
21
|
-
# reranked list.
|
105
|
+
# reranked list. If you are including metadata in recommendations, the
|
106
|
+
# maximum is 50. Otherwise, the maximum is 500.
|
22
107
|
# @return [Array<String>]
|
23
108
|
#
|
24
109
|
# @!attribute [rw] user_id
|
@@ -64,6 +149,21 @@ module Aws::PersonalizeRuntime
|
|
64
149
|
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/filter.html
|
65
150
|
# @return [Hash<String,String>]
|
66
151
|
#
|
152
|
+
# @!attribute [rw] metadata_columns
|
153
|
+
# If you enabled metadata in recommendations when you created or
|
154
|
+
# updated the campaign, specify metadata columns from your Items
|
155
|
+
# dataset to include in the personalized ranking. The map key is
|
156
|
+
# `ITEMS` and the value is a list of column names from your Items
|
157
|
+
# dataset. The maximum number of columns you can provide is 10.
|
158
|
+
#
|
159
|
+
# For information about enabling metadata for a campaign, see
|
160
|
+
# [Enabling metadata in recommendations for a campaign][1].
|
161
|
+
#
|
162
|
+
#
|
163
|
+
#
|
164
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html
|
165
|
+
# @return [Hash<String,Array<String>>]
|
166
|
+
#
|
67
167
|
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetPersonalizedRankingRequest AWS API Documentation
|
68
168
|
#
|
69
169
|
class GetPersonalizedRankingRequest < Struct.new(
|
@@ -72,7 +172,8 @@ module Aws::PersonalizeRuntime
|
|
72
172
|
:user_id,
|
73
173
|
:context,
|
74
174
|
:filter_arn,
|
75
|
-
:filter_values
|
175
|
+
:filter_values,
|
176
|
+
:metadata_columns)
|
76
177
|
SENSITIVE = []
|
77
178
|
include Aws::Structure
|
78
179
|
end
|
@@ -113,8 +214,9 @@ module Aws::PersonalizeRuntime
|
|
113
214
|
# @return [String]
|
114
215
|
#
|
115
216
|
# @!attribute [rw] num_results
|
116
|
-
# The number of results to return. The default is 25.
|
117
|
-
#
|
217
|
+
# The number of results to return. The default is 25. If you are
|
218
|
+
# including metadata in recommendations, the maximum is 50. Otherwise,
|
219
|
+
# the maximum is 500.
|
118
220
|
# @return [Integer]
|
119
221
|
#
|
120
222
|
# @!attribute [rw] context
|
@@ -169,6 +271,24 @@ module Aws::PersonalizeRuntime
|
|
169
271
|
# subset of recommended items.
|
170
272
|
# @return [Array<Types::Promotion>]
|
171
273
|
#
|
274
|
+
# @!attribute [rw] metadata_columns
|
275
|
+
# If you enabled metadata in recommendations when you created or
|
276
|
+
# updated the campaign or recommender, specify the metadata columns
|
277
|
+
# from your Items dataset to include in item recommendations. The map
|
278
|
+
# key is `ITEMS` and the value is a list of column names from your
|
279
|
+
# Items dataset. The maximum number of columns you can provide is 10.
|
280
|
+
#
|
281
|
+
# For information about enabling metadata for a campaign, see
|
282
|
+
# [Enabling metadata in recommendations for a campaign][1]. For
|
283
|
+
# information about enabling metadata for a recommender, see [Enabling
|
284
|
+
# metadata in recommendations for a recommender][2].
|
285
|
+
#
|
286
|
+
#
|
287
|
+
#
|
288
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html
|
289
|
+
# [2]: https://docs.aws.amazon.com/personalize/latest/dg/create-recommender-return-metadata.html
|
290
|
+
# @return [Hash<String,Array<String>>]
|
291
|
+
#
|
172
292
|
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetRecommendationsRequest AWS API Documentation
|
173
293
|
#
|
174
294
|
class GetRecommendationsRequest < Struct.new(
|
@@ -180,7 +300,8 @@ module Aws::PersonalizeRuntime
|
|
180
300
|
:filter_arn,
|
181
301
|
:filter_values,
|
182
302
|
:recommender_arn,
|
183
|
-
:promotions
|
303
|
+
:promotions,
|
304
|
+
:metadata_columns)
|
184
305
|
SENSITIVE = []
|
185
306
|
include Aws::Structure
|
186
307
|
end
|
@@ -216,6 +337,32 @@ module Aws::PersonalizeRuntime
|
|
216
337
|
include Aws::Structure
|
217
338
|
end
|
218
339
|
|
340
|
+
# An object that identifies an action.
|
341
|
+
#
|
342
|
+
# The API returns a list of `PredictedAction`s.
|
343
|
+
#
|
344
|
+
# @!attribute [rw] action_id
|
345
|
+
# The ID of the recommended action.
|
346
|
+
# @return [String]
|
347
|
+
#
|
348
|
+
# @!attribute [rw] score
|
349
|
+
# The score of the recommended action. For information about action
|
350
|
+
# scores, see [How action recommendation scoring works][1].
|
351
|
+
#
|
352
|
+
#
|
353
|
+
#
|
354
|
+
# [1]: https://docs.aws.amazon.com/personalize/latest/dg/how-action-recommendation-scoring-works.html
|
355
|
+
# @return [Float]
|
356
|
+
#
|
357
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/PredictedAction AWS API Documentation
|
358
|
+
#
|
359
|
+
class PredictedAction < Struct.new(
|
360
|
+
:action_id,
|
361
|
+
:score)
|
362
|
+
SENSITIVE = []
|
363
|
+
include Aws::Structure
|
364
|
+
end
|
365
|
+
|
219
366
|
# An object that identifies an item.
|
220
367
|
#
|
221
368
|
# The and APIs return a list of `PredictedItem`s.
|
@@ -234,12 +381,17 @@ module Aws::PersonalizeRuntime
|
|
234
381
|
# The name of the promotion that included the predicted item.
|
235
382
|
# @return [String]
|
236
383
|
#
|
384
|
+
# @!attribute [rw] metadata
|
385
|
+
# Metadata about the item from your Items dataset.
|
386
|
+
# @return [Hash<String,String>]
|
387
|
+
#
|
237
388
|
# @see http://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/PredictedItem AWS API Documentation
|
238
389
|
#
|
239
390
|
class PredictedItem < Struct.new(
|
240
391
|
:item_id,
|
241
392
|
:score,
|
242
|
-
:promotion_name
|
393
|
+
:promotion_name,
|
394
|
+
:metadata)
|
243
395
|
SENSITIVE = []
|
244
396
|
include Aws::Structure
|
245
397
|
end
|
@@ -32,7 +32,7 @@ require_relative 'aws-sdk-personalizeruntime/customizations'
|
|
32
32
|
# structure.
|
33
33
|
#
|
34
34
|
# personalize_runtime = Aws::PersonalizeRuntime::Client.new
|
35
|
-
# resp = personalize_runtime.
|
35
|
+
# resp = personalize_runtime.get_action_recommendations(params)
|
36
36
|
#
|
37
37
|
# See {Client} for more information.
|
38
38
|
#
|
@@ -52,6 +52,6 @@ require_relative 'aws-sdk-personalizeruntime/customizations'
|
|
52
52
|
# @!group service
|
53
53
|
module Aws::PersonalizeRuntime
|
54
54
|
|
55
|
-
GEM_VERSION = '1.
|
55
|
+
GEM_VERSION = '1.44.0'
|
56
56
|
|
57
57
|
end
|
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.
|
4
|
+
version: 1.44.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: 2023-11-
|
11
|
+
date: 2023-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|