236 236 | ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
237 237 | let _input = context
|
238 238 | .input()
|
239 239 | .downcast_ref::<RestoreTableFromBackupInput>()
|
240 240 | .ok_or("failed to downcast to RestoreTableFromBackupInput")?;
|
241 241 |
|
242 242 | let params = crate::config::endpoint::Params::builder()
|
243 243 | .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
|
244 244 | .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
|
245 245 | .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
|
246 246 | .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
|
247 247 | .set_account_id_endpoint_mode(::std::option::Option::Some(
|
248 248 | cfg.load::<::aws_types::endpoint_config::AccountIdEndpointMode>()
|
249 249 | .cloned()
|
250 250 | .unwrap_or_default()
|
251 251 | .to_string(),
|
252 252 | ))
|
253 253 | .set_resource_arn(Some(
|
254 254 | _input
|
255 255 | .target_table_name
|
256 256 | .clone()
|
257 257 | .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
|
258 258 | .ok_or_else(|| {
|
259 259 | ::aws_smithy_types::error::operation::BuildError::missing_field("target_table_name", "A required field was not set")
|
260 260 | })?,
|
261 261 | ))
|
262 262 | .build()
|
263 263 | .map_err(|err| {
|
264 264 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
265 265 | })?;
|
266 + |
|
267 + | match cfg
|
268 + | .load::<::aws_types::endpoint_config::AccountIdEndpointMode>()
|
269 + | .cloned()
|
270 + | .unwrap_or_default()
|
271 + | {
|
272 + | ::aws_types::endpoint_config::AccountIdEndpointMode::Preferred => {
|
273 + | cfg.interceptor_state()
|
274 + | .store_append(::aws_runtime::sdk_feature::AwsSdkFeature::AccountIdModePreferred);
|
275 + | }
|
276 + | ::aws_types::endpoint_config::AccountIdEndpointMode::Required => {
|
277 + | cfg.interceptor_state()
|
278 + | .store_append(::aws_runtime::sdk_feature::AwsSdkFeature::AccountIdModeRequired);
|
279 + | }
|
280 + | ::aws_types::endpoint_config::AccountIdEndpointMode::Disabled => {
|
281 + | cfg.interceptor_state()
|
282 + | .store_append(::aws_runtime::sdk_feature::AwsSdkFeature::AccountIdModeDisabled);
|
283 + | }
|
284 + | otherwise => {
|
285 + | ::tracing::warn!(
|
286 + | "Attempted to track an SDK feature for `{otherwise:?}`, which is not recognized in the current version of the SDK. \
|
287 + | Consider upgrading to the latest version to ensure that it is properly tracked."
|
288 + | );
|
289 + | }
|
290 + | }
|
291 + |
|
266 292 | cfg.interceptor_state()
|
267 293 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
294 + |
|
268 295 | ::std::result::Result::Ok(())
|
269 296 | }
|
270 297 | }
|
271 298 |
|
272 299 | // The get_* functions below are generated from JMESPath expressions in the
|
273 300 | // operationContextParams trait. They target the operation's input shape.
|
274 301 |
|
275 302 | /// Error type for the `RestoreTableFromBackupError` operation.
|
276 303 | #[non_exhaustive]
|
277 304 | #[derive(::std::fmt::Debug)]
|
278 305 | pub enum RestoreTableFromBackupError {
|
279 306 | /// <p>There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.</p>
|
280 307 | BackupInUseException(crate::types::error::BackupInUseException),
|
281 308 | /// <p>Backup not found for the given BackupARN.</p>
|
282 309 | BackupNotFoundException(crate::types::error::BackupNotFoundException),
|
283 310 | /// <p>An error occurred on the server side.</p>
|
284 311 | InternalServerError(crate::types::error::InternalServerError),
|
285 312 | #[allow(missing_docs)] // documentation missing in model
|
286 313 | InvalidEndpointException(crate::types::error::InvalidEndpointException),
|
287 314 | /// <p>There is no limit to the number of daily on-demand backups that can be taken.</p>
|
288 315 | /// <p>For most purposes, up to 500 simultaneous table operations are allowed per account. These operations include <code>CreateTable</code>, <code>UpdateTable</code>, <code>DeleteTable</code>,<code>UpdateTimeToLive</code>, <code>RestoreTableFromBackup</code>, and <code>RestoreTableToPointInTime</code>.</p>
|
289 316 | /// <p>When you are creating a table with one or more secondary indexes, you can have up to 250 such requests running at a time. However, if the table or index specifications are complex, then DynamoDB might temporarily reduce the number of concurrent operations.</p>
|
290 317 | /// <p>When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account.</p>
|
291 318 | /// <p>There is a soft account quota of 2,500 tables.</p>
|
292 319 | /// <p>GetRecords was called with a value of more than 1000 for the limit request parameter.</p>
|
293 320 | /// <p>More than 2 processes are reading from the same streams shard at the same time. Exceeding this limit may result in request throttling.</p>
|
294 321 | LimitExceededException(crate::types::error::LimitExceededException),
|
295 322 | /// <p>A target table with the specified name already exists.</p>
|
296 323 | TableAlreadyExistsException(crate::types::error::TableAlreadyExistsException),
|
297 324 | /// <p>A target table with the specified name is either being created or deleted.</p>
|