Skip to content

create_source_location async

create_source_location(
    http_configuration: HttpConfiguration,
    source_location_name: __string,
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
    access_configuration: Optional[AccessConfiguration] = None,
    default_segment_delivery_configuration: Optional[
        DefaultSegmentDeliveryConfiguration
    ] = None,
    segment_delivery_configurations: Optional[
        __listOfSegmentDeliveryConfiguration
    ] = None,
    tags: Optional[__mapOf__string] = None,
) -> CreateSourceLocationResponse

Creates a source location. A source location is a container for sources. For more information about source locations, see Working with source locations in the MediaTailor User Guide.

Parameters:

Raises:

Source code in docs_src/capo_mediatailor/_services/async_media_tailor.py
async def create_source_location(
    self,
    http_configuration: "capo_mediatailor.types.http_configuration.HttpConfiguration",
    source_location_name: "capo_mediatailor.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
    access_configuration: Optional[
        "capo_mediatailor.types.access_configuration.AccessConfiguration"
    ] = None,
    default_segment_delivery_configuration: Optional[
        "capo_mediatailor.types.default_segment_delivery_configuration.DefaultSegmentDeliveryConfiguration"
    ] = None,
    segment_delivery_configurations: Optional[
        "capo_mediatailor.types.__list_of_segment_delivery_configuration.__listOfSegmentDeliveryConfiguration"
    ] = None,
    tags: Optional[
        "capo_mediatailor.types.__map_of__string.__mapOf__string"
    ] = None,
) -> "capo_mediatailor.types.create_source_location_response.CreateSourceLocationResponse":
    """<p>Creates a source location. A source location is a container for sources. For more information about source locations, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/channel-assembly-source-locations.html">Working with source locations</a> in the <i>MediaTailor User Guide</i>.</p>

    Args:
        access_configuration: <p>Access configuration parameters. Configures the type of authentication used to access content from your source location.</p>
        default_segment_delivery_configuration: <p>The optional configuration for the server that serves segments.</p>
        http_configuration: <p>The source's HTTP package configurations.</p>
        segment_delivery_configurations: <p>A list of the segment delivery configurations associated with this resource.</p>
        source_location_name: <p>The name associated with the source location.</p>
        tags: <p>The tags to assign to the source location. 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_source_location_request.CreateSourceLocationRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediatailor.types.create_source_location_response.CreateSourceLocationResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.create_source_location

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateSourceLocation")
    )
    input_: capo_mediatailor.types.create_source_location_request.CreateSourceLocationRequest = {
        "http_configuration": http_configuration,
        "source_location_name": source_location_name,
    }
    if access_configuration is not None:
        input_["access_configuration"] = access_configuration
    if default_segment_delivery_configuration is not None:
        input_["default_segment_delivery_configuration"] = (
            default_segment_delivery_configuration
        )
    if segment_delivery_configurations is not None:
        input_["segment_delivery_configurations"] = segment_delivery_configurations
    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