Request is an operation to stop an application.
Parameter ApplicationId is required. Parameters StopConnectedEntity and IncludeEc2InstanceShutdown are optional.
Parameters:
-
application_id
(ApplicationId)
–
The ID of the application.
-
stop_connected_entity
(Optional[ConnectedEntityType], default:
None
)
–
Specify the ConnectedEntityType. Accepted type is DBMS.
If this parameter is included, the connected DBMS (Database Management System) will be stopped.
-
include_ec2_instance_shutdown
(Optional[bool], default:
None
)
–
Boolean. If included and if set to True, the StopApplication operation will shut down the associated Amazon EC2 instance in addition to the application.
Raises:
Source code in docs_src/capo_ssm_sap/_services/ssm_sap.py
| def stop_application(
self,
application_id: "capo_ssm_sap.types.application_id.ApplicationId",
*,
config_overrides: Optional[SsmSapClientConfig] = None,
stop_connected_entity: Optional[
"capo_ssm_sap.types.connected_entity_type.ConnectedEntityType"
] = None,
include_ec2_instance_shutdown: Optional[bool] = None,
) -> "capo_ssm_sap.types.stop_application_output.StopApplicationOutput":
"""<p>Request is an operation to stop an application.</p> <p>Parameter <code>ApplicationId</code> is required. Parameters <code>StopConnectedEntity</code> and <code>IncludeEc2InstanceShutdown</code> are optional.</p>
Args:
application_id: <p>The ID of the application.</p>
stop_connected_entity: <p>Specify the <code>ConnectedEntityType</code>. Accepted type is <code>DBMS</code>.</p> <p>If this parameter is included, the connected DBMS (Database Management System) will be stopped.</p>
include_ec2_instance_shutdown: <p>Boolean. If included and if set to <code>True</code>, the StopApplication operation will shut down the associated Amazon EC2 instance in addition to the application.</p>
Raises:
capo_ssm_sap.errors.conflict_exception.ConflictException: <p>A conflict has occurred.</p>
capo_ssm_sap.errors.internal_server_exception.InternalServerException: <p>An internal error has occurred.</p>
capo_ssm_sap.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource is not available.</p>
capo_ssm_sap.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service. </p>
capo_ssm_sap.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_ssm_sap.types.stop_application_input.StopApplicationInput]",
) -> OperationResponse[
"capo_ssm_sap.types.stop_application_output.StopApplicationOutput"
]:
import capo_ssm_sap._operations.ssm_sap.stop_application
output, http_response = (
capo_ssm_sap._operations.ssm_sap.stop_application.stop_application(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopApplication")
)
input_: capo_ssm_sap.types.stop_application_input.StopApplicationInput = {
"application_id": application_id
}
if stop_connected_entity is not None:
input_["stop_connected_entity"] = stop_connected_entity
if include_ec2_instance_shutdown is not None:
input_["include_ec2_instance_shutdown"] = include_ec2_instance_shutdown
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|