endpoint.proto 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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.cloud.aiplatform.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/aiplatform/v1beta1/encryption_spec.proto";
  19. import "google/cloud/aiplatform/v1beta1/explanation.proto";
  20. import "google/cloud/aiplatform/v1beta1/machine_resources.proto";
  21. import "google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto";
  22. import "google/protobuf/timestamp.proto";
  23. import "google/api/annotations.proto";
  24. option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "EndpointProto";
  28. option java_package = "com.google.cloud.aiplatform.v1beta1";
  29. option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
  30. option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
  31. // Models are deployed into it, and afterwards Endpoint is called to obtain
  32. // predictions and explanations.
  33. message Endpoint {
  34. option (google.api.resource) = {
  35. type: "aiplatform.googleapis.com/Endpoint"
  36. pattern: "projects/{project}/locations/{location}/endpoints/{endpoint}"
  37. };
  38. // Output only. The resource name of the Endpoint.
  39. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  40. // Required. The display name of the Endpoint.
  41. // The name can be up to 128 characters long and can be consist of any UTF-8
  42. // characters.
  43. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  44. // The description of the Endpoint.
  45. string description = 3;
  46. // Output only. The models deployed in this Endpoint.
  47. // To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel] and
  48. // [EndpointService.UndeployModel][google.cloud.aiplatform.v1beta1.EndpointService.UndeployModel] respectively.
  49. repeated DeployedModel deployed_models = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  50. // A map from a DeployedModel's ID to the percentage of this Endpoint's
  51. // traffic that should be forwarded to that DeployedModel.
  52. //
  53. // If a DeployedModel's ID is not listed in this map, then it receives no
  54. // traffic.
  55. //
  56. // The traffic percentage values must add up to 100, or map must be empty if
  57. // the Endpoint is to not accept any traffic at a moment.
  58. map<string, int32> traffic_split = 5;
  59. // Used to perform consistent read-modify-write updates. If not set, a blind
  60. // "overwrite" update happens.
  61. string etag = 6;
  62. // The labels with user-defined metadata to organize your Endpoints.
  63. //
  64. // Label keys and values can be no longer than 64 characters
  65. // (Unicode codepoints), can only contain lowercase letters, numeric
  66. // characters, underscores and dashes. International characters are allowed.
  67. //
  68. // See https://goo.gl/xmQnxf for more information and examples of labels.
  69. map<string, string> labels = 7;
  70. // Output only. Timestamp when this Endpoint was created.
  71. google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  72. // Output only. Timestamp when this Endpoint was last updated.
  73. google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  74. // Customer-managed encryption key spec for an Endpoint. If set, this
  75. // Endpoint and all sub-resources of this Endpoint will be secured by
  76. // this key.
  77. EncryptionSpec encryption_spec = 10;
  78. // The full name of the Google Compute Engine
  79. // [network](/compute/docs/networks-and-firewalls#networks) to which the
  80. // Endpoint should be peered.
  81. //
  82. // Private services access must already be configured for the network. If left
  83. // unspecified, the Endpoint is not peered with any network.
  84. //
  85. // [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert):
  86. // projects/{project}/global/networks/{network}.
  87. // Where {project} is a project number, as in '12345', and {network} is
  88. // network name.
  89. string network = 13 [(google.api.resource_reference) = {
  90. type: "compute.googleapis.com/Network"
  91. }];
  92. }
  93. // A deployment of a Model. Endpoints contain one or more DeployedModels.
  94. message DeployedModel {
  95. // The prediction (for example, the machine) resources that the DeployedModel
  96. // uses. The user is billed for the resources (at least their minimal amount)
  97. // even if the DeployedModel receives no traffic.
  98. // Not all Models support all resources types. See
  99. // [Model.supported_deployment_resources_types][google.cloud.aiplatform.v1beta1.Model.supported_deployment_resources_types].
  100. oneof prediction_resources {
  101. // A description of resources that are dedicated to the DeployedModel, and
  102. // that need a higher degree of manual configuration.
  103. DedicatedResources dedicated_resources = 7;
  104. // A description of resources that to large degree are decided by AI
  105. // Platform, and require only a modest additional configuration.
  106. AutomaticResources automatic_resources = 8;
  107. }
  108. // Output only. The ID of the DeployedModel.
  109. string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  110. // Required. The name of the Model that this is the deployment of. Note that the Model
  111. // may be in a different location than the DeployedModel's Endpoint.
  112. string model = 2 [
  113. (google.api.field_behavior) = REQUIRED,
  114. (google.api.resource_reference) = {
  115. type: "aiplatform.googleapis.com/Model"
  116. }
  117. ];
  118. // The display name of the DeployedModel. If not provided upon creation,
  119. // the Model's display_name is used.
  120. string display_name = 3;
  121. // Output only. Timestamp when the DeployedModel was created.
  122. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  123. // Explanation configuration for this DeployedModel.
  124. //
  125. // When deploying a Model using [EndpointService.DeployModel][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel], this value
  126. // overrides the value of [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec]. All fields of
  127. // [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] are optional in the request. If a field of
  128. // [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] is not populated, the value of the same field of
  129. // [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] is inherited. If the corresponding
  130. // [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] is not populated, all fields of the
  131. // [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] will be used for the explanation configuration.
  132. ExplanationSpec explanation_spec = 9;
  133. // The service account that the DeployedModel's container runs as. Specify the
  134. // email address of the service account. If this service account is not
  135. // specified, the container runs as a service account that doesn't have access
  136. // to the resource project.
  137. //
  138. // Users deploying the Model must have the `iam.serviceAccounts.actAs`
  139. // permission on this service account.
  140. string service_account = 11;
  141. // If true, the container of the DeployedModel instances will send `stderr`
  142. // and `stdout` streams to Stackdriver Logging.
  143. //
  144. // Only supported for custom-trained Models and AutoML Tabular Models.
  145. bool enable_container_logging = 12;
  146. // These logs are like standard server access logs, containing
  147. // information like timestamp and latency for each prediction request.
  148. //
  149. // Note that Stackdriver logs may incur a cost, especially if your project
  150. // receives prediction requests at a high queries per second rate (QPS).
  151. // Estimate your costs before enabling this option.
  152. bool enable_access_logging = 13;
  153. // Output only. Provide paths for users to send predict/explain/health requests directly to
  154. // the deployed model services running on Cloud via private services access.
  155. // This field is populated if [network][google.cloud.aiplatform.v1beta1.Endpoint.network] is configured.
  156. PrivateEndpoints private_endpoints = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  157. }
  158. // PrivateEndpoints is used to provide paths for users to send
  159. // requests via private services access.
  160. message PrivateEndpoints {
  161. // Output only. Http(s) path to send prediction requests.
  162. string predict_http_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  163. // Output only. Http(s) path to send explain requests.
  164. string explain_http_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  165. // Output only. Http(s) path to send health check requests.
  166. string health_http_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  167. }