Class: Aws::Context::Types::PutTraceRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-context/lib/aws-sdk-context/types.rb

Overview

Constant Summary collapse

SENSITIVE =
[:trace_documents, :trace_metadata]

Instance Attribute Summary collapse

Instance Attribute Details

#access_control_config ⇒ Types::AccessControlConfig

The principals who can see the insights that AWS Context generates from the traces. If you provide entries, the caller is not included unless an entry names it.

If you provide no entries (accessControlConfig absent, or accessControlList absent or empty), only the end user that the caller's trusted identity propagation session names can see the insights. If the session names no end user, or there is no session, the call fails with ValidationException and stores nothing. In that case, name the principals, or send ALLOW for * so that every reader of the agent contexts can see the insights.

An entry other than * without principalType, a principalId that is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected with ValidationException. AWS Context stores principal IDs as given and does not verify them against a directory. A session's access control is the union of its traces' entries. A call that would take that union over 100 entries, or over 65,536 bytes of UTF-8, fails with ValidationException and stores nothing.



5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
# File 'gems/aws-sdk-context/lib/aws-sdk-context/types.rb', line 5773

class PutTraceRequest < Struct.new(
  :session_id,
  :client_token,
  :format,
  :trace_documents,
  :agent_context_arns,
  :trace_metadata,
  :access_control_config)
  SENSITIVE = [:trace_documents, :trace_metadata]
  include Aws::Structure
end

#agent_context_arns ⇒ Array<String>

The ARNs of the agent contexts that the traces are about: 1–10 agent-context/ ARNs that name at most 5 distinct agent contexts, in this Region and partition, all in your account. If you name more, the request fails with ValidationException. AWS Context authorizes context:PutTrace once for each agent context. If any authorization is denied, the whole call fails with AccessDeniedException, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails with ValidationException, and nothing is stored.

Returns:

  • (Array<String>)


5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
# File 'gems/aws-sdk-context/lib/aws-sdk-context/types.rb', line 5773

class PutTraceRequest < Struct.new(
  :session_id,
  :client_token,
  :format,
  :trace_documents,
  :agent_context_arns,
  :trace_metadata,
  :access_control_config)
  SENSITIVE = [:trace_documents, :trace_metadata]
  include Aws::Structure
end

#client_token ⇒ String

Makes the call idempotent. A retry with the same token and the same request returns the same sessionId and does not write the traces again. Reusing the token fails with ValidationException if the request is different, or if another caller reuses it when accessControlConfig names no entries. A token is honored for 8 hours after its first use. When accessControlConfig names no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails with ValidationException even if the first attempt stored traces. To complete them, resend with explicit entries under a new token.

A suitable default value is auto-generated. You should normally not need to pass this option.

Returns:

  • (String)


5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
# File 'gems/aws-sdk-context/lib/aws-sdk-context/types.rb', line 5773

class PutTraceRequest < Struct.new(
  :session_id,
  :client_token,
  :format,
  :trace_documents,
  :agent_context_arns,
  :trace_metadata,
  :access_control_config)
  SENSITIVE = [:trace_documents, :trace_metadata]
  include Aws::Structure
end

#format ⇒ String

The format of the documents in traceDocuments. Valid values:

  • OTEL - OpenTelemetry traces in OTLP/JSON.

  • ANTHROPIC - Claude Code session logs, one log line per document.

  • BEDROCK_CONVERSE - Amazon Bedrock Converse messages, one message (role and content) per document, in conversation order.

  • KIRO - Kiro IDE or Kiro CLI session logs.

Returns:

  • (String)


5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
# File 'gems/aws-sdk-context/lib/aws-sdk-context/types.rb', line 5773

class PutTraceRequest < Struct.new(
  :session_id,
  :client_token,
  :format,
  :trace_documents,
  :agent_context_arns,
  :trace_metadata,
  :access_control_config)
  SENSITIVE = [:trace_documents, :trace_metadata]
  include Aws::Structure
end

#session_id ⇒ String

The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same sessionId are one session. Optional. If you omit it, the service generates one and returns it in the response. It is not the traceId: an OTLP batch carries many trace_ids under one session.

Returns:

  • (String)


5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
# File 'gems/aws-sdk-context/lib/aws-sdk-context/types.rb', line 5773

class PutTraceRequest < Struct.new(
  :session_id,
  :client_token,
  :format,
  :trace_documents,
  :agent_context_arns,
  :trace_metadata,
  :access_control_config)
  SENSITIVE = [:trace_documents, :trace_metadata]
  include Aws::Structure
end

#trace_documents ⇒ Array<String>

The raw trace documents, in the trace schema that format selects. You can send 1–100 documents per call, and each document can be up to 5 MiB (5,242,880 bytes) before encoding. If you use an AWS SDK, pass each document's raw bytes. If you call PutTrace through the agent context's MCP server or another JSON client, send each document as a base64-encoded string.

Returns:

  • (Array<String>)


5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
# File 'gems/aws-sdk-context/lib/aws-sdk-context/types.rb', line 5773

class PutTraceRequest < Struct.new(
  :session_id,
  :client_token,
  :format,
  :trace_documents,
  :agent_context_arns,
  :trace_metadata,
  :access_control_config)
  SENSITIVE = [:trace_documents, :trace_metadata]
  include Aws::Structure
end

#trace_metadata ⇒ Hash<String,String>

Client-supplied key-value pairs, stored with the traces as-is. The key analysisMode is reserved. A request that sets it fails with AccessDeniedException.

Returns:

  • (Hash<String,String>)


5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
# File 'gems/aws-sdk-context/lib/aws-sdk-context/types.rb', line 5773

class PutTraceRequest < Struct.new(
  :session_id,
  :client_token,
  :format,
  :trace_documents,
  :agent_context_arns,
  :trace_metadata,
  :access_control_config)
  SENSITIVE = [:trace_documents, :trace_metadata]
  include Aws::Structure
end