check_error.proto 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.api.servicecontrol.v1;
  16. import "google/rpc/status.proto";
  17. option cc_enable_arenas = true;
  18. option csharp_namespace = "Google.Cloud.ServiceControl.V1";
  19. option go_package = "google.golang.org/genproto/googleapis/api/servicecontrol/v1;servicecontrol";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "CheckErrorProto";
  22. option java_package = "com.google.api.servicecontrol.v1";
  23. option php_namespace = "Google\\Cloud\\ServiceControl\\V1";
  24. option ruby_package = "Google::Cloud::ServiceControl::V1";
  25. // Defines the errors to be returned in
  26. // [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors].
  27. message CheckError {
  28. // Error codes for Check responses.
  29. enum Code {
  30. // This is never used in `CheckResponse`.
  31. ERROR_CODE_UNSPECIFIED = 0;
  32. // The consumer's project id, network container, or resource container was
  33. // not found. Same as [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND].
  34. NOT_FOUND = 5;
  35. // The consumer doesn't have access to the specified resource.
  36. // Same as [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
  37. PERMISSION_DENIED = 7;
  38. // Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED].
  39. RESOURCE_EXHAUSTED = 8;
  40. // The consumer hasn't activated the service.
  41. SERVICE_NOT_ACTIVATED = 104;
  42. // The consumer cannot access the service because billing is disabled.
  43. BILLING_DISABLED = 107;
  44. // The consumer's project has been marked as deleted (soft deletion).
  45. PROJECT_DELETED = 108;
  46. // The consumer's project number or id does not represent a valid project.
  47. PROJECT_INVALID = 114;
  48. // The input consumer info does not represent a valid consumer folder or
  49. // organization.
  50. CONSUMER_INVALID = 125;
  51. // The IP address of the consumer is invalid for the specific consumer
  52. // project.
  53. IP_ADDRESS_BLOCKED = 109;
  54. // The referer address of the consumer request is invalid for the specific
  55. // consumer project.
  56. REFERER_BLOCKED = 110;
  57. // The client application of the consumer request is invalid for the
  58. // specific consumer project.
  59. CLIENT_APP_BLOCKED = 111;
  60. // The API targeted by this request is invalid for the specified consumer
  61. // project.
  62. API_TARGET_BLOCKED = 122;
  63. // The consumer's API key is invalid.
  64. API_KEY_INVALID = 105;
  65. // The consumer's API Key has expired.
  66. API_KEY_EXPIRED = 112;
  67. // The consumer's API Key was not found in config record.
  68. API_KEY_NOT_FOUND = 113;
  69. // The credential in the request can not be verified.
  70. INVALID_CREDENTIAL = 123;
  71. // The backend server for looking up project id/number is unavailable.
  72. NAMESPACE_LOOKUP_UNAVAILABLE = 300;
  73. // The backend server for checking service status is unavailable.
  74. SERVICE_STATUS_UNAVAILABLE = 301;
  75. // The backend server for checking billing status is unavailable.
  76. BILLING_STATUS_UNAVAILABLE = 302;
  77. // Cloud Resource Manager backend server is unavailable.
  78. CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305;
  79. }
  80. // The error code.
  81. Code code = 1;
  82. // Subject to whom this error applies. See the specific code enum for more
  83. // details on this field. For example:
  84. //
  85. // - "project:<project-id or project-number>"
  86. // - "folder:<folder-id>"
  87. // - "organization:<organization-id>"
  88. string subject = 4;
  89. // Free-form text providing details on the error cause of the error.
  90. string detail = 2;
  91. // Contains public information about the check error. If available,
  92. // `status.code` will be non zero and client can propagate it out as public
  93. // error.
  94. google.rpc.Status status = 3;
  95. }