Skip to content

create_recording_configuration

create_recording_configuration(
    destination_configuration: DestinationConfiguration,
    *,
    config_overrides: Optional[ivsClientConfig] = None,
    name: Optional[RecordingConfigurationName] = None,
    tags: Optional[Tags] = None,
    thumbnail_configuration: Optional[ThumbnailConfiguration] = None,
    recording_reconnect_window_seconds: Optional[
        RecordingReconnectWindowSeconds
    ] = None,
    rendition_configuration: Optional[RenditionConfiguration] = None,
) -> CreateRecordingConfigurationResponse

Creates a new recording configuration, used to enable recording to Amazon S3.

Known issue: In the us-east-1 region, if you use the Amazon Web Services CLI to create a recording configuration, it returns success even if the S3 bucket is in a different region. In this case, the state of the recording configuration is CREATE_FAILED (instead of ACTIVE). (In other regions, the CLI correctly returns failure if the bucket is in a different region.)

Workaround: Ensure that your S3 bucket is in the same region as the recording configuration. If you create a recording configuration in a different region as your S3 bucket, delete that recording configuration and create a new one with an S3 bucket from the correct region.

Parameters:

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

    Recording-configuration name. The value does not need to be unique.

  • destination_configuration (DestinationConfiguration) –

    A complex type that contains a destination configuration for where recorded video will be stored.

  • tags (Optional[Tags], default: None ) –

    Array of 1-50 maps, each of the form string:string (key:value). See Best practices and strategies in Tagging Amazon Web Services Resources and Tag Editor for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there.

  • thumbnail_configuration (Optional[ThumbnailConfiguration], default: None ) –

    A complex type that allows you to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session.

  • recording_reconnect_window_seconds (Optional[RecordingReconnectWindowSeconds], default: None ) –

    If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together. Default: 0.

  • rendition_configuration (Optional[RenditionConfiguration], default: None ) –

    Object that describes which renditions should be recorded for a stream.

Raises:

Source code in docs_src/capo_ivs/_services/ivs.py
def create_recording_configuration(
    self,
    destination_configuration: "capo_ivs.types.destination_configuration.DestinationConfiguration",
    *,
    config_overrides: Optional[ivsClientConfig] = None,
    name: Optional[
        "capo_ivs.types.recording_configuration_name.RecordingConfigurationName"
    ] = None,
    tags: Optional["capo_ivs.types.tags.Tags"] = None,
    thumbnail_configuration: Optional[
        "capo_ivs.types.thumbnail_configuration.ThumbnailConfiguration"
    ] = None,
    recording_reconnect_window_seconds: Optional[
        "capo_ivs.types.recording_reconnect_window_seconds.RecordingReconnectWindowSeconds"
    ] = None,
    rendition_configuration: Optional[
        "capo_ivs.types.rendition_configuration.RenditionConfiguration"
    ] = None,
) -> "capo_ivs.types.create_recording_configuration_response.CreateRecordingConfigurationResponse":
    """<p>Creates a new recording configuration, used to enable recording to Amazon S3.</p> <p> <b>Known issue:</b> In the us-east-1 region, if you use the Amazon Web Services CLI to create a recording configuration, it returns success even if the S3 bucket is in a different region. In this case, the <code>state</code> of the recording configuration is <code>CREATE_FAILED</code> (instead of <code>ACTIVE</code>). (In other regions, the CLI correctly returns failure if the bucket is in a different region.)</p> <p> <b>Workaround:</b> Ensure that your S3 bucket is in the same region as the recording configuration. If you create a recording configuration in a different region as your S3 bucket, delete that recording configuration and create a new one with an S3 bucket from the correct region.</p>

    Args:
        name: <p>Recording-configuration name. The value does not need to be unique.</p>
        destination_configuration: <p>A complex type that contains a destination configuration for where recorded video will be stored.</p>
        tags: <p>Array of 1-50 maps, each of the form <code>string:string (key:value)</code>. See <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/best-practices-and-strats.html">Best practices and strategies</a> in <i>Tagging Amazon Web Services Resources and Tag Editor</i> for details, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there.</p>
        thumbnail_configuration: <p>A complex type that allows you to enable/disable the recording of thumbnails for a live session and modify the interval at which thumbnails are generated for the live session.</p>
        recording_reconnect_window_seconds: <p>If a broadcast disconnects and then reconnects within the specified interval, the multiple streams will be considered a single broadcast and merged together. Default: 0.</p>
        rendition_configuration: <p>Object that describes which renditions should be recorded for a stream.</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.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_ivs.errors.pending_verification.PendingVerification: <p>Your account is pending verification.</p>
        capo_ivs.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</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.
    """

    def _handler(
        req: "OperationRequest[capo_ivs.types.create_recording_configuration_request.CreateRecordingConfigurationRequest]",
    ) -> OperationResponse[
        "capo_ivs.types.create_recording_configuration_response.CreateRecordingConfigurationResponse"
    ]:
        import capo_ivs._operations.amazon_interactive_video_service.create_recording_configuration

        output, http_response = (
            capo_ivs._operations.amazon_interactive_video_service.create_recording_configuration.create_recording_configuration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateRecordingConfiguration")
    )
    input_: capo_ivs.types.create_recording_configuration_request.CreateRecordingConfigurationRequest = {
        "destination_configuration": destination_configuration
    }
    if name is not None:
        input_["name"] = name
    if tags is not None:
        input_["tags"] = tags
    if thumbnail_configuration is not None:
        input_["thumbnail_configuration"] = thumbnail_configuration
    if recording_reconnect_window_seconds is not None:
        input_["recording_reconnect_window_seconds"] = (
            recording_reconnect_window_seconds
        )
    if rendition_configuration is not None:
        input_["rendition_configuration"] = rendition_configuration

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