219 219 |
|
220 220 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutLogEventsEndpointParamsInterceptor {
|
221 221 | fn name(&self) -> &'static str {
|
222 222 | "PutLogEventsEndpointParamsInterceptor"
|
223 223 | }
|
224 224 |
|
225 225 | fn read_before_execution(
|
226 226 | &self,
|
227 227 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
228 228 | '_,
|
229 229 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
230 230 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
231 231 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
232 232 | >,
|
233 233 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
234 234 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
235 235 | let _input = context
|
236 236 | .input()
|
237 237 | .downcast_ref::<PutLogEventsInput>()
|
238 238 | .ok_or("failed to downcast to PutLogEventsInput")?;
|
239 239 |
|
240 240 | let params = crate::config::endpoint::Params::builder()
|
241 241 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
242 242 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
243 243 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
244 244 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
245 245 | .build()
|
246 246 | .map_err(|err| {
|
247 247 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
248 248 | })?;
|
249 + |
|
249 250 | cfg.interceptor_state()
|
250 251 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
252 + |
|
251 253 | ::std::result::Result::Ok(())
|
252 254 | }
|
253 255 | }
|
254 256 |
|
255 257 | // The get_* functions below are generated from JMESPath expressions in the
|
256 258 | // operationContextParams trait. They target the operation's input shape.
|
257 259 |
|
258 260 | /// Error type for the `PutLogEventsError` operation.
|
259 261 | #[non_exhaustive]
|
260 262 | #[derive(::std::fmt::Debug)]
|
261 263 | pub enum PutLogEventsError {
|
262 264 | /// <p>The event was already logged.</p><important>
|
263 265 | /// <p><code>PutLogEvents</code> actions are now always accepted and never return <code>DataAlreadyAcceptedException</code> regardless of whether a given batch of log events has already been accepted.</p>
|
264 266 | /// </important>
|
265 267 | DataAlreadyAcceptedException(crate::types::error::DataAlreadyAcceptedException),
|
266 268 | /// <p>A parameter is specified incorrectly.</p>
|
267 269 | InvalidParameterException(crate::types::error::InvalidParameterException),
|
268 270 | /// <p>The sequence token is not valid. You can get the correct sequence token in the <code>expectedSequenceToken</code> field in the <code>InvalidSequenceTokenException</code> message.</p><important>
|
269 271 | /// <p><code>PutLogEvents</code> actions are now always accepted and never return <code>InvalidSequenceTokenException</code> regardless of receiving an invalid sequence token.</p>
|
270 272 | /// </important>
|
271 273 | InvalidSequenceTokenException(crate::types::error::InvalidSequenceTokenException),
|
272 274 | /// <p>The specified resource does not exist.</p>
|
273 275 | ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
|
274 276 | /// <p>The service cannot complete the request.</p>
|
275 277 | ServiceUnavailableException(crate::types::error::ServiceUnavailableException),
|
276 278 | /// <p>The most likely cause is an Amazon Web Services access key ID or secret key that's not valid.</p>
|
277 279 | UnrecognizedClientException(crate::types::error::UnrecognizedClientException),
|
278 280 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
279 281 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
280 282 | variable wildcard pattern and check `.code()`:
|