Skip to main content
Use a per-request control when the request your application already constructs is the case you need to understand. The control must be added before SigV4 signing and must remain present on every retry of that attempt. This guide uses AWS SDK for Java 2.x and S3 PutObject. The application keeps its S3 model and configured Cloud Adapter endpoint. The example selects ExecuteAndExplain, so it performs the upload.

Decide whether the request may execute

An ordinary generated AWS SDK client expects an origin service response. It can consume ExecuteAndExplain because the adapter preserves that native response. Explicit Explain instead returns a diagnostic document and needs explanation-aware handling; do not cast that document to a successful created-resource response or allow the SDK to retry it as a transient parsing failure.
The true shorthand performs the request. It is not equivalent to an explicit version-1 control whose mode is Explain.

Configure the S3 client

Set the endpoint either process-wide or on this client, as described in the AWS Java SDK guide. Keep origin credentials separate from the target-cloud identity held by the adapter. For one client:
The caller supplies its normal configured AwsCredentialsProvider; do not place an access key in source code or diagnostic output.

Execute one upload and request a report

AwsRequestOverrideConfiguration adds the header before the SDK signs this request:
This is an executing example. Use a unique test key, verify the object in the target service, and remove it only after you have preserved the report and verified what was created. A PutObjectResponse or ETag establishes neither report completeness nor support for multipart or resumable upload.

Capture receipts on success and service errors

Read receipt headers from the SDK’s HTTP response before converting the result into application-specific logging. The same helper works for a response carried by an AWS service exception. This complete class is compiled against the same AWS SDK major version used by the application example:
A service error can still carry a report receipt. A transport error might have no HTTP response at all. Neither case is permission to replay a write. First inspect target state and the operation’s idempotency.

Handle preview mode deliberately

To preview the same request, change only the control value:
The adapter does not perform PutObject. Its response is an explanation document rather than an S3 PutObjectResponse. Use an explanation-aware integration that:
  1. marks the explained response as non-retryable;
  2. preserves the report ID and document;
  3. does not treat the absence of an S3 ETag as a transient provider error;
  4. reads the report through the authorized report route;
  5. has the report owner acknowledge the sealed revision only after exporting the evidence others need.
Use only a published explanation-aware integration available in your environment. If none is available, do not send Explain through a response-unaware generated SDK or invent a response wrapper. Use tensor9 explain to inspect the directed profile while you coordinate an approved request-level integration.

Keep the control signed and singular

Request override configuration is applied before SigV4 signing. Middleware that mutates the final HTTP request afterward can invalidate the signature or leave the Explain control unsigned. Inspect the final request construction if the request is refused:
  • add exactly one x-t9-explain field;
  • do not combine a default interceptor and a request override that append two fields;
  • use the exact case-sensitive JSON enum values;
  • keep the header ASCII and under 4096 bytes;
  • ensure the signing identity covers x-t9-explain.
If the request is retried by the SDK, every execution attempt can have its own report. Preserve each report ID rather than overwriting the first with the last. An explanation-aware client must also prevent explicit Explain documents from entering a normal service retry loop.

Retrieve without replaying

Once you have x-t9-explain-id, read that report. Do not repeat PutObject to “get the explanation again.” A signed report GET returns the current revision in Human, Agent or JSON format. For an asynchronous origin operation with a declared status read, an explanation-aware client can poll the original status operation with:
That status poll retains the origin operation’s native result inside the explanation envelope. Select by the exact resource and operation identity; do not guess from a reused display name. See Diagnostic Response Headers for report GET, poll and acknowledgment contracts. See Following Asynchronous Explanations for partial revisions and lost final responses.

Assign acknowledgment ownership

The authenticated principal recorded as the report owner is the principal that can read and acknowledge it through the HTTP report routes. Acknowledging its sealed revision consumes that report. Decide responsibility before the request:
  • the application can export a sanitized bundle and leave acknowledgment to the component acting as the report owner;
  • an automated test that owns the report can acknowledge after its assertions and evidence export;
  • people or systems that do not hold the owner identity receive only the sanitized evidence shared through an approved channel, not direct report-route access.
Never acknowledge merely because the native operation succeeded. First record the final report revision, declared limitations and evidence needed by other people. If the owner loses the acknowledgment response, repeating the same sealed revision is idempotent and returns Consumed.