Skip to content

update_trace_segment_destination

update_trace_segment_destination(
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    destination: Optional[TraceSegmentDestination] = None,
    cloud_watch_logs_configuration: Optional[CloudWatchLogsConfiguration] = None,
) -> UpdateTraceSegmentDestinationResult

Modifies the destination of data sent to PutTraceSegments. The Transaction Search feature requires the CloudWatchLogs destination. For more information, see Transaction Search.

Parameters:

  • destination (Optional[TraceSegmentDestination], default: None ) –

    The configured destination of trace segments.

  • cloud_watch_logs_configuration (Optional[CloudWatchLogsConfiguration], default: None ) –

    Specifies settings for the CloudWatch Logs log groups that X-Ray creates for Transaction Search. Specify this only when Destination is CloudWatchLogs.

Raises:

Source code in docs_src/capo_xray/_services/x_ray.py
def update_trace_segment_destination(
    self,
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    destination: Optional[
        "capo_xray.types.trace_segment_destination.TraceSegmentDestination"
    ] = None,
    cloud_watch_logs_configuration: Optional[
        "capo_xray.types.cloud_watch_logs_configuration.CloudWatchLogsConfiguration"
    ] = None,
) -> "capo_xray.types.update_trace_segment_destination_result.UpdateTraceSegmentDestinationResult":
    """<p> Modifies the destination of data sent to <code>PutTraceSegments</code>. The Transaction Search feature requires the CloudWatchLogs destination. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html">Transaction Search</a>. </p>

    Args:
        destination: <p> The configured destination of trace segments. </p>
        cloud_watch_logs_configuration: <p> Specifies settings for the CloudWatch Logs log groups that X-Ray creates for Transaction Search. Specify this only when <code>Destination</code> is <code>CloudWatchLogs</code>. </p>

    Raises:
        capo_xray.errors.invalid_request_exception.InvalidRequestException: <p>The request is missing required parameters or has invalid parameters.</p>
        capo_xray.errors.throttled_exception.ThrottledException: <p>The request exceeds the maximum number of requests per second.</p>
        capo_xray.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_xray.types.update_trace_segment_destination_request.UpdateTraceSegmentDestinationRequest]",
    ) -> OperationResponse[
        "capo_xray.types.update_trace_segment_destination_result.UpdateTraceSegmentDestinationResult"
    ]:
        import capo_xray._operations.awsx_ray.update_trace_segment_destination

        output, http_response = (
            capo_xray._operations.awsx_ray.update_trace_segment_destination.update_trace_segment_destination(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateTraceSegmentDestination")
    )
    input_: capo_xray.types.update_trace_segment_destination_request.UpdateTraceSegmentDestinationRequest = {}
    if destination is not None:
        input_["destination"] = destination
    if cloud_watch_logs_configuration is not None:
        input_["cloud_watch_logs_configuration"] = cloud_watch_logs_configuration

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