Personalize.Client.
update_metric_attribution
(**kwargs)¶Updates a metric attribution.
See also: AWS API Documentation
Request Syntax
response = client.update_metric_attribution(
addMetrics=[
{
'eventType': 'string',
'metricName': 'string',
'expression': 'string'
},
],
removeMetrics=[
'string',
],
metricsOutputConfig={
's3DataDestination': {
'path': 'string',
'kmsKeyArn': 'string'
},
'roleArn': 'string'
},
metricAttributionArn='string'
)
Add new metric attributes to the metric attribution.
Contains information on a metric that a metric attribution reports on. For more information, see Measuring impact of recommendations.
The metric's event type.
The metric's name. The name helps you identify the metric in Amazon CloudWatch or Amazon S3.
The attribute's expression. Available functions are SUM()
or SAMPLECOUNT()
. For SUM() functions, provide the dataset type (either Interactions or Items) and column to sum as a parameter. For example SUM(Items.PRICE).
Remove metric attributes from the metric attribution.
An output config for the metric attribution.
The configuration details of an Amazon S3 input or output bucket.
The file path of the Amazon S3 bucket.
The Amazon Resource Name (ARN) of the Key Management Service (KMS) key that Amazon Personalize uses to encrypt or decrypt the input and output files.
The Amazon Resource Name (ARN) of the IAM service role that has permissions to add data to your output Amazon S3 bucket and add metrics to Amazon CloudWatch. For more information, see Measuring impact of recommendations.
dict
Response Syntax
{
'metricAttributionArn': 'string'
}
Response Structure
(dict) --
metricAttributionArn (string) --
The Amazon Resource Name (ARN) for the metric attribution that you updated.
Exceptions
Personalize.Client.exceptions.InvalidInputException
Personalize.Client.exceptions.ResourceNotFoundException
Personalize.Client.exceptions.ResourceInUseException
Personalize.Client.exceptions.ResourceAlreadyExistsException