@@ -786,13 +786,21 @@ def terminate_orchestration(self, instance_id: str, *,
786786 )
787787 self ._stub .TerminateInstance (req )
788788
789- def suspend_orchestration (self , instance_id : str ) -> None :
790- req = pb .SuspendRequest (instanceId = instance_id )
789+ def suspend_orchestration (self , instance_id : str , * ,
790+ reason : str | None = None ) -> None :
791+ req = pb .SuspendRequest (
792+ instanceId = instance_id ,
793+ reason = helpers .get_string_value (reason ),
794+ )
791795 self ._logger .info (f"Suspending instance '{ instance_id } '." )
792796 self ._stub .SuspendInstance (req )
793797
794- def resume_orchestration (self , instance_id : str ) -> None :
795- req = pb .ResumeRequest (instanceId = instance_id )
798+ def resume_orchestration (self , instance_id : str , * ,
799+ reason : str | None = None ) -> None :
800+ req = pb .ResumeRequest (
801+ instanceId = instance_id ,
802+ reason = helpers .get_string_value (reason ),
803+ )
796804 self ._logger .info (f"Resuming instance '{ instance_id } '." )
797805 self ._stub .ResumeInstance (req )
798806
@@ -1320,13 +1328,21 @@ async def terminate_orchestration(self, instance_id: str, *,
13201328 )
13211329 await self ._get_stub ().TerminateInstance (req )
13221330
1323- async def suspend_orchestration (self , instance_id : str ) -> None :
1324- req = pb .SuspendRequest (instanceId = instance_id )
1331+ async def suspend_orchestration (self , instance_id : str , * ,
1332+ reason : str | None = None ) -> None :
1333+ req = pb .SuspendRequest (
1334+ instanceId = instance_id ,
1335+ reason = helpers .get_string_value (reason ),
1336+ )
13251337 self ._logger .info (f"Suspending instance '{ instance_id } '." )
13261338 await self ._get_stub ().SuspendInstance (req )
13271339
1328- async def resume_orchestration (self , instance_id : str ) -> None :
1329- req = pb .ResumeRequest (instanceId = instance_id )
1340+ async def resume_orchestration (self , instance_id : str , * ,
1341+ reason : str | None = None ) -> None :
1342+ req = pb .ResumeRequest (
1343+ instanceId = instance_id ,
1344+ reason = helpers .get_string_value (reason ),
1345+ )
13301346 self ._logger .info (f"Resuming instance '{ instance_id } '." )
13311347 await self ._get_stub ().ResumeInstance (req )
13321348
0 commit comments