cloud_tpu.proto 23 KB

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