recommendation_feedbacks
Creates, updates, deletes, gets or lists a recommendation_feedbacks resource.
Overview
| Name | recommendation_feedbacks |
| Type | Resource |
| Id | aws.codeguru_reviewer.recommendation_feedbacks |
Fields
The following fields are returned by SELECT queries:
- describe_recommendation_feedback
- list_recommendation_feedback
| Name | Datatype | Description |
|---|---|---|
code_review_arn | string | The Amazon Resource Name (ARN) of the CodeReview object. (pattern: <code>^arn:aws[^:\s]*:codeguru-reviewer:[^:\s]+:[\d]{12}:[a-z-]+:[\w-]+$</code>) |
created_time_stamp | string (date-time) | The time at which the feedback was created. |
last_updated_time_stamp | string (date-time) | The time at which the feedback was last updated. |
reactions | array | List for storing reactions. Reactions are utf-8 text code for emojis. You can send an empty list to clear off all your feedback. |
recommendation_id | string | The recommendation ID that can be used to track the provided recommendations. Later on it can be used to collect the feedback. |
user_id | string | The ID of the user that made the API call. The UserId is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide. |
| Name | Datatype | Description |
|---|---|---|
next_token | string | If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. |
recommendation_feedback_summaries | array | Recommendation feedback summaries corresponding to the code review ARN. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_recommendation_feedback | select | code_review_arn, RecommendationId, region | UserId | Describes the customer feedback for a CodeGuru Reviewer recommendation. |
list_recommendation_feedback | select | code_review_arn, region | NextToken, MaxResults, UserIds, RecommendationIds | Returns a list of RecommendationFeedbackSummary objects that contain customer recommendation feedback for all CodeGuru Reviewer users. |
put_recommendation_feedback | replace | region, CodeReviewArn, RecommendationId, Reactions | Stores customer feedback for a CodeGuru Reviewer recommendation. When this API is called again with different reactions the previous feedback is overwritten. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
RecommendationId | string | The recommendation ID that can be used to track the provided recommendations and then to collect the feedback. |
code_review_arn | string | The Amazon Resource Name (ARN) of the CodeReview object. |
region | string | AWS region (default: us-east-1) |
MaxResults | integer | The maximum number of results that are returned per call. The default is 100. |
NextToken | string | If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. |
RecommendationIds | array | Used to query the recommendation feedback for a given recommendation. |
UserId | string | Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request. The UserId is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide. |
UserIds | array | An Amazon Web Services user's account ID or Amazon Resource Name (ARN). Use this ID to query the recommendation feedback for a code review from that user. The UserId is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide. |
SELECT examples
- describe_recommendation_feedback
- list_recommendation_feedback
Describes the customer feedback for a CodeGuru Reviewer recommendation.
SELECT
code_review_arn,
created_time_stamp,
last_updated_time_stamp,
reactions,
recommendation_id,
user_id
FROM aws.codeguru_reviewer.recommendation_feedbacks
WHERE code_review_arn = '{{ code_review_arn }}' -- required
AND RecommendationId = '{{ RecommendationId }}' -- required
AND region = '{{ region }}' -- required
AND UserId = '{{ UserId }}'
;
Returns a list of RecommendationFeedbackSummary objects that contain customer recommendation feedback for all CodeGuru Reviewer users.
SELECT
next_token,
recommendation_feedback_summaries
FROM aws.codeguru_reviewer.recommendation_feedbacks
WHERE code_review_arn = '{{ code_review_arn }}' -- required
AND region = '{{ region }}' -- required
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
AND UserIds = '{{ UserIds }}'
AND RecommendationIds = '{{ RecommendationIds }}'
;
REPLACE examples
- put_recommendation_feedback
Stores customer feedback for a CodeGuru Reviewer recommendation. When this API is called again with different reactions the previous feedback is overwritten.
REPLACE aws.codeguru_reviewer.recommendation_feedbacks
SET
CodeReviewArn = '{{ CodeReviewArn }}',
RecommendationId = '{{ RecommendationId }}',
Reactions = '{{ Reactions }}'
WHERE
region = '{{ region }}' --required
AND CodeReviewArn = '{{ CodeReviewArn }}' --required
AND RecommendationId = '{{ RecommendationId }}' --required
AND Reactions = '{{ Reactions }}' --required;