endpoint.proto 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/aiplatform/v1/encryption_spec.proto";
  19. import "google/cloud/aiplatform/v1/machine_resources.proto";
  20. import "google/protobuf/timestamp.proto";
  21. import "google/api/annotations.proto";
  22. option csharp_namespace = "Google.Cloud.AIPlatform.V1";
  23. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1;aiplatform";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "EndpointProto";
  26. option java_package = "com.google.cloud.aiplatform.v1";
  27. option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
  28. option ruby_package = "Google::Cloud::AIPlatform::V1";
  29. // Models are deployed into it, and afterwards Endpoint is called to obtain
  30. // predictions and explanations.
  31. message Endpoint {
  32. option (google.api.resource) = {
  33. type: "aiplatform.googleapis.com/Endpoint"
  34. pattern: "projects/{project}/locations/{location}/endpoints/{endpoint}"
  35. };
  36. // Output only. The resource name of the Endpoint.
  37. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  38. // Required. The display name of the Endpoint.
  39. // The name can be up to 128 characters long and can be consist of any UTF-8
  40. // characters.
  41. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  42. // The description of the Endpoint.
  43. string description = 3;
  44. // Output only. The models deployed in this Endpoint.
  45. // To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] and
  46. // [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] respectively.
  47. repeated DeployedModel deployed_models = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  48. // A map from a DeployedModel's ID to the percentage of this Endpoint's
  49. // traffic that should be forwarded to that DeployedModel.
  50. //
  51. // If a DeployedModel's ID is not listed in this map, then it receives no
  52. // traffic.
  53. //
  54. // The traffic percentage values must add up to 100, or map must be empty if
  55. // the Endpoint is to not accept any traffic at a moment.
  56. map<string, int32> traffic_split = 5;
  57. // Used to perform consistent read-modify-write updates. If not set, a blind
  58. // "overwrite" update happens.
  59. string etag = 6;
  60. // The labels with user-defined metadata to organize your Endpoints.
  61. //
  62. // Label keys and values can be no longer than 64 characters
  63. // (Unicode codepoints), can only contain lowercase letters, numeric
  64. // characters, underscores and dashes. International characters are allowed.
  65. //
  66. // See https://goo.gl/xmQnxf for more information and examples of labels.
  67. map<string, string> labels = 7;
  68. // Output only. Timestamp when this Endpoint was created.
  69. google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  70. // Output only. Timestamp when this Endpoint was last updated.
  71. google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  72. // Customer-managed encryption key spec for an Endpoint. If set, this
  73. // Endpoint and all sub-resources of this Endpoint will be secured by
  74. // this key.
  75. EncryptionSpec encryption_spec = 10;
  76. }
  77. // A deployment of a Model. Endpoints contain one or more DeployedModels.
  78. message DeployedModel {
  79. // The prediction (for example, the machine) resources that the DeployedModel
  80. // uses. The user is billed for the resources (at least their minimal amount)
  81. // even if the DeployedModel receives no traffic.
  82. // Not all Models support all resources types. See
  83. // [Model.supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types].
  84. oneof prediction_resources {
  85. // A description of resources that are dedicated to the DeployedModel, and
  86. // that need a higher degree of manual configuration.
  87. DedicatedResources dedicated_resources = 7;
  88. // A description of resources that to large degree are decided by AI
  89. // Platform, and require only a modest additional configuration.
  90. AutomaticResources automatic_resources = 8;
  91. }
  92. // Output only. The ID of the DeployedModel.
  93. string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  94. // Required. The name of the Model that this is the deployment of. Note that the Model
  95. // may be in a different location than the DeployedModel's Endpoint.
  96. string model = 2 [
  97. (google.api.field_behavior) = REQUIRED,
  98. (google.api.resource_reference) = {
  99. type: "aiplatform.googleapis.com/Model"
  100. }
  101. ];
  102. // The display name of the DeployedModel. If not provided upon creation,
  103. // the Model's display_name is used.
  104. string display_name = 3;
  105. // Output only. Timestamp when the DeployedModel was created.
  106. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  107. // The service account that the DeployedModel's container runs as. Specify the
  108. // email address of the service account. If this service account is not
  109. // specified, the container runs as a service account that doesn't have access
  110. // to the resource project.
  111. //
  112. // Users deploying the Model must have the `iam.serviceAccounts.actAs`
  113. // permission on this service account.
  114. string service_account = 11;
  115. // For custom-trained Models and AutoML Tabular Models, the container of the
  116. // DeployedModel instances will send `stderr` and `stdout` streams to
  117. // Stackdriver Logging by default. Please note that the logs incur cost,
  118. // which are subject to [Cloud Logging
  119. // pricing](https://cloud.google.com/stackdriver/pricing).
  120. //
  121. // User can disable container logging by setting this flag to true.
  122. bool disable_container_logging = 15;
  123. // These logs are like standard server access logs, containing
  124. // information like timestamp and latency for each prediction request.
  125. //
  126. // Note that Stackdriver logs may incur a cost, especially if your project
  127. // receives prediction requests at a high queries per second rate (QPS).
  128. // Estimate your costs before enabling this option.
  129. bool enable_access_logging = 13;
  130. }