uptime_service.proto 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.monitoring.v3;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/monitoring/v3/uptime.proto";
  21. import "google/protobuf/empty.proto";
  22. import "google/protobuf/field_mask.proto";
  23. option csharp_namespace = "Google.Cloud.Monitoring.V3";
  24. option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "UptimeServiceProto";
  27. option java_package = "com.google.monitoring.v3";
  28. option php_namespace = "Google\\Cloud\\Monitoring\\V3";
  29. option ruby_package = "Google::Cloud::Monitoring::V3";
  30. // The UptimeCheckService API is used to manage (list, create, delete, edit)
  31. // Uptime check configurations in the Stackdriver Monitoring product. An Uptime
  32. // check is a piece of configuration that determines which resources and
  33. // services to monitor for availability. These configurations can also be
  34. // configured interactively by navigating to the [Cloud Console]
  35. // (http://console.cloud.google.com), selecting the appropriate project,
  36. // clicking on "Monitoring" on the left-hand side to navigate to Stackdriver,
  37. // and then clicking on "Uptime".
  38. service UptimeCheckService {
  39. option (google.api.default_host) = "monitoring.googleapis.com";
  40. option (google.api.oauth_scopes) =
  41. "https://www.googleapis.com/auth/cloud-platform,"
  42. "https://www.googleapis.com/auth/monitoring,"
  43. "https://www.googleapis.com/auth/monitoring.read";
  44. // Lists the existing valid Uptime check configurations for the project
  45. // (leaving out any invalid configurations).
  46. rpc ListUptimeCheckConfigs(ListUptimeCheckConfigsRequest)
  47. returns (ListUptimeCheckConfigsResponse) {
  48. option (google.api.http) = {
  49. get: "/v3/{parent=projects/*}/uptimeCheckConfigs"
  50. };
  51. option (google.api.method_signature) = "parent";
  52. }
  53. // Gets a single Uptime check configuration.
  54. rpc GetUptimeCheckConfig(GetUptimeCheckConfigRequest)
  55. returns (UptimeCheckConfig) {
  56. option (google.api.http) = {
  57. get: "/v3/{name=projects/*/uptimeCheckConfigs/*}"
  58. };
  59. option (google.api.method_signature) = "name";
  60. }
  61. // Creates a new Uptime check configuration.
  62. rpc CreateUptimeCheckConfig(CreateUptimeCheckConfigRequest)
  63. returns (UptimeCheckConfig) {
  64. option (google.api.http) = {
  65. post: "/v3/{parent=projects/*}/uptimeCheckConfigs"
  66. body: "uptime_check_config"
  67. };
  68. option (google.api.method_signature) = "parent,uptime_check_config";
  69. }
  70. // Updates an Uptime check configuration. You can either replace the entire
  71. // configuration with a new one or replace only certain fields in the current
  72. // configuration by specifying the fields to be updated via `updateMask`.
  73. // Returns the updated configuration.
  74. rpc UpdateUptimeCheckConfig(UpdateUptimeCheckConfigRequest)
  75. returns (UptimeCheckConfig) {
  76. option (google.api.http) = {
  77. patch: "/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}"
  78. body: "uptime_check_config"
  79. };
  80. option (google.api.method_signature) = "uptime_check_config";
  81. }
  82. // Deletes an Uptime check configuration. Note that this method will fail
  83. // if the Uptime check configuration is referenced by an alert policy or
  84. // other dependent configs that would be rendered invalid by the deletion.
  85. rpc DeleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest)
  86. returns (google.protobuf.Empty) {
  87. option (google.api.http) = {
  88. delete: "/v3/{name=projects/*/uptimeCheckConfigs/*}"
  89. };
  90. option (google.api.method_signature) = "name";
  91. }
  92. // Returns the list of IP addresses that checkers run from
  93. rpc ListUptimeCheckIps(ListUptimeCheckIpsRequest)
  94. returns (ListUptimeCheckIpsResponse) {
  95. option (google.api.http) = {
  96. get: "/v3/uptimeCheckIps"
  97. };
  98. }
  99. }
  100. // The protocol for the `ListUptimeCheckConfigs` request.
  101. message ListUptimeCheckConfigsRequest {
  102. // Required. The
  103. // [project](https://cloud.google.com/monitoring/api/v3#project_name) whose
  104. // Uptime check configurations are listed. The format is:
  105. //
  106. // projects/[PROJECT_ID_OR_NUMBER]
  107. string parent = 1 [
  108. (google.api.field_behavior) = REQUIRED,
  109. (google.api.resource_reference) = {
  110. child_type: "monitoring.googleapis.com/UptimeCheckConfig"
  111. }
  112. ];
  113. // The maximum number of results to return in a single response. The server
  114. // may further constrain the maximum number of results returned in a single
  115. // page. If the page_size is <=0, the server will decide the number of results
  116. // to be returned.
  117. int32 page_size = 3;
  118. // If this field is not empty then it must contain the `nextPageToken` value
  119. // returned by a previous call to this method. Using this field causes the
  120. // method to return more results from the previous method call.
  121. string page_token = 4;
  122. }
  123. // The protocol for the `ListUptimeCheckConfigs` response.
  124. message ListUptimeCheckConfigsResponse {
  125. // The returned Uptime check configurations.
  126. repeated UptimeCheckConfig uptime_check_configs = 1;
  127. // This field represents the pagination token to retrieve the next page of
  128. // results. If the value is empty, it means no further results for the
  129. // request. To retrieve the next page of results, the value of the
  130. // next_page_token is passed to the subsequent List method call (in the
  131. // request message's page_token field).
  132. string next_page_token = 2;
  133. // The total number of Uptime check configurations for the project,
  134. // irrespective of any pagination.
  135. int32 total_size = 3;
  136. }
  137. // The protocol for the `GetUptimeCheckConfig` request.
  138. message GetUptimeCheckConfigRequest {
  139. // Required. The Uptime check configuration to retrieve. The format is:
  140. //
  141. // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
  142. string name = 1 [
  143. (google.api.field_behavior) = REQUIRED,
  144. (google.api.resource_reference) = {
  145. type: "monitoring.googleapis.com/UptimeCheckConfig"
  146. }
  147. ];
  148. }
  149. // The protocol for the `CreateUptimeCheckConfig` request.
  150. message CreateUptimeCheckConfigRequest {
  151. // Required. The
  152. // [project](https://cloud.google.com/monitoring/api/v3#project_name) in which
  153. // to create the Uptime check. The format is:
  154. //
  155. // projects/[PROJECT_ID_OR_NUMBER]
  156. string parent = 1 [
  157. (google.api.field_behavior) = REQUIRED,
  158. (google.api.resource_reference) = {
  159. child_type: "monitoring.googleapis.com/UptimeCheckConfig"
  160. }
  161. ];
  162. // Required. The new Uptime check configuration.
  163. UptimeCheckConfig uptime_check_config = 2
  164. [(google.api.field_behavior) = REQUIRED];
  165. }
  166. // The protocol for the `UpdateUptimeCheckConfig` request.
  167. message UpdateUptimeCheckConfigRequest {
  168. // Optional. If present, only the listed fields in the current Uptime check
  169. // configuration are updated with values from the new configuration. If this
  170. // field is empty, then the current configuration is completely replaced with
  171. // the new configuration.
  172. google.protobuf.FieldMask update_mask = 2;
  173. // Required. If an `updateMask` has been specified, this field gives
  174. // the values for the set of fields mentioned in the `updateMask`. If an
  175. // `updateMask` has not been given, this Uptime check configuration replaces
  176. // the current configuration. If a field is mentioned in `updateMask` but
  177. // the corresonding field is omitted in this partial Uptime check
  178. // configuration, it has the effect of deleting/clearing the field from the
  179. // configuration on the server.
  180. //
  181. // The following fields can be updated: `display_name`,
  182. // `http_check`, `tcp_check`, `timeout`, `content_matchers`, and
  183. // `selected_regions`.
  184. UptimeCheckConfig uptime_check_config = 3
  185. [(google.api.field_behavior) = REQUIRED];
  186. }
  187. // The protocol for the `DeleteUptimeCheckConfig` request.
  188. message DeleteUptimeCheckConfigRequest {
  189. // Required. The Uptime check configuration to delete. The format is:
  190. //
  191. // projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID]
  192. string name = 1 [
  193. (google.api.field_behavior) = REQUIRED,
  194. (google.api.resource_reference) = {
  195. type: "monitoring.googleapis.com/UptimeCheckConfig"
  196. }
  197. ];
  198. }
  199. // The protocol for the `ListUptimeCheckIps` request.
  200. message ListUptimeCheckIpsRequest {
  201. // The maximum number of results to return in a single response. The server
  202. // may further constrain the maximum number of results returned in a single
  203. // page. If the page_size is <=0, the server will decide the number of results
  204. // to be returned.
  205. // NOTE: this field is not yet implemented
  206. int32 page_size = 2;
  207. // If this field is not empty then it must contain the `nextPageToken` value
  208. // returned by a previous call to this method. Using this field causes the
  209. // method to return more results from the previous method call.
  210. // NOTE: this field is not yet implemented
  211. string page_token = 3;
  212. }
  213. // The protocol for the `ListUptimeCheckIps` response.
  214. message ListUptimeCheckIpsResponse {
  215. // The returned list of IP addresses (including region and location) that the
  216. // checkers run from.
  217. repeated UptimeCheckIp uptime_check_ips = 1;
  218. // This field represents the pagination token to retrieve the next page of
  219. // results. If the value is empty, it means no further results for the
  220. // request. To retrieve the next page of results, the value of the
  221. // next_page_token is passed to the subsequent List method call (in the
  222. // request message's page_token field).
  223. // NOTE: this field is not yet implemented
  224. string next_page_token = 2;
  225. }