Skip to content

update_account_settings

update_account_settings(
    *,
    config_overrides: Optional[AppConfigClientConfig] = None,
    deletion_protection: Optional[DeletionProtectionSettings] = None,
    vended_metrics: Optional[VendedMetricsSettings] = None,
) -> AccountSettings

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/app_config.py
def update_account_settings(
    self,
    *,
    config_overrides: Optional[AppConfigClientConfig] = 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.
    """

    def _handler(
        req: "OperationRequest[capo_appconfig.types.update_account_settings_request.UpdateAccountSettingsRequest]",
    ) -> OperationResponse["capo_appconfig.types.account_settings.AccountSettings"]:
        import capo_appconfig._operations.amazon_app_config.update_account_settings

        output, http_response = (
            capo_appconfig._operations.amazon_app_config.update_account_settings.update_account_settings(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output