getVehicleStatus method

Future<GetVehicleStatusResponse> getVehicleStatus({
  1. required String vehicleName,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves information about the status of campaigns, decoder manifests, or state templates associated with a vehicle.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter vehicleName : The ID of the vehicle to retrieve information about.

Parameter maxResults : The maximum number of items to return, between 1 and 100, inclusive. This parameter is only supported for resources of type CAMPAIGN.

Parameter 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. This parameter is only supported for resources of type CAMPAIGN.

Implementation

Future<GetVehicleStatusResponse> getVehicleStatus({
  required String vehicleName,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'IoTAutobahnControlPlane.GetVehicleStatus'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'vehicleName': vehicleName,
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
    },
  );

  return GetVehicleStatusResponse.fromJson(jsonResponse.body);
}