uptime_service.proto 9.8 KB

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