Skip to content

Commit f6c9f4c

Browse files
feat(notebooks): update the api
#### notebooks:v1 The following keys were added: - resources.projects.resources.locations.resources.instances.methods.migrate (Total Keys: 12) - resources.projects.resources.locations.resources.runtimes.methods.migrate (Total Keys: 12) - schemas.MigrateInstanceRequest (Total Keys: 3) - schemas.MigrateRuntimeRequest (Total Keys: 7)
1 parent 076ced0 commit f6c9f4c

File tree

4 files changed

+211
-3
lines changed

4 files changed

+211
-3
lines changed

docs/dyn/notebooks_v1.projects.locations.instances.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ <h2>Instance Methods</h2>
104104
<p class="toc_element">
105105
<code><a href="#list_next">list_next()</a></code></p>
106106
<p class="firstline">Retrieves the next page of results.</p>
107+
<p class="toc_element">
108+
<code><a href="#migrate">migrate(name, body=None, x__xgafv=None)</a></code></p>
109+
<p class="firstline">Migrates an existing User-Managed Notebook to Workbench Instances.</p>
107110
<p class="toc_element">
108111
<code><a href="#register">register(parent, body=None, x__xgafv=None)</a></code></p>
109112
<p class="firstline">Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.</p>
@@ -762,6 +765,48 @@ <h3>Method Details</h3>
762765
</pre>
763766
</div>
764767

768+
<div class="method">
769+
<code class="details" id="migrate">migrate(name, body=None, x__xgafv=None)</code>
770+
<pre>Migrates an existing User-Managed Notebook to Workbench Instances.
771+
772+
Args:
773+
name: string, Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` (required)
774+
body: object, The request body.
775+
The object takes the form of:
776+
777+
{ # Request for migrating a User-Managed Notebook to Workbench Instances.
778+
&quot;postStartupScriptOption&quot;: &quot;A String&quot;, # Optional. Specifies the behavior of post startup script during migration.
779+
}
780+
781+
x__xgafv: string, V1 error format.
782+
Allowed values
783+
1 - v1 error format
784+
2 - v2 error format
785+
786+
Returns:
787+
An object of the form:
788+
789+
{ # This resource represents a long-running operation that is the result of a network API call.
790+
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
791+
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
792+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
793+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
794+
{
795+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
796+
},
797+
],
798+
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
799+
},
800+
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
801+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
802+
},
803+
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
804+
&quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
805+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
806+
},
807+
}</pre>
808+
</div>
809+
765810
<div class="method">
766811
<code class="details" id="register">register(parent, body=None, x__xgafv=None)</code>
767812
<pre>Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.

docs/dyn/notebooks_v1.projects.locations.runtimes.html

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ <h2>Instance Methods</h2>
9898
<p class="toc_element">
9999
<code><a href="#list_next">list_next()</a></code></p>
100100
<p class="firstline">Retrieves the next page of results.</p>
101+
<p class="toc_element">
102+
<code><a href="#migrate">migrate(name, body=None, x__xgafv=None)</a></code></p>
103+
<p class="firstline">Migrate an existing Runtime to a new Workbench Instance.</p>
101104
<p class="toc_element">
102105
<code><a href="#patch">patch(name, body=None, requestId=None, updateMask=None, x__xgafv=None)</a></code></p>
103106
<p class="firstline">Update Notebook Runtime configuration.</p>
@@ -719,6 +722,52 @@ <h3>Method Details</h3>
719722
</pre>
720723
</div>
721724

725+
<div class="method">
726+
<code class="details" id="migrate">migrate(name, body=None, x__xgafv=None)</code>
727+
<pre>Migrate an existing Runtime to a new Workbench Instance.
728+
729+
Args:
730+
name: string, Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` (required)
731+
body: object, The request body.
732+
The object takes the form of:
733+
734+
{ # Request for migrating a Runtime to a Workbench Instance.
735+
&quot;network&quot;: &quot;A String&quot;, # Optional. Name of the VPC that the new Instance is in. This is required if the Runtime uses google-managed network. If the Runtime uses customer-owned network, it will reuse the same VPC, and this field must be empty. Format: `projects/{project_id}/global/networks/{network_id}`
736+
&quot;postStartupScriptOption&quot;: &quot;A String&quot;, # Optional. Specifies the behavior of post startup script during migration.
737+
&quot;requestId&quot;: &quot;A String&quot;, # Optional. Idempotent request UUID.
738+
&quot;serviceAccount&quot;: &quot;A String&quot;, # Optional. The service account to be included in the Compute Engine instance of the new Workbench Instance when the Runtime uses &quot;single user only&quot; mode for permission. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. When the Runtime uses service account mode for permission, it will reuse the same service account, and this field must be empty.
739+
&quot;subnet&quot;: &quot;A String&quot;, # Optional. Name of the subnet that the new Instance is in. This is required if the Runtime uses google-managed network. If the Runtime uses customer-owned network, it will reuse the same subnet, and this field must be empty. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
740+
}
741+
742+
x__xgafv: string, V1 error format.
743+
Allowed values
744+
1 - v1 error format
745+
2 - v2 error format
746+
747+
Returns:
748+
An object of the form:
749+
750+
{ # This resource represents a long-running operation that is the result of a network API call.
751+
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
752+
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
753+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
754+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
755+
{
756+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
757+
},
758+
],
759+
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
760+
},
761+
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
762+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
763+
},
764+
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
765+
&quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
766+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
767+
},
768+
}</pre>
769+
</div>
770+
722771
<div class="method">
723772
<code class="details" id="patch">patch(name, body=None, requestId=None, updateMask=None, x__xgafv=None)</code>
724773
<pre>Update Notebook Runtime configuration.

googleapiclient/discovery_cache/documents/notebooks.v1.json

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,34 @@
692692
"https://www.googleapis.com/auth/cloud-platform"
693693
]
694694
},
695+
"migrate": {
696+
"description": "Migrates an existing User-Managed Notebook to Workbench Instances.",
697+
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:migrate",
698+
"httpMethod": "POST",
699+
"id": "notebooks.projects.locations.instances.migrate",
700+
"parameterOrder": [
701+
"name"
702+
],
703+
"parameters": {
704+
"name": {
705+
"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`",
706+
"location": "path",
707+
"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$",
708+
"required": true,
709+
"type": "string"
710+
}
711+
},
712+
"path": "v1/{+name}:migrate",
713+
"request": {
714+
"$ref": "MigrateInstanceRequest"
715+
},
716+
"response": {
717+
"$ref": "Operation"
718+
},
719+
"scopes": [
720+
"https://www.googleapis.com/auth/cloud-platform"
721+
]
722+
},
695723
"register": {
696724
"description": "Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.",
697725
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances:register",
@@ -1493,6 +1521,34 @@
14931521
"https://www.googleapis.com/auth/cloud-platform"
14941522
]
14951523
},
1524+
"migrate": {
1525+
"description": "Migrate an existing Runtime to a new Workbench Instance.",
1526+
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:migrate",
1527+
"httpMethod": "POST",
1528+
"id": "notebooks.projects.locations.runtimes.migrate",
1529+
"parameterOrder": [
1530+
"name"
1531+
],
1532+
"parameters": {
1533+
"name": {
1534+
"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`",
1535+
"location": "path",
1536+
"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$",
1537+
"required": true,
1538+
"type": "string"
1539+
}
1540+
},
1541+
"path": "v1/{+name}:migrate",
1542+
"request": {
1543+
"$ref": "MigrateRuntimeRequest"
1544+
},
1545+
"response": {
1546+
"$ref": "Operation"
1547+
},
1548+
"scopes": [
1549+
"https://www.googleapis.com/auth/cloud-platform"
1550+
]
1551+
},
14961552
"patch": {
14971553
"description": "Update Notebook Runtime configuration.",
14981554
"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}",
@@ -1952,7 +2008,7 @@
19522008
}
19532009
}
19542010
},
1955-
"revision": "20230926",
2011+
"revision": "20231003",
19562012
"rootUrl": "https://notebooks.googleapis.com/",
19572013
"schemas": {
19582014
"AcceleratorConfig": {
@@ -2835,7 +2891,7 @@
28352891
],
28362892
"enumDescriptions": [
28372893
"Default type.",
2838-
"The UmN uses an machine type that's unsupported in WbI. It will be migrated with the default machine type n2-standard-4. Users can change the machine type after the migration.",
2894+
"The UmN uses an machine type that's unsupported in WbI. It will be migrated with the default machine type e2-standard-4. Users can change the machine type after the migration.",
28392895
"The UmN uses an accelerator type that's unsupported in WbI. It will be migrated without an accelerator. User can attach an accelerator after the migration.",
28402896
"The UmN uses an operating system that's unsupported in WbI (e.g. Debian 10, Ubuntu). It will be replaced with Debian 11 in WbI.",
28412897
"This UmN is configured with no_remove_data_disk, which is no longer available in WbI.",
@@ -3182,6 +3238,64 @@
31823238
},
31833239
"type": "object"
31843240
},
3241+
"MigrateInstanceRequest": {
3242+
"description": "Request for migrating a User-Managed Notebook to Workbench Instances.",
3243+
"id": "MigrateInstanceRequest",
3244+
"properties": {
3245+
"postStartupScriptOption": {
3246+
"description": "Optional. Specifies the behavior of post startup script during migration.",
3247+
"enum": [
3248+
"POST_STARTUP_SCRIPT_OPTION_UNSPECIFIED",
3249+
"POST_STARTUP_SCRIPT_OPTION_SKIP",
3250+
"POST_STARTUP_SCRIPT_OPTION_RERUN"
3251+
],
3252+
"enumDescriptions": [
3253+
"Post startup script option is not specified. Default is POST_STARTUP_SCRIPT_OPTION_SKIP.",
3254+
"Not migrate the post startup script to the new Workbench Instance.",
3255+
"Redownload and rerun the same post startup script as the User-Managed Notebook."
3256+
],
3257+
"type": "string"
3258+
}
3259+
},
3260+
"type": "object"
3261+
},
3262+
"MigrateRuntimeRequest": {
3263+
"description": "Request for migrating a Runtime to a Workbench Instance.",
3264+
"id": "MigrateRuntimeRequest",
3265+
"properties": {
3266+
"network": {
3267+
"description": "Optional. Name of the VPC that the new Instance is in. This is required if the Runtime uses google-managed network. If the Runtime uses customer-owned network, it will reuse the same VPC, and this field must be empty. Format: `projects/{project_id}/global/networks/{network_id}`",
3268+
"type": "string"
3269+
},
3270+
"postStartupScriptOption": {
3271+
"description": "Optional. Specifies the behavior of post startup script during migration.",
3272+
"enum": [
3273+
"POST_STARTUP_SCRIPT_OPTION_UNSPECIFIED",
3274+
"POST_STARTUP_SCRIPT_OPTION_SKIP",
3275+
"POST_STARTUP_SCRIPT_OPTION_RERUN"
3276+
],
3277+
"enumDescriptions": [
3278+
"Post startup script option is not specified. Default is POST_STARTUP_SCRIPT_OPTION_SKIP.",
3279+
"Not migrate the post startup script to the new Workbench Instance.",
3280+
"Redownload and rerun the same post startup script as the Google-Managed Notebook."
3281+
],
3282+
"type": "string"
3283+
},
3284+
"requestId": {
3285+
"description": "Optional. Idempotent request UUID.",
3286+
"type": "string"
3287+
},
3288+
"serviceAccount": {
3289+
"description": "Optional. The service account to be included in the Compute Engine instance of the new Workbench Instance when the Runtime uses \"single user only\" mode for permission. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. When the Runtime uses service account mode for permission, it will reuse the same service account, and this field must be empty.",
3290+
"type": "string"
3291+
},
3292+
"subnet": {
3293+
"description": "Optional. Name of the subnet that the new Instance is in. This is required if the Runtime uses google-managed network. If the Runtime uses customer-owned network, it will reuse the same subnet, and this field must be empty. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`",
3294+
"type": "string"
3295+
}
3296+
},
3297+
"type": "object"
3298+
},
31853299
"Operation": {
31863300
"description": "This resource represents a long-running operation that is the result of a network API call.",
31873301
"id": "Operation",

googleapiclient/discovery_cache/documents/notebooks.v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@
823823
}
824824
}
825825
},
826-
"revision": "20230926",
826+
"revision": "20231003",
827827
"rootUrl": "https://notebooks.googleapis.com/",
828828
"schemas": {
829829
"AcceleratorConfig": {

0 commit comments

Comments
 (0)