:doc:`CodeCommit <../../codecommit>` / Client / post_comment_for_compared_commit

********************************
post_comment_for_compared_commit
********************************



.. py:method:: CodeCommit.Client.post_comment_for_compared_commit(**kwargs)

  

  Posts a comment on the comparison between two commits.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/PostCommentForComparedCommit>`_  


  **Request Syntax**
  ::

    response = client.post_comment_for_compared_commit(
        repositoryName='string',
        beforeCommitId='string',
        afterCommitId='string',
        location={
            'filePath': 'string',
            'filePosition': 123,
            'relativeFileVersion': 'BEFORE'|'AFTER'
        },
        content='string',
        clientRequestToken='string'
    )
    
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository where you want to post a comment on the comparison between commits.

    

  
  :type beforeCommitId: string
  :param beforeCommitId: 

    To establish the directionality of the comparison, the full commit ID of the before commit. Required for commenting on any commit unless that commit is the initial commit.

    

  
  :type afterCommitId: string
  :param afterCommitId: **[REQUIRED]** 

    To establish the directionality of the comparison, the full commit ID of the after commit.

    

  
  :type location: dict
  :param location: 

    The location of the comparison where you want to comment.

    

  
    - **filePath** *(string) --* 

      The name of the file being compared, including its extension and subdirectory, if any.

      

    
    - **filePosition** *(integer) --* 

      The position of a change in a compared file, in line number format.

      

    
    - **relativeFileVersion** *(string) --* 

      In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.

      

    
  
  :type content: string
  :param content: **[REQUIRED]** 

    The content of the comment you want to make.

    

  
  :type clientRequestToken: string
  :param clientRequestToken: 

    A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.

    This field is autopopulated if not provided.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'repositoryName': 'string',
          'beforeCommitId': 'string',
          'afterCommitId': 'string',
          'beforeBlobId': 'string',
          'afterBlobId': 'string',
          'location': {
              'filePath': 'string',
              'filePosition': 123,
              'relativeFileVersion': 'BEFORE'|'AFTER'
          },
          'comment': {
              'commentId': 'string',
              'content': 'string',
              'inReplyTo': 'string',
              'creationDate': datetime(2015, 1, 1),
              'lastModifiedDate': datetime(2015, 1, 1),
              'authorArn': 'string',
              'deleted': True|False,
              'clientRequestToken': 'string',
              'callerReactions': [
                  'string',
              ],
              'reactionCounts': {
                  'string': 123
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **repositoryName** *(string) --* 

        The name of the repository where you posted a comment on the comparison between commits.

        
      

      - **beforeCommitId** *(string) --* 

        In the directionality you established, the full commit ID of the before commit.

        
      

      - **afterCommitId** *(string) --* 

        In the directionality you established, the full commit ID of the after commit.

        
      

      - **beforeBlobId** *(string) --* 

        In the directionality you established, the blob ID of the before blob.

        
      

      - **afterBlobId** *(string) --* 

        In the directionality you established, the blob ID of the after blob.

        
      

      - **location** *(dict) --* 

        The location of the comment in the comparison between the two commits.

        
        

        - **filePath** *(string) --* 

          The name of the file being compared, including its extension and subdirectory, if any.

          
        

        - **filePosition** *(integer) --* 

          The position of a change in a compared file, in line number format.

          
        

        - **relativeFileVersion** *(string) --* 

          In a comparison of commits or a pull request, whether the change is in the before or after of that comparison.

          
    
      

      - **comment** *(dict) --* 

        The content of the comment you posted.

        
        

        - **commentId** *(string) --* 

          The system-generated comment ID.

          
        

        - **content** *(string) --* 

          The content of the comment.

          
        

        - **inReplyTo** *(string) --* 

          The ID of the comment for which this comment is a reply, if any.

          
        

        - **creationDate** *(datetime) --* 

          The date and time the comment was created, in timestamp format.

          
        

        - **lastModifiedDate** *(datetime) --* 

          The date and time the comment was most recently modified, in timestamp format.

          
        

        - **authorArn** *(string) --* 

          The Amazon Resource Name (ARN) of the person who posted the comment.

          
        

        - **deleted** *(boolean) --* 

          A Boolean value indicating whether the comment has been deleted.

          
        

        - **clientRequestToken** *(string) --* 

          A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.

          
        

        - **callerReactions** *(list) --* 

          The emoji reactions to a comment, if any, submitted by the user whose credentials are associated with the call to the API.

          
          

          - *(string) --* 
      
        

        - **reactionCounts** *(dict) --* 

          A string to integer map that represents the number of individual users who have responded to a comment with the specified reactions.

          
          

          - *(string) --* 
            

            - *(integer) --* 
      
    
    
  
  **Exceptions**
  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryNameRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.RepositoryDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidRepositoryNameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.ClientRequestTokenRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidClientRequestTokenException`

  
  *   :py:class:`CodeCommit.Client.exceptions.IdempotencyParameterMismatchException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommentContentRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommentContentSizeLimitExceededException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidFileLocationException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidRelativeFileVersionEnumException`

  
  *   :py:class:`CodeCommit.Client.exceptions.PathRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidFilePositionException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommitIdRequiredException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidCommitIdException`

  
  *   :py:class:`CodeCommit.Client.exceptions.BeforeCommitIdAndAfterCommitIdAreSameException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionIntegrityChecksFailedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyAccessDeniedException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyDisabledException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyNotFoundException`

  
  *   :py:class:`CodeCommit.Client.exceptions.EncryptionKeyUnavailableException`

  
  *   :py:class:`CodeCommit.Client.exceptions.CommitDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.InvalidPathException`

  
  *   :py:class:`CodeCommit.Client.exceptions.PathDoesNotExistException`

  
  *   :py:class:`CodeCommit.Client.exceptions.PathRequiredException`

  