Retrieves a service graph for traces based on the specified RetrievalToken from the CloudWatch log group generated by Transaction Search. This API does not initiate a retrieval job. You must first execute StartTraceRetrieval to obtain the required RetrievalToken.
The trace graph describes services that process incoming requests and any downstream services they call, which may include Amazon Web Services resources, external APIs, or databases.
The response is empty until the RetrievalStatus is COMPLETE. Retry the request after the status changes from RUNNING or SCHEDULED to COMPLETE to access the full service graph.
When CloudWatch log is the destination, this API can support cross-account observability and service graph retrieval across linked accounts.
For retrieving graphs from X-Ray directly as opposed to the Transaction-Search Log group, see GetTraceGraph.
Parameters:
-
retrieval_token
(RetrievalToken)
–
-
next_token
(Optional[String], default:
None
)
–
Specify the pagination token returned by a previous request to retrieve the next page of indexes.
Raises:
Source code in docs_src/capo_xray/_services/async_x_ray.py
| async def get_retrieved_traces_graph(
self,
retrieval_token: "capo_xray.types.retrieval_token.RetrievalToken",
*,
config_overrides: Optional[AsyncXRayClientConfig] = None,
next_token: Optional["capo_xray.types.string.String"] = None,
) -> "capo_xray.types.get_retrieved_traces_graph_result.GetRetrievedTracesGraphResult":
"""<p> Retrieves a service graph for traces based on the specified <code>RetrievalToken</code> from the CloudWatch log group generated by Transaction Search. This API does not initiate a retrieval job. You must first execute <code>StartTraceRetrieval</code> to obtain the required <code>RetrievalToken</code>. </p> <p>The trace graph describes services that process incoming requests and any downstream services they call, which may include Amazon Web Services resources, external APIs, or databases.</p> <p>The response is empty until the <code>RetrievalStatus</code> is <i>COMPLETE</i>. Retry the request after the status changes from <i>RUNNING</i> or <i>SCHEDULED</i> to <i>COMPLETE</i> to access the full service graph.</p> <p> When CloudWatch log is the destination, this API can support cross-account observability and service graph retrieval across linked accounts.</p> <p>For retrieving graphs from X-Ray directly as opposed to the Transaction-Search Log group, see <a href="https://docs.aws.amazon.com/xray/latest/api/API_GetTraceGraph.html">GetTraceGraph</a>.</p>
Args:
retrieval_token: <p> Retrieval token. </p>
next_token: <p> Specify the pagination token returned by a previous request to retrieve the next page of indexes. </p>
Raises:
capo_xray.errors.invalid_request_exception.InvalidRequestException: <p>The request is missing required parameters or has invalid parameters.</p>
capo_xray.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is correct.</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.get_retrieved_traces_graph_request.GetRetrievedTracesGraphRequest]",
) -> AsyncOperationResponse[
"capo_xray.types.get_retrieved_traces_graph_result.GetRetrievedTracesGraphResult"
]:
import capo_xray._operations.awsx_ray.get_retrieved_traces_graph
(
output,
http_response,
) = await capo_xray._operations.awsx_ray.get_retrieved_traces_graph.async_get_retrieved_traces_graph(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetRetrievedTracesGraph")
)
input_: capo_xray.types.get_retrieved_traces_graph_request.GetRetrievedTracesGraphRequest = {
"retrieval_token": retrieval_token
}
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|