Deactivates the existing flow. For on-demand flows, this operation returns an unsupportedOperationException error message. For schedule and event-triggered flows, this operation deactivates the flow.
Parameters:
-
flow_name
(FlowName)
–
The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.
Raises:
-
ConflictException
–
There was a conflict when processing the request (for example, a flow with the given name already exists within the account. Check for conflicting resource names and try again.
-
InternalServerException
–
An internal service error occurred during the processing of your request. Try again later.
-
ResourceNotFoundException
–
The resource specified in the request (such as the source or destination connector profile) is not found.
-
UnsupportedOperationException
–
The requested operation is not supported for the current flow.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_appflow/_services/async_appflow.py
| async def stop_flow(
self,
flow_name: "capo_appflow.types.flow_name.FlowName",
*,
config_overrides: Optional[AsyncAppflowClientConfig] = None,
) -> "capo_appflow.types.stop_flow_response.StopFlowResponse":
"""<p> Deactivates the existing flow. For on-demand flows, this operation returns an <code>unsupportedOperationException</code> error message. For schedule and event-triggered flows, this operation deactivates the flow. </p>
Args:
flow_name: <p> The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only. </p>
Raises:
capo_appflow.errors.conflict_exception.ConflictException: <p> There was a conflict when processing the request (for example, a flow with the given name already exists within the account. Check for conflicting resource names and try again. </p>
capo_appflow.errors.internal_server_exception.InternalServerException: <p> An internal service error occurred during the processing of your request. Try again later. </p>
capo_appflow.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource specified in the request (such as the source or destination connector profile) is not found. </p>
capo_appflow.errors.unsupported_operation_exception.UnsupportedOperationException: <p> The requested operation is not supported for the current flow. </p>
capo_appflow.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_appflow.types.stop_flow_request.StopFlowRequest]",
) -> AsyncOperationResponse[
"capo_appflow.types.stop_flow_response.StopFlowResponse"
]:
import capo_appflow._operations.sandstone_configuration_service_lambda.stop_flow
(
output,
http_response,
) = await capo_appflow._operations.sandstone_configuration_service_lambda.stop_flow.async_stop_flow(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("StopFlow")
)
input_: capo_appflow.types.stop_flow_request.StopFlowRequest = {
"flow_name": flow_name
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|