Skip to content

update_source_location

update_source_location(
    http_configuration: HttpConfiguration,
    source_location_name: __string,
    *,
    config_overrides: Optional[MediaTailorClientConfig] = None,
    access_configuration: Optional[AccessConfiguration] = None,
    default_segment_delivery_configuration: Optional[
        DefaultSegmentDeliveryConfiguration
    ] = None,
    segment_delivery_configurations: Optional[
        __listOfSegmentDeliveryConfiguration
    ] = None,
) -> UpdateSourceLocationResponse

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

  • access_configuration (Optional[AccessConfiguration], default: None ) –

    Access configuration parameters. Configures the type of authentication used to access content from your source location.

  • default_segment_delivery_configuration (Optional[DefaultSegmentDeliveryConfiguration], default: None ) –

    The optional configuration for the host server that serves segments.

  • http_configuration (HttpConfiguration) –

    The HTTP configuration for the source location.

  • segment_delivery_configurations (Optional[__listOfSegmentDeliveryConfiguration], default: None ) –

    A list of the segment delivery configurations associated with this resource.

  • source_location_name (__string) –

    The name of the source location.

Raises:

Source code in docs_src/capo_mediatailor/_services/media_tailor.py
def update_source_location(
    self,
    http_configuration: "capo_mediatailor.types.http_configuration.HttpConfiguration",
    source_location_name: "capo_mediatailor.types.__string.__string",
    *,
    config_overrides: Optional[MediaTailorClientConfig] = 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,
) -> "capo_mediatailor.types.update_source_location_response.UpdateSourceLocationResponse":
    """<p>Updates 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 host server that serves segments.</p>
        http_configuration: <p>The HTTP configuration for the source location.</p>
        segment_delivery_configurations: <p>A list of the segment delivery configurations associated with this resource.</p>
        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.
    """

    def _handler(
        req: "OperationRequest[capo_mediatailor.types.update_source_location_request.UpdateSourceLocationRequest]",
    ) -> OperationResponse[
        "capo_mediatailor.types.update_source_location_response.UpdateSourceLocationResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.update_source_location

        output, http_response = (
            capo_mediatailor._operations.media_tailor.update_source_location.update_source_location(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSourceLocation")
    )
    input_: capo_mediatailor.types.update_source_location_request.UpdateSourceLocationRequest = {
        "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

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