1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.cloud.tpu.v2; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/longrunning/operations.proto"; 24import "google/protobuf/empty.proto"; 25import "google/protobuf/field_mask.proto"; 26import "google/protobuf/timestamp.proto"; 27 28option go_package = "cloud.google.com/go/tpu/apiv2/tpupb;tpupb"; 29option java_multiple_files = true; 30option java_outer_classname = "CloudTpuProto"; 31option java_package = "com.google.cloud.tpu.v2"; 32 33// Manages TPU nodes and other resources 34// 35// TPU API v2 36service Tpu { 37 option (google.api.default_host) = "tpu.googleapis.com"; 38 option (google.api.oauth_scopes) = 39 "https://www.googleapis.com/auth/cloud-platform"; 40 41 // Lists nodes. 42 rpc ListNodes(ListNodesRequest) returns (ListNodesResponse) { 43 option (google.api.http) = { 44 get: "/v2/{parent=projects/*/locations/*}/nodes" 45 }; 46 option (google.api.method_signature) = "parent"; 47 } 48 49 // Gets the details of a node. 50 rpc GetNode(GetNodeRequest) returns (Node) { 51 option (google.api.http) = { 52 get: "/v2/{name=projects/*/locations/*/nodes/*}" 53 }; 54 option (google.api.method_signature) = "name"; 55 } 56 57 // Creates a node. 58 rpc CreateNode(CreateNodeRequest) returns (google.longrunning.Operation) { 59 option (google.api.http) = { 60 post: "/v2/{parent=projects/*/locations/*}/nodes" 61 body: "node" 62 }; 63 option (google.api.method_signature) = "parent,node,node_id"; 64 option (google.longrunning.operation_info) = { 65 response_type: "Node" 66 metadata_type: "OperationMetadata" 67 }; 68 } 69 70 // Deletes a node. 71 rpc DeleteNode(DeleteNodeRequest) returns (google.longrunning.Operation) { 72 option (google.api.http) = { 73 delete: "/v2/{name=projects/*/locations/*/nodes/*}" 74 }; 75 option (google.api.method_signature) = "name"; 76 option (google.longrunning.operation_info) = { 77 response_type: "google.protobuf.Empty" 78 metadata_type: "OperationMetadata" 79 }; 80 } 81 82 // Stops a node. This operation is only available with single TPU nodes. 83 rpc StopNode(StopNodeRequest) returns (google.longrunning.Operation) { 84 option (google.api.http) = { 85 post: "/v2/{name=projects/*/locations/*/nodes/*}:stop" 86 body: "*" 87 }; 88 option (google.longrunning.operation_info) = { 89 response_type: "Node" 90 metadata_type: "OperationMetadata" 91 }; 92 } 93 94 // Starts a node. 95 rpc StartNode(StartNodeRequest) returns (google.longrunning.Operation) { 96 option (google.api.http) = { 97 post: "/v2/{name=projects/*/locations/*/nodes/*}:start" 98 body: "*" 99 }; 100 option (google.longrunning.operation_info) = { 101 response_type: "Node" 102 metadata_type: "OperationMetadata" 103 }; 104 } 105 106 // Updates the configurations of a node. 107 rpc UpdateNode(UpdateNodeRequest) returns (google.longrunning.Operation) { 108 option (google.api.http) = { 109 patch: "/v2/{node.name=projects/*/locations/*/nodes/*}" 110 body: "node" 111 }; 112 option (google.api.method_signature) = "node,update_mask"; 113 option (google.longrunning.operation_info) = { 114 response_type: "Node" 115 metadata_type: "OperationMetadata" 116 }; 117 } 118 119 // Generates the Cloud TPU service identity for the project. 120 rpc GenerateServiceIdentity(GenerateServiceIdentityRequest) 121 returns (GenerateServiceIdentityResponse) { 122 option (google.api.http) = { 123 post: "/v2/{parent=projects/*/locations/*}:generateServiceIdentity" 124 body: "*" 125 }; 126 } 127 128 // Lists accelerator types supported by this API. 129 rpc ListAcceleratorTypes(ListAcceleratorTypesRequest) 130 returns (ListAcceleratorTypesResponse) { 131 option (google.api.http) = { 132 get: "/v2/{parent=projects/*/locations/*}/acceleratorTypes" 133 }; 134 option (google.api.method_signature) = "parent"; 135 } 136 137 // Gets AcceleratorType. 138 rpc GetAcceleratorType(GetAcceleratorTypeRequest) returns (AcceleratorType) { 139 option (google.api.http) = { 140 get: "/v2/{name=projects/*/locations/*/acceleratorTypes/*}" 141 }; 142 option (google.api.method_signature) = "name"; 143 } 144 145 // Lists runtime versions supported by this API. 146 rpc ListRuntimeVersions(ListRuntimeVersionsRequest) 147 returns (ListRuntimeVersionsResponse) { 148 option (google.api.http) = { 149 get: "/v2/{parent=projects/*/locations/*}/runtimeVersions" 150 }; 151 option (google.api.method_signature) = "parent"; 152 } 153 154 // Gets a runtime version. 155 rpc GetRuntimeVersion(GetRuntimeVersionRequest) returns (RuntimeVersion) { 156 option (google.api.http) = { 157 get: "/v2/{name=projects/*/locations/*/runtimeVersions/*}" 158 }; 159 option (google.api.method_signature) = "name"; 160 } 161 162 // Retrieves the guest attributes for the node. 163 rpc GetGuestAttributes(GetGuestAttributesRequest) 164 returns (GetGuestAttributesResponse) { 165 option (google.api.http) = { 166 post: "/v2/{name=projects/*/locations/*/nodes/*}:getGuestAttributes" 167 body: "*" 168 }; 169 } 170} 171 172// A guest attributes. 173message GuestAttributes { 174 // The path to be queried. This can be the default namespace ('/') or a 175 // nested namespace ('/\<namespace\>/') or a specified key 176 // ('/\<namespace\>/\<key\>') 177 string query_path = 1; 178 179 // The value of the requested queried path. 180 GuestAttributesValue query_value = 2; 181} 182 183// Array of guest attribute namespace/key/value tuples. 184message GuestAttributesValue { 185 // The list of guest attributes entries. 186 repeated GuestAttributesEntry items = 1; 187} 188 189// A guest attributes namespace/key/value entry. 190message GuestAttributesEntry { 191 // Namespace for the guest attribute entry. 192 string namespace = 1; 193 194 // Key for the guest attribute entry. 195 string key = 2; 196 197 // Value for the guest attribute entry. 198 string value = 3; 199} 200 201// A node-attached disk resource. 202// Next ID: 8; 203message AttachedDisk { 204 // The different mode of the attached disk. 205 enum DiskMode { 206 // The disk mode is not known/set. 207 DISK_MODE_UNSPECIFIED = 0; 208 209 // Attaches the disk in read-write mode. Only one TPU node can attach a disk 210 // in read-write mode at a time. 211 READ_WRITE = 1; 212 213 // Attaches the disk in read-only mode. Multiple TPU nodes can attach 214 // a disk in read-only mode at a time. 215 READ_ONLY = 2; 216 } 217 218 // Specifies the full path to an existing disk. 219 // For example: "projects/my-project/zones/us-central1-c/disks/my-disk". 220 string source_disk = 3; 221 222 // The mode in which to attach this disk. 223 // If not specified, the default is READ_WRITE mode. 224 // Only applicable to data_disks. 225 DiskMode mode = 4; 226} 227 228// Sets the scheduling options for this node. 229message SchedulingConfig { 230 // Defines whether the node is preemptible. 231 bool preemptible = 1; 232 233 // Whether the node is created under a reservation. 234 bool reserved = 2; 235} 236 237// A network endpoint over which a TPU worker can be reached. 238message NetworkEndpoint { 239 // The internal IP address of this network endpoint. 240 string ip_address = 1; 241 242 // The port of this network endpoint. 243 int32 port = 2; 244 245 // The access config for the TPU worker. 246 AccessConfig access_config = 5; 247} 248 249// An access config attached to the TPU worker. 250message AccessConfig { 251 // Output only. An external IP address associated with the TPU worker. 252 string external_ip = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 253} 254 255// Network related configurations. 256message NetworkConfig { 257 // The name of the network for the TPU node. It must be a preexisting Google 258 // Compute Engine network. If none is provided, "default" will be used. 259 string network = 1; 260 261 // The name of the subnetwork for the TPU node. It must be a preexisting 262 // Google Compute Engine subnetwork. If none is provided, "default" will be 263 // used. 264 string subnetwork = 2; 265 266 // Indicates that external IP addresses would be associated with the TPU 267 // workers. If set to false, the specified subnetwork or network should have 268 // Private Google Access enabled. 269 bool enable_external_ips = 3; 270 271 // Allows the TPU node to send and receive packets with non-matching 272 // destination or source IPs. This is required if you plan to use the TPU 273 // workers to forward routes. 274 bool can_ip_forward = 4; 275} 276 277// A service account. 278message ServiceAccount { 279 // Email address of the service account. If empty, default Compute service 280 // account will be used. 281 string email = 1; 282 283 // The list of scopes to be made available for this service account. If empty, 284 // access to all Cloud APIs will be allowed. 285 repeated string scope = 2; 286} 287 288// A TPU instance. 289message Node { 290 option (google.api.resource) = { 291 type: "tpu.googleapis.com/Node" 292 pattern: "projects/{project}/locations/{location}/nodes/{node}" 293 }; 294 295 // Represents the different states of a TPU node during its lifecycle. 296 enum State { 297 // TPU node state is not known/set. 298 STATE_UNSPECIFIED = 0; 299 300 // TPU node is being created. 301 CREATING = 1; 302 303 // TPU node has been created. 304 READY = 2; 305 306 // TPU node is restarting. 307 RESTARTING = 3; 308 309 // TPU node is undergoing reimaging. 310 REIMAGING = 4; 311 312 // TPU node is being deleted. 313 DELETING = 5; 314 315 // TPU node is being repaired and may be unusable. Details can be 316 // found in the `help_description` field. 317 REPAIRING = 6; 318 319 // TPU node is stopped. 320 STOPPED = 8; 321 322 // TPU node is currently stopping. 323 STOPPING = 9; 324 325 // TPU node is currently starting. 326 STARTING = 10; 327 328 // TPU node has been preempted. Only applies to Preemptible TPU Nodes. 329 PREEMPTED = 11; 330 331 // TPU node has been terminated due to maintenance or has reached the end of 332 // its life cycle (for preemptible nodes). 333 TERMINATED = 12; 334 335 // TPU node is currently hiding. 336 HIDING = 13; 337 338 // TPU node has been hidden. 339 HIDDEN = 14; 340 341 // TPU node is currently unhiding. 342 UNHIDING = 15; 343 } 344 345 // Health defines the status of a TPU node as reported by 346 // Health Monitor. 347 enum Health { 348 // Health status is unknown: not initialized or failed to retrieve. 349 HEALTH_UNSPECIFIED = 0; 350 351 // The resource is healthy. 352 HEALTHY = 1; 353 354 // The resource is unresponsive. 355 TIMEOUT = 3; 356 357 // The in-guest ML stack is unhealthy. 358 UNHEALTHY_TENSORFLOW = 4; 359 360 // The node is under maintenance/priority boost caused rescheduling and 361 // will resume running once rescheduled. 362 UNHEALTHY_MAINTENANCE = 5; 363 } 364 365 // TPU API Version. 366 enum ApiVersion { 367 // API version is unknown. 368 API_VERSION_UNSPECIFIED = 0; 369 370 // TPU API V1Alpha1 version. 371 V1_ALPHA1 = 1; 372 373 // TPU API V1 version. 374 V1 = 2; 375 376 // TPU API V2Alpha1 version. 377 V2_ALPHA1 = 3; 378 379 // TPU API V2 version. 380 V2 = 4; 381 } 382 383 // Output only. Immutable. The name of the TPU. 384 string name = 1 [ 385 (google.api.field_behavior) = OUTPUT_ONLY, 386 (google.api.field_behavior) = IMMUTABLE 387 ]; 388 389 // The user-supplied description of the TPU. Maximum of 512 characters. 390 string description = 3; 391 392 // Required. The type of hardware accelerators associated with this node. 393 string accelerator_type = 5 [(google.api.field_behavior) = REQUIRED]; 394 395 // Output only. The current state for the TPU Node. 396 State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 397 398 // Output only. If this field is populated, it contains a description of why 399 // the TPU Node is unhealthy. 400 string health_description = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 401 402 // Required. The runtime version running in the Node. 403 string runtime_version = 11 [(google.api.field_behavior) = REQUIRED]; 404 405 // Network configurations for the TPU node. 406 NetworkConfig network_config = 36; 407 408 // The CIDR block that the TPU node will use when selecting an IP address. 409 // This CIDR block must be a /29 block; the Compute Engine networks API 410 // forbids a smaller block, and using a larger block would be wasteful (a 411 // node can only consume one IP address). Errors will occur if the CIDR block 412 // has already been used for a currently existing TPU node, the CIDR block 413 // conflicts with any subnetworks in the user's provided network, or the 414 // provided network is peered with another network that is using that CIDR 415 // block. 416 string cidr_block = 13; 417 418 // The Google Cloud Platform Service Account to be used by the TPU node VMs. 419 // If None is specified, the default compute service account will be used. 420 ServiceAccount service_account = 37; 421 422 // Output only. The time when the node was created. 423 google.protobuf.Timestamp create_time = 16 424 [(google.api.field_behavior) = OUTPUT_ONLY]; 425 426 // The scheduling options for this node. 427 SchedulingConfig scheduling_config = 17; 428 429 // Output only. The network endpoints where TPU workers can be accessed and 430 // sent work. It is recommended that runtime clients of the node reach out 431 // to the 0th entry in this map first. 432 repeated NetworkEndpoint network_endpoints = 21 433 [(google.api.field_behavior) = OUTPUT_ONLY]; 434 435 // The health status of the TPU node. 436 Health health = 22; 437 438 // Resource labels to represent user-provided metadata. 439 map<string, string> labels = 24; 440 441 // Custom metadata to apply to the TPU Node. 442 // Can set startup-script and shutdown-script 443 map<string, string> metadata = 34; 444 445 // Tags to apply to the TPU Node. Tags are used to identify valid sources or 446 // targets for network firewalls. 447 repeated string tags = 40; 448 449 // Output only. The unique identifier for the TPU Node. 450 int64 id = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; 451 452 // The additional data disks for the Node. 453 repeated AttachedDisk data_disks = 41; 454 455 // Output only. The API version that created this Node. 456 ApiVersion api_version = 38 [(google.api.field_behavior) = OUTPUT_ONLY]; 457 458 // Output only. The Symptoms that have occurred to the TPU Node. 459 repeated Symptom symptoms = 39 [(google.api.field_behavior) = OUTPUT_ONLY]; 460 461 // Shielded Instance options. 462 ShieldedInstanceConfig shielded_instance_config = 45; 463 464 // The AccleratorConfig for the TPU Node. 465 AcceleratorConfig accelerator_config = 46; 466} 467 468// Request for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes]. 469message ListNodesRequest { 470 // Required. The parent resource name. 471 string parent = 1 [ 472 (google.api.field_behavior) = REQUIRED, 473 (google.api.resource_reference) = { child_type: "tpu.googleapis.com/Node" } 474 ]; 475 476 // The maximum number of items to return. 477 int32 page_size = 2; 478 479 // The next_page_token value returned from a previous List request, if any. 480 string page_token = 3; 481} 482 483// Response for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes]. 484message ListNodesResponse { 485 // The listed nodes. 486 repeated Node nodes = 1; 487 488 // The next page token or empty if none. 489 string next_page_token = 2; 490 491 // Locations that could not be reached. 492 repeated string unreachable = 3; 493} 494 495// Request for [GetNode][google.cloud.tpu.v2.Tpu.GetNode]. 496message GetNodeRequest { 497 // Required. The resource name. 498 string name = 1 [ 499 (google.api.field_behavior) = REQUIRED, 500 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 501 ]; 502} 503 504// Request for [CreateNode][google.cloud.tpu.v2.Tpu.CreateNode]. 505message CreateNodeRequest { 506 // Required. The parent resource name. 507 string parent = 1 [ 508 (google.api.field_behavior) = REQUIRED, 509 (google.api.resource_reference) = { 510 type: "locations.googleapis.com/Location" 511 } 512 ]; 513 514 // The unqualified resource name. 515 string node_id = 2; 516 517 // Required. The node. 518 Node node = 3 [(google.api.field_behavior) = REQUIRED]; 519} 520 521// Request for [DeleteNode][google.cloud.tpu.v2.Tpu.DeleteNode]. 522message DeleteNodeRequest { 523 // Required. The resource name. 524 string name = 1 [ 525 (google.api.field_behavior) = REQUIRED, 526 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 527 ]; 528} 529 530// Request for [StopNode][google.cloud.tpu.v2.Tpu.StopNode]. 531message StopNodeRequest { 532 // Required. The resource name. 533 string name = 1 [ 534 (google.api.field_behavior) = REQUIRED, 535 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 536 ]; 537} 538 539// Request for [StartNode][google.cloud.tpu.v2.Tpu.StartNode]. 540message StartNodeRequest { 541 // Required. The resource name. 542 string name = 1 [ 543 (google.api.field_behavior) = REQUIRED, 544 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 545 ]; 546} 547 548// Request for [UpdateNode][google.cloud.tpu.v2.Tpu.UpdateNode]. 549message UpdateNodeRequest { 550 // Required. Mask of fields from [Node][Tpu.Node] to update. 551 // Supported fields: [description, tags, labels, metadata, 552 // network_config.enable_external_ips]. 553 google.protobuf.FieldMask update_mask = 1 554 [(google.api.field_behavior) = REQUIRED]; 555 556 // Required. The node. Only fields specified in update_mask are updated. 557 Node node = 2 [(google.api.field_behavior) = REQUIRED]; 558} 559 560// The per-product per-project service identity for Cloud TPU service. 561message ServiceIdentity { 562 // The email address of the service identity. 563 string email = 1; 564} 565 566// Request for 567// [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. 568message GenerateServiceIdentityRequest { 569 // Required. The parent resource name. 570 string parent = 1 [ 571 (google.api.field_behavior) = REQUIRED, 572 (google.api.resource_reference) = { 573 type: "locations.googleapis.com/Location" 574 } 575 ]; 576} 577 578// Response for 579// [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. 580message GenerateServiceIdentityResponse { 581 // ServiceIdentity that was created or retrieved. 582 ServiceIdentity identity = 1; 583} 584 585// A accelerator type that a Node can be configured with. 586message AcceleratorType { 587 option (google.api.resource) = { 588 type: "tpu.googleapis.com/AcceleratorType" 589 pattern: "projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}" 590 }; 591 592 // The resource name. 593 string name = 1; 594 595 // the accelerator type. 596 string type = 2; 597 598 // The accelerator config. 599 repeated AcceleratorConfig accelerator_configs = 3; 600} 601 602// Request for [GetAcceleratorType][google.cloud.tpu.v2.Tpu.GetAcceleratorType]. 603message GetAcceleratorTypeRequest { 604 // Required. The resource name. 605 string name = 1 [ 606 (google.api.field_behavior) = REQUIRED, 607 (google.api.resource_reference) = { 608 type: "tpu.googleapis.com/AcceleratorType" 609 } 610 ]; 611} 612 613// Request for 614// [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. 615message ListAcceleratorTypesRequest { 616 // Required. The parent resource name. 617 string parent = 1 [ 618 (google.api.field_behavior) = REQUIRED, 619 (google.api.resource_reference) = { 620 child_type: "tpu.googleapis.com/AcceleratorType" 621 } 622 ]; 623 624 // The maximum number of items to return. 625 int32 page_size = 2; 626 627 // The next_page_token value returned from a previous List request, if any. 628 string page_token = 3; 629 630 // List filter. 631 string filter = 5; 632 633 // Sort results. 634 string order_by = 6; 635} 636 637// Response for 638// [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. 639message ListAcceleratorTypesResponse { 640 // The listed nodes. 641 repeated AcceleratorType accelerator_types = 1; 642 643 // The next page token or empty if none. 644 string next_page_token = 2; 645 646 // Locations that could not be reached. 647 repeated string unreachable = 3; 648} 649 650// A runtime version that a Node can be configured with. 651message RuntimeVersion { 652 option (google.api.resource) = { 653 type: "tpu.googleapis.com/RuntimeVersion" 654 pattern: "projects/{project}/locations/{location}/runtimeVersions/{runtime_version}" 655 }; 656 657 // The resource name. 658 string name = 1; 659 660 // The runtime version. 661 string version = 2; 662} 663 664// Request for [GetRuntimeVersion][google.cloud.tpu.v2.Tpu.GetRuntimeVersion]. 665message GetRuntimeVersionRequest { 666 // Required. The resource name. 667 string name = 1 [ 668 (google.api.field_behavior) = REQUIRED, 669 (google.api.resource_reference) = { 670 type: "tpu.googleapis.com/RuntimeVersion" 671 } 672 ]; 673} 674 675// Request for 676// [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. 677message ListRuntimeVersionsRequest { 678 // Required. The parent resource name. 679 string parent = 1 [ 680 (google.api.field_behavior) = REQUIRED, 681 (google.api.resource_reference) = { 682 child_type: "tpu.googleapis.com/RuntimeVersion" 683 } 684 ]; 685 686 // The maximum number of items to return. 687 int32 page_size = 2; 688 689 // The next_page_token value returned from a previous List request, if any. 690 string page_token = 3; 691 692 // List filter. 693 string filter = 5; 694 695 // Sort results. 696 string order_by = 6; 697} 698 699// Response for 700// [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. 701message ListRuntimeVersionsResponse { 702 // The listed nodes. 703 repeated RuntimeVersion runtime_versions = 1; 704 705 // The next page token or empty if none. 706 string next_page_token = 2; 707 708 // Locations that could not be reached. 709 repeated string unreachable = 3; 710} 711 712// Metadata describing an [Operation][google.longrunning.Operation] 713message OperationMetadata { 714 // The time the operation was created. 715 google.protobuf.Timestamp create_time = 1; 716 717 // The time the operation finished running. 718 google.protobuf.Timestamp end_time = 2; 719 720 // Target of the operation - for example 721 // projects/project-1/connectivityTests/test-1 722 string target = 3; 723 724 // Name of the verb executed by the operation. 725 string verb = 4; 726 727 // Human-readable status of the operation, if any. 728 string status_detail = 5; 729 730 // Specifies if cancellation was requested for the operation. 731 bool cancel_requested = 6; 732 733 // API version. 734 string api_version = 7; 735} 736 737// A Symptom instance. 738message Symptom { 739 // SymptomType represents the different types of Symptoms that a TPU can be 740 // at. 741 enum SymptomType { 742 // Unspecified symptom. 743 SYMPTOM_TYPE_UNSPECIFIED = 0; 744 745 // TPU VM memory is low. 746 LOW_MEMORY = 1; 747 748 // TPU runtime is out of memory. 749 OUT_OF_MEMORY = 2; 750 751 // TPU runtime execution has timed out. 752 EXECUTE_TIMED_OUT = 3; 753 754 // TPU runtime fails to construct a mesh that recognizes each TPU device's 755 // neighbors. 756 MESH_BUILD_FAIL = 4; 757 758 // TPU HBM is out of memory. 759 HBM_OUT_OF_MEMORY = 5; 760 761 // Abusive behaviors have been identified on the current project. 762 PROJECT_ABUSE = 6; 763 } 764 765 // Timestamp when the Symptom is created. 766 google.protobuf.Timestamp create_time = 1; 767 768 // Type of the Symptom. 769 SymptomType symptom_type = 2; 770 771 // Detailed information of the current Symptom. 772 string details = 3; 773 774 // A string used to uniquely distinguish a worker within a TPU node. 775 string worker_id = 4; 776} 777 778// Request for [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes]. 779message GetGuestAttributesRequest { 780 // Required. The resource name. 781 string name = 1 [ 782 (google.api.field_behavior) = REQUIRED, 783 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 784 ]; 785 786 // The guest attributes path to be queried. 787 string query_path = 2; 788 789 // The 0-based worker ID. If it is empty, all workers' GuestAttributes will be 790 // returned. 791 repeated string worker_ids = 3; 792} 793 794// Response for 795// [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes]. 796message GetGuestAttributesResponse { 797 // The guest attributes for the TPU workers. 798 repeated GuestAttributes guest_attributes = 1; 799} 800 801// A TPU accelerator configuration. 802message AcceleratorConfig { 803 // TPU type. 804 enum Type { 805 // Unspecified version. 806 TYPE_UNSPECIFIED = 0; 807 808 // TPU v2. 809 V2 = 2; 810 811 // TPU v3. 812 V3 = 4; 813 814 // TPU v4. 815 V4 = 7; 816 } 817 818 // Required. Type of TPU. 819 Type type = 1 [(google.api.field_behavior) = REQUIRED]; 820 821 // Required. Topology of TPU in chips. 822 string topology = 2 [(google.api.field_behavior) = REQUIRED]; 823} 824 825// A set of Shielded Instance options. 826message ShieldedInstanceConfig { 827 // Defines whether the instance has Secure Boot enabled. 828 bool enable_secure_boot = 1; 829} 830