Skip to content

TraceAnalysisConfig

Source code in docs_src/capo_context/types/trace_analysis_config.py
class TraceAnalysisConfig(TypedDict, closed=True):
    status: NotRequired["capo_context.types.trace_analysis_status.TraceAnalysisStatus"]
    """<p>Specifies whether you allow AWS Context to use <code>traceAnalysisRole</code> to analyze this agent context's agent traces, and to capture its own agents' traces as <code>includeContextAgentTraces</code> specifies. Defaults to <code>ENABLED</code> when you set <code>traceAnalysisConfig</code> on CreateAgentContext. Setting it to <code>ENABLED</code> requires <code>traceAnalysisRole</code>. Setting it to <code>DISABLED</code> removes the role. An agent context that has never set it reads <code>ENABLED</code> when it has a <code>traceAnalysisRole</code>, and <code>DISABLED</code> otherwise.</p>"""
    trace_analysis_role: NotRequired["capo_context.types.role_arn.RoleArn"]
    """<p>The IAM role that AWS Context assumes to access the agent context's connected source data when it analyzes agent traces. The role must be in the same account as the agent context. Its trust policy must allow the AWS Context service principal, with <code>aws:SourceArn</code> set to the agent context's ARN and <code>aws:SourceAccount</code> set to its account. You must have <code>iam:PassRole</code> permission on the role to pass it to AWS Context. Otherwise, the request fails with <code>AccessDeniedException</code>. Required to set <code>status</code> to <code>ENABLED</code>. You can't set it while <code>status</code> is <code>DISABLED</code>.</p>"""
    include_context_agent_traces: NotRequired[
        "capo_context.types.context_agent_traces_status.ContextAgentTracesStatus"
    ]
    """<p>Specifies whether trace analysis includes traces from the agents built into AWS Context, such as the retrieval agent. Uses <code>traceAnalysisRole</code> and takes effect only while <code>status</code> is <code>ENABLED</code>. An agent context that has never set it reads <code>ENABLED</code>.</p>"""

include_context_agent_traces instance-attribute

include_context_agent_traces: NotRequired[ContextAgentTracesStatus]

Specifies whether trace analysis includes traces from the agents built into AWS Context, such as the retrieval agent. Uses traceAnalysisRole and takes effect only while status is ENABLED. An agent context that has never set it reads ENABLED.

status instance-attribute

status: NotRequired[TraceAnalysisStatus]

Specifies whether you allow AWS Context to use traceAnalysisRole to analyze this agent context's agent traces, and to capture its own agents' traces as includeContextAgentTraces specifies. Defaults to ENABLED when you set traceAnalysisConfig on CreateAgentContext. Setting it to ENABLED requires traceAnalysisRole. Setting it to DISABLED removes the role. An agent context that has never set it reads ENABLED when it has a traceAnalysisRole, and DISABLED otherwise.

trace_analysis_role instance-attribute

trace_analysis_role: NotRequired[RoleArn]

The IAM role that AWS Context assumes to access the agent context's connected source data when it analyzes agent traces. The role must be in the same account as the agent context. Its trust policy must allow the AWS Context service principal, with aws:SourceArn set to the agent context's ARN and aws:SourceAccount set to its account. You must have iam:PassRole permission on the role to pass it to AWS Context. Otherwise, the request fails with AccessDeniedException. Required to set status to ENABLED. You can't set it while status is DISABLED.