Documentation ¶
Overview ¶
Package personalizeruntime provides the client and types for making API requests to Amazon Personalize Runtime.
See https://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22 for more information on this service.
See personalizeruntime package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/personalizeruntime/
Using the Client ¶
To contact Amazon Personalize Runtime with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the Amazon Personalize Runtime client PersonalizeRuntime for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/personalizeruntime/#New
Index ¶
- Constants
- type GetActionRecommendationsInput
- func (s GetActionRecommendationsInput) GoString() string
- func (s *GetActionRecommendationsInput) SetCampaignArn(v string) *GetActionRecommendationsInput
- func (s *GetActionRecommendationsInput) SetFilterArn(v string) *GetActionRecommendationsInput
- func (s *GetActionRecommendationsInput) SetFilterValues(v map[string]*string) *GetActionRecommendationsInput
- func (s *GetActionRecommendationsInput) SetNumResults(v int64) *GetActionRecommendationsInput
- func (s *GetActionRecommendationsInput) SetUserId(v string) *GetActionRecommendationsInput
- func (s GetActionRecommendationsInput) String() string
- type GetActionRecommendationsOutput
- func (s GetActionRecommendationsOutput) GoString() string
- func (s *GetActionRecommendationsOutput) SetActionList(v []*PredictedAction) *GetActionRecommendationsOutput
- func (s *GetActionRecommendationsOutput) SetRecommendationId(v string) *GetActionRecommendationsOutput
- func (s GetActionRecommendationsOutput) String() string
- type GetPersonalizedRankingInput
- func (s GetPersonalizedRankingInput) GoString() string
- func (s *GetPersonalizedRankingInput) SetCampaignArn(v string) *GetPersonalizedRankingInput
- func (s *GetPersonalizedRankingInput) SetContext(v map[string]*string) *GetPersonalizedRankingInput
- func (s *GetPersonalizedRankingInput) SetFilterArn(v string) *GetPersonalizedRankingInput
- func (s *GetPersonalizedRankingInput) SetFilterValues(v map[string]*string) *GetPersonalizedRankingInput
- func (s *GetPersonalizedRankingInput) SetInputList(v []*string) *GetPersonalizedRankingInput
- func (s *GetPersonalizedRankingInput) SetMetadataColumns(v map[string][]*string) *GetPersonalizedRankingInput
- func (s *GetPersonalizedRankingInput) SetUserId(v string) *GetPersonalizedRankingInput
- func (s GetPersonalizedRankingInput) String() string
- func (s *GetPersonalizedRankingInput) Validate() error
- type GetPersonalizedRankingOutput
- func (s GetPersonalizedRankingOutput) GoString() string
- func (s *GetPersonalizedRankingOutput) SetPersonalizedRanking(v []*PredictedItem) *GetPersonalizedRankingOutput
- func (s *GetPersonalizedRankingOutput) SetRecommendationId(v string) *GetPersonalizedRankingOutput
- func (s GetPersonalizedRankingOutput) String() string
- type GetRecommendationsInput
- func (s GetRecommendationsInput) GoString() string
- func (s *GetRecommendationsInput) SetCampaignArn(v string) *GetRecommendationsInput
- func (s *GetRecommendationsInput) SetContext(v map[string]*string) *GetRecommendationsInput
- func (s *GetRecommendationsInput) SetFilterArn(v string) *GetRecommendationsInput
- func (s *GetRecommendationsInput) SetFilterValues(v map[string]*string) *GetRecommendationsInput
- func (s *GetRecommendationsInput) SetItemId(v string) *GetRecommendationsInput
- func (s *GetRecommendationsInput) SetMetadataColumns(v map[string][]*string) *GetRecommendationsInput
- func (s *GetRecommendationsInput) SetNumResults(v int64) *GetRecommendationsInput
- func (s *GetRecommendationsInput) SetPromotions(v []*Promotion) *GetRecommendationsInput
- func (s *GetRecommendationsInput) SetRecommenderArn(v string) *GetRecommendationsInput
- func (s *GetRecommendationsInput) SetUserId(v string) *GetRecommendationsInput
- func (s GetRecommendationsInput) String() string
- func (s *GetRecommendationsInput) Validate() error
- type GetRecommendationsOutput
- type InvalidInputException
- func (s *InvalidInputException) Code() string
- func (s *InvalidInputException) Error() string
- func (s InvalidInputException) GoString() string
- func (s *InvalidInputException) Message() string
- func (s *InvalidInputException) OrigErr() error
- func (s *InvalidInputException) RequestID() string
- func (s *InvalidInputException) StatusCode() int
- func (s InvalidInputException) String() string
- type PersonalizeRuntime
- func (c *PersonalizeRuntime) GetActionRecommendations(input *GetActionRecommendationsInput) (*GetActionRecommendationsOutput, error)
- func (c *PersonalizeRuntime) GetActionRecommendationsRequest(input *GetActionRecommendationsInput) (req *request.Request, output *GetActionRecommendationsOutput)
- func (c *PersonalizeRuntime) GetActionRecommendationsWithContext(ctx aws.Context, input *GetActionRecommendationsInput, opts ...request.Option) (*GetActionRecommendationsOutput, error)
- func (c *PersonalizeRuntime) GetPersonalizedRanking(input *GetPersonalizedRankingInput) (*GetPersonalizedRankingOutput, error)
- func (c *PersonalizeRuntime) GetPersonalizedRankingRequest(input *GetPersonalizedRankingInput) (req *request.Request, output *GetPersonalizedRankingOutput)
- func (c *PersonalizeRuntime) GetPersonalizedRankingWithContext(ctx aws.Context, input *GetPersonalizedRankingInput, opts ...request.Option) (*GetPersonalizedRankingOutput, error)
- func (c *PersonalizeRuntime) GetRecommendations(input *GetRecommendationsInput) (*GetRecommendationsOutput, error)
- func (c *PersonalizeRuntime) GetRecommendationsRequest(input *GetRecommendationsInput) (req *request.Request, output *GetRecommendationsOutput)
- func (c *PersonalizeRuntime) GetRecommendationsWithContext(ctx aws.Context, input *GetRecommendationsInput, opts ...request.Option) (*GetRecommendationsOutput, error)
- type PredictedAction
- type PredictedItem
- func (s PredictedItem) GoString() string
- func (s *PredictedItem) SetItemId(v string) *PredictedItem
- func (s *PredictedItem) SetMetadata(v map[string]*string) *PredictedItem
- func (s *PredictedItem) SetPromotionName(v string) *PredictedItem
- func (s *PredictedItem) SetScore(v float64) *PredictedItem
- func (s PredictedItem) String() string
- type Promotion
- func (s Promotion) GoString() string
- func (s *Promotion) SetFilterArn(v string) *Promotion
- func (s *Promotion) SetFilterValues(v map[string]*string) *Promotion
- func (s *Promotion) SetName(v string) *Promotion
- func (s *Promotion) SetPercentPromotedItems(v int64) *Promotion
- func (s Promotion) String() string
- func (s *Promotion) Validate() error
- type ResourceNotFoundException
- func (s *ResourceNotFoundException) Code() string
- func (s *ResourceNotFoundException) Error() string
- func (s ResourceNotFoundException) GoString() string
- func (s *ResourceNotFoundException) Message() string
- func (s *ResourceNotFoundException) OrigErr() error
- func (s *ResourceNotFoundException) RequestID() string
- func (s *ResourceNotFoundException) StatusCode() int
- func (s ResourceNotFoundException) String() string
Constants ¶
const ( // ErrCodeInvalidInputException for service response error code // "InvalidInputException". // // Provide a valid value for the field or parameter. ErrCodeInvalidInputException = "InvalidInputException" // ErrCodeResourceNotFoundException for service response error code // "ResourceNotFoundException". // // The specified resource does not exist. ErrCodeResourceNotFoundException = "ResourceNotFoundException" )
const ( ServiceName = "Personalize Runtime" // Name of service. EndpointsID = "personalize-runtime" // ID to lookup a service endpoint with. ServiceID = "Personalize Runtime" // ServiceID is a unique identifier of a specific service. )
Service information constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetActionRecommendationsInput ¶
type GetActionRecommendationsInput struct { // The Amazon Resource Name (ARN) of the campaign to use for getting action // recommendations. This campaign must deploy a solution version trained with // a PERSONALIZED_ACTIONS recipe. CampaignArn *string `locationName:"campaignArn" type:"string"` // The ARN of the filter to apply to the returned recommendations. For more // information, see Filtering Recommendations (https://docs.aws.amazon.com/personalize/latest/dg/filter.html). // // When using this parameter, be sure the filter resource is ACTIVE. FilterArn *string `locationName:"filterArn" type:"string"` // The values to use when filtering recommendations. For each placeholder parameter // in your filter expression, provide the parameter name (in matching case) // as a key and the filter value(s) as the corresponding value. Separate multiple // values for one parameter with a comma. // // For filter expressions that use an INCLUDE element to include actions, you // must provide values for all parameters that are defined in the expression. // For filters with expressions that use an EXCLUDE element to exclude actions, // you can omit the filter-values. In this case, Amazon Personalize doesn't // use that portion of the expression to filter recommendations. // // For more information, see Filtering recommendations and user segments (https://docs.aws.amazon.com/personalize/latest/dg/filter.html). FilterValues map[string]*string `locationName:"filterValues" type:"map"` // The number of results to return. The default is 5. The maximum is 100. NumResults *int64 `locationName:"numResults" type:"integer"` // The user ID of the user to provide action recommendations for. UserId *string `locationName:"userId" type:"string"` // contains filtered or unexported fields }
func (GetActionRecommendationsInput) GoString ¶
func (s GetActionRecommendationsInput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GetActionRecommendationsInput) SetCampaignArn ¶
func (s *GetActionRecommendationsInput) SetCampaignArn(v string) *GetActionRecommendationsInput
SetCampaignArn sets the CampaignArn field's value.
func (*GetActionRecommendationsInput) SetFilterArn ¶
func (s *GetActionRecommendationsInput) SetFilterArn(v string) *GetActionRecommendationsInput
SetFilterArn sets the FilterArn field's value.
func (*GetActionRecommendationsInput) SetFilterValues ¶
func (s *GetActionRecommendationsInput) SetFilterValues(v map[string]*string) *GetActionRecommendationsInput
SetFilterValues sets the FilterValues field's value.
func (*GetActionRecommendationsInput) SetNumResults ¶
func (s *GetActionRecommendationsInput) SetNumResults(v int64) *GetActionRecommendationsInput
SetNumResults sets the NumResults field's value.
func (*GetActionRecommendationsInput) SetUserId ¶
func (s *GetActionRecommendationsInput) SetUserId(v string) *GetActionRecommendationsInput
SetUserId sets the UserId field's value.
func (GetActionRecommendationsInput) String ¶
func (s GetActionRecommendationsInput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GetActionRecommendationsOutput ¶
type GetActionRecommendationsOutput struct { // A list of action recommendations sorted in descending order by prediction // score. There can be a maximum of 100 actions in the list. For information // about action scores, see How action recommendation scoring works (https://docs.aws.amazon.com/personalize/latest/dg/how-action-recommendation-scoring-works.html). ActionList []*PredictedAction `locationName:"actionList" type:"list"` // The ID of the recommendation. RecommendationId *string `locationName:"recommendationId" type:"string"` // contains filtered or unexported fields }
func (GetActionRecommendationsOutput) GoString ¶
func (s GetActionRecommendationsOutput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GetActionRecommendationsOutput) SetActionList ¶
func (s *GetActionRecommendationsOutput) SetActionList(v []*PredictedAction) *GetActionRecommendationsOutput
SetActionList sets the ActionList field's value.
func (*GetActionRecommendationsOutput) SetRecommendationId ¶
func (s *GetActionRecommendationsOutput) SetRecommendationId(v string) *GetActionRecommendationsOutput
SetRecommendationId sets the RecommendationId field's value.
func (GetActionRecommendationsOutput) String ¶
func (s GetActionRecommendationsOutput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GetPersonalizedRankingInput ¶
type GetPersonalizedRankingInput struct { // The Amazon Resource Name (ARN) of the campaign to use for generating the // personalized ranking. // // CampaignArn is a required field CampaignArn *string `locationName:"campaignArn" type:"string" required:"true"` // The contextual metadata to use when getting recommendations. Contextual metadata // includes any interaction information that might be relevant when getting // a user's recommendations, such as the user's current location or device type. Context map[string]*string `locationName:"context" type:"map"` // The Amazon Resource Name (ARN) of a filter you created to include items or // exclude items from recommendations for a given user. For more information, // see Filtering Recommendations (https://docs.aws.amazon.com/personalize/latest/dg/filter.html). FilterArn *string `locationName:"filterArn" type:"string"` // The values to use when filtering recommendations. For each placeholder parameter // in your filter expression, provide the parameter name (in matching case) // as a key and the filter value(s) as the corresponding value. Separate multiple // values for one parameter with a comma. // // For filter expressions that use an INCLUDE element to include items, you // must provide values for all parameters that are defined in the expression. // For filters with expressions that use an EXCLUDE element to exclude items, // you can omit the filter-values.In this case, Amazon Personalize doesn't use // that portion of the expression to filter recommendations. // // For more information, see Filtering Recommendations (https://docs.aws.amazon.com/personalize/latest/dg/filter.html). FilterValues map[string]*string `locationName:"filterValues" type:"map"` // A list of items (by itemId) to rank. If an item was not included in the training // dataset, the item is appended to the end of the reranked list. If you are // including metadata in recommendations, the maximum is 50. Otherwise, the // maximum is 500. // // InputList is a required field InputList []*string `locationName:"inputList" type:"list" required:"true"` // If you enabled metadata in recommendations when you created or updated the // campaign, specify metadata columns from your Items dataset to include in // the personalized ranking. The map key is ITEMS and the value is a list of // column names from your Items dataset. The maximum number of columns you can // provide is 10. // // For information about enabling metadata for a campaign, see Enabling metadata // in recommendations for a campaign (https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html). MetadataColumns map[string][]*string `locationName:"metadataColumns" type:"map"` // The user for which you want the campaign to provide a personalized ranking. // // UserId is a required field UserId *string `locationName:"userId" type:"string" required:"true"` // contains filtered or unexported fields }
func (GetPersonalizedRankingInput) GoString ¶
func (s GetPersonalizedRankingInput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GetPersonalizedRankingInput) SetCampaignArn ¶
func (s *GetPersonalizedRankingInput) SetCampaignArn(v string) *GetPersonalizedRankingInput
SetCampaignArn sets the CampaignArn field's value.
func (*GetPersonalizedRankingInput) SetContext ¶
func (s *GetPersonalizedRankingInput) SetContext(v map[string]*string) *GetPersonalizedRankingInput
SetContext sets the Context field's value.
func (*GetPersonalizedRankingInput) SetFilterArn ¶
func (s *GetPersonalizedRankingInput) SetFilterArn(v string) *GetPersonalizedRankingInput
SetFilterArn sets the FilterArn field's value.
func (*GetPersonalizedRankingInput) SetFilterValues ¶
func (s *GetPersonalizedRankingInput) SetFilterValues(v map[string]*string) *GetPersonalizedRankingInput
SetFilterValues sets the FilterValues field's value.
func (*GetPersonalizedRankingInput) SetInputList ¶
func (s *GetPersonalizedRankingInput) SetInputList(v []*string) *GetPersonalizedRankingInput
SetInputList sets the InputList field's value.
func (*GetPersonalizedRankingInput) SetMetadataColumns ¶
func (s *GetPersonalizedRankingInput) SetMetadataColumns(v map[string][]*string) *GetPersonalizedRankingInput
SetMetadataColumns sets the MetadataColumns field's value.
func (*GetPersonalizedRankingInput) SetUserId ¶
func (s *GetPersonalizedRankingInput) SetUserId(v string) *GetPersonalizedRankingInput
SetUserId sets the UserId field's value.
func (GetPersonalizedRankingInput) String ¶
func (s GetPersonalizedRankingInput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GetPersonalizedRankingInput) Validate ¶
func (s *GetPersonalizedRankingInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GetPersonalizedRankingOutput ¶
type GetPersonalizedRankingOutput struct { // A list of items in order of most likely interest to the user. The maximum // is 500. PersonalizedRanking []*PredictedItem `locationName:"personalizedRanking" type:"list"` // The ID of the recommendation. RecommendationId *string `locationName:"recommendationId" type:"string"` // contains filtered or unexported fields }
func (GetPersonalizedRankingOutput) GoString ¶
func (s GetPersonalizedRankingOutput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GetPersonalizedRankingOutput) SetPersonalizedRanking ¶
func (s *GetPersonalizedRankingOutput) SetPersonalizedRanking(v []*PredictedItem) *GetPersonalizedRankingOutput
SetPersonalizedRanking sets the PersonalizedRanking field's value.
func (*GetPersonalizedRankingOutput) SetRecommendationId ¶
func (s *GetPersonalizedRankingOutput) SetRecommendationId(v string) *GetPersonalizedRankingOutput
SetRecommendationId sets the RecommendationId field's value.
func (GetPersonalizedRankingOutput) String ¶
func (s GetPersonalizedRankingOutput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type GetRecommendationsInput ¶
type GetRecommendationsInput struct { // The Amazon Resource Name (ARN) of the campaign to use for getting recommendations. CampaignArn *string `locationName:"campaignArn" type:"string"` // The contextual metadata to use when getting recommendations. Contextual metadata // includes any interaction information that might be relevant when getting // a user's recommendations, such as the user's current location or device type. Context map[string]*string `locationName:"context" type:"map"` // The ARN of the filter to apply to the returned recommendations. For more // information, see Filtering Recommendations (https://docs.aws.amazon.com/personalize/latest/dg/filter.html). // // When using this parameter, be sure the filter resource is ACTIVE. FilterArn *string `locationName:"filterArn" type:"string"` // The values to use when filtering recommendations. For each placeholder parameter // in your filter expression, provide the parameter name (in matching case) // as a key and the filter value(s) as the corresponding value. Separate multiple // values for one parameter with a comma. // // For filter expressions that use an INCLUDE element to include items, you // must provide values for all parameters that are defined in the expression. // For filters with expressions that use an EXCLUDE element to exclude items, // you can omit the filter-values.In this case, Amazon Personalize doesn't use // that portion of the expression to filter recommendations. // // For more information, see Filtering recommendations and user segments (https://docs.aws.amazon.com/personalize/latest/dg/filter.html). FilterValues map[string]*string `locationName:"filterValues" type:"map"` // The item ID to provide recommendations for. // // Required for RELATED_ITEMS recipe type. ItemId *string `locationName:"itemId" type:"string"` // If you enabled metadata in recommendations when you created or updated the // campaign or recommender, specify the metadata columns from your Items dataset // to include in item recommendations. The map key is ITEMS and the value is // a list of column names from your Items dataset. The maximum number of columns // you can provide is 10. // // For information about enabling metadata for a campaign, see Enabling metadata // in recommendations for a campaign (https://docs.aws.amazon.com/personalize/latest/dg/create-campaign-return-metadata.html). // For information about enabling metadata for a recommender, see Enabling metadata // in recommendations for a recommender (https://docs.aws.amazon.com/personalize/latest/dg/create-recommender-return-metadata.html). MetadataColumns map[string][]*string `locationName:"metadataColumns" type:"map"` // The number of results to return. The default is 25. If you are including // metadata in recommendations, the maximum is 50. Otherwise, the maximum is // 500. NumResults *int64 `locationName:"numResults" type:"integer"` // The promotions to apply to the recommendation request. A promotion defines // additional business rules that apply to a configurable subset of recommended // items. Promotions []*Promotion `locationName:"promotions" type:"list"` // The Amazon Resource Name (ARN) of the recommender to use to get recommendations. // Provide a recommender ARN if you created a Domain dataset group with a recommender // for a domain use case. RecommenderArn *string `locationName:"recommenderArn" type:"string"` // The user ID to provide recommendations for. // // Required for USER_PERSONALIZATION recipe type. UserId *string `locationName:"userId" type:"string"` // contains filtered or unexported fields }
func (GetRecommendationsInput) GoString ¶
func (s GetRecommendationsInput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GetRecommendationsInput) SetCampaignArn ¶
func (s *GetRecommendationsInput) SetCampaignArn(v string) *GetRecommendationsInput
SetCampaignArn sets the CampaignArn field's value.
func (*GetRecommendationsInput) SetContext ¶
func (s *GetRecommendationsInput) SetContext(v map[string]*string) *GetRecommendationsInput
SetContext sets the Context field's value.
func (*GetRecommendationsInput) SetFilterArn ¶
func (s *GetRecommendationsInput) SetFilterArn(v string) *GetRecommendationsInput
SetFilterArn sets the FilterArn field's value.
func (*GetRecommendationsInput) SetFilterValues ¶
func (s *GetRecommendationsInput) SetFilterValues(v map[string]*string) *GetRecommendationsInput
SetFilterValues sets the FilterValues field's value.
func (*GetRecommendationsInput) SetItemId ¶
func (s *GetRecommendationsInput) SetItemId(v string) *GetRecommendationsInput
SetItemId sets the ItemId field's value.
func (*GetRecommendationsInput) SetMetadataColumns ¶
func (s *GetRecommendationsInput) SetMetadataColumns(v map[string][]*string) *GetRecommendationsInput
SetMetadataColumns sets the MetadataColumns field's value.
func (*GetRecommendationsInput) SetNumResults ¶
func (s *GetRecommendationsInput) SetNumResults(v int64) *GetRecommendationsInput
SetNumResults sets the NumResults field's value.
func (*GetRecommendationsInput) SetPromotions ¶
func (s *GetRecommendationsInput) SetPromotions(v []*Promotion) *GetRecommendationsInput
SetPromotions sets the Promotions field's value.
func (*GetRecommendationsInput) SetRecommenderArn ¶
func (s *GetRecommendationsInput) SetRecommenderArn(v string) *GetRecommendationsInput
SetRecommenderArn sets the RecommenderArn field's value.
func (*GetRecommendationsInput) SetUserId ¶
func (s *GetRecommendationsInput) SetUserId(v string) *GetRecommendationsInput
SetUserId sets the UserId field's value.
func (GetRecommendationsInput) String ¶
func (s GetRecommendationsInput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GetRecommendationsInput) Validate ¶
func (s *GetRecommendationsInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type GetRecommendationsOutput ¶
type GetRecommendationsOutput struct { // A list of recommendations sorted in descending order by prediction score. // There can be a maximum of 500 items in the list. ItemList []*PredictedItem `locationName:"itemList" type:"list"` // The ID of the recommendation. RecommendationId *string `locationName:"recommendationId" type:"string"` // contains filtered or unexported fields }
func (GetRecommendationsOutput) GoString ¶
func (s GetRecommendationsOutput) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*GetRecommendationsOutput) SetItemList ¶
func (s *GetRecommendationsOutput) SetItemList(v []*PredictedItem) *GetRecommendationsOutput
SetItemList sets the ItemList field's value.
func (*GetRecommendationsOutput) SetRecommendationId ¶
func (s *GetRecommendationsOutput) SetRecommendationId(v string) *GetRecommendationsOutput
SetRecommendationId sets the RecommendationId field's value.
func (GetRecommendationsOutput) String ¶
func (s GetRecommendationsOutput) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type InvalidInputException ¶
type InvalidInputException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
Provide a valid value for the field or parameter.
func (*InvalidInputException) Code ¶
func (s *InvalidInputException) Code() string
Code returns the exception type name.
func (*InvalidInputException) Error ¶
func (s *InvalidInputException) Error() string
func (InvalidInputException) GoString ¶
func (s InvalidInputException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*InvalidInputException) Message ¶
func (s *InvalidInputException) Message() string
Message returns the exception's message.
func (*InvalidInputException) OrigErr ¶
func (s *InvalidInputException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*InvalidInputException) RequestID ¶
func (s *InvalidInputException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*InvalidInputException) StatusCode ¶
func (s *InvalidInputException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (InvalidInputException) String ¶
func (s InvalidInputException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type PersonalizeRuntime ¶
PersonalizeRuntime provides the API operation methods for making requests to Amazon Personalize Runtime. See this package's package overview docs for details on the service.
PersonalizeRuntime methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*aws.Config) *PersonalizeRuntime
New creates a new instance of the PersonalizeRuntime client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.
Example:
mySession := session.Must(session.NewSession()) // Create a PersonalizeRuntime client from just a session. svc := personalizeruntime.New(mySession) // Create a PersonalizeRuntime client with additional configuration svc := personalizeruntime.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func (*PersonalizeRuntime) GetActionRecommendations ¶
func (c *PersonalizeRuntime) GetActionRecommendations(input *GetActionRecommendationsInput) (*GetActionRecommendationsOutput, error)
GetActionRecommendations API operation for Amazon Personalize Runtime.
Returns a list of recommended actions in sorted in descending order by prediction score. Use the GetActionRecommendations API if you have a custom campaign that deploys a solution version trained with a PERSONALIZED_ACTIONS recipe.
For more information about PERSONALIZED_ACTIONS recipes, see PERSONALIZED_ACTIONS recipes (https://docs.aws.amazon.com/personalize/latest/dg/nexts-best-action-recipes.html). For more information about getting action recommendations, see Getting action recommendations (https://docs.aws.amazon.com/personalize/latest/dg/get-action-recommendations.html).
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Personalize Runtime's API operation GetActionRecommendations for usage and error information.
Returned Error Types:
InvalidInputException Provide a valid value for the field or parameter.
ResourceNotFoundException The specified resource does not exist.
See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetActionRecommendations
func (*PersonalizeRuntime) GetActionRecommendationsRequest ¶
func (c *PersonalizeRuntime) GetActionRecommendationsRequest(input *GetActionRecommendationsInput) (req *request.Request, output *GetActionRecommendationsOutput)
GetActionRecommendationsRequest generates a "aws/request.Request" representing the client's request for the GetActionRecommendations operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See GetActionRecommendations for more information on using the GetActionRecommendations API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the GetActionRecommendationsRequest method. req, resp := client.GetActionRecommendationsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetActionRecommendations
func (*PersonalizeRuntime) GetActionRecommendationsWithContext ¶
func (c *PersonalizeRuntime) GetActionRecommendationsWithContext(ctx aws.Context, input *GetActionRecommendationsInput, opts ...request.Option) (*GetActionRecommendationsOutput, error)
GetActionRecommendationsWithContext is the same as GetActionRecommendations with the addition of the ability to pass a context and additional request options.
See GetActionRecommendations for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*PersonalizeRuntime) GetPersonalizedRanking ¶
func (c *PersonalizeRuntime) GetPersonalizedRanking(input *GetPersonalizedRankingInput) (*GetPersonalizedRankingOutput, error)
GetPersonalizedRanking API operation for Amazon Personalize Runtime.
Re-ranks a list of recommended items for the given user. The first item in the list is deemed the most likely item to be of interest to the user.
The solution backing the campaign must have been created using a recipe of type PERSONALIZED_RANKING.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Personalize Runtime's API operation GetPersonalizedRanking for usage and error information.
Returned Error Types:
InvalidInputException Provide a valid value for the field or parameter.
ResourceNotFoundException The specified resource does not exist.
See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetPersonalizedRanking
func (*PersonalizeRuntime) GetPersonalizedRankingRequest ¶
func (c *PersonalizeRuntime) GetPersonalizedRankingRequest(input *GetPersonalizedRankingInput) (req *request.Request, output *GetPersonalizedRankingOutput)
GetPersonalizedRankingRequest generates a "aws/request.Request" representing the client's request for the GetPersonalizedRanking operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See GetPersonalizedRanking for more information on using the GetPersonalizedRanking API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the GetPersonalizedRankingRequest method. req, resp := client.GetPersonalizedRankingRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetPersonalizedRanking
func (*PersonalizeRuntime) GetPersonalizedRankingWithContext ¶
func (c *PersonalizeRuntime) GetPersonalizedRankingWithContext(ctx aws.Context, input *GetPersonalizedRankingInput, opts ...request.Option) (*GetPersonalizedRankingOutput, error)
GetPersonalizedRankingWithContext is the same as GetPersonalizedRanking with the addition of the ability to pass a context and additional request options.
See GetPersonalizedRanking for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
func (*PersonalizeRuntime) GetRecommendations ¶
func (c *PersonalizeRuntime) GetRecommendations(input *GetRecommendationsInput) (*GetRecommendationsOutput, error)
GetRecommendations API operation for Amazon Personalize Runtime.
Returns a list of recommended items. For campaigns, the campaign's Amazon Resource Name (ARN) is required and the required user and item input depends on the recipe type used to create the solution backing the campaign as follows:
USER_PERSONALIZATION - userId required, itemId not used
RELATED_ITEMS - itemId required, userId not used
Campaigns that are backed by a solution created using a recipe of type PERSONALIZED_RANKING use the API.
For recommenders, the recommender's ARN is required and the required item and user input depends on the use case (domain-based recipe) backing the recommender. For information on use case requirements see Choosing recommender use cases (https://docs.aws.amazon.com/personalize/latest/dg/domain-use-cases.html).
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for Amazon Personalize Runtime's API operation GetRecommendations for usage and error information.
Returned Error Types:
InvalidInputException Provide a valid value for the field or parameter.
ResourceNotFoundException The specified resource does not exist.
See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetRecommendations
func (*PersonalizeRuntime) GetRecommendationsRequest ¶
func (c *PersonalizeRuntime) GetRecommendationsRequest(input *GetRecommendationsInput) (req *request.Request, output *GetRecommendationsOutput)
GetRecommendationsRequest generates a "aws/request.Request" representing the client's request for the GetRecommendations operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See GetRecommendations for more information on using the GetRecommendations API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the GetRecommendationsRequest method. req, resp := client.GetRecommendationsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/personalize-runtime-2018-05-22/GetRecommendations
func (*PersonalizeRuntime) GetRecommendationsWithContext ¶
func (c *PersonalizeRuntime) GetRecommendationsWithContext(ctx aws.Context, input *GetRecommendationsInput, opts ...request.Option) (*GetRecommendationsOutput, error)
GetRecommendationsWithContext is the same as GetRecommendations with the addition of the ability to pass a context and additional request options.
See GetRecommendations for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
type PredictedAction ¶
type PredictedAction struct { // The ID of the recommended action. ActionId *string `locationName:"actionId" type:"string"` // The score of the recommended action. For information about action scores, // see How action recommendation scoring works (https://docs.aws.amazon.com/personalize/latest/dg/how-action-recommendation-scoring-works.html). Score *float64 `locationName:"score" type:"double"` // contains filtered or unexported fields }
An object that identifies an action.
The API returns a list of PredictedActions.
func (PredictedAction) GoString ¶
func (s PredictedAction) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*PredictedAction) SetActionId ¶
func (s *PredictedAction) SetActionId(v string) *PredictedAction
SetActionId sets the ActionId field's value.
func (*PredictedAction) SetScore ¶
func (s *PredictedAction) SetScore(v float64) *PredictedAction
SetScore sets the Score field's value.
func (PredictedAction) String ¶
func (s PredictedAction) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type PredictedItem ¶
type PredictedItem struct { // The recommended item ID. ItemId *string `locationName:"itemId" type:"string"` // Metadata about the item from your Items dataset. Metadata map[string]*string `locationName:"metadata" type:"map"` // The name of the promotion that included the predicted item. PromotionName *string `locationName:"promotionName" min:"1" type:"string"` // A numeric representation of the model's certainty that the item will be the // next user selection. For more information on scoring logic, see how-scores-work. Score *float64 `locationName:"score" type:"double"` // contains filtered or unexported fields }
An object that identifies an item.
The and APIs return a list of PredictedItems.
func (PredictedItem) GoString ¶
func (s PredictedItem) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*PredictedItem) SetItemId ¶
func (s *PredictedItem) SetItemId(v string) *PredictedItem
SetItemId sets the ItemId field's value.
func (*PredictedItem) SetMetadata ¶
func (s *PredictedItem) SetMetadata(v map[string]*string) *PredictedItem
SetMetadata sets the Metadata field's value.
func (*PredictedItem) SetPromotionName ¶
func (s *PredictedItem) SetPromotionName(v string) *PredictedItem
SetPromotionName sets the PromotionName field's value.
func (*PredictedItem) SetScore ¶
func (s *PredictedItem) SetScore(v float64) *PredictedItem
SetScore sets the Score field's value.
func (PredictedItem) String ¶
func (s PredictedItem) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
type Promotion ¶
type Promotion struct { // The Amazon Resource Name (ARN) of the filter used by the promotion. This // filter defines the criteria for promoted items. For more information, see // Promotion filters (https://docs.aws.amazon.com/personalize/latest/dg/promoting-items.html#promotion-filters). FilterArn *string `locationName:"filterArn" type:"string"` // The values to use when promoting items. For each placeholder parameter in // your promotion's filter expression, provide the parameter name (in matching // case) as a key and the filter value(s) as the corresponding value. Separate // multiple values for one parameter with a comma. // // For filter expressions that use an INCLUDE element to include items, you // must provide values for all parameters that are defined in the expression. // For filters with expressions that use an EXCLUDE element to exclude items, // you can omit the filter-values. In this case, Amazon Personalize doesn't // use that portion of the expression to filter recommendations. // // For more information on creating filters, see Filtering recommendations and // user segments (https://docs.aws.amazon.com/personalize/latest/dg/filter.html). FilterValues map[string]*string `locationName:"filterValues" type:"map"` // The name of the promotion. Name *string `locationName:"name" min:"1" type:"string"` // The percentage of recommended items to apply the promotion to. PercentPromotedItems *int64 `locationName:"percentPromotedItems" min:"1" type:"integer"` // contains filtered or unexported fields }
Contains information on a promotion. A promotion defines additional business rules that apply to a configurable subset of recommended items.
func (Promotion) GoString ¶
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*Promotion) SetFilterArn ¶
SetFilterArn sets the FilterArn field's value.
func (*Promotion) SetFilterValues ¶
SetFilterValues sets the FilterValues field's value.
func (*Promotion) SetPercentPromotedItems ¶
SetPercentPromotedItems sets the PercentPromotedItems field's value.
type ResourceNotFoundException ¶
type ResourceNotFoundException struct { RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` Message_ *string `locationName:"message" type:"string"` // contains filtered or unexported fields }
The specified resource does not exist.
func (*ResourceNotFoundException) Code ¶
func (s *ResourceNotFoundException) Code() string
Code returns the exception type name.
func (*ResourceNotFoundException) Error ¶
func (s *ResourceNotFoundException) Error() string
func (ResourceNotFoundException) GoString ¶
func (s ResourceNotFoundException) GoString() string
GoString returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
func (*ResourceNotFoundException) Message ¶
func (s *ResourceNotFoundException) Message() string
Message returns the exception's message.
func (*ResourceNotFoundException) OrigErr ¶
func (s *ResourceNotFoundException) OrigErr() error
OrigErr always returns nil, satisfies awserr.Error interface.
func (*ResourceNotFoundException) RequestID ¶
func (s *ResourceNotFoundException) RequestID() string
RequestID returns the service's response RequestID for request.
func (*ResourceNotFoundException) StatusCode ¶
func (s *ResourceNotFoundException) StatusCode() int
Status code returns the HTTP status code for the request's response error.
func (ResourceNotFoundException) String ¶
func (s ResourceNotFoundException) String() string
String returns the string representation.
API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".
Directories ¶
Path | Synopsis |
---|---|
Package personalizeruntimeiface provides an interface to enable mocking the Amazon Personalize Runtime service client for testing your code.
|
Package personalizeruntimeiface provides an interface to enable mocking the Amazon Personalize Runtime service client for testing your code. |