暫無描述

CloudMonitoring.php 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. /**
  18. * Service definition for CloudMonitoring (v2beta2).
  19. *
  20. * <p>
  21. * Accesses Google Cloud Monitoring data.</p>
  22. *
  23. * <p>
  24. * For more information about this service, see the API
  25. * <a href="https://cloud.google.com/monitoring/v2beta2/" target="_blank">Documentation</a>
  26. * </p>
  27. *
  28. * @author Google, Inc.
  29. */
  30. class Google_Service_CloudMonitoring extends Google_Service
  31. {
  32. /** View and manage your data across Google Cloud Platform services. */
  33. const CLOUD_PLATFORM =
  34. "https://www.googleapis.com/auth/cloud-platform";
  35. /** View and write monitoring data for all of your Google and third-party Cloud and API projects. */
  36. const MONITORING =
  37. "https://www.googleapis.com/auth/monitoring";
  38. public $metricDescriptors;
  39. public $timeseries;
  40. public $timeseriesDescriptors;
  41. /**
  42. * Constructs the internal representation of the CloudMonitoring service.
  43. *
  44. * @param Google_Client $client
  45. */
  46. public function __construct(Google_Client $client)
  47. {
  48. parent::__construct($client);
  49. $this->rootUrl = 'https://www.googleapis.com/';
  50. $this->servicePath = 'cloudmonitoring/v2beta2/projects/';
  51. $this->version = 'v2beta2';
  52. $this->serviceName = 'cloudmonitoring';
  53. $this->metricDescriptors = new Google_Service_CloudMonitoring_Resource_MetricDescriptors(
  54. $this,
  55. $this->serviceName,
  56. 'metricDescriptors',
  57. array(
  58. 'methods' => array(
  59. 'create' => array(
  60. 'path' => '{project}/metricDescriptors',
  61. 'httpMethod' => 'POST',
  62. 'parameters' => array(
  63. 'project' => array(
  64. 'location' => 'path',
  65. 'type' => 'string',
  66. 'required' => true,
  67. ),
  68. ),
  69. ),'delete' => array(
  70. 'path' => '{project}/metricDescriptors/{metric}',
  71. 'httpMethod' => 'DELETE',
  72. 'parameters' => array(
  73. 'project' => array(
  74. 'location' => 'path',
  75. 'type' => 'string',
  76. 'required' => true,
  77. ),
  78. 'metric' => array(
  79. 'location' => 'path',
  80. 'type' => 'string',
  81. 'required' => true,
  82. ),
  83. ),
  84. ),'list' => array(
  85. 'path' => '{project}/metricDescriptors',
  86. 'httpMethod' => 'GET',
  87. 'parameters' => array(
  88. 'project' => array(
  89. 'location' => 'path',
  90. 'type' => 'string',
  91. 'required' => true,
  92. ),
  93. 'count' => array(
  94. 'location' => 'query',
  95. 'type' => 'integer',
  96. ),
  97. 'pageToken' => array(
  98. 'location' => 'query',
  99. 'type' => 'string',
  100. ),
  101. 'query' => array(
  102. 'location' => 'query',
  103. 'type' => 'string',
  104. ),
  105. ),
  106. ),
  107. )
  108. )
  109. );
  110. $this->timeseries = new Google_Service_CloudMonitoring_Resource_Timeseries(
  111. $this,
  112. $this->serviceName,
  113. 'timeseries',
  114. array(
  115. 'methods' => array(
  116. 'list' => array(
  117. 'path' => '{project}/timeseries/{metric}',
  118. 'httpMethod' => 'GET',
  119. 'parameters' => array(
  120. 'project' => array(
  121. 'location' => 'path',
  122. 'type' => 'string',
  123. 'required' => true,
  124. ),
  125. 'metric' => array(
  126. 'location' => 'path',
  127. 'type' => 'string',
  128. 'required' => true,
  129. ),
  130. 'youngest' => array(
  131. 'location' => 'query',
  132. 'type' => 'string',
  133. 'required' => true,
  134. ),
  135. 'aggregator' => array(
  136. 'location' => 'query',
  137. 'type' => 'string',
  138. ),
  139. 'count' => array(
  140. 'location' => 'query',
  141. 'type' => 'integer',
  142. ),
  143. 'labels' => array(
  144. 'location' => 'query',
  145. 'type' => 'string',
  146. 'repeated' => true,
  147. ),
  148. 'oldest' => array(
  149. 'location' => 'query',
  150. 'type' => 'string',
  151. ),
  152. 'pageToken' => array(
  153. 'location' => 'query',
  154. 'type' => 'string',
  155. ),
  156. 'timespan' => array(
  157. 'location' => 'query',
  158. 'type' => 'string',
  159. ),
  160. 'window' => array(
  161. 'location' => 'query',
  162. 'type' => 'string',
  163. ),
  164. ),
  165. ),'write' => array(
  166. 'path' => '{project}/timeseries:write',
  167. 'httpMethod' => 'POST',
  168. 'parameters' => array(
  169. 'project' => array(
  170. 'location' => 'path',
  171. 'type' => 'string',
  172. 'required' => true,
  173. ),
  174. ),
  175. ),
  176. )
  177. )
  178. );
  179. $this->timeseriesDescriptors = new Google_Service_CloudMonitoring_Resource_TimeseriesDescriptors(
  180. $this,
  181. $this->serviceName,
  182. 'timeseriesDescriptors',
  183. array(
  184. 'methods' => array(
  185. 'list' => array(
  186. 'path' => '{project}/timeseriesDescriptors/{metric}',
  187. 'httpMethod' => 'GET',
  188. 'parameters' => array(
  189. 'project' => array(
  190. 'location' => 'path',
  191. 'type' => 'string',
  192. 'required' => true,
  193. ),
  194. 'metric' => array(
  195. 'location' => 'path',
  196. 'type' => 'string',
  197. 'required' => true,
  198. ),
  199. 'youngest' => array(
  200. 'location' => 'query',
  201. 'type' => 'string',
  202. 'required' => true,
  203. ),
  204. 'aggregator' => array(
  205. 'location' => 'query',
  206. 'type' => 'string',
  207. ),
  208. 'count' => array(
  209. 'location' => 'query',
  210. 'type' => 'integer',
  211. ),
  212. 'labels' => array(
  213. 'location' => 'query',
  214. 'type' => 'string',
  215. 'repeated' => true,
  216. ),
  217. 'oldest' => array(
  218. 'location' => 'query',
  219. 'type' => 'string',
  220. ),
  221. 'pageToken' => array(
  222. 'location' => 'query',
  223. 'type' => 'string',
  224. ),
  225. 'timespan' => array(
  226. 'location' => 'query',
  227. 'type' => 'string',
  228. ),
  229. 'window' => array(
  230. 'location' => 'query',
  231. 'type' => 'string',
  232. ),
  233. ),
  234. ),
  235. )
  236. )
  237. );
  238. }
  239. }