Skip to content

CloudWatchLogsConfiguration

Source code in docs_src/capo_xray/types/cloud_watch_logs_configuration.py
class CloudWatchLogsConfiguration(TypedDict, closed=True):
    spans_log_group_kms_key_id: NotRequired["capo_xray.types.kms_key_id.KmsKeyId"]
    """<p> 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 <code>aws/spans</code> log group. Key IDs and alias ARNs are not supported. </p> <p> X-Ray applies the key only when it creates <code>aws/spans</code>. If the account already has an <code>aws/spans</code> log group, X-Ray fails the request with an <code>InvalidRequestException</code> and does not change the log group. To enable Transaction Search with the existing log group as it is, call <code>UpdateTraceSegmentDestination</code> again without <code>SpansLogGroupKmsKeyId</code>. To set or change the key of the existing log group, use the CloudWatch Logs <code>AssociateKmsKey</code> operation. </p> <p> You need <code>kms:DescribeKey</code> permission on the key, and the key policy must allow CloudWatch Logs to use the key. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html">Encrypt log data in CloudWatch Logs using AWS Key Management Service</a>. </p>"""

spans_log_group_kms_key_id instance-attribute

spans_log_group_kms_key_id: NotRequired[KmsKeyId]

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/spans log 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 an aws/spans log group, X-Ray fails the request with an InvalidRequestException and does not change the log group. To enable Transaction Search with the existing log group as it is, call UpdateTraceSegmentDestination again without SpansLogGroupKmsKeyId. To set or change the key of the existing log group, use the CloudWatch Logs AssociateKmsKey operation.

You need kms:DescribeKey permission 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.