:doc:`GuardDuty <../../guardduty>` / Client / create_publishing_destination

*****************************
create_publishing_destination
*****************************



.. py:method:: GuardDuty.Client.create_publishing_destination(**kwargs)

  

  Creates a publishing destination where you can export your GuardDuty findings. Before you start exporting the findings, the destination resource must exist.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreatePublishingDestination>`_  


  **Request Syntax**
  ::

    response = client.create_publishing_destination(
        DetectorId='string',
        DestinationType='S3',
        DestinationProperties={
            'DestinationArn': 'string',
            'KmsKeyArn': 'string'
        },
        ClientToken='string',
        Tags={
            'string': 'string'
        }
    )
    
  :type DetectorId: string
  :param DetectorId: **[REQUIRED]** 

    The ID of the GuardDuty detector associated with the publishing destination.

     

    To find the ``detectorId`` in the current Region, see the Settings page in the GuardDuty console, or run the `ListDetectors <https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html>`__ API.

    

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

    The type of resource for the publishing destination. Currently only Amazon S3 buckets are supported.

    

  
  :type DestinationProperties: dict
  :param DestinationProperties: **[REQUIRED]** 

    The properties of the publishing destination, including the ARNs for the destination and the KMS key used for encryption.

    

  
    - **DestinationArn** *(string) --* 

      The ARN of the resource to publish to.

       

      To specify an S3 bucket folder use the following format: ``arn:aws:s3:::DOC-EXAMPLE-BUCKET/myFolder/``

      

    
    - **KmsKeyArn** *(string) --* 

      The ARN of the KMS key to use for encryption.

      

    
  
  :type ClientToken: string
  :param ClientToken: 

    The idempotency token for the request.

    This field is autopopulated if not provided.

  
  :type Tags: dict
  :param Tags: 

    The tags to be added to a new publishing destination resource.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'DestinationId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DestinationId** *(string) --* 

        The ID of the publishing destination that is created.

        
  
  **Exceptions**
  
  *   :py:class:`GuardDuty.Client.exceptions.BadRequestException`

  
  *   :py:class:`GuardDuty.Client.exceptions.InternalServerErrorException`

  