:doc:`mediapackagev2 <../../mediapackagev2>` / Client / create_harvest_job

******************
create_harvest_job
******************



.. py:method:: mediapackagev2.Client.create_harvest_job(**kwargs)

  

  Creates a new harvest job to export content from a MediaPackage v2 channel to an S3 bucket.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediapackagev2-2022-12-25/CreateHarvestJob>`_  


  **Request Syntax**
  ::

    response = client.create_harvest_job(
        ChannelGroupName='string',
        ChannelName='string',
        OriginEndpointName='string',
        Description='string',
        HarvestedManifests={
            'HlsManifests': [
                {
                    'ManifestName': 'string'
                },
            ],
            'DashManifests': [
                {
                    'ManifestName': 'string'
                },
            ],
            'LowLatencyHlsManifests': [
                {
                    'ManifestName': 'string'
                },
            ]
        },
        ScheduleConfiguration={
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1)
        },
        Destination={
            'S3Destination': {
                'BucketName': 'string',
                'DestinationPath': 'string'
            }
        },
        ClientToken='string',
        HarvestJobName='string',
        Tags={
            'string': 'string'
        }
    )
    
  :type ChannelGroupName: string
  :param ChannelGroupName: **[REQUIRED]** 

    The name of the channel group containing the channel from which to harvest content.

    

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

    The name of the channel from which to harvest content.

    

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

    The name of the origin endpoint from which to harvest content.

    

  
  :type Description: string
  :param Description: 

    An optional description for the harvest job.

    

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

    A list of manifests to be harvested.

    

  
    - **HlsManifests** *(list) --* 

      A list of harvested HLS manifests.

      

    
      - *(dict) --* 

        Information about a harvested HLS manifest.

        

      
        - **ManifestName** *(string) --* **[REQUIRED]** 

          The name of the harvested HLS manifest.

          

        
      
  
    - **DashManifests** *(list) --* 

      A list of harvested DASH manifests.

      

    
      - *(dict) --* 

        Information about a harvested DASH manifest.

        

      
        - **ManifestName** *(string) --* **[REQUIRED]** 

          The name of the harvested DASH manifest.

          

        
      
  
    - **LowLatencyHlsManifests** *(list) --* 

      A list of harvested Low-Latency HLS manifests.

      

    
      - *(dict) --* 

        Information about a harvested Low-Latency HLS manifest.

        

      
        - **ManifestName** *(string) --* **[REQUIRED]** 

          The name of the harvested Low-Latency HLS manifest.

          

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

    The configuration for when the harvest job should run, including start and end times.

    

  
    - **StartTime** *(datetime) --* **[REQUIRED]** 

      The start time for the harvest job.

      

    
    - **EndTime** *(datetime) --* **[REQUIRED]** 

      The end time for the harvest job.

      

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

    The S3 destination where the harvested content will be placed.

    

  
    - **S3Destination** *(dict) --* **[REQUIRED]** 

      The configuration for exporting harvested content to an S3 bucket. This includes details such as the bucket name and destination path within the bucket.

      

    
      - **BucketName** *(string) --* **[REQUIRED]** 

        The name of an S3 bucket within which harvested content will be exported.

        

      
      - **DestinationPath** *(string) --* **[REQUIRED]** 

        The path within the specified S3 bucket where the harvested content will be placed.

        

      
    
  
  :type ClientToken: string
  :param ClientToken: 

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

    This field is autopopulated if not provided.

  
  :type HarvestJobName: string
  :param HarvestJobName: 

    A name for the harvest job. This name must be unique within the channel.

    

  
  :type Tags: dict
  :param Tags: 

    A collection of tags associated with the harvest job.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'ChannelGroupName': 'string',
          'ChannelName': 'string',
          'OriginEndpointName': 'string',
          'Destination': {
              'S3Destination': {
                  'BucketName': 'string',
                  'DestinationPath': 'string'
              }
          },
          'HarvestJobName': 'string',
          'HarvestedManifests': {
              'HlsManifests': [
                  {
                      'ManifestName': 'string'
                  },
              ],
              'DashManifests': [
                  {
                      'ManifestName': 'string'
                  },
              ],
              'LowLatencyHlsManifests': [
                  {
                      'ManifestName': 'string'
                  },
              ]
          },
          'Description': 'string',
          'ScheduleConfiguration': {
              'StartTime': datetime(2015, 1, 1),
              'EndTime': datetime(2015, 1, 1)
          },
          'Arn': 'string',
          'CreatedAt': datetime(2015, 1, 1),
          'ModifiedAt': datetime(2015, 1, 1),
          'Status': 'QUEUED'|'IN_PROGRESS'|'CANCELLED'|'COMPLETED'|'FAILED',
          'ErrorMessage': 'string',
          'ETag': 'string',
          'Tags': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The response object returned after creating a harvest job.

      
      

      - **ChannelGroupName** *(string) --* 

        The name of the channel group containing the channel from which content is being harvested.

        
      

      - **ChannelName** *(string) --* 

        The name of the channel from which content is being harvested.

        
      

      - **OriginEndpointName** *(string) --* 

        The name of the origin endpoint from which content is being harvested.

        
      

      - **Destination** *(dict) --* 

        The S3 destination where the harvested content will be placed.

        
        

        - **S3Destination** *(dict) --* 

          The configuration for exporting harvested content to an S3 bucket. This includes details such as the bucket name and destination path within the bucket.

          
          

          - **BucketName** *(string) --* 

            The name of an S3 bucket within which harvested content will be exported.

            
          

          - **DestinationPath** *(string) --* 

            The path within the specified S3 bucket where the harvested content will be placed.

            
      
    
      

      - **HarvestJobName** *(string) --* 

        The name of the created harvest job.

        
      

      - **HarvestedManifests** *(dict) --* 

        A list of manifests that will be harvested.

        
        

        - **HlsManifests** *(list) --* 

          A list of harvested HLS manifests.

          
          

          - *(dict) --* 

            Information about a harvested HLS manifest.

            
            

            - **ManifestName** *(string) --* 

              The name of the harvested HLS manifest.

              
        
      
        

        - **DashManifests** *(list) --* 

          A list of harvested DASH manifests.

          
          

          - *(dict) --* 

            Information about a harvested DASH manifest.

            
            

            - **ManifestName** *(string) --* 

              The name of the harvested DASH manifest.

              
        
      
        

        - **LowLatencyHlsManifests** *(list) --* 

          A list of harvested Low-Latency HLS manifests.

          
          

          - *(dict) --* 

            Information about a harvested Low-Latency HLS manifest.

            
            

            - **ManifestName** *(string) --* 

              The name of the harvested Low-Latency HLS manifest.

              
        
      
    
      

      - **Description** *(string) --* 

        The description of the harvest job, if provided.

        
      

      - **ScheduleConfiguration** *(dict) --* 

        The configuration for when the harvest job will run, including start and end times.

        
        

        - **StartTime** *(datetime) --* 

          The start time for the harvest job.

          
        

        - **EndTime** *(datetime) --* 

          The end time for the harvest job.

          
    
      

      - **Arn** *(string) --* 

        The Amazon Resource Name (ARN) of the created harvest job.

        
      

      - **CreatedAt** *(datetime) --* 

        The date and time the harvest job was created.

        
      

      - **ModifiedAt** *(datetime) --* 

        The date and time the harvest job was last modified.

        
      

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

        The current status of the harvest job (e.g., CREATED, IN_PROGRESS, ABORTED, COMPLETED, FAILED).

        
      

      - **ErrorMessage** *(string) --* 

        An error message if the harvest job creation failed.

        
      

      - **ETag** *(string) --* 

        The current version of the harvest job. Used for concurrency control.

        
      

      - **Tags** *(dict) --* 

        A collection of tags associated with the harvest job.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
  
  **Exceptions**
  
  *   :py:class:`mediapackagev2.Client.exceptions.ConflictException`

  
  *   :py:class:`mediapackagev2.Client.exceptions.ThrottlingException`

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

  
  *   :py:class:`mediapackagev2.Client.exceptions.InternalServerException`

  
  *   :py:class:`mediapackagev2.Client.exceptions.ValidationException`

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

  
  *   :py:class:`mediapackagev2.Client.exceptions.ServiceQuotaExceededException`

  