Skip to content

update_channel async

update_channel(
    arn: ChannelArn,
    *,
    config_overrides: Optional[AsyncivsClientConfig] = None,
    name: Optional[ChannelName] = None,
    latency_mode: Optional[ChannelLatencyMode] = None,
    type: Optional[ChannelType] = None,
    authorized: Optional[Boolean] = None,
    recording_configuration_arn: Optional[ChannelRecordingConfigurationArn] = None,
    insecure_ingest: Optional[Boolean] = None,
    preset: Optional[TranscodePreset] = None,
    playback_restriction_policy_arn: Optional[
        ChannelPlaybackRestrictionPolicyArn
    ] = None,
    multitrack_input_configuration: Optional[MultitrackInputConfiguration] = None,
    container_format: Optional[ContainerFormat] = None,
    ad_configuration_arn: Optional[ChannelAdConfigurationArn] = None,
) -> UpdateChannelResponse

Updates a channel's configuration. Live channels cannot be updated. You must stop the ongoing stream, update the channel, and restart the stream for the changes to take effect.

Parameters:

  • arn (ChannelArn) –

    ARN of the channel to be updated.

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

    Channel name.

  • latency_mode (Optional[ChannelLatencyMode], default: None ) –

    Channel latency mode. Use NORMAL to broadcast and deliver live video up to Full HD. Use LOW for near-real-time interaction with viewers.

  • type (Optional[ChannelType], default: None ) –

    Channel type, which determines the allowable resolution and bitrate. If you exceed the allowable input resolution or bitrate, the stream probably will disconnect immediately. Default: STANDARD. For details, see Channel Types.

  • authorized (Optional[Boolean], default: None ) –

    Whether the channel is private (enabled for playback authorization).

  • recording_configuration_arn (Optional[ChannelRecordingConfigurationArn], default: None ) –

    Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. If this is set to an empty string, recording is disabled.

  • insecure_ingest (Optional[Boolean], default: None ) –

    Whether the channel allows insecure RTMP and SRT ingest. Default: false.

  • preset (Optional[TranscodePreset], default: None ) –

    Optional transcode preset for the channel. This is selectable only for ADVANCED_HD and ADVANCED_SD channel types. For those channel types, the default preset is HIGHER_BANDWIDTH_DELIVERY. For other channel types (BASIC and STANDARD), preset is the empty string ("").

  • playback_restriction_policy_arn (Optional[ChannelPlaybackRestrictionPolicyArn], default: None ) –

    Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction. If this is set to an empty string, playback restriction policy is disabled.

  • multitrack_input_configuration (Optional[MultitrackInputConfiguration], default: None ) –

    Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.

  • container_format (Optional[ContainerFormat], default: None ) –

    Indicates which content-packaging format is used (MPEG-TS or fMP4). If multitrackInputConfiguration is specified and enabled is true, then containerFormat is required and must be set to FRAGMENTED_MP4. Otherwise, containerFormat may be set to TS or FRAGMENTED_MP4. Default: TS.

  • ad_configuration_arn (Optional[ChannelAdConfigurationArn], default: None ) –

    ARN of the ad configuration associated with the channel.

Raises:

Source code in docs_src/capo_ivs/_services/async_ivs.py
async def update_channel(
    self,
    arn: "capo_ivs.types.channel_arn.ChannelArn",
    *,
    config_overrides: Optional[AsyncivsClientConfig] = None,
    name: Optional["capo_ivs.types.channel_name.ChannelName"] = None,
    latency_mode: Optional[
        "capo_ivs.types.channel_latency_mode.ChannelLatencyMode"
    ] = None,
    type: Optional["capo_ivs.types.channel_type.ChannelType"] = None,
    authorized: Optional["capo_ivs.types.boolean.Boolean"] = None,
    recording_configuration_arn: Optional[
        "capo_ivs.types.channel_recording_configuration_arn.ChannelRecordingConfigurationArn"
    ] = None,
    insecure_ingest: Optional["capo_ivs.types.boolean.Boolean"] = None,
    preset: Optional["capo_ivs.types.transcode_preset.TranscodePreset"] = None,
    playback_restriction_policy_arn: Optional[
        "capo_ivs.types.channel_playback_restriction_policy_arn.ChannelPlaybackRestrictionPolicyArn"
    ] = None,
    multitrack_input_configuration: Optional[
        "capo_ivs.types.multitrack_input_configuration.MultitrackInputConfiguration"
    ] = None,
    container_format: Optional[
        "capo_ivs.types.container_format.ContainerFormat"
    ] = None,
    ad_configuration_arn: Optional[
        "capo_ivs.types.channel_ad_configuration_arn.ChannelAdConfigurationArn"
    ] = None,
) -> "capo_ivs.types.update_channel_response.UpdateChannelResponse":
    """<p>Updates a channel's configuration. Live channels cannot be updated. You must stop the ongoing stream, update the channel, and restart the stream for the changes to take effect.</p>

    Args:
        arn: <p>ARN of the channel to be updated.</p>
        name: <p>Channel name.</p>
        latency_mode: <p>Channel latency mode. Use <code>NORMAL</code> to broadcast and deliver live video up to Full HD. Use <code>LOW</code> for near-real-time interaction with viewers.</p>
        type: <p>Channel type, which determines the allowable resolution and bitrate. <i>If you exceed the allowable input resolution or bitrate, the stream probably will disconnect immediately.</i> Default: <code>STANDARD</code>. For details, see <a href="https://docs.aws.amazon.com/ivs/latest/LowLatencyUserGuide/channel-types.html">Channel Types</a>.</p>
        authorized: <p>Whether the channel is private (enabled for playback authorization).</p>
        recording_configuration_arn: <p>Recording-configuration ARN. A valid ARN value here both specifies the ARN and enables recording. If this is set to an empty string, recording is disabled.</p>
        insecure_ingest: <p>Whether the channel allows insecure RTMP and SRT ingest. Default: <code>false</code>.</p>
        preset: <p>Optional transcode preset for the channel. This is selectable only for <code>ADVANCED_HD</code> and <code>ADVANCED_SD</code> channel types. For those channel types, the default <code>preset</code> is <code>HIGHER_BANDWIDTH_DELIVERY</code>. For other channel types (<code>BASIC</code> and <code>STANDARD</code>), <code>preset</code> is the empty string (<code>""</code>).</p>
        playback_restriction_policy_arn: <p>Playback-restriction-policy ARN. A valid ARN value here both specifies the ARN and enables playback restriction. If this is set to an empty string, playback restriction policy is disabled.</p>
        multitrack_input_configuration: <p>Object specifying multitrack input configuration. Default: no multitrack input configuration is specified.</p>
        container_format: <p>Indicates which content-packaging format is used (MPEG-TS or fMP4). If <code>multitrackInputConfiguration</code> is specified and <code>enabled</code> is <code>true</code>, then <code>containerFormat</code> is required and must be set to <code>FRAGMENTED_MP4</code>. Otherwise, <code>containerFormat</code> may be set to <code>TS</code> or <code>FRAGMENTED_MP4</code>. Default: <code>TS</code>.</p>
        ad_configuration_arn: <p>ARN of the ad configuration associated with the channel.</p>

    Raises:
        capo_ivs.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_ivs.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_ivs.errors.pending_verification.PendingVerification: <p>Your account is pending verification.</p>
        capo_ivs.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_ivs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ivs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ivs.types.update_channel_request.UpdateChannelRequest]",
    ) -> AsyncOperationResponse[
        "capo_ivs.types.update_channel_response.UpdateChannelResponse"
    ]:
        import capo_ivs._operations.amazon_interactive_video_service.update_channel

        (
            output,
            http_response,
        ) = await capo_ivs._operations.amazon_interactive_video_service.update_channel.async_update_channel(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_ivs.types.update_channel_response.UpdateChannelResponse",
    ) -> dict[str, Any]:
        import capo_ivs.types.update_channel_response

        return capo_ivs.types.update_channel_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateChannel", redact_output=_redact_output),
    )
    input_: capo_ivs.types.update_channel_request.UpdateChannelRequest = {
        "arn": arn
    }
    if name is not None:
        input_["name"] = name
    if latency_mode is not None:
        input_["latency_mode"] = latency_mode
    if type is not None:
        input_["type"] = type
    if authorized is not None:
        input_["authorized"] = authorized
    if recording_configuration_arn is not None:
        input_["recording_configuration_arn"] = recording_configuration_arn
    if insecure_ingest is not None:
        input_["insecure_ingest"] = insecure_ingest
    if preset is not None:
        input_["preset"] = preset
    if playback_restriction_policy_arn is not None:
        input_["playback_restriction_policy_arn"] = playback_restriction_policy_arn
    if multitrack_input_configuration is not None:
        input_["multitrack_input_configuration"] = multitrack_input_configuration
    if container_format is not None:
        input_["container_format"] = container_format
    if ad_configuration_arn is not None:
        input_["ad_configuration_arn"] = ad_configuration_arn

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