Skip to content

update_channel async

update_channel(
    channel_group_name: ResourceName,
    channel_name: ResourceName,
    *,
    config_overrides: Optional[AsyncMediaPackageV2ClientConfig] = None,
    e_tag: Optional[EntityTag] = None,
    description: Optional[ResourceDescription] = None,
    input_switch_configuration: Optional[InputSwitchConfiguration] = None,
    output_header_configuration: Optional[OutputHeaderConfiguration] = None,
    multiview_configuration: Optional[MultiviewConfiguration] = None,
) -> UpdateChannelResponse

Update the specified channel. You can edit if MediaPackage sends ingest or egress access logs to the CloudWatch log group, if content will be encrypted, the description on a channel, and your channel's policy settings. You can't edit the name of the channel or CloudFront distribution details.

Any edits you make that impact the video output may not be reflected for a few minutes.

Parameters:

  • channel_group_name (ResourceName) –

    The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.

  • channel_name (ResourceName) –

    The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group.

  • e_tag (Optional[EntityTag], default: None ) –

    The expected current Entity Tag (ETag) for the resource. If the specified ETag does not match the resource's current entity tag, the update request will be rejected.

  • description (Optional[ResourceDescription], default: None ) –

    Any descriptive information that you want to add to the channel for future identification purposes.

  • input_switch_configuration (Optional[InputSwitchConfiguration], default: None ) –

    The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when InputType is CMAF.

  • output_header_configuration (Optional[OutputHeaderConfiguration], default: None ) –

    The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when InputType is CMAF.

  • multiview_configuration (Optional[MultiviewConfiguration], default: None ) –

    The multiview configuration for the channel. This setting is required when the channel's InputType is MULTIVIEW, and can't be set for any other input type. Because InputType is immutable, you can change a multiview channel's sources and layouts. You can't add or remove the multiview configuration itself.

Raises:

  • AccessDeniedException –

    Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.

  • ConflictException –

    Updating or deleting this resource can cause an inconsistent state.

  • InternalServerException –

    Indicates that an error from the service occurred while trying to process a request.

  • ResourceNotFoundException –

    The specified resource doesn't exist.

  • ThrottlingException –

    The request throughput limit was exceeded.

  • ValidationException –

    The input failed to meet the constraints specified by the AWS service.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

Updating a Channel

>>> await client.update_channel(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', description='Updated description for exampleChannel')
Updating a CMAF Channel with non-epoch-locked output locking mode
>>> await client.update_channel(channel_group_name='exampleChannelGroup', channel_name='exampleCmafChannel', description='Updated non-epoch-locked CMAF channel')
Source code in docs_src/capo_mediapackagev2/_services/async_media_package_v2.py
async def update_channel(
    self,
    channel_group_name: "capo_mediapackagev2.types.resource_name.ResourceName",
    channel_name: "capo_mediapackagev2.types.resource_name.ResourceName",
    *,
    config_overrides: Optional[AsyncMediaPackageV2ClientConfig] = None,
    e_tag: Optional["capo_mediapackagev2.types.entity_tag.EntityTag"] = None,
    description: Optional[
        "capo_mediapackagev2.types.resource_description.ResourceDescription"
    ] = None,
    input_switch_configuration: Optional[
        "capo_mediapackagev2.types.input_switch_configuration.InputSwitchConfiguration"
    ] = None,
    output_header_configuration: Optional[
        "capo_mediapackagev2.types.output_header_configuration.OutputHeaderConfiguration"
    ] = None,
    multiview_configuration: Optional[
        "capo_mediapackagev2.types.multiview_configuration.MultiviewConfiguration"
    ] = None,
) -> "capo_mediapackagev2.types.update_channel_response.UpdateChannelResponse":
    """<p>Update the specified channel. You can edit if MediaPackage sends ingest or egress access logs to the CloudWatch log group, if content will be encrypted, the description on a channel, and your channel's policy settings. You can't edit the name of the channel or CloudFront distribution details.</p> <p>Any edits you make that impact the video output may not be reflected for a few minutes.</p>

    Args:
        channel_group_name: <p>The name that describes the channel group. The name is the primary identifier for the channel group, and must be unique for your account in the AWS Region.</p>
        channel_name: <p>The name that describes the channel. The name is the primary identifier for the channel, and must be unique for your account in the AWS Region and channel group. </p>
        e_tag: <p>The expected current Entity Tag (ETag) for the resource. If the specified ETag does not match the resource's current entity tag, the update request will be rejected.</p>
        description: <p>Any descriptive information that you want to add to the channel for future identification purposes.</p>
        input_switch_configuration: <p>The configuration for input switching based on the media quality confidence score (MQCS) as provided from AWS Elemental MediaLive. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
        output_header_configuration: <p>The settings for what common media server data (CMSD) headers AWS Elemental MediaPackage includes in responses to the CDN. This setting is valid only when <code>InputType</code> is <code>CMAF</code>.</p>
        multiview_configuration: <p>The multiview configuration for the channel. This setting is required when the channel's <code>InputType</code> is <code>MULTIVIEW</code>, and can't be set for any other input type. Because <code>InputType</code> is immutable, you can change a multiview channel's sources and layouts. You can't add or remove the multiview configuration itself.</p>

    Raises:
        capo_mediapackagev2.errors.access_denied_exception.AccessDeniedException: <p>Access is denied because either you don't have permissions to perform the requested operation or MediaPackage is getting throttling errors with CDN authorization. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions. For more information, see Access Management in the IAM User Guide. Or, if you're using CDN authorization, you will receive this exception if MediaPackage receives a throttling error from Secrets Manager.</p>
        capo_mediapackagev2.errors.conflict_exception.ConflictException: <p>Updating or deleting this resource can cause an inconsistent state.</p>
        capo_mediapackagev2.errors.internal_server_exception.InternalServerException: <p>Indicates that an error from the service occurred while trying to process a request.</p>
        capo_mediapackagev2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</p>
        capo_mediapackagev2.errors.throttling_exception.ThrottlingException: <p>The request throughput limit was exceeded.</p>
        capo_mediapackagev2.errors.validation_exception.ValidationException: <p>The input failed to meet the constraints specified by the AWS service.</p>
        capo_mediapackagev2.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Updating a Channel

        >>> await client.update_channel(channel_group_name='exampleChannelGroup', channel_name='exampleChannel', description='Updated description for exampleChannel')
        Updating a CMAF Channel with non-epoch-locked output locking mode

        >>> await client.update_channel(channel_group_name='exampleChannelGroup', channel_name='exampleCmafChannel', description='Updated non-epoch-locked CMAF channel')
    """

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

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateChannel")
    )
    input_: capo_mediapackagev2.types.update_channel_request.UpdateChannelRequest = {
        "channel_group_name": channel_group_name,
        "channel_name": channel_name,
    }
    if e_tag is not None:
        input_["e_tag"] = e_tag
    if description is not None:
        input_["description"] = description
    if input_switch_configuration is not None:
        input_["input_switch_configuration"] = input_switch_configuration
    if output_header_configuration is not None:
        input_["output_header_configuration"] = output_header_configuration
    if multiview_configuration is not None:
        input_["multiview_configuration"] = multiview_configuration

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