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::<CreateBackupInput>()
|
235 235 | .ok_or("failed to downcast to CreateBackupInput")?;
|
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 | .set_account_id_endpoint_mode(::std::option::Option::Some(
|
243 243 | cfg.load::<::aws_types::endpoint_config::AccountIdEndpointMode>()
|
244 244 | .cloned()
|
245 245 | .unwrap_or_default()
|
246 246 | .to_string(),
|
247 247 | ))
|
248 248 | .set_resource_arn(Some(
|
249 249 | _input
|
250 250 | .table_name
|
251 251 | .clone()
|
252 252 | .filter(|f| !AsRef::<str>::as_ref(f).trim().is_empty())
|
253 253 | .ok_or_else(|| ::aws_smithy_types::error::operation::BuildError::missing_field("table_name", "A required field was not set"))?,
|
254 254 | ))
|
255 255 | .build()
|
256 256 | .map_err(|err| {
|
257 257 | ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
|
258 258 | })?;
|
259 + |
|
260 + | match cfg
|
261 + | .load::<::aws_types::endpoint_config::AccountIdEndpointMode>()
|
262 + | .cloned()
|
263 + | .unwrap_or_default()
|
264 + | {
|
265 + | ::aws_types::endpoint_config::AccountIdEndpointMode::Preferred => {
|
266 + | cfg.interceptor_state()
|
267 + | .store_append(::aws_runtime::sdk_feature::AwsSdkFeature::AccountIdModePreferred);
|
268 + | }
|
269 + | ::aws_types::endpoint_config::AccountIdEndpointMode::Required => {
|
270 + | cfg.interceptor_state()
|
271 + | .store_append(::aws_runtime::sdk_feature::AwsSdkFeature::AccountIdModeRequired);
|
272 + | }
|
273 + | ::aws_types::endpoint_config::AccountIdEndpointMode::Disabled => {
|
274 + | cfg.interceptor_state()
|
275 + | .store_append(::aws_runtime::sdk_feature::AwsSdkFeature::AccountIdModeDisabled);
|
276 + | }
|
277 + | otherwise => {
|
278 + | ::tracing::warn!(
|
279 + | "Attempted to track an SDK feature for `{otherwise:?}`, which is not recognized in the current version of the SDK. \
|
280 + | Consider upgrading to the latest version to ensure that it is properly tracked."
|
281 + | );
|
282 + | }
|
283 + | }
|
284 + |
|
259 285 | cfg.interceptor_state()
|
260 286 | .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
|
287 + |
|
261 288 | ::std::result::Result::Ok(())
|
262 289 | }
|
263 290 | }
|
264 291 |
|
265 292 | // The get_* functions below are generated from JMESPath expressions in the
|
266 293 | // operationContextParams trait. They target the operation's input shape.
|
267 294 |
|
268 295 | /// Error type for the `CreateBackupError` operation.
|
269 296 | #[non_exhaustive]
|
270 297 | #[derive(::std::fmt::Debug)]
|
271 298 | pub enum CreateBackupError {
|
272 299 | /// <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>
|
273 300 | BackupInUseException(crate::types::error::BackupInUseException),
|
274 301 | /// <p>Backups have not yet been enabled for this table.</p>
|
275 302 | ContinuousBackupsUnavailableException(crate::types::error::ContinuousBackupsUnavailableException),
|
276 303 | /// <p>An error occurred on the server side.</p>
|
277 304 | InternalServerError(crate::types::error::InternalServerError),
|
278 305 | #[allow(missing_docs)] // documentation missing in model
|
279 306 | InvalidEndpointException(crate::types::error::InvalidEndpointException),
|
280 307 | /// <p>There is no limit to the number of daily on-demand backups that can be taken.</p>
|
281 308 | /// <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>
|
282 309 | /// <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>
|
283 310 | /// <p>When importing into DynamoDB, up to 50 simultaneous import table operations are allowed per account.</p>
|
284 311 | /// <p>There is a soft account quota of 2,500 tables.</p>
|
285 312 | /// <p>GetRecords was called with a value of more than 1000 for the limit request parameter.</p>
|
286 313 | /// <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>
|
287 314 | LimitExceededException(crate::types::error::LimitExceededException),
|
288 315 | /// <p>A target table with the specified name is either being created or deleted.</p>
|
289 316 | TableInUseException(crate::types::error::TableInUseException),
|
290 317 | /// <p>A source table with the name <code>TableName</code> does not currently exist within the subscriber's account or the subscriber is operating in the wrong Amazon Web Services Region.</p>
|