220 220 |
|
221 221 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for PutDeliveryChannelEndpointParamsInterceptor {
|
222 222 | fn name(&self) -> &'static str {
|
223 223 | "PutDeliveryChannelEndpointParamsInterceptor"
|
224 224 | }
|
225 225 |
|
226 226 | fn read_before_execution(
|
227 227 | &self,
|
228 228 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
229 229 | '_,
|
230 230 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
231 231 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
232 232 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
233 233 | >,
|
234 234 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
235 235 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
236 236 | let _input = context
|
237 237 | .input()
|
238 238 | .downcast_ref::<PutDeliveryChannelInput>()
|
239 239 | .ok_or("failed to downcast to PutDeliveryChannelInput")?;
|
240 240 |
|
241 241 | let params = crate::config::endpoint::Params::builder()
|
242 242 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
243 243 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
244 244 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
245 245 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
246 246 | .build()
|
247 247 | .map_err(|err| {
|
248 248 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
249 249 | })?;
|
250 + |
|
250 251 | cfg.interceptor_state()
|
251 252 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
253 + |
|
252 254 | ::std::result::Result::Ok(())
|
253 255 | }
|
254 256 | }
|
255 257 |
|
256 258 | // The get_* functions below are generated from JMESPath expressions in the
|
257 259 | // operationContextParams trait. They target the operation's input shape.
|
258 260 |
|
259 261 | /// Error type for the `PutDeliveryChannelError` operation.
|
260 262 | #[non_exhaustive]
|
261 263 | #[derive(::std::fmt::Debug)]
|
262 264 | pub enum PutDeliveryChannelError {
|
263 265 | /// <p>Your Amazon S3 bucket policy does not permit Config to write to it.</p>
|
264 266 | InsufficientDeliveryPolicyException(crate::types::error::InsufficientDeliveryPolicyException),
|
265 267 | /// <p>The specified delivery channel name is not valid.</p>
|
266 268 | InvalidDeliveryChannelNameException(crate::types::error::InvalidDeliveryChannelNameException),
|
267 269 | /// <p>The specified Amazon S3 key prefix is not valid.</p>
|
268 270 | InvalidS3KeyPrefixException(crate::types::error::InvalidS3KeyPrefixException),
|
269 271 | /// <p>The specified Amazon KMS Key ARN is not valid.</p>
|
270 272 | InvalidS3KmsKeyArnException(crate::types::error::InvalidS3KmsKeyArnException),
|
271 273 | /// <p>The specified Amazon SNS topic does not exist.</p>
|
272 274 | InvalidSnsTopicArnException(crate::types::error::InvalidSnsTopicArnException),
|
273 275 | /// <p>You have reached the limit of the number of delivery channels you can create.</p>
|
274 276 | MaxNumberOfDeliveryChannelsExceededException(crate::types::error::MaxNumberOfDeliveryChannelsExceededException),
|
275 277 | /// <p>There are no configuration recorders available to provide the role needed to describe your resources. Create a configuration recorder.</p>
|
276 278 | NoAvailableConfigurationRecorderException(crate::types::error::NoAvailableConfigurationRecorderException),
|
277 279 | /// <p>The specified Amazon S3 bucket does not exist.</p>
|
278 280 | NoSuchBucketException(crate::types::error::NoSuchBucketException),
|
279 281 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
280 282 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
281 283 | variable wildcard pattern and check `.code()`:
|