:doc:`signer <../../signer>` / Client / sign_payload

************
sign_payload
************



.. py:method:: signer.Client.sign_payload(**kwargs)

  

  Signs a binary payload and returns a signature envelope.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/signer-2017-08-25/SignPayload>`_  


  **Request Syntax**
  ::

    response = client.sign_payload(
        profileName='string',
        profileOwner='string',
        payload=b'bytes',
        payloadFormat='string'
    )
    
  :type profileName: string
  :param profileName: **[REQUIRED]** 

    The name of the signing profile.

    

  
  :type profileOwner: string
  :param profileOwner: 

    The AWS account ID of the profile owner.

    

  
  :type payload: bytes
  :param payload: **[REQUIRED]** 

    Specifies the object digest (hash) to sign.

    

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

    Payload content type. The single valid type is ``application/vnd.cncf.notary.payload.v1+json``.

    

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

    
    ::

      {
          'jobId': 'string',
          'jobOwner': 'string',
          'metadata': {
              'string': 'string'
          },
          'signature': b'bytes'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **jobId** *(string) --* 

        Unique identifier of the signing job.

        
      

      - **jobOwner** *(string) --* 

        The AWS account ID of the job owner.

        
      

      - **metadata** *(dict) --* 

        Information including the signing profile ARN and the signing job ID.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
      

      - **signature** *(bytes) --* 

        A cryptographic signature.

        
  
  **Exceptions**
  
  *   :py:class:`signer.Client.exceptions.ValidationException`

  
  *   :py:class:`signer.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`signer.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`signer.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`signer.Client.exceptions.InternalServiceErrorException`

  