Interface PutTraceRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,ContextRequest.Builder,CopyableBuilder<PutTraceRequest.Builder,,PutTraceRequest> SdkBuilder<PutTraceRequest.Builder,,PutTraceRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
PutTraceRequest
-
Method Summary
Modifier and TypeMethodDescriptiondefault PutTraceRequest.BuilderaccessControlConfig(Consumer<AccessControlConfig.Builder> accessControlConfig) The principals who can see the insights that AWS Context generates from the traces.accessControlConfig(AccessControlConfig accessControlConfig) The principals who can see the insights that AWS Context generates from the traces.agentContextArns(String... agentContextArns) The ARNs of the agent contexts that the traces are about: 1–10agent-context/ARNs that name at most 5 distinct agent contexts, in this Region and partition, all in your account.agentContextArns(Collection<String> agentContextArns) The ARNs of the agent contexts that the traces are about: 1–10agent-context/ARNs that name at most 5 distinct agent contexts, in this Region and partition, all in your account.clientToken(String clientToken) Makes the call idempotent.The format of the documents intraceDocuments.format(TraceFormat format) The format of the documents intraceDocuments.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the samesessionIdare one session.traceDocuments(Collection<SdkBytes> traceDocuments) The raw trace documents, in the trace schema thatformatselects.traceDocuments(SdkBytes... traceDocuments) The raw trace documents, in the trace schema thatformatselects.traceMetadata(Map<String, String> traceMetadata) Client-supplied key-value pairs, stored with the traces as-is.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.services.context.model.ContextRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
sessionId
The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same
sessionIdare one session. Optional. If you omit it, the service generates one and returns it in the response. It is not thetraceId: an OTLP batch carries many trace_ids under one session.- Parameters:
sessionId- The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the samesessionIdare one session. Optional. If you omit it, the service generates one and returns it in the response. It is not thetraceId: an OTLP batch carries many trace_ids under one session.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
clientToken
Makes the call idempotent. A retry with the same token and the same request returns the same
sessionIdand does not write the traces again. Reusing the token fails withValidationExceptionif the request is different, or if another caller reuses it whenaccessControlConfignames no entries. A token is honored for 8 hours after its first use. WhenaccessControlConfignames no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails withValidationExceptioneven if the first attempt stored traces. To complete them, resend with explicit entries under a new token.- Parameters:
clientToken- Makes the call idempotent. A retry with the same token and the same request returns the samesessionIdand does not write the traces again. Reusing the token fails withValidationExceptionif the request is different, or if another caller reuses it whenaccessControlConfignames no entries. A token is honored for 8 hours after its first use. WhenaccessControlConfignames no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails withValidationExceptioneven if the first attempt stored traces. To complete them, resend with explicit entries under a new token.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
format
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 (roleandcontent) per document, in conversation order. -
KIRO- Kiro IDE or Kiro CLI session logs.
- Parameters:
format- The format of the documents intraceDocuments. 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 (roleandcontent) per document, in conversation order. -
KIRO- Kiro IDE or Kiro CLI session logs.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
format
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 (roleandcontent) per document, in conversation order. -
KIRO- Kiro IDE or Kiro CLI session logs.
- Parameters:
format- The format of the documents intraceDocuments. 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 (roleandcontent) per document, in conversation order. -
KIRO- Kiro IDE or Kiro CLI session logs.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
-
traceDocuments
The raw trace documents, in the trace schema that
formatselects. 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.- Parameters:
traceDocuments- The raw trace documents, in the trace schema thatformatselects. 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:
- Returns a reference to this object so that method calls can be chained together.
-
traceDocuments
The raw trace documents, in the trace schema that
formatselects. 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.- Parameters:
traceDocuments- The raw trace documents, in the trace schema thatformatselects. 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:
- Returns a reference to this object so that method calls can be chained together.
-
agentContextArns
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 withValidationException. AWS Context authorizescontext:PutTraceonce for each agent context. If any authorization is denied, the whole call fails withAccessDeniedException, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails withValidationException, and nothing is stored.- Parameters:
agentContextArns- The ARNs of the agent contexts that the traces are about: 1–10agent-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 withValidationException. AWS Context authorizescontext:PutTraceonce for each agent context. If any authorization is denied, the whole call fails withAccessDeniedException, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails withValidationException, and nothing is stored.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
agentContextArns
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 withValidationException. AWS Context authorizescontext:PutTraceonce for each agent context. If any authorization is denied, the whole call fails withAccessDeniedException, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails withValidationException, and nothing is stored.- Parameters:
agentContextArns- The ARNs of the agent contexts that the traces are about: 1–10agent-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 withValidationException. AWS Context authorizescontext:PutTraceonce for each agent context. If any authorization is denied, the whole call fails withAccessDeniedException, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails withValidationException, and nothing is stored.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
traceMetadata
Client-supplied key-value pairs, stored with the traces as-is. The key
analysisModeis reserved. A request that sets it fails withAccessDeniedException.- Parameters:
traceMetadata- Client-supplied key-value pairs, stored with the traces as-is. The keyanalysisModeis reserved. A request that sets it fails withAccessDeniedException.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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 (
accessControlConfigabsent, oraccessControlListabsent 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 withValidationExceptionand stores nothing. In that case, name the principals, or sendALLOWfor*so that every reader of the agent contexts can see the insights.An entry other than
*withoutprincipalType, aprincipalIdthat is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected withValidationException. 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 withValidationExceptionand stores nothing.- Parameters:
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 (
accessControlConfigabsent, oraccessControlListabsent 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 withValidationExceptionand stores nothing. In that case, name the principals, or sendALLOWfor*so that every reader of the agent contexts can see the insights.An entry other than
*withoutprincipalType, aprincipalIdthat is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected withValidationException. 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 withValidationExceptionand stores nothing.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
accessControlConfig
default PutTraceRequest.Builder accessControlConfig(Consumer<AccessControlConfig.Builder> 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 (
accessControlConfigabsent, oraccessControlListabsent 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 withValidationExceptionand stores nothing. In that case, name the principals, or sendALLOWfor*so that every reader of the agent contexts can see the insights.An entry other than
This is a convenience method that creates an instance of the*withoutprincipalType, aprincipalIdthat is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected withValidationException. 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 withValidationExceptionand stores nothing.AccessControlConfig.Builderavoiding the need to create one manually viaAccessControlConfig.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toaccessControlConfig(AccessControlConfig).- Parameters:
accessControlConfig- a consumer that will call methods onAccessControlConfig.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
PutTraceRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
PutTraceRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-