@@ -799,13 +799,21 @@ def terminate_orchestration(self, instance_id: str, *,
799799 )
800800 self ._stub .TerminateInstance (req )
801801
802- def suspend_orchestration (self , instance_id : str ) -> None :
803- req = pb .SuspendRequest (instanceId = instance_id )
802+ def suspend_orchestration (self , instance_id : str , * ,
803+ reason : str | None = None ) -> None :
804+ req = pb .SuspendRequest (
805+ instanceId = instance_id ,
806+ reason = helpers .get_string_value (reason ),
807+ )
804808 self ._logger .info (f"Suspending instance '{ instance_id } '." )
805809 self ._stub .SuspendInstance (req )
806810
807- def resume_orchestration (self , instance_id : str ) -> None :
808- req = pb .ResumeRequest (instanceId = instance_id )
811+ def resume_orchestration (self , instance_id : str , * ,
812+ reason : str | None = None ) -> None :
813+ req = pb .ResumeRequest (
814+ instanceId = instance_id ,
815+ reason = helpers .get_string_value (reason ),
816+ )
809817 self ._logger .info (f"Resuming instance '{ instance_id } '." )
810818 self ._stub .ResumeInstance (req )
811819
@@ -1335,13 +1343,21 @@ async def terminate_orchestration(self, instance_id: str, *,
13351343 )
13361344 await self ._get_stub ().TerminateInstance (req )
13371345
1338- async def suspend_orchestration (self , instance_id : str ) -> None :
1339- req = pb .SuspendRequest (instanceId = instance_id )
1346+ async def suspend_orchestration (self , instance_id : str , * ,
1347+ reason : str | None = None ) -> None :
1348+ req = pb .SuspendRequest (
1349+ instanceId = instance_id ,
1350+ reason = helpers .get_string_value (reason ),
1351+ )
13401352 self ._logger .info (f"Suspending instance '{ instance_id } '." )
13411353 await self ._get_stub ().SuspendInstance (req )
13421354
1343- async def resume_orchestration (self , instance_id : str ) -> None :
1344- req = pb .ResumeRequest (instanceId = instance_id )
1355+ async def resume_orchestration (self , instance_id : str , * ,
1356+ reason : str | None = None ) -> None :
1357+ req = pb .ResumeRequest (
1358+ instanceId = instance_id ,
1359+ reason = helpers .get_string_value (reason ),
1360+ )
13451361 self ._logger .info (f"Resuming instance '{ instance_id } '." )
13461362 await self ._get_stub ().ResumeInstance (req )
13471363
0 commit comments