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 // Optional. The type of hardware accelerators associated with this node. 393 string accelerator_type = 5 [(google.api.field_behavior) = OPTIONAL]; 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 // Output only. The qualified name of the QueuedResource that requested this 468 // Node. 469 string queued_resource = 47 [(google.api.field_behavior) = OUTPUT_ONLY]; 470 471 // Output only. Whether the Node belongs to a Multislice group. 472 bool multislice_node = 48 [(google.api.field_behavior) = OUTPUT_ONLY]; 473} 474 475// Request for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes]. 476message ListNodesRequest { 477 // Required. The parent resource name. 478 string parent = 1 [ 479 (google.api.field_behavior) = REQUIRED, 480 (google.api.resource_reference) = { child_type: "tpu.googleapis.com/Node" } 481 ]; 482 483 // The maximum number of items to return. 484 int32 page_size = 2; 485 486 // The next_page_token value returned from a previous List request, if any. 487 string page_token = 3; 488} 489 490// Response for [ListNodes][google.cloud.tpu.v2.Tpu.ListNodes]. 491message ListNodesResponse { 492 // The listed nodes. 493 repeated Node nodes = 1; 494 495 // The next page token or empty if none. 496 string next_page_token = 2; 497 498 // Locations that could not be reached. 499 repeated string unreachable = 3; 500} 501 502// Request for [GetNode][google.cloud.tpu.v2.Tpu.GetNode]. 503message GetNodeRequest { 504 // Required. The resource name. 505 string name = 1 [ 506 (google.api.field_behavior) = REQUIRED, 507 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 508 ]; 509} 510 511// Request for [CreateNode][google.cloud.tpu.v2.Tpu.CreateNode]. 512message CreateNodeRequest { 513 // Required. The parent resource name. 514 string parent = 1 [ 515 (google.api.field_behavior) = REQUIRED, 516 (google.api.resource_reference) = { 517 type: "locations.googleapis.com/Location" 518 } 519 ]; 520 521 // The unqualified resource name. 522 string node_id = 2; 523 524 // Required. The node. 525 Node node = 3 [(google.api.field_behavior) = REQUIRED]; 526} 527 528// Request for [DeleteNode][google.cloud.tpu.v2.Tpu.DeleteNode]. 529message DeleteNodeRequest { 530 // Required. The resource name. 531 string name = 1 [ 532 (google.api.field_behavior) = REQUIRED, 533 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 534 ]; 535} 536 537// Request for [StopNode][google.cloud.tpu.v2.Tpu.StopNode]. 538message StopNodeRequest { 539 // Required. The resource name. 540 string name = 1 [ 541 (google.api.field_behavior) = REQUIRED, 542 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 543 ]; 544} 545 546// Request for [StartNode][google.cloud.tpu.v2.Tpu.StartNode]. 547message StartNodeRequest { 548 // Required. The resource name. 549 string name = 1 [ 550 (google.api.field_behavior) = REQUIRED, 551 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 552 ]; 553} 554 555// Request for [UpdateNode][google.cloud.tpu.v2.Tpu.UpdateNode]. 556message UpdateNodeRequest { 557 // Required. Mask of fields from [Node][Tpu.Node] to update. 558 // Supported fields: [description, tags, labels, metadata, 559 // network_config.enable_external_ips]. 560 google.protobuf.FieldMask update_mask = 1 561 [(google.api.field_behavior) = REQUIRED]; 562 563 // Required. The node. Only fields specified in update_mask are updated. 564 Node node = 2 [(google.api.field_behavior) = REQUIRED]; 565} 566 567// The per-product per-project service identity for Cloud TPU service. 568message ServiceIdentity { 569 // The email address of the service identity. 570 string email = 1; 571} 572 573// Request for 574// [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. 575message GenerateServiceIdentityRequest { 576 // Required. The parent resource name. 577 string parent = 1 [ 578 (google.api.field_behavior) = REQUIRED, 579 (google.api.resource_reference) = { 580 type: "locations.googleapis.com/Location" 581 } 582 ]; 583} 584 585// Response for 586// [GenerateServiceIdentity][google.cloud.tpu.v2.Tpu.GenerateServiceIdentity]. 587message GenerateServiceIdentityResponse { 588 // ServiceIdentity that was created or retrieved. 589 ServiceIdentity identity = 1; 590} 591 592// A accelerator type that a Node can be configured with. 593message AcceleratorType { 594 option (google.api.resource) = { 595 type: "tpu.googleapis.com/AcceleratorType" 596 pattern: "projects/{project}/locations/{location}/acceleratorTypes/{accelerator_type}" 597 }; 598 599 // The resource name. 600 string name = 1; 601 602 // The accelerator type. 603 string type = 2; 604 605 // The accelerator config. 606 repeated AcceleratorConfig accelerator_configs = 3; 607} 608 609// Request for [GetAcceleratorType][google.cloud.tpu.v2.Tpu.GetAcceleratorType]. 610message GetAcceleratorTypeRequest { 611 // Required. The resource name. 612 string name = 1 [ 613 (google.api.field_behavior) = REQUIRED, 614 (google.api.resource_reference) = { 615 type: "tpu.googleapis.com/AcceleratorType" 616 } 617 ]; 618} 619 620// Request for 621// [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. 622message ListAcceleratorTypesRequest { 623 // Required. The parent resource name. 624 string parent = 1 [ 625 (google.api.field_behavior) = REQUIRED, 626 (google.api.resource_reference) = { 627 child_type: "tpu.googleapis.com/AcceleratorType" 628 } 629 ]; 630 631 // The maximum number of items to return. 632 int32 page_size = 2; 633 634 // The next_page_token value returned from a previous List request, if any. 635 string page_token = 3; 636 637 // List filter. 638 string filter = 5; 639 640 // Sort results. 641 string order_by = 6; 642} 643 644// Response for 645// [ListAcceleratorTypes][google.cloud.tpu.v2.Tpu.ListAcceleratorTypes]. 646message ListAcceleratorTypesResponse { 647 // The listed nodes. 648 repeated AcceleratorType accelerator_types = 1; 649 650 // The next page token or empty if none. 651 string next_page_token = 2; 652 653 // Locations that could not be reached. 654 repeated string unreachable = 3; 655} 656 657// A runtime version that a Node can be configured with. 658message RuntimeVersion { 659 option (google.api.resource) = { 660 type: "tpu.googleapis.com/RuntimeVersion" 661 pattern: "projects/{project}/locations/{location}/runtimeVersions/{runtime_version}" 662 }; 663 664 // The resource name. 665 string name = 1; 666 667 // The runtime version. 668 string version = 2; 669} 670 671// Request for [GetRuntimeVersion][google.cloud.tpu.v2.Tpu.GetRuntimeVersion]. 672message GetRuntimeVersionRequest { 673 // Required. The resource name. 674 string name = 1 [ 675 (google.api.field_behavior) = REQUIRED, 676 (google.api.resource_reference) = { 677 type: "tpu.googleapis.com/RuntimeVersion" 678 } 679 ]; 680} 681 682// Request for 683// [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. 684message ListRuntimeVersionsRequest { 685 // Required. The parent resource name. 686 string parent = 1 [ 687 (google.api.field_behavior) = REQUIRED, 688 (google.api.resource_reference) = { 689 child_type: "tpu.googleapis.com/RuntimeVersion" 690 } 691 ]; 692 693 // The maximum number of items to return. 694 int32 page_size = 2; 695 696 // The next_page_token value returned from a previous List request, if any. 697 string page_token = 3; 698 699 // List filter. 700 string filter = 5; 701 702 // Sort results. 703 string order_by = 6; 704} 705 706// Response for 707// [ListRuntimeVersions][google.cloud.tpu.v2.Tpu.ListRuntimeVersions]. 708message ListRuntimeVersionsResponse { 709 // The listed nodes. 710 repeated RuntimeVersion runtime_versions = 1; 711 712 // The next page token or empty if none. 713 string next_page_token = 2; 714 715 // Locations that could not be reached. 716 repeated string unreachable = 3; 717} 718 719// Metadata describing an [Operation][google.longrunning.Operation] 720message OperationMetadata { 721 // The time the operation was created. 722 google.protobuf.Timestamp create_time = 1; 723 724 // The time the operation finished running. 725 google.protobuf.Timestamp end_time = 2; 726 727 // Target of the operation - for example 728 // projects/project-1/connectivityTests/test-1 729 string target = 3; 730 731 // Name of the verb executed by the operation. 732 string verb = 4; 733 734 // Human-readable status of the operation, if any. 735 string status_detail = 5; 736 737 // Specifies if cancellation was requested for the operation. 738 bool cancel_requested = 6; 739 740 // API version. 741 string api_version = 7; 742} 743 744// A Symptom instance. 745message Symptom { 746 // SymptomType represents the different types of Symptoms that a TPU can be 747 // at. 748 enum SymptomType { 749 // Unspecified symptom. 750 SYMPTOM_TYPE_UNSPECIFIED = 0; 751 752 // TPU VM memory is low. 753 LOW_MEMORY = 1; 754 755 // TPU runtime is out of memory. 756 OUT_OF_MEMORY = 2; 757 758 // TPU runtime execution has timed out. 759 EXECUTE_TIMED_OUT = 3; 760 761 // TPU runtime fails to construct a mesh that recognizes each TPU device's 762 // neighbors. 763 MESH_BUILD_FAIL = 4; 764 765 // TPU HBM is out of memory. 766 HBM_OUT_OF_MEMORY = 5; 767 768 // Abusive behaviors have been identified on the current project. 769 PROJECT_ABUSE = 6; 770 } 771 772 // Timestamp when the Symptom is created. 773 google.protobuf.Timestamp create_time = 1; 774 775 // Type of the Symptom. 776 SymptomType symptom_type = 2; 777 778 // Detailed information of the current Symptom. 779 string details = 3; 780 781 // A string used to uniquely distinguish a worker within a TPU node. 782 string worker_id = 4; 783} 784 785// Request for [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes]. 786message GetGuestAttributesRequest { 787 // Required. The resource name. 788 string name = 1 [ 789 (google.api.field_behavior) = REQUIRED, 790 (google.api.resource_reference) = { type: "tpu.googleapis.com/Node" } 791 ]; 792 793 // The guest attributes path to be queried. 794 string query_path = 2; 795 796 // The 0-based worker ID. If it is empty, all workers' GuestAttributes will be 797 // returned. 798 repeated string worker_ids = 3; 799} 800 801// Response for 802// [GetGuestAttributes][google.cloud.tpu.v2.Tpu.GetGuestAttributes]. 803message GetGuestAttributesResponse { 804 // The guest attributes for the TPU workers. 805 repeated GuestAttributes guest_attributes = 1; 806} 807 808// A TPU accelerator configuration. 809message AcceleratorConfig { 810 // TPU type. 811 enum Type { 812 // Unspecified version. 813 TYPE_UNSPECIFIED = 0; 814 815 // TPU v2. 816 V2 = 2; 817 818 // TPU v3. 819 V3 = 4; 820 821 // TPU v4. 822 V4 = 7; 823 } 824 825 // Required. Type of TPU. 826 Type type = 1 [(google.api.field_behavior) = REQUIRED]; 827 828 // Required. Topology of TPU in chips. 829 string topology = 2 [(google.api.field_behavior) = REQUIRED]; 830} 831 832// A set of Shielded Instance options. 833message ShieldedInstanceConfig { 834 // Defines whether the instance has Secure Boot enabled. 835 bool enable_secure_boot = 1; 836} 837