Skip to content

list_vehicles async

list_vehicles(
    *,
    config_overrides: Optional[AsyncIoTFleetWiseClientConfig] = None,
    model_manifest_arn: Optional[arn] = None,
    attribute_names: Optional[attributeNamesList] = None,
    attribute_values: Optional[attributeValuesList] = None,
    next_token: Optional[nextToken] = None,
    max_results: Optional[listVehiclesMaxResults] = None,
    list_response_scope: Optional[ListResponseScope] = None,
) -> ListVehiclesResponse

Retrieves a list of summaries of created vehicles.

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

Parameters:

  • model_manifest_arn (Optional[arn], default: None ) –

    The Amazon Resource Name (ARN) of a vehicle model (model manifest). You can use this optional parameter to list only the vehicles created from a certain vehicle model.

  • attribute_names (Optional[attributeNamesList], default: None ) –

    The fully qualified names of the attributes. You can use this optional parameter to list the vehicles containing all the attributes in the request. For example, attributeNames could be "Vehicle.Body.Engine.Type, Vehicle.Color" and the corresponding attributeValues could be "1.3 L R2, Blue" . In this case, the API will filter vehicles with an attribute name Vehicle.Body.Engine.Type that contains a value of 1.3 L R2 AND an attribute name Vehicle.Color that contains a value of "Blue". A request must contain unique values for the attributeNames filter and the matching number of attributeValues filters to return the subset of vehicles that match the attributes filter condition.

  • attribute_values (Optional[attributeValuesList], default: None ) –

    Static information about a vehicle attribute value in string format. You can use this optional parameter in conjunction with attributeNames to list the vehicles containing all the attributeValues corresponding to the attributeNames filter. For example, attributeValues could be "1.3 L R2, Blue" and the corresponding attributeNames filter could be "Vehicle.Body.Engine.Type, Vehicle.Color". In this case, the API will filter vehicles with attribute name Vehicle.Body.Engine.Type that contains a value of 1.3 L R2 AND an attribute name Vehicle.Color that contains a value of "Blue". A request must contain unique values for the attributeNames filter and the matching number of attributeValues filter to return the subset of vehicles that match the attributes filter condition.

  • next_token (Optional[nextToken], default: None ) –

    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.

  • max_results (Optional[listVehiclesMaxResults], default: None ) –

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

  • list_response_scope (Optional[ListResponseScope], default: None ) –

    When you set the listResponseScope parameter to METADATA_ONLY, the list response includes: vehicle name, Amazon Resource Name (ARN), creation time, and last modification time.

Raises:

Source code in docs_src/capo_iotfleetwise/_services/async_io_t_fleet_wise.py
async def list_vehicles(
    self,
    *,
    config_overrides: Optional[AsyncIoTFleetWiseClientConfig] = None,
    model_manifest_arn: Optional["capo_iotfleetwise.types.arn.arn"] = None,
    attribute_names: Optional[
        "capo_iotfleetwise.types.attribute_names_list.attributeNamesList"
    ] = None,
    attribute_values: Optional[
        "capo_iotfleetwise.types.attribute_values_list.attributeValuesList"
    ] = None,
    next_token: Optional["capo_iotfleetwise.types.next_token.nextToken"] = None,
    max_results: Optional[
        "capo_iotfleetwise.types.list_vehicles_max_results.listVehiclesMaxResults"
    ] = None,
    list_response_scope: Optional[
        "capo_iotfleetwise.types.list_response_scope.ListResponseScope"
    ] = None,
) -> "capo_iotfleetwise.types.list_vehicles_response.ListVehiclesResponse":
    """<p> Retrieves a list of summaries of created vehicles. </p> <note> <p>This API operation uses pagination. Specify the <code>nextToken</code> parameter in the request to return more results.</p> </note>

    Args:
        model_manifest_arn: <p> The Amazon Resource Name (ARN) of a vehicle model (model manifest). You can use this optional parameter to list only the vehicles created from a certain vehicle model. </p>
        attribute_names: <p>The fully qualified names of the attributes. You can use this optional parameter to list the vehicles containing all the attributes in the request. For example, <code>attributeNames</code> could be "<code>Vehicle.Body.Engine.Type, Vehicle.Color</code>" and the corresponding <code>attributeValues</code> could be "<code>1.3 L R2, Blue</code>" . In this case, the API will filter vehicles with an attribute name <code>Vehicle.Body.Engine.Type</code> that contains a value of <code>1.3 L R2</code> AND an attribute name <code>Vehicle.Color</code> that contains a value of "<code>Blue</code>". A request must contain unique values for the <code>attributeNames</code> filter and the matching number of <code>attributeValues</code> filters to return the subset of vehicles that match the attributes filter condition.</p>
        attribute_values: <p>Static information about a vehicle attribute value in string format. You can use this optional parameter in conjunction with <code>attributeNames</code> to list the vehicles containing all the <code>attributeValues</code> corresponding to the <code>attributeNames</code> filter. For example, <code>attributeValues</code> could be "<code>1.3 L R2, Blue</code>" and the corresponding <code>attributeNames</code> filter could be "<code>Vehicle.Body.Engine.Type, Vehicle.Color</code>". In this case, the API will filter vehicles with attribute name <code>Vehicle.Body.Engine.Type</code> that contains a value of <code>1.3 L R2</code> AND an attribute name <code>Vehicle.Color</code> that contains a value of "<code>Blue</code>". A request must contain unique values for the <code>attributeNames</code> filter and the matching number of <code>attributeValues</code> filter to return the subset of vehicles that match the attributes filter condition.</p>
        next_token: <p>A pagination token for the next set of results.</p> <p>If the results of a search are large, only a portion of the results are returned, and a <code>nextToken</code> 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. </p>
        max_results: <p>The maximum number of items to return, between 1 and 100, inclusive.</p>
        list_response_scope: <p>When you set the <code>listResponseScope</code> parameter to <code>METADATA_ONLY</code>, the list response includes: vehicle name, Amazon Resource Name (ARN), creation time, and last modification time.</p>

    Raises:
        capo_iotfleetwise.errors.internal_server_exception.InternalServerException: <p>The request couldn't be completed because the server temporarily failed.</p>
        capo_iotfleetwise.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
        capo_iotfleetwise.errors.throttling_exception.ThrottlingException: <p>The request couldn't be completed due to throttling.</p>
        capo_iotfleetwise.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_iotfleetwise.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iotfleetwise.types.list_vehicles_request.ListVehiclesRequest]",
    ) -> AsyncOperationResponse[
        "capo_iotfleetwise.types.list_vehicles_response.ListVehiclesResponse"
    ]:
        import capo_iotfleetwise._operations.io_t_autobahn_control_plane.list_vehicles

        (
            output,
            http_response,
        ) = await capo_iotfleetwise._operations.io_t_autobahn_control_plane.list_vehicles.async_list_vehicles(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListVehicles")
    )
    input_: capo_iotfleetwise.types.list_vehicles_request.ListVehiclesRequest = {}
    if model_manifest_arn is not None:
        input_["model_manifest_arn"] = model_manifest_arn
    if attribute_names is not None:
        input_["attribute_names"] = attribute_names
    if attribute_values is not None:
        input_["attribute_values"] = attribute_values
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if list_response_scope is not None:
        input_["list_response_scope"] = list_response_scope

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output