Skip to content

batch_update_schedule

batch_update_schedule(
    channel_id: __string,
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    creates: Optional[BatchScheduleActionCreateRequest] = None,
    deletes: Optional[BatchScheduleActionDeleteRequest] = None,
) -> BatchUpdateScheduleResponse

Update a channel schedule

Parameters:

Raises:

Source code in docs_src/capo_medialive/_services/media_live.py
def batch_update_schedule(
    self,
    channel_id: "capo_medialive.types.__string.__string",
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    creates: Optional[
        "capo_medialive.types.batch_schedule_action_create_request.BatchScheduleActionCreateRequest"
    ] = None,
    deletes: Optional[
        "capo_medialive.types.batch_schedule_action_delete_request.BatchScheduleActionDeleteRequest"
    ] = None,
) -> "capo_medialive.types.batch_update_schedule_response.BatchUpdateScheduleResponse":
    """Update a channel schedule

    Args:
        channel_id: Id of the channel whose schedule is being updated.
        creates: Schedule actions to create in the schedule.
        deletes: Schedule actions to delete from the schedule.

    Raises:
        capo_medialive.errors.bad_gateway_exception.BadGatewayException: Placeholder documentation for BadGatewayException
        capo_medialive.errors.bad_request_exception.BadRequestException: Placeholder documentation for BadRequestException
        capo_medialive.errors.forbidden_exception.ForbiddenException: Placeholder documentation for ForbiddenException
        capo_medialive.errors.gateway_timeout_exception.GatewayTimeoutException: Placeholder documentation for GatewayTimeoutException
        capo_medialive.errors.internal_server_error_exception.InternalServerErrorException: Placeholder documentation for InternalServerErrorException
        capo_medialive.errors.not_found_exception.NotFoundException: Placeholder documentation for NotFoundException
        capo_medialive.errors.too_many_requests_exception.TooManyRequestsException: Placeholder documentation for TooManyRequestsException
        capo_medialive.errors.unprocessable_entity_exception.UnprocessableEntityException: Placeholder documentation for UnprocessableEntityException
        capo_medialive.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_medialive.types.batch_update_schedule_request.BatchUpdateScheduleRequest]",
    ) -> OperationResponse[
        "capo_medialive.types.batch_update_schedule_response.BatchUpdateScheduleResponse"
    ]:
        import capo_medialive._operations.media_live.batch_update_schedule

        output, http_response = (
            capo_medialive._operations.media_live.batch_update_schedule.batch_update_schedule(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchUpdateSchedule")
    )
    input_: capo_medialive.types.batch_update_schedule_request.BatchUpdateScheduleRequest = {
        "channel_id": channel_id
    }
    if creates is not None:
        input_["creates"] = creates
    if deletes is not None:
        input_["deletes"] = deletes

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