Cancels in-progress environment configuration update or application version deployment.
Parameters:
-
environment_id
(Optional[EnvironmentId], default:
None
)
–
This specifies the ID of the environment with the in-progress update that you want to cancel.
-
environment_name
(Optional[EnvironmentName], default:
None
)
–
This specifies the name of the environment with the in-progress update that you want to cancel.
Raises:
Examples:
To abort a deployment
The following code aborts a running application version deployment for an environment named my-env:
>>> client.abort_environment_update(environment_name='my-env')
Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
| def abort_environment_update(
self,
*,
config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
environment_id: Optional[
"capo_elastic_beanstalk.types.environment_id.EnvironmentId"
] = None,
environment_name: Optional[
"capo_elastic_beanstalk.types.environment_name.EnvironmentName"
] = None,
) -> None:
"""<p>Cancels in-progress environment configuration update or application version deployment.</p>
Args:
environment_id: <p>This specifies the ID of the environment with the in-progress update that you want to cancel.</p>
environment_name: <p>This specifies the name of the environment with the in-progress update that you want to cancel.</p>
Raises:
capo_elastic_beanstalk.errors.insufficient_privileges_exception.InsufficientPrivilegesException: <p>The specified account does not have sufficient privileges for one or more Amazon Web Services services.</p>
capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To abort a deployment
The following code aborts a running application version deployment for an environment named my-env:
>>> client.abort_environment_update(environment_name='my-env')
"""
def _handler(
req: "OperationRequest[capo_elastic_beanstalk.types.abort_environment_update_message.AbortEnvironmentUpdateMessage]",
) -> OperationResponse[None]:
import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.abort_environment_update
output, http_response = (
capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.abort_environment_update.abort_environment_update(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AbortEnvironmentUpdate")
)
input_: capo_elastic_beanstalk.types.abort_environment_update_message.AbortEnvironmentUpdateMessage = {}
if environment_id is not None:
input_["environment_id"] = environment_id
if environment_name is not None:
input_["environment_name"] = environment_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|