Deletes an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.
Parameters:
-
name
(EnvironmentName)
–
The name of the Amazon MWAA environment. For example, MyMWAAEnvironment.
Raises:
Source code in docs_src/capo_mwaa/_services/mwaa.py
| def delete_environment(
self,
name: "capo_mwaa.types.environment_name.EnvironmentName",
*,
config_overrides: Optional[MWAAClientConfig] = None,
) -> "capo_mwaa.types.delete_environment_output.DeleteEnvironmentOutput":
"""<p>Deletes an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.</p>
Args:
name: <p>The name of the Amazon MWAA environment. For example, <code>MyMWAAEnvironment</code>.</p>
Raises:
capo_mwaa.errors.internal_server_exception.InternalServerException: <p>InternalServerException: An internal error has occurred.</p>
capo_mwaa.errors.resource_not_found_exception.ResourceNotFoundException: <p>ResourceNotFoundException: The resource is not available.</p>
capo_mwaa.errors.service_unavailable_exception.ServiceUnavailableException: <p>ServiceUnavailableException: The service is currently unavailable.</p>
capo_mwaa.errors.validation_exception.ValidationException: <p>ValidationException: The provided input is not valid.</p>
capo_mwaa.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_mwaa.types.delete_environment_input.DeleteEnvironmentInput]",
) -> OperationResponse[
"capo_mwaa.types.delete_environment_output.DeleteEnvironmentOutput"
]:
import capo_mwaa._operations.amazon_mwaa.delete_environment
output, http_response = (
capo_mwaa._operations.amazon_mwaa.delete_environment.delete_environment(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteEnvironment")
)
input_: capo_mwaa.types.delete_environment_input.DeleteEnvironmentInput = {
"name": name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|