XRay / Client / update_trace_segment_destination
update_trace_segment_destination¶
- XRay.Client.update_trace_segment_destination(**kwargs)¶
Modifies the destination of data sent to
PutTraceSegments. The Transaction Search feature requires the CloudWatchLogs destination. For more information, see Transaction Search.See also: AWS API Documentation
Request Syntax
response = client.update_trace_segment_destination( Destination='XRay'|'CloudWatchLogs', CloudWatchLogsConfiguration={ 'SpansLogGroupKmsKeyId': 'string' } )
- Parameters:
Destination (string) – The configured destination of trace segments.
CloudWatchLogsConfiguration (dict) –
Specifies settings for the CloudWatch Logs log groups that X-Ray creates for Transaction Search. Specify this only when
DestinationisCloudWatchLogs.SpansLogGroupKmsKeyId (string) –
The ARN of an AWS Key Management Service (AWS KMS) key that you create and manage, in the same account and Region, used to encrypt the
aws/spanslog group. Key IDs and alias ARNs are not supported.X-Ray applies the key only when it creates
aws/spans. If the account already has anaws/spanslog group, X-Ray fails the request with anInvalidRequestExceptionand does not change the log group. To enable Transaction Search with the existing log group as it is, callUpdateTraceSegmentDestinationagain withoutSpansLogGroupKmsKeyId. To set or change the key of the existing log group, use the CloudWatch LogsAssociateKmsKeyoperation.You need
kms:DescribeKeypermission on the key, and the key policy must allow CloudWatch Logs to use the key. For more information, see Encrypt log data in CloudWatch Logs using AWS Key Management Service.
- Return type:
dict
- Returns:
Response Syntax
{ 'Destination': 'XRay'|'CloudWatchLogs', 'Status': 'PENDING'|'ACTIVE' }
Response Structure
(dict) –
Destination (string) –
The destination of the trace segments.
Status (string) –
The status of the update.
Exceptions
XRay.Client.exceptions.InvalidRequestExceptionXRay.Client.exceptions.ThrottledException