:doc:`PrometheusService <../../amp>` / Client / describe_anomaly_detector

*************************
describe_anomaly_detector
*************************



.. py:method:: PrometheusService.Client.describe_anomaly_detector(**kwargs)

  

  Retrieves detailed information about a specific anomaly detector, including its status and configuration.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/DescribeAnomalyDetector>`_  


  **Request Syntax**
  ::

    response = client.describe_anomaly_detector(
        workspaceId='string',
        anomalyDetectorId='string'
    )
    
  :type workspaceId: string
  :param workspaceId: **[REQUIRED]** 

    The identifier of the workspace containing the anomaly detector.

    

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

    The identifier of the anomaly detector to describe.

    

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

    
    ::

      {
          'anomalyDetector': {
              'arn': 'string',
              'anomalyDetectorId': 'string',
              'alias': 'string',
              'evaluationIntervalInSeconds': 123,
              'missingDataAction': {
                  'markAsAnomaly': True|False,
                  'skip': True|False
              },
              'configuration': {
                  'randomCutForest': {
                      'query': 'string',
                      'shingleSize': 123,
                      'sampleSize': 123,
                      'ignoreNearExpectedFromAbove': {
                          'amount': 123.0,
                          'ratio': 123.0
                      },
                      'ignoreNearExpectedFromBelow': {
                          'amount': 123.0,
                          'ratio': 123.0
                      }
                  }
              },
              'labels': {
                  'string': 'string'
              },
              'status': {
                  'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED'|'DELETION_FAILED',
                  'statusReason': 'string'
              },
              'createdAt': datetime(2015, 1, 1),
              'modifiedAt': datetime(2015, 1, 1),
              'tags': {
                  'string': 'string'
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **anomalyDetector** *(dict) --* 

        The detailed information about the anomaly detector.

        
        

        - **arn** *(string) --* 

          The Amazon Resource Name (ARN) of the anomaly detector.

          
        

        - **anomalyDetectorId** *(string) --* 

          The unique identifier of the anomaly detector.

          
        

        - **alias** *(string) --* 

          The user-friendly name of the anomaly detector.

          
        

        - **evaluationIntervalInSeconds** *(integer) --* 

          The frequency, in seconds, at which the anomaly detector evaluates metrics.

          
        

        - **missingDataAction** *(dict) --* 

          The action taken when data is missing during evaluation.

          .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``markAsAnomaly``, ``skip``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


        
          

          - **markAsAnomaly** *(boolean) --* 

            Marks missing data points as anomalies.

            
          

          - **skip** *(boolean) --* 

            Skips evaluation when data is missing.

            
      
        

        - **configuration** *(dict) --* 

          The algorithm configuration of the anomaly detector.

          .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``randomCutForest``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                    'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


        
          

          - **randomCutForest** *(dict) --* 

            The Random Cut Forest algorithm configuration for anomaly detection.

            
            

            - **query** *(string) --* 

              The Prometheus query used to retrieve the time-series data for anomaly detection.

               

              .. warning::

                 

                Random Cut Forest queries must be wrapped by a supported PromQL aggregation operator. For more information, see `Aggregation operators <https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators>`__ on the *Prometheus docs* website.

                 

                **Supported PromQL aggregation operators**: ``avg``, ``count``, ``group``, ``max``, ``min``, ``quantile``, ``stddev``, ``stdvar``, and ``sum``.

                

              
            

            - **shingleSize** *(integer) --* 

              The number of consecutive data points used to create a shingle for the Random Cut Forest algorithm. The default number is 8 consecutive data points.

              
            

            - **sampleSize** *(integer) --* 

              The number of data points sampled from the input stream for the Random Cut Forest algorithm. The default number is 256 consecutive data points.

              
            

            - **ignoreNearExpectedFromAbove** *(dict) --* 

              Configuration for ignoring values that are near expected values from above during anomaly detection.

              .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``amount``, ``ratio``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


            
              

              - **amount** *(float) --* 

                The absolute amount by which values can differ from expected values before being considered anomalous.

                
              

              - **ratio** *(float) --* 

                The ratio by which values can differ from expected values before being considered anomalous.

                
          
            

            - **ignoreNearExpectedFromBelow** *(dict) --* 

              Configuration for ignoring values that are near expected values from below during anomaly detection.

              .. note::    This is a Tagged Union structure. Only one of the     following top level keys will be set: ``amount``, ``ratio``.     If a client receives an unknown member it will     set ``SDK_UNKNOWN_MEMBER`` as the top level key,     which maps to the name or tag of the unknown     member. The structure of ``SDK_UNKNOWN_MEMBER`` is     as follows::

                            'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}


            
              

              - **amount** *(float) --* 

                The absolute amount by which values can differ from expected values before being considered anomalous.

                
              

              - **ratio** *(float) --* 

                The ratio by which values can differ from expected values before being considered anomalous.

                
          
        
      
        

        - **labels** *(dict) --* 

          The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
        

        - **status** *(dict) --* 

          The current status of the anomaly detector.

          
          

          - **statusCode** *(string) --* 

            The status code of the anomaly detector.

            
          

          - **statusReason** *(string) --* 

            A description of the current status of the anomaly detector.

            
      
        

        - **createdAt** *(datetime) --* 

          The timestamp when the anomaly detector was created.

          
        

        - **modifiedAt** *(datetime) --* 

          The timestamp when the anomaly detector was last modified.

          
        

        - **tags** *(dict) --* 

          The tags applied to the anomaly detector.

          
          

          - *(string) --* 

            The key of the tag. Must not begin with ``aws:``.

            
            

            - *(string) --* 

              The value of the tag.

              
      
    
    
  
  **Exceptions**
  
  *   :py:class:`PrometheusService.Client.exceptions.ThrottlingException`

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

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

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

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

  