Skip to content

update_channel

update_channel(
    channel_id: __string,
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    cdi_input_specification: Optional[CdiInputSpecification] = None,
    destinations: Optional[__listOfOutputDestination] = None,
    encoder_settings: Optional[EncoderSettings] = None,
    input_attachments: Optional[__listOfInputAttachment] = None,
    input_specification: Optional[InputSpecification] = None,
    log_level: Optional[LogLevel] = None,
    maintenance: Optional[MaintenanceUpdateSettings] = None,
    name: Optional[__string] = None,
    role_arn: Optional[__string] = None,
    channel_engine_version: Optional[ChannelEngineVersionRequest] = None,
    dry_run: Optional[__boolean] = None,
    anywhere_settings: Optional[AnywhereSettings] = None,
    linked_channel_settings: Optional[LinkedChannelSettings] = None,
    channel_security_groups: Optional[__listOf__string] = None,
    inference_settings: Optional[InferenceSettings] = None,
    special_router_settings: Optional[SpecialRouterSettings] = None,
) -> UpdateChannelResponse

Updates a channel.

Parameters:

  • cdi_input_specification (Optional[CdiInputSpecification], default: None ) –

    Specification of CDI inputs for this channel

  • channel_id (__string) –

    channel ID

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

    A list of output destinations for this channel.

  • encoder_settings (Optional[EncoderSettings], default: None ) –

    The encoder settings for this channel.

  • input_specification (Optional[InputSpecification], default: None ) –

    Specification of network and file inputs for this channel

  • log_level (Optional[LogLevel], default: None ) –

    The log level to write to CloudWatch Logs.

  • maintenance (Optional[MaintenanceUpdateSettings], default: None ) –

    Maintenance settings for this channel.

  • name (Optional[__string], default: None ) –

    The name of the channel.

  • role_arn (Optional[__string], default: None ) –

    An optional Amazon Resource Name (ARN) of the role to assume when running the Channel. If you do not specify this on an update call but the role was previously set that role will be removed.

  • channel_engine_version (Optional[ChannelEngineVersionRequest], default: None ) –

    Channel engine version for this channel

  • anywhere_settings (Optional[AnywhereSettings], default: None ) –

    The Elemental Anywhere settings for this channel.

  • linked_channel_settings (Optional[LinkedChannelSettings], default: None ) –

    The linked channel settings for the channel.

  • channel_security_groups (Optional[__listOf__string], default: None ) –

    A list of IDs for all the Input Security Groups attached to the channel.

  • inference_settings (Optional[InferenceSettings], default: None ) –

    Include this setting to include Elemental Inference features in this channel.

  • special_router_settings (Optional[SpecialRouterSettings], default: None ) –

    When using MediaConnect Router as the source of a MediaLive input there's a special handoff that occurs when a router output is created. This group of settings is set on your behalf by the MediaConnect Router service using this set of settings. This setting object can only by used by that service.

Raises:

Source code in docs_src/capo_medialive/_services/media_live.py
def update_channel(
    self,
    channel_id: "capo_medialive.types.__string.__string",
    *,
    config_overrides: Optional[MediaLiveClientConfig] = None,
    cdi_input_specification: Optional[
        "capo_medialive.types.cdi_input_specification.CdiInputSpecification"
    ] = None,
    destinations: Optional[
        "capo_medialive.types.__list_of_output_destination.__listOfOutputDestination"
    ] = None,
    encoder_settings: Optional[
        "capo_medialive.types.encoder_settings.EncoderSettings"
    ] = None,
    input_attachments: Optional[
        "capo_medialive.types.__list_of_input_attachment.__listOfInputAttachment"
    ] = None,
    input_specification: Optional[
        "capo_medialive.types.input_specification.InputSpecification"
    ] = None,
    log_level: Optional["capo_medialive.types.log_level.LogLevel"] = None,
    maintenance: Optional[
        "capo_medialive.types.maintenance_update_settings.MaintenanceUpdateSettings"
    ] = None,
    name: Optional["capo_medialive.types.__string.__string"] = None,
    role_arn: Optional["capo_medialive.types.__string.__string"] = None,
    channel_engine_version: Optional[
        "capo_medialive.types.channel_engine_version_request.ChannelEngineVersionRequest"
    ] = None,
    dry_run: Optional["capo_medialive.types.__boolean.__boolean"] = None,
    anywhere_settings: Optional[
        "capo_medialive.types.anywhere_settings.AnywhereSettings"
    ] = None,
    linked_channel_settings: Optional[
        "capo_medialive.types.linked_channel_settings.LinkedChannelSettings"
    ] = None,
    channel_security_groups: Optional[
        "capo_medialive.types.__list_of__string.__listOf__string"
    ] = None,
    inference_settings: Optional[
        "capo_medialive.types.inference_settings.InferenceSettings"
    ] = None,
    special_router_settings: Optional[
        "capo_medialive.types.special_router_settings.SpecialRouterSettings"
    ] = None,
) -> "capo_medialive.types.update_channel_response.UpdateChannelResponse":
    """Updates a channel.

    Args:
        cdi_input_specification: Specification of CDI inputs for this channel
        channel_id: channel ID
        destinations: A list of output destinations for this channel.
        encoder_settings: The encoder settings for this channel.
        input_specification: Specification of network and file inputs for this channel
        log_level: The log level to write to CloudWatch Logs.
        maintenance: Maintenance settings for this channel.
        name: The name of the channel.
        role_arn: An optional Amazon Resource Name (ARN) of the role to assume when running the Channel. If you do not specify this on an update call but the role was previously set that role will be removed.
        channel_engine_version: Channel engine version for this channel
        anywhere_settings: The Elemental Anywhere settings for this channel.
        linked_channel_settings: The linked channel settings for the channel.
        channel_security_groups: A list of IDs for all the Input Security Groups attached to the channel.
        inference_settings: Include this setting to include Elemental Inference features in this channel.
        special_router_settings: When using MediaConnect Router as the source of a MediaLive input there's a special handoff that occurs when a router output is created. This group of settings is set on your behalf by the MediaConnect Router service using this set of settings. This setting object can only by used by that service.

    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.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_request.UpdateChannelRequest]",
    ) -> OperationResponse[
        "capo_medialive.types.update_channel_response.UpdateChannelResponse"
    ]:
        import capo_medialive._operations.media_live.update_channel

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateChannel")
    )
    input_: capo_medialive.types.update_channel_request.UpdateChannelRequest = {
        "channel_id": channel_id
    }
    if cdi_input_specification is not None:
        input_["cdi_input_specification"] = cdi_input_specification
    if destinations is not None:
        input_["destinations"] = destinations
    if encoder_settings is not None:
        input_["encoder_settings"] = encoder_settings
    if input_attachments is not None:
        input_["input_attachments"] = input_attachments
    if input_specification is not None:
        input_["input_specification"] = input_specification
    if log_level is not None:
        input_["log_level"] = log_level
    if maintenance is not None:
        input_["maintenance"] = maintenance
    if name is not None:
        input_["name"] = name
    if role_arn is not None:
        input_["role_arn"] = role_arn
    if channel_engine_version is not None:
        input_["channel_engine_version"] = channel_engine_version
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if anywhere_settings is not None:
        input_["anywhere_settings"] = anywhere_settings
    if linked_channel_settings is not None:
        input_["linked_channel_settings"] = linked_channel_settings
    if channel_security_groups is not None:
        input_["channel_security_groups"] = channel_security_groups
    if inference_settings is not None:
        input_["inference_settings"] = inference_settings
    if special_router_settings is not None:
        input_["special_router_settings"] = special_router_settings

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