blob: 36243288ef9b3f88ed3243e872e59030de8e5ff6 [file] [log] [blame]
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="ml_v1beta1.html">Google Cloud Machine Learning</a> . <a href="ml_v1beta1.projects.html">projects</a> . <a href="ml_v1beta1.projects.models.html">models</a> . <a href="ml_v1beta1.projects.models.versions.html">versions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(parent=None, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a new version of a model from a trained TensorFlow model.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a model version.</p>
83<p class="toc_element">
84 <code><a href="#get">get(name=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets information about a model version.</p>
86<p class="toc_element">
87 <code><a href="#list">list(parent=None, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p>
88<p class="firstline">Gets basic information about all the versions of a model.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
93 <code><a href="#setDefault">setDefault(name=None, body, x__xgafv=None)</a></code></p>
94<p class="firstline">Designates a version to be the default for the model.</p>
95<h3>Method Details</h3>
96<div class="method">
97 <code class="details" id="create">create(parent=None, body, x__xgafv=None)</code>
98 <pre>Creates a new version of a model from a trained TensorFlow model.
99
100If the version created in the cloud by this call is the first deployed
101version of the specified model, it will be made the default version of the
102model. When you add a version to a model that already has one or more
103versions, the default version does not automatically change. If you want a
104new version to be the default, you must call
105[projects.models.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
106
107Args:
108 parent: string, Required. The name of the model.
109
110Authorization: requires `Editor` role on the parent project. (required)
111 body: object, The request body. (required)
112 The object takes the form of:
113
114{ # Represents a version of the model.
115 #
116 # Each version is a trained model deployed in the cloud, ready to handle
117 # prediction requests. A model can have multiple versions. You can get
118 # information about all of the versions of a given model by calling
119 # [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
120 "description": "A String", # Optional. The description specified for the version when it was created.
121 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
122 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
123 # create the version. See the
124 # [overview of model deployment](/ml/docs/concepts/deployment-overview) for
125 # more informaiton.
126 #
127 # When passing Version to
128 # [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)
129 # the model service uses the specified location as the source of the model.
130 # Once deployed, the model version is hosted by the prediction service, so
131 # this location is useful only as a historical record.
132 "createTime": "A String", # Output only. The time the version was created.
133 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
134 # requests that do not specify a version.
135 #
136 # You can change the default version by calling
137 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
138 "name": "A String", # Required.The name specified for the version when it was created.
139 #
140 # The version name must be unique within the model it is created in.
141}
142
143 x__xgafv: string, V1 error format.
144 Allowed values
145 1 - v1 error format
146 2 - v2 error format
147
148Returns:
149 An object of the form:
150
151 { # This resource represents a long-running operation that is the result of a
152 # network API call.
153 "metadata": { # Service-specific metadata associated with the operation. It typically
154 # contains progress information and common metadata such as create time.
155 # Some services might not provide such metadata. Any method that returns a
156 # long-running operation should document the metadata type, if any.
157 "a_key": "", # Properties of the object. Contains field @type with type URL.
158 },
159 "done": True or False, # If the value is `false`, it means the operation is still in progress.
160 # If true, the operation is completed, and either `error` or `response` is
161 # available.
162 "response": { # The normal response of the operation in case of success. If the original
163 # method returns no data on success, such as `Delete`, the response is
164 # `google.protobuf.Empty`. If the original method is standard
165 # `Get`/`Create`/`Update`, the response should be the resource. For other
166 # methods, the response should have the type `XxxResponse`, where `Xxx`
167 # is the original method name. For example, if the original method name
168 # is `TakeSnapshot()`, the inferred response type is
169 # `TakeSnapshotResponse`.
170 "a_key": "", # Properties of the object. Contains field @type with type URL.
171 },
172 "name": "A String", # The server-assigned name, which is only unique within the same service that
173 # originally returns it. If you use the default HTTP mapping, the
174 # `name` should have the format of `operations/some/unique/name`.
Jon Wayne Parrottdc6c1ef2016-10-14 11:04:30 -0700175 "error": { # The `Status` type defines a logical error model that is suitable for different # The error result of the operation in case of failure or cancellation.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700176 # programming environments, including REST APIs and RPC APIs. It is used by
177 # [gRPC](https://github.com/grpc). The error model is designed to be:
178 #
179 # - Simple to use and understand for most users
180 # - Flexible enough to meet unexpected needs
181 #
182 # # Overview
183 #
184 # The `Status` message contains three pieces of data: error code, error message,
185 # and error details. The error code should be an enum value of
186 # google.rpc.Code, but it may accept additional error codes if needed. The
187 # error message should be a developer-facing English message that helps
188 # developers *understand* and *resolve* the error. If a localized user-facing
189 # error message is needed, put the localized message in the error details or
190 # localize it in the client. The optional error details may contain arbitrary
191 # information about the error. There is a predefined set of error detail types
192 # in the package `google.rpc` which can be used for common error conditions.
193 #
194 # # Language mapping
195 #
196 # The `Status` message is the logical representation of the error model, but it
197 # is not necessarily the actual wire format. When the `Status` message is
198 # exposed in different client libraries and different wire protocols, it can be
199 # mapped differently. For example, it will likely be mapped to some exceptions
200 # in Java, but more likely mapped to some error codes in C.
201 #
202 # # Other uses
203 #
204 # The error model and the `Status` message can be used in a variety of
205 # environments, either with or without APIs, to provide a
206 # consistent developer experience across different environments.
207 #
208 # Example uses of this error model include:
209 #
210 # - Partial errors. If a service needs to return partial errors to the client,
211 # it may embed the `Status` in the normal response to indicate the partial
212 # errors.
213 #
214 # - Workflow errors. A typical workflow has multiple steps. Each step may
215 # have a `Status` message for error reporting purpose.
216 #
217 # - Batch operations. If a client uses batch request and batch response, the
218 # `Status` message should be used directly inside batch response, one for
219 # each error sub-response.
220 #
221 # - Asynchronous operations. If an API call embeds asynchronous operation
222 # results in its response, the status of those operations should be
223 # represented directly using the `Status` message.
224 #
225 # - Logging. If some API errors are stored in logs, the message `Status` could
226 # be used directly after any stripping needed for security/privacy reasons.
227 "message": "A String", # A developer-facing error message, which should be in English. Any
228 # user-facing error message should be localized and sent in the
229 # google.rpc.Status.details field, or localized by the client.
230 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
231 "details": [ # A list of messages that carry the error details. There will be a
232 # common set of message types for APIs to use.
233 {
234 "a_key": "", # Properties of the object. Contains field @type with type URL.
235 },
236 ],
237 },
238 }</pre>
239</div>
240
241<div class="method">
242 <code class="details" id="delete">delete(name=None, x__xgafv=None)</code>
243 <pre>Deletes a model version.
244
245Each model can have multiple versions deployed and in use at any given
246time. Use this method to remove a single version.
247
248Note: You cannot delete the version that is set as the default version
249of the model unless it is the only remaining version.
250
251Args:
252 name: string, Required. The name of the version. You can get the names of all the
253versions of a model by calling
254[projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
255
256Authorization: requires `Editor` role on the parent project. (required)
257 x__xgafv: string, V1 error format.
258 Allowed values
259 1 - v1 error format
260 2 - v2 error format
261
262Returns:
263 An object of the form:
264
265 { # This resource represents a long-running operation that is the result of a
266 # network API call.
267 "metadata": { # Service-specific metadata associated with the operation. It typically
268 # contains progress information and common metadata such as create time.
269 # Some services might not provide such metadata. Any method that returns a
270 # long-running operation should document the metadata type, if any.
271 "a_key": "", # Properties of the object. Contains field @type with type URL.
272 },
273 "done": True or False, # If the value is `false`, it means the operation is still in progress.
274 # If true, the operation is completed, and either `error` or `response` is
275 # available.
276 "response": { # The normal response of the operation in case of success. If the original
277 # method returns no data on success, such as `Delete`, the response is
278 # `google.protobuf.Empty`. If the original method is standard
279 # `Get`/`Create`/`Update`, the response should be the resource. For other
280 # methods, the response should have the type `XxxResponse`, where `Xxx`
281 # is the original method name. For example, if the original method name
282 # is `TakeSnapshot()`, the inferred response type is
283 # `TakeSnapshotResponse`.
284 "a_key": "", # Properties of the object. Contains field @type with type URL.
285 },
286 "name": "A String", # The server-assigned name, which is only unique within the same service that
287 # originally returns it. If you use the default HTTP mapping, the
288 # `name` should have the format of `operations/some/unique/name`.
Jon Wayne Parrottdc6c1ef2016-10-14 11:04:30 -0700289 "error": { # The `Status` type defines a logical error model that is suitable for different # The error result of the operation in case of failure or cancellation.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700290 # programming environments, including REST APIs and RPC APIs. It is used by
291 # [gRPC](https://github.com/grpc). The error model is designed to be:
292 #
293 # - Simple to use and understand for most users
294 # - Flexible enough to meet unexpected needs
295 #
296 # # Overview
297 #
298 # The `Status` message contains three pieces of data: error code, error message,
299 # and error details. The error code should be an enum value of
300 # google.rpc.Code, but it may accept additional error codes if needed. The
301 # error message should be a developer-facing English message that helps
302 # developers *understand* and *resolve* the error. If a localized user-facing
303 # error message is needed, put the localized message in the error details or
304 # localize it in the client. The optional error details may contain arbitrary
305 # information about the error. There is a predefined set of error detail types
306 # in the package `google.rpc` which can be used for common error conditions.
307 #
308 # # Language mapping
309 #
310 # The `Status` message is the logical representation of the error model, but it
311 # is not necessarily the actual wire format. When the `Status` message is
312 # exposed in different client libraries and different wire protocols, it can be
313 # mapped differently. For example, it will likely be mapped to some exceptions
314 # in Java, but more likely mapped to some error codes in C.
315 #
316 # # Other uses
317 #
318 # The error model and the `Status` message can be used in a variety of
319 # environments, either with or without APIs, to provide a
320 # consistent developer experience across different environments.
321 #
322 # Example uses of this error model include:
323 #
324 # - Partial errors. If a service needs to return partial errors to the client,
325 # it may embed the `Status` in the normal response to indicate the partial
326 # errors.
327 #
328 # - Workflow errors. A typical workflow has multiple steps. Each step may
329 # have a `Status` message for error reporting purpose.
330 #
331 # - Batch operations. If a client uses batch request and batch response, the
332 # `Status` message should be used directly inside batch response, one for
333 # each error sub-response.
334 #
335 # - Asynchronous operations. If an API call embeds asynchronous operation
336 # results in its response, the status of those operations should be
337 # represented directly using the `Status` message.
338 #
339 # - Logging. If some API errors are stored in logs, the message `Status` could
340 # be used directly after any stripping needed for security/privacy reasons.
341 "message": "A String", # A developer-facing error message, which should be in English. Any
342 # user-facing error message should be localized and sent in the
343 # google.rpc.Status.details field, or localized by the client.
344 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
345 "details": [ # A list of messages that carry the error details. There will be a
346 # common set of message types for APIs to use.
347 {
348 "a_key": "", # Properties of the object. Contains field @type with type URL.
349 },
350 ],
351 },
352 }</pre>
353</div>
354
355<div class="method">
356 <code class="details" id="get">get(name=None, x__xgafv=None)</code>
357 <pre>Gets information about a model version.
358
359Models can have multiple versions. You can call
360[projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list)
361to get the same information that this method returns for all of the
362versions of a model.
363
364Args:
365 name: string, Required. The name of the version.
366
367Authorization: requires `Viewer` role on the parent project. (required)
368 x__xgafv: string, V1 error format.
369 Allowed values
370 1 - v1 error format
371 2 - v2 error format
372
373Returns:
374 An object of the form:
375
376 { # Represents a version of the model.
377 #
378 # Each version is a trained model deployed in the cloud, ready to handle
379 # prediction requests. A model can have multiple versions. You can get
380 # information about all of the versions of a given model by calling
381 # [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
382 "description": "A String", # Optional. The description specified for the version when it was created.
383 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
384 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
385 # create the version. See the
386 # [overview of model deployment](/ml/docs/concepts/deployment-overview) for
387 # more informaiton.
388 #
389 # When passing Version to
390 # [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)
391 # the model service uses the specified location as the source of the model.
392 # Once deployed, the model version is hosted by the prediction service, so
393 # this location is useful only as a historical record.
394 "createTime": "A String", # Output only. The time the version was created.
395 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
396 # requests that do not specify a version.
397 #
398 # You can change the default version by calling
399 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
400 "name": "A String", # Required.The name specified for the version when it was created.
401 #
402 # The version name must be unique within the model it is created in.
403 }</pre>
404</div>
405
406<div class="method">
407 <code class="details" id="list">list(parent=None, pageToken=None, x__xgafv=None, pageSize=None)</code>
408 <pre>Gets basic information about all the versions of a model.
409
410If you expect that a model has a lot of versions, or if you need to handle
411only a limited number of results at a time, you can request that the list
412be retrieved in batches (called pages):
413
414Args:
415 parent: string, Required. The name of the model for which to list the version.
416
417Authorization: requires `Viewer` role on the parent project. (required)
418 pageToken: string, Optional. A page token to request the next page of results.
419
420You get the token from the `next_page_token` field of the response from
421the previous call.
422 x__xgafv: string, V1 error format.
423 Allowed values
424 1 - v1 error format
425 2 - v2 error format
426 pageSize: integer, Optional. The number of versions to retrieve per "page" of results. If
427there are more remaining results than this number, the response message
428will contain a valid value in the `next_page_token` field.
429
430The default value is 20, and the maximum page size is 100.
431
432Returns:
433 An object of the form:
434
435 { # Response message for the ListVersions method.
436 "nextPageToken": "A String", # Optional. Pass this token as the `page_token` field of the request for a
437 # subsequent call.
438 "versions": [ # The list of versions.
439 { # Represents a version of the model.
440 #
441 # Each version is a trained model deployed in the cloud, ready to handle
442 # prediction requests. A model can have multiple versions. You can get
443 # information about all of the versions of a given model by calling
444 # [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
445 "description": "A String", # Optional. The description specified for the version when it was created.
446 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
447 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
448 # create the version. See the
449 # [overview of model deployment](/ml/docs/concepts/deployment-overview) for
450 # more informaiton.
451 #
452 # When passing Version to
453 # [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)
454 # the model service uses the specified location as the source of the model.
455 # Once deployed, the model version is hosted by the prediction service, so
456 # this location is useful only as a historical record.
457 "createTime": "A String", # Output only. The time the version was created.
458 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
459 # requests that do not specify a version.
460 #
461 # You can change the default version by calling
462 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
463 "name": "A String", # Required.The name specified for the version when it was created.
464 #
465 # The version name must be unique within the model it is created in.
466 },
467 ],
468 }</pre>
469</div>
470
471<div class="method">
472 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
473 <pre>Retrieves the next page of results.
474
475Args:
476 previous_request: The request for the previous page. (required)
477 previous_response: The response from the request for the previous page. (required)
478
479Returns:
480 A request object that you can call 'execute()' on to request the next
481 page. Returns None if there are no more items in the collection.
482 </pre>
483</div>
484
485<div class="method">
486 <code class="details" id="setDefault">setDefault(name=None, body, x__xgafv=None)</code>
487 <pre>Designates a version to be the default for the model.
488
489The default version is used for prediction requests made against the model
490that don't specify a version.
491
492The first version to be created for a model is automatically set as the
493default. You must make any subsequent changes to the default version
494setting manually using this method.
495
496Args:
497 name: string, Required. The name of the version to make the default for the model. You
498can get the names of all the versions of a model by calling
499[projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
500
501Authorization: requires `Editor` role on the parent project. (required)
502 body: object, The request body. (required)
503 The object takes the form of:
504
505{ # Request message for the SetDefaultVersion request.
506 }
507
508 x__xgafv: string, V1 error format.
509 Allowed values
510 1 - v1 error format
511 2 - v2 error format
512
513Returns:
514 An object of the form:
515
516 { # Represents a version of the model.
517 #
518 # Each version is a trained model deployed in the cloud, ready to handle
519 # prediction requests. A model can have multiple versions. You can get
520 # information about all of the versions of a given model by calling
521 # [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
522 "description": "A String", # Optional. The description specified for the version when it was created.
523 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
524 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
525 # create the version. See the
526 # [overview of model deployment](/ml/docs/concepts/deployment-overview) for
527 # more informaiton.
528 #
529 # When passing Version to
530 # [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)
531 # the model service uses the specified location as the source of the model.
532 # Once deployed, the model version is hosted by the prediction service, so
533 # this location is useful only as a historical record.
534 "createTime": "A String", # Output only. The time the version was created.
535 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
536 # requests that do not specify a version.
537 #
538 # You can change the default version by calling
539 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
540 "name": "A String", # Required.The name specified for the version when it was created.
541 #
542 # The version name must be unique within the model it is created in.
543 }</pre>
544</div>
545
546</body></html>