delete_environment
async
¶
delete_environment(
environment_id: Name,
application_id: Name,
*,
config_overrides: Optional[AsyncAppConfigClientConfig] = None,
deletion_protection_check: Optional[DeletionProtectionCheck] = None,
) -> None
Deletes an environment.
To prevent users from unintentionally deleting actively-used environments, enable deletion protection.
Parameters:
-
environment_id(Name) –The ID of the environment that you want to delete.
-
application_id(Name) –The application ID that includes the environment that you want to delete.
-
deletion_protection_check(Optional[DeletionProtectionCheck], default:None) –A parameter to configure deletion protection. Deletion protection prevents a user from deleting an environment if your application called either GetLatestConfiguration or in the environment during the specified interval.
This parameter supports the following values:
-
BYPASS: Instructs AppConfig to bypass the deletion protection check and delete a configuration profile even if deletion protection would have otherwise prevented it. -
APPLY: Instructs the deletion protection check to run, even if deletion protection is disabled at the account level.APPLYalso forces the deletion protection check to run against resources created in the past hour, which are normally excluded from deletion protection checks. -
ACCOUNT_DEFAULT: The default setting, which instructs AppConfig to implement the deletion protection value specified in theUpdateAccountSettingsAPI.
-
Raises:
-
BadRequestException–The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
ConflictException–The request could not be processed because of conflict in the current state of the resource.
-
InternalServerException–There was an internal failure in the AppConfig service.
-
ResourceNotFoundException–The requested resource could not be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To delete an environment The following delete-environment example deletes the specified application environment.
Source code in docs_src/capo_appconfig/_services/async_app_config.py
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 | |