Skip to content

update_trace_segment_destination async

update_trace_segment_destination(
    *,
    config_overrides: Optional[AsyncXRayClientConfig] = None,
    destination: Optional[TraceSegmentDestination] = 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:

Raises:

Source code in docs_src/capo_xray/_services/async_x_ray.py
async def update_trace_segment_destination(
    self,
    *,
    config_overrides: Optional[AsyncXRayClientConfig] = None,
    destination: Optional[
        "capo_xray.types.trace_segment_destination.TraceSegmentDestination"
    ] = 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>

    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.
    """

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

        (
            output,
            http_response,
        ) = await capo_xray._operations.awsx_ray.update_trace_segment_destination.async_update_trace_segment_destination(
            req.options, req.input
        )
        return AsyncOperationResponse(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

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