terminate_environment
¶
terminate_environment(
*,
config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
environment_id: Optional[EnvironmentId] = None,
environment_name: Optional[EnvironmentName] = None,
terminate_resources: Optional[TerminateEnvironmentResources] = None,
force_terminate: Optional[ForceTerminate] = None,
) -> EnvironmentDescription
Terminates the specified environment.
Parameters:
-
environment_id(Optional[EnvironmentId], default:None) –The ID of the environment to terminate.
Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, Elastic Beanstalk returns
MissingRequiredParametererror. -
environment_name(Optional[EnvironmentName], default:None) –The name of the environment to terminate.
Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, Elastic Beanstalk returns
MissingRequiredParametererror. -
terminate_resources(Optional[TerminateEnvironmentResources], default:None) –Indicates whether the associated Amazon Web Services resources should shut down when the environment is terminated:
-
true: The specified environment as well as the associated Amazon Web Services resources, such as Auto Scaling group and LoadBalancer, are terminated. -
false: Elastic Beanstalk resource management is removed from the environment, but the Amazon Web Services resources continue to operate.
For more information, see the Elastic Beanstalk User Guide.
Default:
trueValid Values:
true|false -
-
force_terminate(Optional[ForceTerminate], default:None) –Terminates the target environment even if another environment in the same group is dependent on it.
Raises:
-
InsufficientPrivilegesException–The specified account does not have sufficient privileges for one or more Amazon Web Services services.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To terminate an environment The following operation terminates an Elastic Beanstalk environment named my-env:
Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 | |