terminate_environment
async
¶
terminate_environment(
*,
config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = 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/async_elastic_beanstalk.py
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 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 | |