Skip to content

Commit

Permalink
feat: [tpu] make reservation_name parameter generally visible in Queu…
Browse files Browse the repository at this point in the history
…edResource message (#4178)

* feat: make reservation_name parameter generally visible in QueuedResource message

---
feat: add DeleteQueuedResource experiment

---
docs(v2alpha1): minor formatting to the description for `queued_resource_id`

PiperOrigin-RevId: 524336094

Source-Link: googleapis/googleapis@cad90d2

Source-Link: googleapis/googleapis-gen@848f9c2
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRwdS8uT3dsQm90LnlhbWwiLCJoIjoiODQ4ZjljMjk0MDc2ZGI2ZDFkMWE3ODAxMzA0MDI1MWIxYzBhZDdhOSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Denis DelGrosso <[email protected]>
  • Loading branch information
3 people authored Apr 18, 2023
1 parent 2beee25 commit 595ab28
Show file tree
Hide file tree
Showing 15 changed files with 943 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-tpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Tpu.list_nodes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_nodes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_nodes.js,samples/README.md) |
| Tpu.list_queued_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_queued_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_queued_resources.js,samples/README.md) |
| Tpu.list_runtime_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_runtime_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.list_runtime_versions.js,samples/README.md) |
| Tpu.reset_queued_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.reset_queued_resource.js,samples/README.md) |
| Tpu.simulate_maintenance_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.simulate_maintenance_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.simulate_maintenance_event.js,samples/README.md) |
| Tpu.start_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.start_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.start_node.js,samples/README.md) |
| Tpu.stop_node | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.stop_node.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.stop_node.js,samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,20 @@ service Tpu {
};
}

// Resets a QueuedResource TPU instance
rpc ResetQueuedResource(ResetQueuedResourceRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2alpha1/{name=projects/*/locations/*/queuedResources/*}:reset"
body: "*"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "QueuedResource"
metadata_type: "OperationMetadata"
};
}

// Generates the Cloud TPU service identity for the project.
rpc GenerateServiceIdentity(GenerateServiceIdentityRequest)
returns (GenerateServiceIdentityResponse) {
Expand Down Expand Up @@ -629,6 +643,10 @@ message QueuedResource {

// Output only. State of the QueuedResource request.
QueuedResourceState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// Name of the reservation in which the resource should be provisioned.
// Format: projects/{project}/locations/{zone}/reservations/{reservation}
string reservation_name = 8;
}

// QueuedResourceState defines the details of the QueuedResource request.
Expand Down Expand Up @@ -884,7 +902,7 @@ message CreateQueuedResourceRequest {
}
];

// The unqualified resource name. Should follow the ^[A-Za-z0-9_.~+%-]+$
// The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$`
// regex format.
string queued_resource_id = 2;

Expand All @@ -910,6 +928,18 @@ message DeleteQueuedResourceRequest {
string request_id = 2;
}

// Request for
// [ResetQueuedResource][google.cloud.tpu.v2alpha1.Tpu.ResetQueuedResource].
message ResetQueuedResourceRequest {
// Required. The name of the queued resource.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "tpu.googleapis.com/QueuedResource"
}
];
}

// The per-product per-project service identity for Cloud TPU service.
message ServiceIdentity {
// The email address of the service identity.
Expand Down
124 changes: 124 additions & 0 deletions packages/google-cloud-tpu/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 595ab28

Please sign in to comment.