Skip to content

create_live_source async

create_live_source(
    http_package_configurations: HttpPackageConfigurations,
    live_source_name: __string,
    source_location_name: __string,
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
    tags: Optional[__mapOf__string] = None,
) -> CreateLiveSourceResponse

The live source configuration.

Parameters:

  • http_package_configurations (HttpPackageConfigurations) –

    A list of HTTP package configuration parameters for this live source.

  • live_source_name (__string) –

    The name of the live source.

  • source_location_name (__string) –

    The name of the source location.

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

    The tags to assign to the live source. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources.

Raises:

Source code in docs_src/capo_mediatailor/_services/async_media_tailor.py
async def create_live_source(
    self,
    http_package_configurations: "capo_mediatailor.types.http_package_configurations.HttpPackageConfigurations",
    live_source_name: "capo_mediatailor.types.__string.__string",
    source_location_name: "capo_mediatailor.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
    tags: Optional[
        "capo_mediatailor.types.__map_of__string.__mapOf__string"
    ] = None,
) -> "capo_mediatailor.types.create_live_source_response.CreateLiveSourceResponse":
    """<p>The live source configuration.</p>

    Args:
        http_package_configurations: <p>A list of HTTP package configuration parameters for this live source.</p>
        live_source_name: <p>The name of the live source.</p>
        source_location_name: <p>The name of the source location.</p>
        tags: <p>The tags to assign to the live source. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/tagging.html">Tagging AWS Elemental MediaTailor Resources</a>.</p>

    Raises:
        capo_mediatailor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediatailor.types.create_live_source_request.CreateLiveSourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediatailor.types.create_live_source_response.CreateLiveSourceResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.create_live_source

        (
            output,
            http_response,
        ) = await capo_mediatailor._operations.media_tailor.create_live_source.async_create_live_source(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateLiveSource")
    )
    input_: capo_mediatailor.types.create_live_source_request.CreateLiveSourceRequest = {
        "http_package_configurations": http_package_configurations,
        "live_source_name": live_source_name,
        "source_location_name": source_location_name,
    }
    if tags is not None:
        input_["tags"] = tags

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