:doc:`BedrockAgentCoreControl <../../bedrock-agentcore-control>` / Client / update_online_evaluation_config

*******************************
update_online_evaluation_config
*******************************



.. py:method:: BedrockAgentCoreControl.Client.update_online_evaluation_config(**kwargs)

  

  Updates an online evaluation configuration's settings, including rules, data sources, evaluators, and execution status. Changes take effect immediately for ongoing evaluations.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-control-2023-06-05/UpdateOnlineEvaluationConfig>`_  


  **Request Syntax**
  ::

    response = client.update_online_evaluation_config(
        clientToken='string',
        onlineEvaluationConfigId='string',
        description='string',
        rule={
            'samplingConfig': {
                'samplingPercentage': 123.0
            },
            'filters': [
                {
                    'key': 'string',
                    'operator': 'Equals'|'NotEquals'|'GreaterThan'|'LessThan'|'GreaterThanOrEqual'|'LessThanOrEqual'|'Contains'|'NotContains',
                    'value': {
                        'stringValue': 'string',
                        'doubleValue': 123.0,
                        'booleanValue': True|False
                    }
                },
            ],
            'sessionConfig': {
                'sessionTimeoutMinutes': 123
            }
        },
        dataSourceConfig={
            'cloudWatchLogs': {
                'logGroupNames': [
                    'string',
                ],
                'serviceNames': [
                    'string',
                ]
            }
        },
        evaluators=[
            {
                'evaluatorId': 'string'
            },
        ],
        evaluationExecutionRoleArn='string',
        executionStatus='ENABLED'|'DISABLED'
    )
    
  :type clientToken: string
  :param clientToken: 

    A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see `Ensuring idempotency <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html>`__.

    This field is autopopulated if not provided.

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

    The unique identifier of the online evaluation configuration to update.

    

  
  :type description: string
  :param description: 

    The updated description of the online evaluation configuration.

    

  
  :type rule: dict
  :param rule: 

    The updated evaluation rule containing sampling configuration, filters, and session settings.

    

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

      The sampling configuration that determines what percentage of agent traces to evaluate.

      

    
      - **samplingPercentage** *(float) --* **[REQUIRED]** 

        The percentage of agent traces to sample for evaluation, ranging from 0.01% to 100%.

        

      
    
    - **filters** *(list) --* 

      The list of filters that determine which agent traces should be included in the evaluation based on trace properties.

      

    
      - *(dict) --* 

        The filter that applies conditions to agent traces during online evaluation to determine which traces should be evaluated.

        

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

          The key or field name to filter on within the agent trace data.

          

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

          The comparison operator to use for filtering.

          

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

          The value to compare against using the specified operator.

          .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``stringValue``, ``doubleValue``, ``booleanValue``. 

        
          - **stringValue** *(string) --* 

            The string value for text-based filtering.

            

          
          - **doubleValue** *(float) --* 

            The numeric value for numerical filtering and comparisons.

            

          
          - **booleanValue** *(boolean) --* 

            The boolean value for true/false filtering conditions.

            

          
        
      
  
    - **sessionConfig** *(dict) --* 

      The session configuration that defines timeout settings for detecting when agent sessions are complete and ready for evaluation.

      

    
      - **sessionTimeoutMinutes** *(integer) --* **[REQUIRED]** 

        The number of minutes of inactivity after which an agent session is considered complete and ready for evaluation. Default is 15 minutes.

        

      
    
  
  :type dataSourceConfig: dict
  :param dataSourceConfig: 

    The updated data source configuration specifying CloudWatch log groups and service names to monitor.

    .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``cloudWatchLogs``. 

  
    - **cloudWatchLogs** *(dict) --* 

      The CloudWatch logs configuration for reading agent traces from log groups.

      

    
      - **logGroupNames** *(list) --* **[REQUIRED]** 

        The list of CloudWatch log group names to monitor for agent traces.

        

      
        - *(string) --* 

        
    
      - **serviceNames** *(list) --* **[REQUIRED]** 

        The list of service names to filter traces within the specified log groups. Used to identify relevant agent sessions.

        

      
        - *(string) --* 

        
    
    
  
  :type evaluators: list
  :param evaluators: 

    The updated list of evaluators to apply during online evaluation.

    

  
    - *(dict) --* 

      The reference to an evaluator used in online evaluation configurations, containing the evaluator identifier.

      .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``evaluatorId``. 

    
      - **evaluatorId** *(string) --* 

        The unique identifier of the evaluator. Can reference builtin evaluators (e.g., Builtin.Helpfulness) or custom evaluators.

        

      
    

  :type evaluationExecutionRoleArn: string
  :param evaluationExecutionRoleArn: 

    The updated Amazon Resource Name (ARN) of the IAM role used for evaluation execution.

    

  
  :type executionStatus: string
  :param executionStatus: 

    The updated execution status to enable or disable the online evaluation.

    

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

    
    ::

      {
          'onlineEvaluationConfigArn': 'string',
          'onlineEvaluationConfigId': 'string',
          'updatedAt': datetime(2015, 1, 1),
          'status': 'ACTIVE'|'CREATING'|'CREATE_FAILED'|'UPDATING'|'UPDATE_FAILED'|'DELETING',
          'executionStatus': 'ENABLED'|'DISABLED',
          'failureReason': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **onlineEvaluationConfigArn** *(string) --* 

        The Amazon Resource Name (ARN) of the updated online evaluation configuration.

        
      

      - **onlineEvaluationConfigId** *(string) --* 

        The unique identifier of the updated online evaluation configuration.

        
      

      - **updatedAt** *(datetime) --* 

        The timestamp when the online evaluation configuration was last updated.

        
      

      - **status** *(string) --* 

        The status of the online evaluation configuration.

        
      

      - **executionStatus** *(string) --* 

        The execution status indicating whether the online evaluation is currently running.

        
      

      - **failureReason** *(string) --* 

        The reason for failure if the online evaluation configuration update or execution failed.

        
  
  **Exceptions**
  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ServiceQuotaExceededException`

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

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

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ConflictException`

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

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

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

  