DemoSnapshotAuditPreset.php 989 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. include 'DemoBase.php';
  3. global $client;
  4. $body = [
  5. 'Vhost' => 'vhost',
  6. 'App' => 'app',
  7. 'Bucket' => 'bb',
  8. 'Interval' => 2.3,
  9. 'StorageStrategy' => 1,
  10. 'Label' => ['301'],
  11. 'CallbackDetailList' => [
  12. [
  13. 'URL' => 'http://xx',
  14. 'CallbackType' => 'http'
  15. ]
  16. ],
  17. 'StorageDir' => '/xx'
  18. ];
  19. $response = $client->createSnapshotAuditPreset(['json' => $body]);
  20. echo $response;
  21. echo '<br>';
  22. $body = [
  23. 'PresetName' => 'presetName',
  24. 'Vhost' => 'vhost',
  25. 'App' => 'app',
  26. 'Bucket' => 'bb2'
  27. ];
  28. $response = $client->updateSnapshotAuditPreset(['json' => $body]);
  29. echo $response;
  30. echo '<br>';
  31. $body = [
  32. 'Vhost' => 'vhost',
  33. 'App' => 'app',
  34. 'PresetName' => 'presetName',
  35. ];
  36. $response = $client->deleteSnapshotAuditPreset(['json' => $body]);
  37. echo $response;
  38. echo '<br>';
  39. $body = [
  40. 'Vhost' => 'vhost',
  41. ];
  42. $response = $client->listVhostSnapshotAuditPreset(['json' => $body]);
  43. echo $response;
  44. echo '<br>';