Skip to content

get_comment_reactions async

get_comment_reactions(
    comment_id: CommentId,
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
    reaction_user_arn: Optional[Arn] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> GetCommentReactionsOutput

Returns information about reactions to a specified comment ID. Reactions from users who have been deleted will not be included in the count.

Parameters:

  • comment_id (CommentId) –

    The ID of the comment for which you want to get reactions information.

  • reaction_user_arn (Optional[Arn], default: None ) –

    Optional. The Amazon Resource Name (ARN) of the user or identity for which you want to get reaction information.

  • next_token (Optional[NextToken], default: None ) –

    An enumeration token that, when provided in a request, returns the next batch of the results.

  • max_results (Optional[MaxResults], default: None ) –

    A non-zero, non-negative integer used to limit the number of returned results. The default is the same as the allowed maximum, 1,000.

Raises:

Source code in docs_src/capo_codecommit/_services/async_code_commit.py
async def get_comment_reactions(
    self,
    comment_id: "capo_codecommit.types.comment_id.CommentId",
    *,
    config_overrides: Optional[AsyncCodeCommitClientConfig] = None,
    reaction_user_arn: Optional["capo_codecommit.types.arn.Arn"] = None,
    next_token: Optional["capo_codecommit.types.next_token.NextToken"] = None,
    max_results: Optional["capo_codecommit.types.max_results.MaxResults"] = None,
) -> "capo_codecommit.types.get_comment_reactions_output.GetCommentReactionsOutput":
    """<p>Returns information about reactions to a specified comment ID. Reactions from users who have been deleted will not be included in the count.</p>

    Args:
        comment_id: <p>The ID of the comment for which you want to get reactions information.</p>
        reaction_user_arn: <p>Optional. The Amazon Resource Name (ARN) of the user or identity for which you want to get reaction information.</p>
        next_token: <p>An enumeration token that, when provided in a request, returns the next batch of the results. </p>
        max_results: <p>A non-zero, non-negative integer used to limit the number of returned results. The default is the same as the allowed maximum, 1,000.</p>

    Raises:
        capo_codecommit.errors.comment_deleted_exception.CommentDeletedException: <p>This comment has already been deleted. You cannot edit or delete a deleted comment.</p>
        capo_codecommit.errors.comment_does_not_exist_exception.CommentDoesNotExistException: <p>No comment exists with the provided ID. Verify that you have used the correct ID, and then try again.</p>
        capo_codecommit.errors.comment_id_required_exception.CommentIdRequiredException: <p>The comment ID is missing or null. A comment ID is required.</p>
        capo_codecommit.errors.invalid_comment_id_exception.InvalidCommentIdException: <p>The comment ID is not in a valid format. Make sure that you have provided the full comment ID.</p>
        capo_codecommit.errors.invalid_continuation_token_exception.InvalidContinuationTokenException: <p>The specified continuation token is not valid.</p>
        capo_codecommit.errors.invalid_max_results_exception.InvalidMaxResultsException: <p>The specified number of maximum results is not valid.</p>
        capo_codecommit.errors.invalid_reaction_user_arn_exception.InvalidReactionUserArnException: <p>The Amazon Resource Name (ARN) of the user or identity is not valid.</p>
        capo_codecommit.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codecommit.types.get_comment_reactions_input.GetCommentReactionsInput]",
    ) -> AsyncOperationResponse[
        "capo_codecommit.types.get_comment_reactions_output.GetCommentReactionsOutput"
    ]:
        import capo_codecommit._operations.code_commit_20150413.get_comment_reactions

        (
            output,
            http_response,
        ) = await capo_codecommit._operations.code_commit_20150413.get_comment_reactions.async_get_comment_reactions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetCommentReactions")
    )
    input_: capo_codecommit.types.get_comment_reactions_input.GetCommentReactionsInput = {
        "comment_id": comment_id
    }
    if reaction_user_arn is not None:
        input_["reaction_user_arn"] = reaction_user_arn
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output