:doc:`WorkDocs <../../workdocs>` / Client / create_comment

**************
create_comment
**************



.. py:method:: WorkDocs.Client.create_comment(**kwargs)

  

  Adds a new comment to the specified document version.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateComment>`_  


  **Request Syntax**
  ::

    response = client.create_comment(
        AuthenticationToken='string',
        DocumentId='string',
        VersionId='string',
        ParentId='string',
        ThreadId='string',
        Text='string',
        Visibility='PUBLIC'|'PRIVATE',
        NotifyCollaborators=True|False
    )
    
  :type AuthenticationToken: string
  :param AuthenticationToken: 

    Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

    

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

    The ID of the document.

    

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

    The ID of the document version.

    

  
  :type ParentId: string
  :param ParentId: 

    The ID of the parent comment.

    

  
  :type ThreadId: string
  :param ThreadId: 

    The ID of the root comment in the thread.

    

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

    The text of the comment.

    

  
  :type Visibility: string
  :param Visibility: 

    The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.

    

  
  :type NotifyCollaborators: boolean
  :param NotifyCollaborators: 

    Set this parameter to TRUE to send an email out to the document collaborators after the comment is created.

    

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

    
    ::

      {
          'Comment': {
              'CommentId': 'string',
              'ParentId': 'string',
              'ThreadId': 'string',
              'Text': 'string',
              'Contributor': {
                  'Id': 'string',
                  'Username': 'string',
                  'EmailAddress': 'string',
                  'GivenName': 'string',
                  'Surname': 'string',
                  'OrganizationId': 'string',
                  'RootFolderId': 'string',
                  'RecycleBinFolderId': 'string',
                  'Status': 'ACTIVE'|'INACTIVE'|'PENDING',
                  'Type': 'USER'|'ADMIN'|'POWERUSER'|'MINIMALUSER'|'WORKSPACESUSER',
                  'CreatedTimestamp': datetime(2015, 1, 1),
                  'ModifiedTimestamp': datetime(2015, 1, 1),
                  'TimeZoneId': 'string',
                  'Locale': 'en'|'fr'|'ko'|'de'|'es'|'ja'|'ru'|'zh_CN'|'zh_TW'|'pt_BR'|'default',
                  'Storage': {
                      'StorageUtilizedInBytes': 123,
                      'StorageRule': {
                          'StorageAllocatedInBytes': 123,
                          'StorageType': 'UNLIMITED'|'QUOTA'
                      }
                  }
              },
              'CreatedTimestamp': datetime(2015, 1, 1),
              'Status': 'DRAFT'|'PUBLISHED'|'DELETED',
              'Visibility': 'PUBLIC'|'PRIVATE',
              'RecipientId': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Comment** *(dict) --* 

        The comment that has been created.

        
        

        - **CommentId** *(string) --* 

          The ID of the comment.

          
        

        - **ParentId** *(string) --* 

          The ID of the parent comment.

          
        

        - **ThreadId** *(string) --* 

          The ID of the root comment in the thread.

          
        

        - **Text** *(string) --* 

          The text of the comment.

          
        

        - **Contributor** *(dict) --* 

          The details of the user who made the comment.

          
          

          - **Id** *(string) --* 

            The ID of the user.

            
          

          - **Username** *(string) --* 

            The login name of the user.

            
          

          - **EmailAddress** *(string) --* 

            The email address of the user.

            
          

          - **GivenName** *(string) --* 

            The given name of the user.

            
          

          - **Surname** *(string) --* 

            The surname of the user.

            
          

          - **OrganizationId** *(string) --* 

            The ID of the organization.

            
          

          - **RootFolderId** *(string) --* 

            The ID of the root folder.

            
          

          - **RecycleBinFolderId** *(string) --* 

            The ID of the recycle bin folder.

            
          

          - **Status** *(string) --* 

            The status of the user.

            
          

          - **Type** *(string) --* 

            The type of user.

            
          

          - **CreatedTimestamp** *(datetime) --* 

            The time when the user was created.

            
          

          - **ModifiedTimestamp** *(datetime) --* 

            The time when the user was modified.

            
          

          - **TimeZoneId** *(string) --* 

            The time zone ID of the user.

            
          

          - **Locale** *(string) --* 

            The locale of the user.

            
          

          - **Storage** *(dict) --* 

            The storage for the user.

            
            

            - **StorageUtilizedInBytes** *(integer) --* 

              The amount of storage used, in bytes.

              
            

            - **StorageRule** *(dict) --* 

              The storage for a user.

              
              

              - **StorageAllocatedInBytes** *(integer) --* 

                The amount of storage allocated, in bytes.

                
              

              - **StorageType** *(string) --* 

                The type of storage.

                
          
        
      
        

        - **CreatedTimestamp** *(datetime) --* 

          The time that the comment was created.

          
        

        - **Status** *(string) --* 

          The status of the comment.

          
        

        - **Visibility** *(string) --* 

          The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.

          
        

        - **RecipientId** *(string) --* 

          If the comment is a reply to another user's comment, this field contains the user ID of the user being replied to.

          
    
  
  **Exceptions**
  
  *   :py:class:`WorkDocs.Client.exceptions.EntityNotExistsException`

  
  *   :py:class:`WorkDocs.Client.exceptions.ProhibitedStateException`

  
  *   :py:class:`WorkDocs.Client.exceptions.UnauthorizedOperationException`

  
  *   :py:class:`WorkDocs.Client.exceptions.UnauthorizedResourceAccessException`

  
  *   :py:class:`WorkDocs.Client.exceptions.FailedDependencyException`

  
  *   :py:class:`WorkDocs.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`WorkDocs.Client.exceptions.DocumentLockedForCommentsException`

  
  *   :py:class:`WorkDocs.Client.exceptions.InvalidCommentOperationException`

  