:doc:`IoTFleetWise <../../iotfleetwise>` / Client / list_fleets_for_vehicle

***********************
list_fleets_for_vehicle
***********************



.. py:method:: IoTFleetWise.Client.list_fleets_for_vehicle(**kwargs)

  

  Retrieves a list of IDs for all fleets that the vehicle is associated with.

   

  .. note::

    

    This API operation uses pagination. Specify the ``nextToken`` parameter in the request to return more results.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotfleetwise-2021-06-17/ListFleetsForVehicle>`_  


  **Request Syntax**
  ::

    response = client.list_fleets_for_vehicle(
        vehicleName='string',
        nextToken='string',
        maxResults=123
    )
    
  :type vehicleName: string
  :param vehicleName: **[REQUIRED]** 

    The ID of the vehicle to retrieve information about.

    

  
  :type nextToken: string
  :param nextToken: 

    A pagination token for the next set of results.

     

    If the results of a search are large, only a portion of the results are returned, and a ``nextToken`` pagination token is returned in the response. To retrieve the next set of results, reissue the search request and include the returned token. When all results have been returned, the response does not contain a pagination token value.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of items to return, between 1 and 100, inclusive.

    

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

    
    ::

      {
          'fleets': [
              'string',
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **fleets** *(list) --* 

        A list of fleet IDs that the vehicle is associated with.

        
        

        - *(string) --* 
    
      

      - **nextToken** *(string) --* 

        The token to retrieve the next set of results, or ``null`` if there are no more results.

        
  
  **Exceptions**
  
  *   :py:class:`IoTFleetWise.Client.exceptions.InternalServerException`

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

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

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

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

  