Skip to content

delete_source_location async

delete_source_location(
    source_location_name: __string,
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
) -> DeleteSourceLocationResponse

Deletes 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:

  • source_location_name (__string) –

    The name of the source location.

Raises:

Source code in docs_src/capo_mediatailor/_services/async_media_tailor.py
async def delete_source_location(
    self,
    source_location_name: "capo_mediatailor.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
) -> "capo_mediatailor.types.delete_source_location_response.DeleteSourceLocationResponse":
    """<p>Deletes 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:
        source_location_name: <p>The name of the source location.</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.delete_source_location_request.DeleteSourceLocationRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediatailor.types.delete_source_location_response.DeleteSourceLocationResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.delete_source_location

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteSourceLocation")
    )
    input_: capo_mediatailor.types.delete_source_location_request.DeleteSourceLocationRequest = {
        "source_location_name": source_location_name
    }

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