Skip to content

update_notification_configuration async

update_notification_configuration(
    *,
    config_overrides: Optional[AsyncKinesisVideoClientConfig] = None,
    stream_name: Optional[StreamName] = None,
    stream_arn: Optional[ResourceARN] = None,
    notification_configuration: Optional[NotificationConfiguration] = None,
) -> UpdateNotificationConfigurationOutput

Updates the notification information for a stream.

Parameters:

  • stream_name (Optional[StreamName], default: None ) –

    The name of the stream from which to update the notification configuration. You must specify either the StreamName or the StreamARN.

  • stream_arn (Optional[ResourceARN], default: None ) –

    The Amazon Resource Name (ARN) of the Kinesis video stream from where you want to update the notification configuration. You must specify either the StreamName or the StreamARN.

  • notification_configuration (Optional[NotificationConfiguration], default: None ) –

    The structure containing the information required for notifications. If the structure is null, the configuration will be deleted from the stream.

Raises:

  • AccessDeniedException –

    You do not have required permissions to perform this operation.

  • ClientLimitExceededException –

    Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.

  • InvalidArgumentException –

    The value for this input parameter is invalid.

  • NoDataRetentionException –

    The Stream data retention in hours is equal to zero.

  • ResourceInUseException –

    When the input StreamARN or ChannelARN in CLOUD_STORAGE_MODE is already mapped to a different Kinesis Video Stream resource, or if the provided input StreamARN or ChannelARN is not in Active status, try one of the following :

    1. The DescribeMediaStorageConfiguration API to determine what the stream given channel is mapped to.

    2. The DescribeMappedResourceConfiguration API to determine the channel that the given stream is mapped to.

    3. The DescribeStream or DescribeSignalingChannel API to determine the status of the resource.

  • ResourceNotFoundException –

    Amazon Kinesis Video Streams can't find the stream that you specified.

  • UnknownServiceError –

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

Source code in docs_src/capo_kinesis_video/_services/async_kinesis_video.py
async def update_notification_configuration(
    self,
    *,
    config_overrides: Optional[AsyncKinesisVideoClientConfig] = None,
    stream_name: Optional["capo_kinesis_video.types.stream_name.StreamName"] = None,
    stream_arn: Optional[
        "capo_kinesis_video.types.resource_arn.ResourceARN"
    ] = None,
    notification_configuration: Optional[
        "capo_kinesis_video.types.notification_configuration.NotificationConfiguration"
    ] = None,
) -> "capo_kinesis_video.types.update_notification_configuration_output.UpdateNotificationConfigurationOutput":
    """<p>Updates the notification information for a stream.</p>

    Args:
        stream_name: <p>The name of the stream from which to update the notification configuration. You must specify either the <code>StreamName</code> or the <code>StreamARN</code>.</p>
        stream_arn: <p>The Amazon Resource Name (ARN) of the Kinesis video stream from where you want to update the notification configuration. You must specify either the <code>StreamName</code> or the <code>StreamARN</code>.</p>
        notification_configuration: <p>The structure containing the information required for notifications. If the structure is null, the configuration will be deleted from the stream.</p>

    Raises:
        capo_kinesis_video.errors.access_denied_exception.AccessDeniedException: <p>You do not have required permissions to perform this operation.</p>
        capo_kinesis_video.errors.client_limit_exceeded_exception.ClientLimitExceededException: <p>Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.</p>
        capo_kinesis_video.errors.invalid_argument_exception.InvalidArgumentException: <p>The value for this input parameter is invalid.</p>
        capo_kinesis_video.errors.no_data_retention_exception.NoDataRetentionException: <p>The Stream data retention in hours is equal to zero.</p>
        capo_kinesis_video.errors.resource_in_use_exception.ResourceInUseException: <p>When the input <code>StreamARN</code> or <code>ChannelARN</code> in <code>CLOUD_STORAGE_MODE</code> is already mapped to a different Kinesis Video Stream resource, or if the provided input <code>StreamARN</code> or <code>ChannelARN</code> is not in Active status, try one of the following : </p> <ol> <li> <p>The <code>DescribeMediaStorageConfiguration</code> API to determine what the stream given channel is mapped to. </p> </li> <li> <p>The <code>DescribeMappedResourceConfiguration</code> API to determine the channel that the given stream is mapped to. </p> </li> <li> <p>The <code>DescribeStream</code> or <code>DescribeSignalingChannel</code> API to determine the status of the resource. </p> </li> </ol>
        capo_kinesis_video.errors.resource_not_found_exception.ResourceNotFoundException: <p>Amazon Kinesis Video Streams can't find the stream that you specified.</p>
        capo_kinesis_video.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_kinesis_video.types.update_notification_configuration_input.UpdateNotificationConfigurationInput]",
    ) -> AsyncOperationResponse[
        "capo_kinesis_video.types.update_notification_configuration_output.UpdateNotificationConfigurationOutput"
    ]:
        import capo_kinesis_video._operations.kinesis_video_20170930.update_notification_configuration

        (
            output,
            http_response,
        ) = await capo_kinesis_video._operations.kinesis_video_20170930.update_notification_configuration.async_update_notification_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateNotificationConfiguration")
    )
    input_: capo_kinesis_video.types.update_notification_configuration_input.UpdateNotificationConfigurationInput = {}
    if stream_name is not None:
        input_["stream_name"] = stream_name
    if stream_arn is not None:
        input_["stream_arn"] = stream_arn
    if notification_configuration is not None:
        input_["notification_configuration"] = notification_configuration

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