210 210 |
|
211 211 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for DeleteRoleEndpointParamsInterceptor {
|
212 212 | fn name(&self) -> &'static str {
|
213 213 | "DeleteRoleEndpointParamsInterceptor"
|
214 214 | }
|
215 215 |
|
216 216 | fn read_before_execution(
|
217 217 | &self,
|
218 218 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
219 219 | '_,
|
220 220 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
221 221 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
222 222 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
223 223 | >,
|
224 224 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
225 225 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
226 226 | let _input = context
|
227 227 | .input()
|
228 228 | .downcast_ref::<DeleteRoleInput>()
|
229 229 | .ok_or("failed to downcast to DeleteRoleInput")?;
|
230 230 |
|
231 231 | let params = crate::config::endpoint::Params::builder()
|
232 232 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
233 233 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
234 234 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
235 235 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
236 236 | .build()
|
237 237 | .map_err(|err| {
|
238 238 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
239 239 | })?;
|
240 + |
|
240 241 | cfg.interceptor_state()
|
241 242 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
243 + |
|
242 244 | ::std::result::Result::Ok(())
|
243 245 | }
|
244 246 | }
|
245 247 |
|
246 248 | // The get_* functions below are generated from JMESPath expressions in the
|
247 249 | // operationContextParams trait. They target the operation's input shape.
|
248 250 |
|
249 251 | /// Error type for the `DeleteRoleError` operation.
|
250 252 | #[non_exhaustive]
|
251 253 | #[derive(::std::fmt::Debug)]
|
252 254 | pub enum DeleteRoleError {
|
253 255 | /// <p>The request was rejected because multiple requests to change this object were submitted simultaneously. Wait a few minutes and submit your request again.</p>
|
254 256 | ConcurrentModificationException(crate::types::error::ConcurrentModificationException),
|
255 257 | /// <p>The request was rejected because it attempted to delete a resource that has attached subordinate entities. The error message describes these entities.</p>
|
256 258 | DeleteConflictException(crate::types::error::DeleteConflictException),
|
257 259 | /// <p>The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded.</p>
|
258 260 | LimitExceededException(crate::types::error::LimitExceededException),
|
259 261 | /// <p>The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.</p>
|
260 262 | NoSuchEntityException(crate::types::error::NoSuchEntityException),
|
261 263 | /// <p>The request processing has failed because of an unknown error, exception or failure.</p>
|
262 264 | ServiceFailureException(crate::types::error::ServiceFailureException),
|
263 265 | /// <p>The request was rejected because service-linked roles are protected Amazon Web Services resources. Only the service that depends on the service-linked role can modify or delete the role on your behalf. The error message includes the name of the service that depends on this service-linked role. You must request the change through that service.</p>
|
264 266 | UnmodifiableEntityException(crate::types::error::UnmodifiableEntityException),
|
265 267 | /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
|
266 268 | #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
|
267 269 | variable wildcard pattern and check `.code()`:
|
268 270 | \
|
269 271 | `err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
|
270 272 | \
|
271 273 | See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-DeleteRoleError) for what information is available for the error.")]
|