Updates the value of the DeletionProtection parameter.
Parameters:
-
deletion_protection
(Optional[DeletionProtectionSettings], default:
None
)
–
A parameter to configure deletion protection. Deletion protection prevents a user from deleting a configuration profile or an environment if AppConfig has called either GetLatestConfiguration or for the configuration profile or from the environment during the specified interval. The default interval for ProtectionPeriodInMinutes is 60.
-
vended_metrics
(Optional[VendedMetricsSettings], default:
None
)
–
The configuration for vended metrics in the account.
Raises:
Source code in docs_src/capo_appconfig/_services/async_app_config.py
| async def update_account_settings(
self,
*,
config_overrides: Optional[AsyncAppConfigClientConfig] = None,
deletion_protection: Optional[
"capo_appconfig.types.deletion_protection_settings.DeletionProtectionSettings"
] = None,
vended_metrics: Optional[
"capo_appconfig.types.vended_metrics_settings.VendedMetricsSettings"
] = None,
) -> "capo_appconfig.types.account_settings.AccountSettings":
"""<p>Updates the value of the <code>DeletionProtection</code> parameter.</p>
Args:
deletion_protection: <p>A parameter to configure deletion protection. Deletion protection prevents a user from deleting a configuration profile or an environment if AppConfig has called either <a href="https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_appconfigdata_GetLatestConfiguration.html">GetLatestConfiguration</a> or for the configuration profile or from the environment during the specified interval. The default interval for <code>ProtectionPeriodInMinutes</code> is 60.</p>
vended_metrics: <p>The configuration for vended metrics in the account.</p>
Raises:
capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_appconfig.types.update_account_settings_request.UpdateAccountSettingsRequest]",
) -> AsyncOperationResponse[
"capo_appconfig.types.account_settings.AccountSettings"
]:
import capo_appconfig._operations.amazon_app_config.update_account_settings
(
output,
http_response,
) = await capo_appconfig._operations.amazon_app_config.update_account_settings.async_update_account_settings(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateAccountSettings")
)
input_: capo_appconfig.types.update_account_settings_request.UpdateAccountSettingsRequest = {}
if deletion_protection is not None:
input_["deletion_protection"] = deletion_protection
if vended_metrics is not None:
input_["vended_metrics"] = vended_metrics
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|