Skip to content

update_fuota_task

update_fuota_task(
    id: FuotaTaskId,
    *,
    config_overrides: Optional[IoTWirelessClientConfig] = None,
    name: Optional[FuotaTaskName] = None,
    description: Optional[Description] = None,
    lo_ra_wan: Optional[LoRaWANFuotaTask] = None,
    firmware_update_image: Optional[FirmwareUpdateImage] = None,
    firmware_update_role: Optional[FirmwareUpdateRole] = None,
    redundancy_percent: Optional[RedundancyPercent] = None,
    fragment_size_bytes: Optional[FragmentSizeBytes] = None,
    fragment_interval_ms: Optional[FragmentIntervalMS] = None,
    descriptor: Optional[FileDescriptor] = None,
) -> UpdateFuotaTaskResponse

Updates properties of a FUOTA task.

Raises:

Source code in docs_src/capo_iot_wireless/_services/io_t_wireless.py
def update_fuota_task(
    self,
    id: "capo_iot_wireless.types.fuota_task_id.FuotaTaskId",
    *,
    config_overrides: Optional[IoTWirelessClientConfig] = None,
    name: Optional["capo_iot_wireless.types.fuota_task_name.FuotaTaskName"] = None,
    description: Optional["capo_iot_wireless.types.description.Description"] = None,
    lo_ra_wan: Optional[
        "capo_iot_wireless.types.lo_ra_wan_fuota_task.LoRaWANFuotaTask"
    ] = None,
    firmware_update_image: Optional[
        "capo_iot_wireless.types.firmware_update_image.FirmwareUpdateImage"
    ] = None,
    firmware_update_role: Optional[
        "capo_iot_wireless.types.firmware_update_role.FirmwareUpdateRole"
    ] = None,
    redundancy_percent: Optional[
        "capo_iot_wireless.types.redundancy_percent.RedundancyPercent"
    ] = None,
    fragment_size_bytes: Optional[
        "capo_iot_wireless.types.fragment_size_bytes.FragmentSizeBytes"
    ] = None,
    fragment_interval_ms: Optional[
        "capo_iot_wireless.types.fragment_interval_ms.FragmentIntervalMS"
    ] = None,
    descriptor: Optional[
        "capo_iot_wireless.types.file_descriptor.FileDescriptor"
    ] = None,
) -> "capo_iot_wireless.types.update_fuota_task_response.UpdateFuotaTaskResponse":
    """<p>Updates properties of a FUOTA task.</p>

    Raises:
        capo_iot_wireless.errors.access_denied_exception.AccessDeniedException: <p>User does not have permission to perform this action.</p>
        capo_iot_wireless.errors.conflict_exception.ConflictException: <p>Adding, updating, or deleting the resource can cause an inconsistent state.</p>
        capo_iot_wireless.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing a request.</p>
        capo_iot_wireless.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource does not exist.</p>
        capo_iot_wireless.errors.throttling_exception.ThrottlingException: <p>The request was denied because it exceeded the allowed API request rate.</p>
        capo_iot_wireless.errors.validation_exception.ValidationException: <p>The input did not meet the specified constraints.</p>
        capo_iot_wireless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_iot_wireless.types.update_fuota_task_request.UpdateFuotaTaskRequest]",
    ) -> OperationResponse[
        "capo_iot_wireless.types.update_fuota_task_response.UpdateFuotaTaskResponse"
    ]:
        import capo_iot_wireless._operations.iotwireless.update_fuota_task

        output, http_response = (
            capo_iot_wireless._operations.iotwireless.update_fuota_task.update_fuota_task(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateFuotaTask")
    )
    input_: capo_iot_wireless.types.update_fuota_task_request.UpdateFuotaTaskRequest = {
        "id": id
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if lo_ra_wan is not None:
        input_["lo_ra_wan"] = lo_ra_wan
    if firmware_update_image is not None:
        input_["firmware_update_image"] = firmware_update_image
    if firmware_update_role is not None:
        input_["firmware_update_role"] = firmware_update_role
    if redundancy_percent is not None:
        input_["redundancy_percent"] = redundancy_percent
    if fragment_size_bytes is not None:
        input_["fragment_size_bytes"] = fragment_size_bytes
    if fragment_interval_ms is not None:
        input_["fragment_interval_ms"] = fragment_interval_ms
    if descriptor is not None:
        input_["descriptor"] = descriptor

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output