:doc:`CloudWatchApplicationSignals <../../application-signals>` / Client / batch_update_exclusion_windows

******************************
batch_update_exclusion_windows
******************************



.. py:method:: CloudWatchApplicationSignals.Client.batch_update_exclusion_windows(**kwargs)

  

  Add or remove time window exclusions for one or more Service Level Objectives (SLOs).

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/application-signals-2024-04-15/BatchUpdateExclusionWindows>`_  


  **Request Syntax**
  ::

    response = client.batch_update_exclusion_windows(
        SloIds=[
            'string',
        ],
        AddExclusionWindows=[
            {
                'Window': {
                    'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
                    'Duration': 123
                },
                'StartTime': datetime(2015, 1, 1),
                'RecurrenceRule': {
                    'Expression': 'string'
                },
                'Reason': 'string'
            },
        ],
        RemoveExclusionWindows=[
            {
                'Window': {
                    'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
                    'Duration': 123
                },
                'StartTime': datetime(2015, 1, 1),
                'RecurrenceRule': {
                    'Expression': 'string'
                },
                'Reason': 'string'
            },
        ]
    )
    
  :type SloIds: list
  :param SloIds: **[REQUIRED]** 

    The list of SLO IDs to add or remove exclusion windows from.

    

  
    - *(string) --* 

    

  :type AddExclusionWindows: list
  :param AddExclusionWindows: 

    A list of exclusion windows to add to the specified SLOs. You can add up to 10 exclusion windows per SLO.

    

  
    - *(dict) --* 

      The core SLO time window exclusion object that includes Window, StartTime, RecurrenceRule, and Reason.

      

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

        The SLO time window exclusion .

        

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

          The unit of time for the exclusion window duration. Valid values: MINUTE, HOUR, DAY, MONTH.

          

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

          The number of time units for the exclusion window length.

          

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

        The start of the SLO time window exclusion. Defaults to current time if not specified.

        

      
      - **RecurrenceRule** *(dict) --* 

        The recurrence rule for the SLO time window exclusion. Supports both cron and rate expressions.

        

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

          A cron or rate expression that specifies the schedule for the exclusion window.

          

        
      
      - **Reason** *(string) --* 

        A description explaining why this time period should be excluded from SLO calculations.

        

      
    

  :type RemoveExclusionWindows: list
  :param RemoveExclusionWindows: 

    A list of exclusion windows to remove from the specified SLOs. The window configuration must match an existing exclusion window.

    

  
    - *(dict) --* 

      The core SLO time window exclusion object that includes Window, StartTime, RecurrenceRule, and Reason.

      

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

        The SLO time window exclusion .

        

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

          The unit of time for the exclusion window duration. Valid values: MINUTE, HOUR, DAY, MONTH.

          

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

          The number of time units for the exclusion window length.

          

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

        The start of the SLO time window exclusion. Defaults to current time if not specified.

        

      
      - **RecurrenceRule** *(dict) --* 

        The recurrence rule for the SLO time window exclusion. Supports both cron and rate expressions.

        

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

          A cron or rate expression that specifies the schedule for the exclusion window.

          

        
      
      - **Reason** *(string) --* 

        A description explaining why this time period should be excluded from SLO calculations.

        

      
    

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

    
    ::

      {
          'SloIds': [
              'string',
          ],
          'Errors': [
              {
                  'SloId': 'string',
                  'ErrorCode': 'string',
                  'ErrorMessage': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **SloIds** *(list) --* 

        The list of SLO IDs that were successfully processed.

        
        

        - *(string) --* 
    
      

      - **Errors** *(list) --* 

        A list of errors that occurred while processing the request.

        
        

        - *(dict) --* 

          An array of structures, where each structure includes an error indicating that one of the requests in the array was not valid.

          
          

          - **SloId** *(string) --* 

            The SLO ID in the error.

            
          

          - **ErrorCode** *(string) --* 

            The error code.

            
          

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

            The error message.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`CloudWatchApplicationSignals.Client.exceptions.ValidationException`

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

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

  