updateFleet method

Future<UpdateFleetResponse> updateFleet({
  1. required String fleetId,
  2. String? description,
})

Updates the description of an existing fleet.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter fleetId : The ID of the fleet to update.

Parameter description : An updated description of the fleet.

Implementation

Future<UpdateFleetResponse> updateFleet({
  required String fleetId,
  String? description,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'IoTAutobahnControlPlane.UpdateFleet'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'fleetId': fleetId,
      if (description != null) 'description': description,
    },
  );

  return UpdateFleetResponse.fromJson(jsonResponse.body);
}