Skip to content

update_fleet async

update_fleet(
    fleet_id: fleetId,
    *,
    config_overrides: Optional[AsyncIoTFleetWiseClientConfig] = None,
    description: Optional[description] = None,
) -> UpdateFleetResponse

Updates the description of an existing fleet.

Parameters:

  • fleet_id (fleetId) –

    The ID of the fleet to update.

  • description (Optional[description], default: None ) –

    An updated description of the fleet.

Raises:

Source code in docs_src/capo_iotfleetwise/_services/async_io_t_fleet_wise.py
async def update_fleet(
    self,
    fleet_id: "capo_iotfleetwise.types.fleet_id.fleetId",
    *,
    config_overrides: Optional[AsyncIoTFleetWiseClientConfig] = None,
    description: Optional["capo_iotfleetwise.types.description.description"] = None,
) -> "capo_iotfleetwise.types.update_fleet_response.UpdateFleetResponse":
    """<p> Updates the description of an existing fleet. </p>

    Args:
        fleet_id: <p> The ID of the fleet to update. </p>
        description: <p> An updated description of the fleet. </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.conflict_exception.ConflictException: <p>The request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</p>
        capo_iotfleetwise.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</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.update_fleet_request.UpdateFleetRequest]",
    ) -> AsyncOperationResponse[
        "capo_iotfleetwise.types.update_fleet_response.UpdateFleetResponse"
    ]:
        import capo_iotfleetwise._operations.io_t_autobahn_control_plane.update_fleet

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFleet")
    )
    input_: capo_iotfleetwise.types.update_fleet_request.UpdateFleetRequest = {
        "fleet_id": fleet_id
    }
    if description is not None:
        input_["description"] = description

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