@@ -164,6 +164,20 @@ service Tpu {
164164 };
165165 }
166166
167+ // Resets a QueuedResource TPU instance
168+ rpc ResetQueuedResource (ResetQueuedResourceRequest )
169+ returns (google.longrunning.Operation ) {
170+ option (google.api.http ) = {
171+ post : "/v2alpha1/{name=projects/*/locations/*/queuedResources/*}:reset"
172+ body : "*"
173+ };
174+ option (google.api.method_signature ) = "name" ;
175+ option (google.longrunning.operation_info ) = {
176+ response_type : "QueuedResource"
177+ metadata_type : "OperationMetadata"
178+ };
179+ }
180+
167181 // Generates the Cloud TPU service identity for the project.
168182 rpc GenerateServiceIdentity (GenerateServiceIdentityRequest )
169183 returns (GenerateServiceIdentityResponse ) {
@@ -544,6 +558,23 @@ message QueuedResource {
544558 // single node or multiple nodes.
545559 // NodeSpec provides the specification for node(s) to be created.
546560 message NodeSpec {
561+ // Parameters to specify for multi-node QueuedResource requests. This
562+ // field must be populated in case of multi-node requests instead of
563+ // node_id. It's an error to specify both node_id and multi_node_params.
564+ message MultiNodeParams {
565+ // Required. Number of nodes with this spec. The system will attempt
566+ // to provison "node_count" nodes as part of the request.
567+ // This needs to be > 1.
568+ int32 node_count = 1 [(google.api.field_behavior ) = REQUIRED ];
569+
570+ // Prefix of node_ids in case of multi-node request
571+ // Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.
572+ // If node_count = 3 and node_id_prefix = "np", node ids of nodes
573+ // created will be "np-0", "np-1", "np-2". If this field is not
574+ // provided we use queued_resource_id as the node_id_prefix.
575+ string node_id_prefix = 2 ;
576+ }
577+
547578 // Required. The parent resource name.
548579 string parent = 1 [
549580 (google.api.field_behavior ) = REQUIRED ,
@@ -558,6 +589,10 @@ message QueuedResource {
558589 // instead. It's an error to specify both node_id and multi_node_params.
559590 string node_id = 2 ;
560591
592+ // Optional. Fields to specify in case of multi-node request.
593+ MultiNodeParams multi_node_params = 6
594+ [(google.api.field_behavior ) = OPTIONAL ];
595+
561596 // Required. The node.
562597 Node node = 3 [(google.api.field_behavior ) = REQUIRED ];
563598 }
@@ -946,6 +981,18 @@ message DeleteQueuedResourceRequest {
946981 bool force = 3 ;
947982}
948983
984+ // Request for
985+ // [ResetQueuedResource][google.cloud.tpu.v2alpha1.Tpu.ResetQueuedResource].
986+ message ResetQueuedResourceRequest {
987+ // Required. The name of the queued resource.
988+ string name = 1 [
989+ (google.api.field_behavior ) = REQUIRED ,
990+ (google.api.resource_reference ) = {
991+ type : "tpu.googleapis.com/QueuedResource"
992+ }
993+ ];
994+ }
995+
949996// The per-product per-project service identity for Cloud TPU service.
950997message ServiceIdentity {
951998 // The email address of the service identity.
0 commit comments