@@ -14,7 +14,7 @@ use models::{
1414 DaemonInfo , HealthResponse , ListDirectoryResponse , ListProcessesResponse ,
1515 ListSandboxPoolsResponse , ListSandboxesResponse , ListSnapshotsResponse , OutputEvent ,
1616 OutputResponse , ProcessInfo , SandboxInfo , SandboxPoolInfo , SandboxPoolRequest ,
17- SendSignalResponse , SnapshotInfo ,
17+ SendSignalResponse , SnapshotInfo , UpdateSandboxRequest ,
1818} ;
1919
2020/// A client for managing sandbox lifecycle, pool, and snapshot APIs.
@@ -91,6 +91,19 @@ impl SandboxesClient {
9191 Ok ( list. sandboxes )
9292 }
9393
94+ pub async fn update (
95+ & self ,
96+ sandbox_id : & str ,
97+ request : & UpdateSandboxRequest ,
98+ ) -> Result < SandboxInfo , SdkError > {
99+ let uri = self . endpoint ( & format ! ( "sandboxes/{sandbox_id}" ) ) ;
100+ let req = self
101+ . client
102+ . build_post_json_request ( Method :: PATCH , & uri, request) ?;
103+ let resp = self . client . execute ( req) . await ?;
104+ Self :: parse_json ( resp) . await
105+ }
106+
94107 pub async fn delete ( & self , sandbox_id : & str ) -> Result < ( ) , SdkError > {
95108 let uri = self . endpoint ( & format ! ( "sandboxes/{sandbox_id}" ) ) ;
96109 let req = self . client . request ( Method :: DELETE , & uri) . build ( ) ?;
0 commit comments