Skip to content

update_channel_class

update_channel_class(
    channel_id: __string,
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    channel_class: Optional[ChannelClass] = None,
    destinations: Optional[__listOfOutputDestination] = None,
) -> UpdateChannelClassResponse

Changes the class of the channel.

Parameters:

  • channel_class (Optional[ChannelClass], default: None ) –

    The channel class that you wish to update this channel to use.

  • channel_id (__string) –

    Channel Id of the channel whose class should be updated.

  • destinations (Optional[__listOfOutputDestination], default: None ) –

    A list of output destinations for this channel.

Raises:

Source code in docs_src/capo_medialive/_services/media_live.py
def update_channel_class(
    self,
    channel_id: "capo_medialive.types.__string.__string",
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    channel_class: Optional[
        "capo_medialive.types.channel_class.ChannelClass"
    ] = None,
    destinations: Optional[
        "capo_medialive.types.__list_of_output_destination.__listOfOutputDestination"
    ] = None,
) -> (
    "capo_medialive.types.update_channel_class_response.UpdateChannelClassResponse"
):
    """Changes the class of the channel.

    Args:
        channel_class: The channel class that you wish to update this channel to use.
        channel_id: Channel Id of the channel whose class should be updated.
        destinations: A list of output destinations for this channel.

    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.conflict_exception.ConflictException: Placeholder documentation for ConflictException
        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.update_channel_class_request.UpdateChannelClassRequest]",
    ) -> OperationResponse[
        "capo_medialive.types.update_channel_class_response.UpdateChannelClassResponse"
    ]:
        import capo_medialive._operations.media_live.update_channel_class

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateChannelClass")
    )
    input_: capo_medialive.types.update_channel_class_request.UpdateChannelClassRequest = {
        "channel_id": channel_id
    }
    if channel_class is not None:
        input_["channel_class"] = channel_class
    if destinations is not None:
        input_["destinations"] = destinations

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