212 212 |
|
213 213 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateFunctionEndpointParamsInterceptor {
|
214 214 | fn name(&self) -> &'static str {
|
215 215 | "CreateFunctionEndpointParamsInterceptor"
|
216 216 | }
|
217 217 |
|
218 218 | fn read_before_execution(
|
219 219 | &self,
|
220 220 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
221 221 | '_,
|
222 222 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
223 223 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
224 224 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
225 225 | >,
|
226 226 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
227 227 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
228 228 | let _input = context
|
229 229 | .input()
|
230 230 | .downcast_ref::<CreateFunctionInput>()
|
231 231 | .ok_or("failed to downcast to CreateFunctionInput")?;
|
232 232 |
|
233 233 | let params = crate::config::endpoint::Params::builder()
|
234 234 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
235 235 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
236 236 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
237 237 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
238 238 | .build()
|
239 239 | .map_err(|err| {
|
240 240 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
241 241 | })?;
|
242 + |
|
242 243 | cfg.interceptor_state()
|
243 244 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
245 + |
|
244 246 | ::std::result::Result::Ok(())
|
245 247 | }
|
246 248 | }
|
247 249 |
|
248 250 | // The get_* functions below are generated from JMESPath expressions in the
|
249 251 | // operationContextParams trait. They target the operation's input shape.
|
250 252 |
|
251 253 | /// Error type for the `CreateFunctionError` operation.
|
252 254 | #[non_exhaustive]
|
253 255 | #[derive(::std::fmt::Debug)]
|
254 256 | pub enum CreateFunctionError {
|
255 257 | /// <p>The specified code signing configuration does not exist.</p>
|
256 258 | CodeSigningConfigNotFoundException(crate::types::error::CodeSigningConfigNotFoundException),
|
257 259 | /// <p>Your Amazon Web Services account has exceeded its maximum total code size. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda quotas</a>.</p>
|
258 260 | CodeStorageExceededException(crate::types::error::CodeStorageExceededException),
|
259 261 | /// <p>The code signature failed one or more of the validation checks for signature mismatch or expiry, and the code signing policy is set to ENFORCE. Lambda blocks the deployment.</p>
|
260 262 | CodeVerificationFailedException(crate::types::error::CodeVerificationFailedException),
|
261 263 | /// <p>The code signature failed the integrity check. If the integrity check fails, then Lambda blocks deployment, even if the code signing policy is set to WARN.</p>
|
262 264 | InvalidCodeSignatureException(crate::types::error::InvalidCodeSignatureException),
|
263 265 | /// <p>One of the parameters in the request is not valid.</p>
|
264 266 | InvalidParameterValueException(crate::types::error::InvalidParameterValueException),
|
265 267 | /// <p>The resource already exists, or another operation is in progress.</p>
|
266 268 | ResourceConflictException(crate::types::error::ResourceConflictException),
|
267 269 | /// <p>The resource specified in the request does not exist.</p>
|
268 270 | ResourceNotFoundException(crate::types::error::ResourceNotFoundException),
|
269 271 | /// <p>The Lambda service encountered an internal error.</p>
|
270 272 | ServiceException(crate::types::error::ServiceException),
|
271 273 | /// <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p>
|
272 274 | TooManyRequestsException(crate::types::error::TooManyRequestsException),
|
273 275 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|