:doc:`SSMContacts <../../ssm-contacts>` / Client / list_rotation_shifts

********************
list_rotation_shifts
********************



.. py:method:: SSMContacts.Client.list_rotation_shifts(**kwargs)

  

  Returns a list of shifts generated by an existing rotation in the system.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-contacts-2021-05-03/ListRotationShifts>`_  


  **Request Syntax**
  ::

    response = client.list_rotation_shifts(
        RotationId='string',
        StartTime=datetime(2015, 1, 1),
        EndTime=datetime(2015, 1, 1),
        NextToken='string',
        MaxResults=123
    )
    
  :type RotationId: string
  :param RotationId: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the rotation to retrieve shift information about.

    

  
  :type StartTime: datetime
  :param StartTime: 

    The date and time for the beginning of the time range to list shifts for.

    

  
  :type EndTime: datetime
  :param EndTime: **[REQUIRED]** 

    The date and time for the end of the time range to list shifts for.

    

  
  :type NextToken: string
  :param NextToken: 

    A token to start the list. Use this token to get the next set of results.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

    

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

    
    ::

      {
          'RotationShifts': [
              {
                  'ContactIds': [
                      'string',
                  ],
                  'StartTime': datetime(2015, 1, 1),
                  'EndTime': datetime(2015, 1, 1),
                  'Type': 'REGULAR'|'OVERRIDDEN',
                  'ShiftDetails': {
                      'OverriddenContactIds': [
                          'string',
                      ]
                  }
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **RotationShifts** *(list) --* 

        Information about shifts that meet the filter criteria.

        
        

        - *(dict) --* 

          Information about a shift that belongs to an on-call rotation.

          
          

          - **ContactIds** *(list) --* 

            The Amazon Resource Names (ARNs) of the contacts who are part of the shift rotation.

            
            

            - *(string) --* 
        
          

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

            The time a shift rotation begins.

            
          

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

            The time a shift rotation ends.

            
          

          - **Type** *(string) --* 

            The type of shift rotation.

            
          

          - **ShiftDetails** *(dict) --* 

            Additional information about an on-call rotation shift.

            
            

            - **OverriddenContactIds** *(list) --* 

              The Amazon Resources Names (ARNs) of the contacts who were replaced in a shift when an override was created. If the override is deleted, these contacts are restored to the shift.

              
              

              - *(string) --* 
          
        
      
    
      

      - **NextToken** *(string) --* 

        The token for the next set of items to return. Use this token to get the next set of results.

        
  
  **Exceptions**
  
  *   :py:class:`SSMContacts.Client.exceptions.AccessDeniedException`

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

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

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

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

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

  