File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -681,14 +681,16 @@ def start(self):
681681 raise Exception ('Cluster operation failed : %s' % (json .dumps (resp .get ('messages' , {}).get ('messages' , {}))))
682682 return resp
683683
684- def stop (self ):
684+ def stop (self , terminate = True ):
685685 """
686686 Stops or detaches the cluster
687687
688688 This operation is only valid for a managed cluster.
689+ :param boolean terminate: whether to delete the cluster after stopping it
689690 """
690691 resp = self .client ._perform_json (
691- "POST" , "/admin/clusters/%s/actions/stop" % (self .cluster_id ))
692+ "POST" , "/admin/clusters/%s/actions/stop" % (self .cluster_id ),
693+ params = {'terminate' :terminate })
692694 if resp is None :
693695 raise Exception ('Env update returned no data' )
694696 if resp .get ('messages' , {}).get ('error' , False ):
You can’t perform that action at this time.
0 commit comments