216 216 |
|
217 217 | impl ::aws_smithy_runtime_api::client::interceptors::Intercept for CreateKeySigningKeyEndpointParamsInterceptor {
|
218 218 | fn name(&self) -> &'static str {
|
219 219 | "CreateKeySigningKeyEndpointParamsInterceptor"
|
220 220 | }
|
221 221 |
|
222 222 | fn read_before_execution(
|
223 223 | &self,
|
224 224 | context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
|
225 225 | '_,
|
226 226 | ::aws_smithy_runtime_api::client::interceptors::context::Input,
|
227 227 | ::aws_smithy_runtime_api::client::interceptors::context::Output,
|
228 228 | ::aws_smithy_runtime_api::client::interceptors::context::Error,
|
229 229 | >,
|
230 230 | cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
|
231 231 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
232 232 | let _input = context
|
233 233 | .input()
|
234 234 | .downcast_ref::<CreateKeySigningKeyInput>()
|
235 235 | .ok_or("failed to downcast to CreateKeySigningKeyInput")?;
|
236 236 |
|
237 237 | let params = crate::config::endpoint::Params::builder()
|
238 238 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
239 239 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
240 240 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
241 241 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
242 242 | .build()
|
243 243 | .map_err(|err| {
|
244 244 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
245 245 | })?;
|
246 + |
|
246 247 | cfg.interceptor_state()
|
247 248 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
249 + |
|
248 250 | ::std::result::Result::Ok(())
|
249 251 | }
|
250 252 | }
|
251 253 |
|
252 254 | // The get_* functions below are generated from JMESPath expressions in the
|
253 255 | // operationContextParams trait. They target the operation's input shape.
|
254 256 |
|
255 257 | /// Error type for the `CreateKeySigningKeyError` operation.
|
256 258 | #[non_exhaustive]
|
257 259 | #[derive(::std::fmt::Debug)]
|
258 260 | pub enum CreateKeySigningKeyError {
|
259 261 | /// <p>Another user submitted a request to create, update, or delete the object at the same time that you did. Retry the request.</p>
|
260 262 | ConcurrentModification(crate::types::error::ConcurrentModification),
|
261 263 | /// <p>Parameter name is not valid.</p>
|
262 264 | InvalidArgument(crate::types::error::InvalidArgument),
|
263 265 | /// <p>The input is not valid.</p>
|
264 266 | InvalidInput(crate::types::error::InvalidInput),
|
265 267 | /// <p>The key-signing key (KSK) name that you specified isn't a valid name.</p>
|
266 268 | InvalidKeySigningKeyName(crate::types::error::InvalidKeySigningKeyName),
|
267 269 | /// <p>The key-signing key (KSK) status isn't valid or another KSK has the status <code>INTERNAL_FAILURE</code>.</p>
|
268 270 | InvalidKeySigningKeyStatus(crate::types::error::InvalidKeySigningKeyStatus),
|
269 271 | /// <p>The KeyManagementServiceArn that you specified isn't valid to use with DNSSEC signing.</p>
|
270 272 | InvalidKmsArn(crate::types::error::InvalidKmsArn),
|
271 273 | /// <p>Your hosted zone status isn't valid for this operation. In the hosted zone, change the status to enable <code>DNSSEC</code> or disable <code>DNSSEC</code>.</p>
|
272 274 | InvalidSigningStatus(crate::types::error::InvalidSigningStatus),
|
273 275 | /// <p>You've already created a key-signing key (KSK) with this name or with the same customer managed key ARN.</p>
|
274 276 | KeySigningKeyAlreadyExists(crate::types::error::KeySigningKeyAlreadyExists),
|
275 277 | /// <p>No hosted zone exists with the ID that you specified.</p>
|
276 278 | NoSuchHostedZone(crate::types::error::NoSuchHostedZone),
|
277 279 | /// <p>You've reached the limit for the number of key-signing keys (KSKs). Remove at least one KSK, and then try again.</p>
|