Deletes a fleet. Before you delete a fleet, all vehicles must be dissociated from the fleet. For more information, see Delete a fleet (AWS CLI) in the Amazon Web Services IoT FleetWise Developer Guide.
Parameters:
-
fleet_id
(fleetId)
–
The ID of the fleet to delete.
Raises:
Source code in docs_src/capo_iotfleetwise/_services/io_t_fleet_wise.py
| def delete_fleet(
self,
fleet_id: "capo_iotfleetwise.types.fleet_id.fleetId",
*,
config_overrides: Optional[IoTFleetWiseClientConfig] = None,
) -> "capo_iotfleetwise.types.delete_fleet_response.DeleteFleetResponse":
"""<p> Deletes a fleet. Before you delete a fleet, all vehicles must be dissociated from the fleet. For more information, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/delete-fleet-cli.html">Delete a fleet (AWS CLI)</a> in the <i>Amazon Web Services IoT FleetWise Developer Guide</i>.</p>
Args:
fleet_id: <p> The ID of the fleet to delete. </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.
"""
def _handler(
req: "OperationRequest[capo_iotfleetwise.types.delete_fleet_request.DeleteFleetRequest]",
) -> OperationResponse[
"capo_iotfleetwise.types.delete_fleet_response.DeleteFleetResponse"
]:
import capo_iotfleetwise._operations.io_t_autobahn_control_plane.delete_fleet
output, http_response = (
capo_iotfleetwise._operations.io_t_autobahn_control_plane.delete_fleet.delete_fleet(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteFleet")
)
input_: capo_iotfleetwise.types.delete_fleet_request.DeleteFleetRequest = {
"fleet_id": fleet_id
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|