From 9ff1945acf3a74221759c2ceb9eb9a22c22b7c09 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Tue, 11 Oct 2022 07:18:46 +0000 Subject: [PATCH] feat(notebooks): update the api #### notebooks:v1 The following keys were added: - resources.projects.resources.locations.resources.instances.methods.diagnose (Total Keys: 12) - resources.projects.resources.locations.resources.runtimes.methods.diagnose (Total Keys: 12) - resources.projects.resources.locations.resources.runtimes.methods.upgrade (Total Keys: 12) - schemas.DiagnoseInstanceRequest (Total Keys: 3) - schemas.DiagnoseRuntimeRequest (Total Keys: 3) - schemas.DiagnosticConfig (Total Keys: 7) - schemas.UpgradeRuntimeRequest (Total Keys: 3) --- ...books_v1.projects.locations.instances.html | 51 ++++++ ...ebooks_v1.projects.locations.runtimes.html | 96 ++++++++++++ .../documents/notebooks.v1.json | 146 +++++++++++++++++- 3 files changed, 292 insertions(+), 1 deletion(-) diff --git a/docs/dyn/notebooks_v1.projects.locations.instances.html b/docs/dyn/notebooks_v1.projects.locations.instances.html index 03c5cc0fa2f..450879cfeb9 100644 --- a/docs/dyn/notebooks_v1.projects.locations.instances.html +++ b/docs/dyn/notebooks_v1.projects.locations.instances.html @@ -83,6 +83,9 @@

Instance Methods

delete(name, x__xgafv=None)

Deletes a single Instance.

+

+ diagnose(name, body=None, x__xgafv=None)

+

Creates a Diagnostic File and runs Diagnostic Tool given an Instance.

get(name, x__xgafv=None)

Gets details of a single Instance.

@@ -332,6 +335,54 @@

Method Details

} +
+ diagnose(name, body=None, x__xgafv=None) +
Creates a Diagnostic File and runs Diagnostic Tool given an Instance.
+
+Args:
+  name: string, Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}` (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request for creating a notebook instance diagnostic file.
+  "diagnosticConfig": { # Defines flags that are used to run the diagnostic tool # Required. Defines flags that are used to run the diagnostic tool
+    "copyHomeFilesFlagEnabled": True or False, # Optional. Enables flag to copy all `/home/jupyter` folder contents
+    "gcsBucket": "A String", # Required. User Cloud Storage bucket location (REQUIRED) ## Must be formatted with path prefix (gs://$GCS_BUCKET) Permissions: User Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account attached to VM. Google Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account or ## user credentials attached to VM depending on authentication mode. Cloud Storage bucket Log file will be written to gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz
+    "packetCaptureFlagEnabled": True or False, # Optional. Enables flag to capture packets from the instance for 30 seconds
+    "relativePath": "A String", # Optional. Defines the relative storage path in the Cloud Storage bucket where the diagnostic logs will be written: Default path will be the root directory of the Cloud Storage bucket (gs://$GCS_BUCKET/$DATE_$TIME.tar.gz) Example of full path where Log file will be written: gs://$GCS_BUCKET/$RELATIVE_PATH/
+    "repairFlagEnabled": True or False, # Optional. Enables flag to repair service for instance
+  },
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # This resource represents a long-running operation that is the result of a network API call.
+  "done": 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.
+  "error": { # 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.
+    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
+    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
+      {
+        "a_key": "", # Properties of the object. Contains field @type with type URL.
+      },
+    ],
+    "message": "A String", # 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.
+  },
+  "metadata": { # 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.
+    "a_key": "", # Properties of the object. Contains field @type with type URL.
+  },
+  "name": "A String", # 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}`.
+  "response": { # The normal response of the operation in case of success. 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`.
+    "a_key": "", # Properties of the object. Contains field @type with type URL.
+  },
+}
+
+
get(name, x__xgafv=None)
Gets details of a single Instance.
diff --git a/docs/dyn/notebooks_v1.projects.locations.runtimes.html b/docs/dyn/notebooks_v1.projects.locations.runtimes.html
index 16592ef028a..52d3eae0fff 100644
--- a/docs/dyn/notebooks_v1.projects.locations.runtimes.html
+++ b/docs/dyn/notebooks_v1.projects.locations.runtimes.html
@@ -83,6 +83,9 @@ 

Instance Methods

delete(name, requestId=None, x__xgafv=None)

Deletes a single Runtime.

+

+ diagnose(name, body=None, x__xgafv=None)

+

Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.

get(name, x__xgafv=None)

Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.

@@ -122,6 +125,9 @@

Instance Methods

testIamPermissions(resource, body=None, x__xgafv=None)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

+

+ upgrade(name, body=None, x__xgafv=None)

+

Upgrades a Managed Notebook Runtime to the latest version.

Method Details

close() @@ -313,6 +319,54 @@

Method Details

}
+
+ diagnose(name, body=None, x__xgafv=None) +
Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.
+
+Args:
+  name: string, Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request for creating a notebook instance diagnostic file.
+  "diagnosticConfig": { # Defines flags that are used to run the diagnostic tool # Required. Defines flags that are used to run the diagnostic tool
+    "copyHomeFilesFlagEnabled": True or False, # Optional. Enables flag to copy all `/home/jupyter` folder contents
+    "gcsBucket": "A String", # Required. User Cloud Storage bucket location (REQUIRED) ## Must be formatted with path prefix (gs://$GCS_BUCKET) Permissions: User Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account attached to VM. Google Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account or ## user credentials attached to VM depending on authentication mode. Cloud Storage bucket Log file will be written to gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz
+    "packetCaptureFlagEnabled": True or False, # Optional. Enables flag to capture packets from the instance for 30 seconds
+    "relativePath": "A String", # Optional. Defines the relative storage path in the Cloud Storage bucket where the diagnostic logs will be written: Default path will be the root directory of the Cloud Storage bucket (gs://$GCS_BUCKET/$DATE_$TIME.tar.gz) Example of full path where Log file will be written: gs://$GCS_BUCKET/$RELATIVE_PATH/
+    "repairFlagEnabled": True or False, # Optional. Enables flag to repair service for instance
+  },
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # This resource represents a long-running operation that is the result of a network API call.
+  "done": 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.
+  "error": { # 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.
+    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
+    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
+      {
+        "a_key": "", # Properties of the object. Contains field @type with type URL.
+      },
+    ],
+    "message": "A String", # 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.
+  },
+  "metadata": { # 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.
+    "a_key": "", # Properties of the object. Contains field @type with type URL.
+  },
+  "name": "A String", # 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}`.
+  "response": { # The normal response of the operation in case of success. 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`.
+    "a_key": "", # Properties of the object. Contains field @type with type URL.
+  },
+}
+
+
get(name, x__xgafv=None)
Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.
@@ -1106,4 +1160,46 @@ 

Method Details

}
+
+ upgrade(name, body=None, x__xgafv=None) +
Upgrades a Managed Notebook Runtime to the latest version.
+
+Args:
+  name: string, Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` (required)
+  body: object, The request body.
+    The object takes the form of:
+
+{ # Request for upgrading a Managed Notebook Runtime to the latest version. option (google.api.message_visibility).restriction = "TRUSTED_TESTER,SPECIAL_TESTER";
+  "requestId": "A String", # Idempotent request UUID.
+}
+
+  x__xgafv: string, V1 error format.
+    Allowed values
+      1 - v1 error format
+      2 - v2 error format
+
+Returns:
+  An object of the form:
+
+    { # This resource represents a long-running operation that is the result of a network API call.
+  "done": 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.
+  "error": { # 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.
+    "code": 42, # The status code, which should be an enum value of google.rpc.Code.
+    "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
+      {
+        "a_key": "", # Properties of the object. Contains field @type with type URL.
+      },
+    ],
+    "message": "A String", # 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.
+  },
+  "metadata": { # 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.
+    "a_key": "", # Properties of the object. Contains field @type with type URL.
+  },
+  "name": "A String", # 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}`.
+  "response": { # The normal response of the operation in case of success. 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`.
+    "a_key": "", # Properties of the object. Contains field @type with type URL.
+  },
+}
+
+ \ No newline at end of file diff --git a/googleapiclient/discovery_cache/documents/notebooks.v1.json b/googleapiclient/discovery_cache/documents/notebooks.v1.json index 51563dda0a7..0c95794c501 100644 --- a/googleapiclient/discovery_cache/documents/notebooks.v1.json +++ b/googleapiclient/discovery_cache/documents/notebooks.v1.json @@ -493,6 +493,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "diagnose": { + "description": "Creates a Diagnostic File and runs Diagnostic Tool given an Instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:diagnose", + "httpMethod": "POST", + "id": "notebooks.projects.locations.instances.diagnose", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:diagnose", + "request": { + "$ref": "DiagnoseInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets details of a single Instance.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", @@ -1297,6 +1325,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "diagnose": { + "description": "Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:diagnose", + "httpMethod": "POST", + "id": "notebooks.projects.locations.runtimes.diagnose", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:diagnose", + "request": { + "$ref": "DiagnoseRuntimeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}", @@ -1651,6 +1707,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "upgrade": { + "description": "Upgrades a Managed Notebook Runtime to the latest version.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:upgrade", + "httpMethod": "POST", + "id": "notebooks.projects.locations.runtimes.upgrade", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:upgrade", + "request": { + "$ref": "UpgradeRuntimeRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1820,7 +1904,7 @@ } } }, - "revision": "20220909", + "revision": "20220927", "rootUrl": "https://notebooks.googleapis.com/", "schemas": { "AcceleratorConfig": { @@ -1927,6 +2011,55 @@ }, "type": "object" }, + "DiagnoseInstanceRequest": { + "description": "Request for creating a notebook instance diagnostic file.", + "id": "DiagnoseInstanceRequest", + "properties": { + "diagnosticConfig": { + "$ref": "DiagnosticConfig", + "description": "Required. Defines flags that are used to run the diagnostic tool" + } + }, + "type": "object" + }, + "DiagnoseRuntimeRequest": { + "description": "Request for creating a notebook instance diagnostic file.", + "id": "DiagnoseRuntimeRequest", + "properties": { + "diagnosticConfig": { + "$ref": "DiagnosticConfig", + "description": "Required. Defines flags that are used to run the diagnostic tool" + } + }, + "type": "object" + }, + "DiagnosticConfig": { + "description": "Defines flags that are used to run the diagnostic tool", + "id": "DiagnosticConfig", + "properties": { + "copyHomeFilesFlagEnabled": { + "description": "Optional. Enables flag to copy all `/home/jupyter` folder contents", + "type": "boolean" + }, + "gcsBucket": { + "description": "Required. User Cloud Storage bucket location (REQUIRED) ## Must be formatted with path prefix (gs://$GCS_BUCKET) Permissions: User Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account attached to VM. Google Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account or ## user credentials attached to VM depending on authentication mode. Cloud Storage bucket Log file will be written to gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz", + "type": "string" + }, + "packetCaptureFlagEnabled": { + "description": "Optional. Enables flag to capture packets from the instance for 30 seconds", + "type": "boolean" + }, + "relativePath": { + "description": "Optional. Defines the relative storage path in the Cloud Storage bucket where the diagnostic logs will be written: Default path will be the root directory of the Cloud Storage bucket (gs://$GCS_BUCKET/$DATE_$TIME.tar.gz) Example of full path where Log file will be written: gs://$GCS_BUCKET/$RELATIVE_PATH/", + "type": "string" + }, + "repairFlagEnabled": { + "description": "Optional. Enables flag to repair service for instance", + "type": "boolean" + } + }, + "type": "object" + }, "Disk": { "description": "An instance-attached disk resource.", "id": "Disk", @@ -3934,6 +4067,17 @@ }, "type": "object" }, + "UpgradeRuntimeRequest": { + "description": "Request for upgrading a Managed Notebook Runtime to the latest version. option (google.api.message_visibility).restriction = \"TRUSTED_TESTER,SPECIAL_TESTER\";", + "id": "UpgradeRuntimeRequest", + "properties": { + "requestId": { + "description": "Idempotent request UUID.", + "type": "string" + } + }, + "type": "object" + }, "VertexAIParameters": { "description": "Parameters used in Vertex AI JobType executions.", "id": "VertexAIParameters",