Skip to content

Commit

Permalink
feat(tpu): update the api
Browse files Browse the repository at this point in the history
#### tpu:v2alpha1

The following keys were added:
- resources.projects.resources.locations.resources.reservations.methods.list (Total Keys: 16)
- schemas.ListReservationsResponse (Total Keys: 5)
- schemas.QueuedResource.properties.createTime (Total Keys: 3)
- schemas.Reservation (Total Keys: 4)
- schemas.Standard (Total Keys: 8)
- schemas.Usage (Total Keys: 4)
  • Loading branch information
yoshi-automation committed Nov 7, 2023
1 parent 5b59e9b commit 28a8222
Show file tree
Hide file tree
Showing 7 changed files with 280 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/dyn/tpu_v2alpha1.projects.locations.html
Expand Up @@ -94,6 +94,11 @@ <h2>Instance Methods</h2>
</p>
<p class="firstline">Returns the queuedResources Resource.</p>

<p class="toc_element">
<code><a href="tpu_v2alpha1.projects.locations.reservations.html">reservations()</a></code>
</p>
<p class="firstline">Returns the reservations Resource.</p>

<p class="toc_element">
<code><a href="tpu_v2alpha1.projects.locations.runtimeVersions.html">runtimeVersions()</a></code>
</p>
Expand Down
3 changes: 3 additions & 0 deletions docs/dyn/tpu_v2alpha1.projects.locations.queuedResources.html
Expand Up @@ -113,6 +113,7 @@ <h3>Method Details</h3>
{ # A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.
&quot;bestEffort&quot;: { # BestEffort tier definition. # The BestEffort tier.
},
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the QueuedResource was created.
&quot;guaranteed&quot;: { # Guaranteed tier definition. # The Guaranteed tier.
&quot;minDuration&quot;: &quot;A String&quot;, # Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration.
&quot;reserved&quot;: True or False, # Optional. Specifies the request should be scheduled on reserved capacity.
Expand Down Expand Up @@ -335,6 +336,7 @@ <h3>Method Details</h3>
{ # A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.
&quot;bestEffort&quot;: { # BestEffort tier definition. # The BestEffort tier.
},
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the QueuedResource was created.
&quot;guaranteed&quot;: { # Guaranteed tier definition. # The Guaranteed tier.
&quot;minDuration&quot;: &quot;A String&quot;, # Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration.
&quot;reserved&quot;: True or False, # Optional. Specifies the request should be scheduled on reserved capacity.
Expand Down Expand Up @@ -495,6 +497,7 @@ <h3>Method Details</h3>
{ # A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.
&quot;bestEffort&quot;: { # BestEffort tier definition. # The BestEffort tier.
},
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the QueuedResource was created.
&quot;guaranteed&quot;: { # Guaranteed tier definition. # The Guaranteed tier.
&quot;minDuration&quot;: &quot;A String&quot;, # Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration.
&quot;reserved&quot;: True or False, # Optional. Specifies the request should be scheduled on reserved capacity.
Expand Down
144 changes: 144 additions & 0 deletions docs/dyn/tpu_v2alpha1.projects.locations.reservations.html
@@ -0,0 +1,144 @@
<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}

body {
font-size: 13px;
padding: 1em;
}

h1 {
font-size: 26px;
margin-bottom: 1em;
}

h2 {
font-size: 24px;
margin-bottom: 1em;
}

h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}

pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
margin-top: 0.5em;
}

h1, h2, h3, p {
font-family: Arial, sans serif;
}

h1, h2, h3 {
border-bottom: solid #CCC 1px;
}

.toc_element {
margin-top: 0.5em;
}

.firstline {
margin-left: 2 em;
}

.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}

.details {
font-weight: bold;
font-size: 14px;
}

</style>

<h1><a href="tpu_v2alpha1.html">Cloud TPU API</a> . <a href="tpu_v2alpha1.projects.html">projects</a> . <a href="tpu_v2alpha1.projects.locations.html">locations</a> . <a href="tpu_v2alpha1.projects.locations.reservations.html">reservations</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves the reservations for the given project in the given location.</p>
<p class="toc_element">
<code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>

<div class="method">
<code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Retrieves the reservations for the given project in the given location.

Args:
parent: string, Required. The parent for reservations. (required)
pageSize: integer, The maximum number of items to return.
pageToken: string, The next_page_token value returned from a previous List request, if any.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Response for ListReservations.
&quot;nextPageToken&quot;: &quot;A String&quot;, # The next page token or empty if none.
&quot;reservations&quot;: [ # The listed reservations.
{ # A reservation describes the amount of a resource &#x27;allotted&#x27; for a defined period of time.
&quot;name&quot;: &quot;A String&quot;, # The reservation name with the format: projects/{projectID}/locations/{location}/reservations/{reservationID}
&quot;standard&quot;: {
&quot;capacityUnits&quot;: &quot;A String&quot;,
&quot;interval&quot;: { # Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. # The start and end time of the reservation.
&quot;endTime&quot;: &quot;A String&quot;, # Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.
&quot;startTime&quot;: &quot;A String&quot;, # Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.
},
&quot;resourceType&quot;: &quot;A String&quot;, # The resource type of the reservation.
&quot;size&quot;: 42, # The size of the reservation, in the units specified in the &#x27;capacity_units&#x27; field.
&quot;usage&quot;: {
&quot;total&quot;: &quot;A String&quot;, # The real-time value of usage within the reservation, with the unit specified in field capacity_units.
},
},
},
],
}</pre>
</div>

<div class="method">
<code class="details" id="list_next">list_next()</code>
<pre>Retrieves the next page of results.

Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)

Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>

</body></html>
2 changes: 1 addition & 1 deletion googleapiclient/discovery_cache/documents/tpu.v1.json
Expand Up @@ -659,7 +659,7 @@
}
}
},
"revision": "20231019",
"revision": "20231026",
"rootUrl": "https://tpu.googleapis.com/",
"schemas": {
"AcceleratorType": {
Expand Down
Expand Up @@ -669,7 +669,7 @@
}
}
},
"revision": "20231019",
"revision": "20231026",
"rootUrl": "https://tpu.googleapis.com/",
"schemas": {
"AcceleratorType": {
Expand Down
2 changes: 1 addition & 1 deletion googleapiclient/discovery_cache/documents/tpu.v2.json
Expand Up @@ -721,7 +721,7 @@
}
}
},
"revision": "20231019",
"revision": "20231026",
"rootUrl": "https://tpu.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
Expand Down
126 changes: 125 additions & 1 deletion googleapiclient/discovery_cache/documents/tpu.v2alpha1.json
Expand Up @@ -845,6 +845,46 @@
}
}
},
"reservations": {
"methods": {
"list": {
"description": "Retrieves the reservations for the given project in the given location.",
"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/reservations",
"httpMethod": "GET",
"id": "tpu.projects.locations.reservations.list",
"parameterOrder": [
"parent"
],
"parameters": {
"pageSize": {
"description": "The maximum number of items to return.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "The next_page_token value returned from a previous List request, if any.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The parent for reservations.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v2alpha1/{+parent}/reservations",
"response": {
"$ref": "ListReservationsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
},
"runtimeVersions": {
"methods": {
"get": {
Expand Down Expand Up @@ -925,7 +965,7 @@
}
}
},
"revision": "20231019",
"revision": "20231026",
"rootUrl": "https://tpu.googleapis.com/",
"schemas": {
"AcceleratorConfig": {
Expand Down Expand Up @@ -1328,6 +1368,24 @@
},
"type": "object"
},
"ListReservationsResponse": {
"description": "Response for ListReservations.",
"id": "ListReservationsResponse",
"properties": {
"nextPageToken": {
"description": "The next page token or empty if none.",
"type": "string"
},
"reservations": {
"description": "The listed reservations.",
"items": {
"$ref": "Reservation"
},
"type": "array"
}
},
"type": "object"
},
"ListRuntimeVersionsResponse": {
"description": "Response for ListRuntimeVersions.",
"id": "ListRuntimeVersionsResponse",
Expand Down Expand Up @@ -1752,6 +1810,12 @@
"$ref": "BestEffort",
"description": "The BestEffort tier."
},
"createTime": {
"description": "Output only. The time when the QueuedResource was created.",
"format": "google-datetime",
"readOnly": true,
"type": "string"
},
"guaranteed": {
"$ref": "Guaranteed",
"description": "The Guaranteed tier."
Expand Down Expand Up @@ -1898,6 +1962,20 @@
},
"type": "object"
},
"Reservation": {
"description": "A reservation describes the amount of a resource 'allotted' for a defined period of time.",
"id": "Reservation",
"properties": {
"name": {
"description": "The reservation name with the format: projects/{projectID}/locations/{location}/reservations/{reservationID}",
"type": "string"
},
"standard": {
"$ref": "Standard"
}
},
"type": "object"
},
"ResetQueuedResourceRequest": {
"description": "Request for ResetQueuedResource.",
"id": "ResetQueuedResourceRequest",
Expand Down Expand Up @@ -1994,6 +2072,41 @@
"properties": {},
"type": "object"
},
"Standard": {
"id": "Standard",
"properties": {
"capacityUnits": {
"enum": [
"CAPACITY_UNITS_UNSPECIFIED",
"CORES",
"CHIPS"
],
"enumDescriptions": [
"The capacity units is not known/set.",
"The capacity unit is set to CORES.",
"The capacity unit is set to CHIPS."
],
"type": "string"
},
"interval": {
"$ref": "Interval",
"description": "The start and end time of the reservation."
},
"resourceType": {
"description": "The resource type of the reservation.",
"type": "string"
},
"size": {
"description": "The size of the reservation, in the units specified in the 'capacity_units' field.",
"format": "int32",
"type": "integer"
},
"usage": {
"$ref": "Usage"
}
},
"type": "object"
},
"StartNodeRequest": {
"description": "Request for StartNode.",
"id": "StartNodeRequest",
Expand Down Expand Up @@ -2100,6 +2213,17 @@
}
},
"type": "object"
},
"Usage": {
"id": "Usage",
"properties": {
"total": {
"description": "The real-time value of usage within the reservation, with the unit specified in field capacity_units.",
"format": "int64",
"type": "string"
}
},
"type": "object"
}
},
"servicePath": "",
Expand Down

0 comments on commit 28a8222

Please sign in to comment.