:doc:`MediaTailor <../../mediatailor>` / Client / configure_logs_for_playback_configuration

*****************************************
configure_logs_for_playback_configuration
*****************************************



.. py:method:: MediaTailor.Client.configure_logs_for_playback_configuration(**kwargs)

  

  Defines where AWS Elemental MediaTailor sends logs for the playback configuration.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediatailor-2018-04-23/ConfigureLogsForPlaybackConfiguration>`_  


  **Request Syntax**
  ::

    response = client.configure_logs_for_playback_configuration(
        PercentEnabled=123,
        PlaybackConfigurationName='string',
        EnabledLoggingStrategies=[
            'VENDED_LOGS'|'LEGACY_CLOUDWATCH',
        ],
        AdsInteractionLog={
            'PublishOptInEventTypes': [
                'RAW_ADS_RESPONSE',
            ],
            'ExcludeEventTypes': [
                'AD_MARKER_FOUND'|'NON_AD_MARKER_FOUND'|'MAKING_ADS_REQUEST'|'MODIFIED_TARGET_URL'|'VAST_REDIRECT'|'EMPTY_VAST_RESPONSE'|'EMPTY_VMAP_RESPONSE'|'VAST_RESPONSE'|'REDIRECTED_VAST_RESPONSE'|'FILLED_AVAIL'|'FILLED_OVERLAY_AVAIL'|'BEACON_FIRED'|'WARNING_NO_ADVERTISEMENTS'|'WARNING_VPAID_AD_DROPPED'|'WARNING_URL_VARIABLE_SUBSTITUTION_FAILED'|'ERROR_UNKNOWN'|'ERROR_UNKNOWN_HOST'|'ERROR_DISALLOWED_HOST'|'ERROR_ADS_IO'|'ERROR_ADS_TIMEOUT'|'ERROR_ADS_RESPONSE_PARSE'|'ERROR_ADS_RESPONSE_UNKNOWN_ROOT_ELEMENT'|'ERROR_ADS_INVALID_RESPONSE'|'ERROR_VAST_REDIRECT_EMPTY_RESPONSE'|'ERROR_VAST_REDIRECT_MULTIPLE_VAST'|'ERROR_VAST_REDIRECT_FAILED'|'ERROR_VAST_MISSING_MEDIAFILES'|'ERROR_VAST_MISSING_CREATIVES'|'ERROR_VAST_MISSING_OVERLAYS'|'ERROR_VAST_MISSING_IMPRESSION'|'ERROR_VAST_INVALID_VAST_AD_TAG_URI'|'ERROR_VAST_MULTIPLE_TRACKING_EVENTS'|'ERROR_VAST_MULTIPLE_LINEAR'|'ERROR_VAST_INVALID_MEDIA_FILE'|'ERROR_FIRING_BEACON_FAILED'|'ERROR_PERSONALIZATION_DISABLED'|'VOD_TIME_BASED_AVAIL_PLAN_VAST_RESPONSE_FOR_OFFSET'|'VOD_TIME_BASED_AVAIL_PLAN_SUCCESS'|'VOD_TIME_BASED_AVAIL_PLAN_WARNING_NO_ADVERTISEMENTS'|'INTERSTITIAL_VOD_SUCCESS'|'INTERSTITIAL_VOD_FAILURE',
            ]
        },
        ManifestServiceInteractionLog={
            'ExcludeEventTypes': [
                'GENERATED_MANIFEST'|'ORIGIN_MANIFEST'|'SESSION_INITIALIZED'|'TRACKING_RESPONSE'|'CONFIG_SYNTAX_ERROR'|'CONFIG_SECURITY_ERROR'|'UNKNOWN_HOST'|'TIMEOUT_ERROR'|'CONNECTION_ERROR'|'IO_ERROR'|'UNKNOWN_ERROR'|'HOST_DISALLOWED'|'PARSING_ERROR'|'MANIFEST_ERROR'|'NO_MASTER_OR_MEDIA_PLAYLIST'|'NO_MASTER_PLAYLIST'|'NO_MEDIA_PLAYLIST'|'INCOMPATIBLE_HLS_VERSION'|'SCTE35_PARSING_ERROR'|'INVALID_SINGLE_PERIOD_DASH_MANIFEST'|'UNSUPPORTED_SINGLE_PERIOD_DASH_MANIFEST'|'LAST_PERIOD_MISSING_AUDIO'|'LAST_PERIOD_MISSING_AUDIO_WARNING'|'ERROR_ORIGIN_PREFIX_INTERPOLATION'|'ERROR_ADS_INTERPOLATION'|'ERROR_LIVE_PRE_ROLL_ADS_INTERPOLATION'|'ERROR_CDN_AD_SEGMENT_INTERPOLATION'|'ERROR_CDN_CONTENT_SEGMENT_INTERPOLATION'|'ERROR_SLATE_AD_URL_INTERPOLATION'|'ERROR_PROFILE_NAME_INTERPOLATION'|'ERROR_BUMPER_START_INTERPOLATION'|'ERROR_BUMPER_END_INTERPOLATION',
            ]
        }
    )
    
  :type PercentEnabled: integer
  :param PercentEnabled: **[REQUIRED]** 

    The percentage of session logs that MediaTailor sends to your CloudWatch Logs account. For example, if your playback configuration has 1000 sessions and percentEnabled is set to ``60``, MediaTailor sends logs for 600 of the sessions to CloudWatch Logs. MediaTailor decides at random which of the playback configuration sessions to send logs for. If you want to view logs for a specific session, you can use the `debug log mode <https://docs.aws.amazon.com/mediatailor/latest/ug/debug-log-mode.html>`__.

     

    Valid values: ``0`` - ``100``

    

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

    The name of the playback configuration.

    

  
  :type EnabledLoggingStrategies: list
  :param EnabledLoggingStrategies: 

    The method used for collecting logs from AWS Elemental MediaTailor. To configure MediaTailor to send logs directly to Amazon CloudWatch Logs, choose ``LEGACY_CLOUDWATCH``. To configure MediaTailor to send logs to CloudWatch, which then vends the logs to your destination of choice, choose ``VENDED_LOGS``. Supported destinations are CloudWatch Logs log group, Amazon S3 bucket, and Amazon Data Firehose stream.

     

    To use vended logs, you must configure the delivery destination in Amazon CloudWatch, as described in `Enable logging from AWS services, Logging that requires additional permissions [V2] <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html#AWS-vended-logs-permissions-V2>`__.

    

  
    - *(string) --* 

    

  :type AdsInteractionLog: dict
  :param AdsInteractionLog: 

    The event types that MediaTailor emits in logs for interactions with the ADS.

    

  
    - **PublishOptInEventTypes** *(list) --* 

      Indicates that MediaTailor emits ``RAW_ADS_RESPONSE`` logs for playback sessions that are initialized with this configuration.

      

    
      - *(string) --* 

      
  
    - **ExcludeEventTypes** *(list) --* 

      Indicates that MediaTailor won't emit the selected events in the logs for playback sessions that are initialized with this configuration.

      

    
      - *(string) --* 

      
  
  
  :type ManifestServiceInteractionLog: dict
  :param ManifestServiceInteractionLog: 

    The event types that MediaTailor emits in logs for interactions with the origin server.

    

  
    - **ExcludeEventTypes** *(list) --* 

      Indicates that MediaTailor won't emit the selected events in the logs for playback sessions that are initialized with this configuration.

      

    
      - *(string) --* 

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

    
    ::

      {
          'PercentEnabled': 123,
          'PlaybackConfigurationName': 'string',
          'EnabledLoggingStrategies': [
              'VENDED_LOGS'|'LEGACY_CLOUDWATCH',
          ],
          'AdsInteractionLog': {
              'PublishOptInEventTypes': [
                  'RAW_ADS_RESPONSE',
              ],
              'ExcludeEventTypes': [
                  'AD_MARKER_FOUND'|'NON_AD_MARKER_FOUND'|'MAKING_ADS_REQUEST'|'MODIFIED_TARGET_URL'|'VAST_REDIRECT'|'EMPTY_VAST_RESPONSE'|'EMPTY_VMAP_RESPONSE'|'VAST_RESPONSE'|'REDIRECTED_VAST_RESPONSE'|'FILLED_AVAIL'|'FILLED_OVERLAY_AVAIL'|'BEACON_FIRED'|'WARNING_NO_ADVERTISEMENTS'|'WARNING_VPAID_AD_DROPPED'|'WARNING_URL_VARIABLE_SUBSTITUTION_FAILED'|'ERROR_UNKNOWN'|'ERROR_UNKNOWN_HOST'|'ERROR_DISALLOWED_HOST'|'ERROR_ADS_IO'|'ERROR_ADS_TIMEOUT'|'ERROR_ADS_RESPONSE_PARSE'|'ERROR_ADS_RESPONSE_UNKNOWN_ROOT_ELEMENT'|'ERROR_ADS_INVALID_RESPONSE'|'ERROR_VAST_REDIRECT_EMPTY_RESPONSE'|'ERROR_VAST_REDIRECT_MULTIPLE_VAST'|'ERROR_VAST_REDIRECT_FAILED'|'ERROR_VAST_MISSING_MEDIAFILES'|'ERROR_VAST_MISSING_CREATIVES'|'ERROR_VAST_MISSING_OVERLAYS'|'ERROR_VAST_MISSING_IMPRESSION'|'ERROR_VAST_INVALID_VAST_AD_TAG_URI'|'ERROR_VAST_MULTIPLE_TRACKING_EVENTS'|'ERROR_VAST_MULTIPLE_LINEAR'|'ERROR_VAST_INVALID_MEDIA_FILE'|'ERROR_FIRING_BEACON_FAILED'|'ERROR_PERSONALIZATION_DISABLED'|'VOD_TIME_BASED_AVAIL_PLAN_VAST_RESPONSE_FOR_OFFSET'|'VOD_TIME_BASED_AVAIL_PLAN_SUCCESS'|'VOD_TIME_BASED_AVAIL_PLAN_WARNING_NO_ADVERTISEMENTS'|'INTERSTITIAL_VOD_SUCCESS'|'INTERSTITIAL_VOD_FAILURE',
              ]
          },
          'ManifestServiceInteractionLog': {
              'ExcludeEventTypes': [
                  'GENERATED_MANIFEST'|'ORIGIN_MANIFEST'|'SESSION_INITIALIZED'|'TRACKING_RESPONSE'|'CONFIG_SYNTAX_ERROR'|'CONFIG_SECURITY_ERROR'|'UNKNOWN_HOST'|'TIMEOUT_ERROR'|'CONNECTION_ERROR'|'IO_ERROR'|'UNKNOWN_ERROR'|'HOST_DISALLOWED'|'PARSING_ERROR'|'MANIFEST_ERROR'|'NO_MASTER_OR_MEDIA_PLAYLIST'|'NO_MASTER_PLAYLIST'|'NO_MEDIA_PLAYLIST'|'INCOMPATIBLE_HLS_VERSION'|'SCTE35_PARSING_ERROR'|'INVALID_SINGLE_PERIOD_DASH_MANIFEST'|'UNSUPPORTED_SINGLE_PERIOD_DASH_MANIFEST'|'LAST_PERIOD_MISSING_AUDIO'|'LAST_PERIOD_MISSING_AUDIO_WARNING'|'ERROR_ORIGIN_PREFIX_INTERPOLATION'|'ERROR_ADS_INTERPOLATION'|'ERROR_LIVE_PRE_ROLL_ADS_INTERPOLATION'|'ERROR_CDN_AD_SEGMENT_INTERPOLATION'|'ERROR_CDN_CONTENT_SEGMENT_INTERPOLATION'|'ERROR_SLATE_AD_URL_INTERPOLATION'|'ERROR_PROFILE_NAME_INTERPOLATION'|'ERROR_BUMPER_START_INTERPOLATION'|'ERROR_BUMPER_END_INTERPOLATION',
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **PercentEnabled** *(integer) --* 

        The percentage of session logs that MediaTailor sends to your Cloudwatch Logs account.

        
      

      - **PlaybackConfigurationName** *(string) --* 

        The name of the playback configuration.

        
      

      - **EnabledLoggingStrategies** *(list) --* 

        The method used for collecting logs from AWS Elemental MediaTailor. ``LEGACY_CLOUDWATCH`` indicates that MediaTailor is sending logs directly to Amazon CloudWatch Logs. ``VENDED_LOGS`` indicates that MediaTailor is sending logs to CloudWatch, which then vends the logs to your destination of choice. Supported destinations are CloudWatch Logs log group, Amazon S3 bucket, and Amazon Data Firehose stream.

        
        

        - *(string) --* 
    
      

      - **AdsInteractionLog** *(dict) --* 

        The event types that MediaTailor emits in logs for interactions with the ADS.

        
        

        - **PublishOptInEventTypes** *(list) --* 

          Indicates that MediaTailor emits ``RAW_ADS_RESPONSE`` logs for playback sessions that are initialized with this configuration.

          
          

          - *(string) --* 
      
        

        - **ExcludeEventTypes** *(list) --* 

          Indicates that MediaTailor won't emit the selected events in the logs for playback sessions that are initialized with this configuration.

          
          

          - *(string) --* 
      
    
      

      - **ManifestServiceInteractionLog** *(dict) --* 

        The event types that MediaTailor emits in logs for interactions with the origin server.

        
        

        - **ExcludeEventTypes** *(list) --* 

          Indicates that MediaTailor won't emit the selected events in the logs for playback sessions that are initialized with this configuration.

          
          

          - *(string) --* 
      
    
  