aws_sdk_context/operation/put_trace/_put_trace_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct PutTraceInput {
6 /// <p>The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same <code>sessionId</code> are one session. Optional. If you omit it, the service generates one and returns it in the response. It is not the <code>traceId</code>: an OTLP batch carries many trace_ids under one session.</p>
7 pub session_id: ::std::option::Option<::std::string::String>,
8 /// <p>Makes the call idempotent. A retry with the same token and the same request returns the same <code>sessionId</code> and does not write the traces again. Reusing the token fails with <code>ValidationException</code> if the request is different, or if another caller reuses it when <code>accessControlConfig</code> names no entries. A token is honored for 8 hours after its first use. When <code>accessControlConfig</code> names no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails with <code>ValidationException</code> even if the first attempt stored traces. To complete them, resend with explicit entries under a new token.</p>
9 pub client_token: ::std::option::Option<::std::string::String>,
10 /// <p>The format of the documents in <code>traceDocuments</code>. Valid values:</p>
11 /// <ul>
12 /// <li>
13 /// <p><code>OTEL</code> - OpenTelemetry traces in OTLP/JSON.</p></li>
14 /// <li>
15 /// <p><code>ANTHROPIC</code> - Claude Code session logs, one log line per document.</p></li>
16 /// <li>
17 /// <p><code>BEDROCK_CONVERSE</code> - Amazon Bedrock Converse messages, one message (<code>role</code> and <code>content</code>) per document, in conversation order.</p></li>
18 /// <li>
19 /// <p><code>KIRO</code> - Kiro IDE or Kiro CLI session logs.</p></li>
20 /// </ul>
21 pub format: ::std::option::Option<crate::types::TraceFormat>,
22 /// <p>The raw trace documents, in the trace schema that <code>format</code> 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.</p>
23 pub trace_documents: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>,
24 /// <p>The ARNs of the agent contexts that the traces are about: 1–10 <code>agent-context/</code> 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 <code>ValidationException</code>. AWS Context authorizes <code>context:PutTrace</code> once for each agent context. If any authorization is denied, the whole call fails with <code>AccessDeniedException</code>, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails with <code>ValidationException</code>, and nothing is stored.</p>
25 pub agent_context_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
26 /// <p>Client-supplied key-value pairs, stored with the traces as-is. The key <code>analysisMode</code> is reserved. A request that sets it fails with <code>AccessDeniedException</code>.</p>
27 pub trace_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
28 /// <p>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.</p>
29 /// <p>If you provide no entries (<code>accessControlConfig</code> absent, or <code>accessControlList</code> 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 <code>ValidationException</code> and stores nothing. In that case, name the principals, or send <code>ALLOW</code> for <code>*</code> so that every reader of the agent contexts can see the insights.</p>
30 /// <p>An entry other than <code>*</code> without <code>principalType</code>, a <code>principalId</code> that is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected with <code>ValidationException</code>. 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 <code>ValidationException</code> and stores nothing.</p>
31 pub access_control_config: ::std::option::Option<crate::types::AccessControlConfig>,
32}
33impl PutTraceInput {
34 /// <p>The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same <code>sessionId</code> are one session. Optional. If you omit it, the service generates one and returns it in the response. It is not the <code>traceId</code>: an OTLP batch carries many trace_ids under one session.</p>
35 pub fn session_id(&self) -> ::std::option::Option<&str> {
36 self.session_id.as_deref()
37 }
38 /// <p>Makes the call idempotent. A retry with the same token and the same request returns the same <code>sessionId</code> and does not write the traces again. Reusing the token fails with <code>ValidationException</code> if the request is different, or if another caller reuses it when <code>accessControlConfig</code> names no entries. A token is honored for 8 hours after its first use. When <code>accessControlConfig</code> names no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails with <code>ValidationException</code> even if the first attempt stored traces. To complete them, resend with explicit entries under a new token.</p>
39 pub fn client_token(&self) -> ::std::option::Option<&str> {
40 self.client_token.as_deref()
41 }
42 /// <p>The format of the documents in <code>traceDocuments</code>. Valid values:</p>
43 /// <ul>
44 /// <li>
45 /// <p><code>OTEL</code> - OpenTelemetry traces in OTLP/JSON.</p></li>
46 /// <li>
47 /// <p><code>ANTHROPIC</code> - Claude Code session logs, one log line per document.</p></li>
48 /// <li>
49 /// <p><code>BEDROCK_CONVERSE</code> - Amazon Bedrock Converse messages, one message (<code>role</code> and <code>content</code>) per document, in conversation order.</p></li>
50 /// <li>
51 /// <p><code>KIRO</code> - Kiro IDE or Kiro CLI session logs.</p></li>
52 /// </ul>
53 pub fn format(&self) -> ::std::option::Option<&crate::types::TraceFormat> {
54 self.format.as_ref()
55 }
56 /// <p>The raw trace documents, in the trace schema that <code>format</code> 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.</p>
57 ///
58 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.trace_documents.is_none()`.
59 pub fn trace_documents(&self) -> &[::aws_smithy_types::Blob] {
60 self.trace_documents.as_deref().unwrap_or_default()
61 }
62 /// <p>The ARNs of the agent contexts that the traces are about: 1–10 <code>agent-context/</code> 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 <code>ValidationException</code>. AWS Context authorizes <code>context:PutTrace</code> once for each agent context. If any authorization is denied, the whole call fails with <code>AccessDeniedException</code>, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails with <code>ValidationException</code>, and nothing is stored.</p>
63 ///
64 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.agent_context_arns.is_none()`.
65 pub fn agent_context_arns(&self) -> &[::std::string::String] {
66 self.agent_context_arns.as_deref().unwrap_or_default()
67 }
68 /// <p>Client-supplied key-value pairs, stored with the traces as-is. The key <code>analysisMode</code> is reserved. A request that sets it fails with <code>AccessDeniedException</code>.</p>
69 pub fn trace_metadata(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
70 self.trace_metadata.as_ref()
71 }
72 /// <p>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.</p>
73 /// <p>If you provide no entries (<code>accessControlConfig</code> absent, or <code>accessControlList</code> 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 <code>ValidationException</code> and stores nothing. In that case, name the principals, or send <code>ALLOW</code> for <code>*</code> so that every reader of the agent contexts can see the insights.</p>
74 /// <p>An entry other than <code>*</code> without <code>principalType</code>, a <code>principalId</code> that is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected with <code>ValidationException</code>. 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 <code>ValidationException</code> and stores nothing.</p>
75 pub fn access_control_config(&self) -> ::std::option::Option<&crate::types::AccessControlConfig> {
76 self.access_control_config.as_ref()
77 }
78}
79impl ::std::fmt::Debug for PutTraceInput {
80 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
81 let mut formatter = f.debug_struct("PutTraceInput");
82 formatter.field("session_id", &self.session_id);
83 formatter.field("client_token", &self.client_token);
84 formatter.field("format", &self.format);
85 formatter.field("trace_documents", &"*** Sensitive Data Redacted ***");
86 formatter.field("agent_context_arns", &self.agent_context_arns);
87 formatter.field("trace_metadata", &"*** Sensitive Data Redacted ***");
88 formatter.field("access_control_config", &self.access_control_config);
89 formatter.finish()
90 }
91}
92impl PutTraceInput {
93 /// Creates a new builder-style object to manufacture [`PutTraceInput`](crate::operation::put_trace::PutTraceInput).
94 pub fn builder() -> crate::operation::put_trace::builders::PutTraceInputBuilder {
95 crate::operation::put_trace::builders::PutTraceInputBuilder::default()
96 }
97}
98
99/// A builder for [`PutTraceInput`](crate::operation::put_trace::PutTraceInput).
100#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
101#[non_exhaustive]
102pub struct PutTraceInputBuilder {
103 pub(crate) session_id: ::std::option::Option<::std::string::String>,
104 pub(crate) client_token: ::std::option::Option<::std::string::String>,
105 pub(crate) format: ::std::option::Option<crate::types::TraceFormat>,
106 pub(crate) trace_documents: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>,
107 pub(crate) agent_context_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
108 pub(crate) trace_metadata: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
109 pub(crate) access_control_config: ::std::option::Option<crate::types::AccessControlConfig>,
110}
111impl PutTraceInputBuilder {
112 /// <p>The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same <code>sessionId</code> are one session. Optional. If you omit it, the service generates one and returns it in the response. It is not the <code>traceId</code>: an OTLP batch carries many trace_ids under one session.</p>
113 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
114 self.session_id = ::std::option::Option::Some(input.into());
115 self
116 }
117 /// <p>The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same <code>sessionId</code> are one session. Optional. If you omit it, the service generates one and returns it in the response. It is not the <code>traceId</code>: an OTLP batch carries many trace_ids under one session.</p>
118 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
119 self.session_id = input;
120 self
121 }
122 /// <p>The agent session this trace belongs to and the grouping key: multiple PutTrace calls with the same <code>sessionId</code> are one session. Optional. If you omit it, the service generates one and returns it in the response. It is not the <code>traceId</code>: an OTLP batch carries many trace_ids under one session.</p>
123 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
124 &self.session_id
125 }
126 /// <p>Makes the call idempotent. A retry with the same token and the same request returns the same <code>sessionId</code> and does not write the traces again. Reusing the token fails with <code>ValidationException</code> if the request is different, or if another caller reuses it when <code>accessControlConfig</code> names no entries. A token is honored for 8 hours after its first use. When <code>accessControlConfig</code> names no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails with <code>ValidationException</code> even if the first attempt stored traces. To complete them, resend with explicit entries under a new token.</p>
127 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128 self.client_token = ::std::option::Option::Some(input.into());
129 self
130 }
131 /// <p>Makes the call idempotent. A retry with the same token and the same request returns the same <code>sessionId</code> and does not write the traces again. Reusing the token fails with <code>ValidationException</code> if the request is different, or if another caller reuses it when <code>accessControlConfig</code> names no entries. A token is honored for 8 hours after its first use. When <code>accessControlConfig</code> names no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails with <code>ValidationException</code> even if the first attempt stored traces. To complete them, resend with explicit entries under a new token.</p>
132 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133 self.client_token = input;
134 self
135 }
136 /// <p>Makes the call idempotent. A retry with the same token and the same request returns the same <code>sessionId</code> and does not write the traces again. Reusing the token fails with <code>ValidationException</code> if the request is different, or if another caller reuses it when <code>accessControlConfig</code> names no entries. A token is honored for 8 hours after its first use. When <code>accessControlConfig</code> names no entries and the caller's end user cannot be resolved at the time of the retry, the retry fails with <code>ValidationException</code> even if the first attempt stored traces. To complete them, resend with explicit entries under a new token.</p>
137 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
138 &self.client_token
139 }
140 /// <p>The format of the documents in <code>traceDocuments</code>. Valid values:</p>
141 /// <ul>
142 /// <li>
143 /// <p><code>OTEL</code> - OpenTelemetry traces in OTLP/JSON.</p></li>
144 /// <li>
145 /// <p><code>ANTHROPIC</code> - Claude Code session logs, one log line per document.</p></li>
146 /// <li>
147 /// <p><code>BEDROCK_CONVERSE</code> - Amazon Bedrock Converse messages, one message (<code>role</code> and <code>content</code>) per document, in conversation order.</p></li>
148 /// <li>
149 /// <p><code>KIRO</code> - Kiro IDE or Kiro CLI session logs.</p></li>
150 /// </ul>
151 /// This field is required.
152 pub fn format(mut self, input: crate::types::TraceFormat) -> Self {
153 self.format = ::std::option::Option::Some(input);
154 self
155 }
156 /// <p>The format of the documents in <code>traceDocuments</code>. Valid values:</p>
157 /// <ul>
158 /// <li>
159 /// <p><code>OTEL</code> - OpenTelemetry traces in OTLP/JSON.</p></li>
160 /// <li>
161 /// <p><code>ANTHROPIC</code> - Claude Code session logs, one log line per document.</p></li>
162 /// <li>
163 /// <p><code>BEDROCK_CONVERSE</code> - Amazon Bedrock Converse messages, one message (<code>role</code> and <code>content</code>) per document, in conversation order.</p></li>
164 /// <li>
165 /// <p><code>KIRO</code> - Kiro IDE or Kiro CLI session logs.</p></li>
166 /// </ul>
167 pub fn set_format(mut self, input: ::std::option::Option<crate::types::TraceFormat>) -> Self {
168 self.format = input;
169 self
170 }
171 /// <p>The format of the documents in <code>traceDocuments</code>. Valid values:</p>
172 /// <ul>
173 /// <li>
174 /// <p><code>OTEL</code> - OpenTelemetry traces in OTLP/JSON.</p></li>
175 /// <li>
176 /// <p><code>ANTHROPIC</code> - Claude Code session logs, one log line per document.</p></li>
177 /// <li>
178 /// <p><code>BEDROCK_CONVERSE</code> - Amazon Bedrock Converse messages, one message (<code>role</code> and <code>content</code>) per document, in conversation order.</p></li>
179 /// <li>
180 /// <p><code>KIRO</code> - Kiro IDE or Kiro CLI session logs.</p></li>
181 /// </ul>
182 pub fn get_format(&self) -> &::std::option::Option<crate::types::TraceFormat> {
183 &self.format
184 }
185 /// Appends an item to `trace_documents`.
186 ///
187 /// To override the contents of this collection use [`set_trace_documents`](Self::set_trace_documents).
188 ///
189 /// <p>The raw trace documents, in the trace schema that <code>format</code> 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.</p>
190 pub fn trace_documents(mut self, input: ::aws_smithy_types::Blob) -> Self {
191 let mut v = self.trace_documents.unwrap_or_default();
192 v.push(input);
193 self.trace_documents = ::std::option::Option::Some(v);
194 self
195 }
196 /// <p>The raw trace documents, in the trace schema that <code>format</code> 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.</p>
197 pub fn set_trace_documents(mut self, input: ::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>>) -> Self {
198 self.trace_documents = input;
199 self
200 }
201 /// <p>The raw trace documents, in the trace schema that <code>format</code> 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.</p>
202 pub fn get_trace_documents(&self) -> &::std::option::Option<::std::vec::Vec<::aws_smithy_types::Blob>> {
203 &self.trace_documents
204 }
205 /// Appends an item to `agent_context_arns`.
206 ///
207 /// To override the contents of this collection use [`set_agent_context_arns`](Self::set_agent_context_arns).
208 ///
209 /// <p>The ARNs of the agent contexts that the traces are about: 1–10 <code>agent-context/</code> 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 <code>ValidationException</code>. AWS Context authorizes <code>context:PutTrace</code> once for each agent context. If any authorization is denied, the whole call fails with <code>AccessDeniedException</code>, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails with <code>ValidationException</code>, and nothing is stored.</p>
210 pub fn agent_context_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211 let mut v = self.agent_context_arns.unwrap_or_default();
212 v.push(input.into());
213 self.agent_context_arns = ::std::option::Option::Some(v);
214 self
215 }
216 /// <p>The ARNs of the agent contexts that the traces are about: 1–10 <code>agent-context/</code> 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 <code>ValidationException</code>. AWS Context authorizes <code>context:PutTrace</code> once for each agent context. If any authorization is denied, the whole call fails with <code>AccessDeniedException</code>, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails with <code>ValidationException</code>, and nothing is stored.</p>
217 pub fn set_agent_context_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
218 self.agent_context_arns = input;
219 self
220 }
221 /// <p>The ARNs of the agent contexts that the traces are about: 1–10 <code>agent-context/</code> 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 <code>ValidationException</code>. AWS Context authorizes <code>context:PutTrace</code> once for each agent context. If any authorization is denied, the whole call fails with <code>AccessDeniedException</code>, and nothing is stored. After authorization, if trace analysis is disabled for an agent context, the call fails with <code>ValidationException</code>, and nothing is stored.</p>
222 pub fn get_agent_context_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
223 &self.agent_context_arns
224 }
225 /// Adds a key-value pair to `trace_metadata`.
226 ///
227 /// To override the contents of this collection use [`set_trace_metadata`](Self::set_trace_metadata).
228 ///
229 /// <p>Client-supplied key-value pairs, stored with the traces as-is. The key <code>analysisMode</code> is reserved. A request that sets it fails with <code>AccessDeniedException</code>.</p>
230 pub fn trace_metadata(
231 mut self,
232 k: impl ::std::convert::Into<::std::string::String>,
233 v: impl ::std::convert::Into<::std::string::String>,
234 ) -> Self {
235 let mut hash_map = self.trace_metadata.unwrap_or_default();
236 hash_map.insert(k.into(), v.into());
237 self.trace_metadata = ::std::option::Option::Some(hash_map);
238 self
239 }
240 /// <p>Client-supplied key-value pairs, stored with the traces as-is. The key <code>analysisMode</code> is reserved. A request that sets it fails with <code>AccessDeniedException</code>.</p>
241 pub fn set_trace_metadata(
242 mut self,
243 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
244 ) -> Self {
245 self.trace_metadata = input;
246 self
247 }
248 /// <p>Client-supplied key-value pairs, stored with the traces as-is. The key <code>analysisMode</code> is reserved. A request that sets it fails with <code>AccessDeniedException</code>.</p>
249 pub fn get_trace_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
250 &self.trace_metadata
251 }
252 /// <p>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.</p>
253 /// <p>If you provide no entries (<code>accessControlConfig</code> absent, or <code>accessControlList</code> 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 <code>ValidationException</code> and stores nothing. In that case, name the principals, or send <code>ALLOW</code> for <code>*</code> so that every reader of the agent contexts can see the insights.</p>
254 /// <p>An entry other than <code>*</code> without <code>principalType</code>, a <code>principalId</code> that is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected with <code>ValidationException</code>. 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 <code>ValidationException</code> and stores nothing.</p>
255 pub fn access_control_config(mut self, input: crate::types::AccessControlConfig) -> Self {
256 self.access_control_config = ::std::option::Option::Some(input);
257 self
258 }
259 /// <p>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.</p>
260 /// <p>If you provide no entries (<code>accessControlConfig</code> absent, or <code>accessControlList</code> 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 <code>ValidationException</code> and stores nothing. In that case, name the principals, or send <code>ALLOW</code> for <code>*</code> so that every reader of the agent contexts can see the insights.</p>
261 /// <p>An entry other than <code>*</code> without <code>principalType</code>, a <code>principalId</code> that is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected with <code>ValidationException</code>. 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 <code>ValidationException</code> and stores nothing.</p>
262 pub fn set_access_control_config(mut self, input: ::std::option::Option<crate::types::AccessControlConfig>) -> Self {
263 self.access_control_config = input;
264 self
265 }
266 /// <p>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.</p>
267 /// <p>If you provide no entries (<code>accessControlConfig</code> absent, or <code>accessControlList</code> 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 <code>ValidationException</code> and stores nothing. In that case, name the principals, or send <code>ALLOW</code> for <code>*</code> so that every reader of the agent contexts can see the insights.</p>
268 /// <p>An entry other than <code>*</code> without <code>principalType</code>, a <code>principalId</code> that is not valid Unicode, or entries that total more than 65,536 bytes of UTF-8 are rejected with <code>ValidationException</code>. 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 <code>ValidationException</code> and stores nothing.</p>
269 pub fn get_access_control_config(&self) -> &::std::option::Option<crate::types::AccessControlConfig> {
270 &self.access_control_config
271 }
272 /// Consumes the builder and constructs a [`PutTraceInput`](crate::operation::put_trace::PutTraceInput).
273 pub fn build(self) -> ::std::result::Result<crate::operation::put_trace::PutTraceInput, ::aws_smithy_types::error::operation::BuildError> {
274 ::std::result::Result::Ok(crate::operation::put_trace::PutTraceInput {
275 session_id: self.session_id,
276 client_token: self.client_token,
277 format: self.format,
278 trace_documents: self.trace_documents,
279 agent_context_arns: self.agent_context_arns,
280 trace_metadata: self.trace_metadata,
281 access_control_config: self.access_control_config,
282 })
283 }
284}
285impl ::std::fmt::Debug for PutTraceInputBuilder {
286 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
287 let mut formatter = f.debug_struct("PutTraceInputBuilder");
288 formatter.field("session_id", &self.session_id);
289 formatter.field("client_token", &self.client_token);
290 formatter.field("format", &self.format);
291 formatter.field("trace_documents", &"*** Sensitive Data Redacted ***");
292 formatter.field("agent_context_arns", &self.agent_context_arns);
293 formatter.field("trace_metadata", &"*** Sensitive Data Redacted ***");
294 formatter.field("access_control_config", &self.access_control_config);
295 formatter.finish()
296 }
297}