DemoSnapshotPreset.php 903 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. include 'DemoBase.php';
  3. global $client;
  4. $body = [
  5. 'Vhost' => 'vhost',
  6. 'App' => 'app',
  7. 'Bucket' => 'bb',
  8. 'SnapshotFormat' => 'jpeg',
  9. 'SnapshotObject' => 'xx/xx',
  10. 'StorageDir' => '/xx'
  11. ];
  12. $response = $client->createSnapshotPreset(['json' => $body]);
  13. echo $response;
  14. echo '<br>';
  15. $body = [
  16. 'Preset' => 'preset',
  17. 'Vhost' => 'vhost',
  18. 'App' => 'app',
  19. 'Bucket' => 'bb2',
  20. 'SnapshotFormat' => 'jpeg',
  21. 'SnapshotObject' => 'xx/xx',
  22. 'StorageDir' => '/xx'
  23. ];
  24. $response = $client->updateSnapshotPreset(['json' => $body]);
  25. echo $response;
  26. echo '<br>';
  27. $body = [
  28. 'Vhost' => 'vhost',
  29. 'App' => 'app',
  30. 'Preset' => 'xx',
  31. ];
  32. $response = $client->deleteSnapshotPreset(['json' => $body]);
  33. echo $response;
  34. echo '<br>';
  35. $body = [
  36. 'Vhost' => 'vhost',
  37. ];
  38. $response = $client->listVhostSnapshotPreset(['json' => $body]);
  39. echo $response;
  40. echo '<br>';