-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added UpdateRuntime, UpgradeRuntime, DiagnoseRuntime, DiagnoseI…
…nstance to v1 API feat: add Instance.reservation_affinity, nic_type, can_ip_forward to v1beta1 API feat: add IsInstanceUpgradeableResponse.upgrade_image to v1beta1 API feat: added Location and IAM methods fix: deprecate AcceleratorType.NVIDIA_TESLA_K80 PiperOrigin-RevId: 489032946 Source-Link: googleapis/googleapis@1d21a86 Source-Link: googleapis/googleapis-gen@6da6c08 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuTm90ZWJvb2tzLlYxLy5Pd2xCb3QueWFtbCIsImgiOiI2ZGE2YzA4NTBiMDJiMmYwZDZhYjljNTg2MmQwMjFjNGQxNmRhZGM5In0=
- Loading branch information
1 parent
0b4f620
commit 61da370
Showing
38 changed files
with
6,376 additions
and
695 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
...ebooks.V1.GeneratedSnippets/ManagedNotebookServiceClient.DiagnoseRuntimeAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.Notebooks.V1.Snippets | ||
{ | ||
// [START notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_async_flattened] | ||
using Google.Cloud.Notebooks.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedManagedNotebookServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DiagnoseRuntimeAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task DiagnoseRuntimeAsync() | ||
{ | ||
// Create client | ||
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]"; | ||
DiagnosticConfig diagnosticConfig = new DiagnosticConfig(); | ||
// Make the request | ||
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.DiagnoseRuntimeAsync(name, diagnosticConfig); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
Runtime result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDiagnoseRuntimeAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Runtime retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_async_flattened] | ||
} |
65 changes: 65 additions & 0 deletions
65
...eratedSnippets/ManagedNotebookServiceClient.DiagnoseRuntimeRequestObjectAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.Notebooks.V1.Snippets | ||
{ | ||
// [START notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_async] | ||
using Google.Cloud.Notebooks.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedManagedNotebookServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DiagnoseRuntimeAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task DiagnoseRuntimeRequestObjectAsync() | ||
{ | ||
// Create client | ||
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
DiagnoseRuntimeRequest request = new DiagnoseRuntimeRequest | ||
{ | ||
RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"), | ||
DiagnosticConfig = new DiagnosticConfig(), | ||
}; | ||
// Make the request | ||
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.DiagnoseRuntimeAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
Runtime result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDiagnoseRuntimeAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Runtime retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_async] | ||
} |
64 changes: 64 additions & 0 deletions
64
...1.GeneratedSnippets/ManagedNotebookServiceClient.DiagnoseRuntimeRequestObjectSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.Notebooks.V1.Snippets | ||
{ | ||
// [START notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync] | ||
using Google.Cloud.Notebooks.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedManagedNotebookServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DiagnoseRuntime</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void DiagnoseRuntimeRequestObject() | ||
{ | ||
// Create client | ||
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create(); | ||
// Initialize request argument(s) | ||
DiagnoseRuntimeRequest request = new DiagnoseRuntimeRequest | ||
{ | ||
RuntimeName = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"), | ||
DiagnosticConfig = new DiagnosticConfig(), | ||
}; | ||
// Make the request | ||
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.DiagnoseRuntime(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
Runtime result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceDiagnoseRuntime(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Runtime retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync] | ||
} |
62 changes: 62 additions & 0 deletions
62
...eratedSnippets/ManagedNotebookServiceClient.DiagnoseRuntimeResourceNamesAsyncSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.Notebooks.V1.Snippets | ||
{ | ||
// [START notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_async_flattened_resourceNames] | ||
using Google.Cloud.Notebooks.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedManagedNotebookServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DiagnoseRuntimeAsync</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public async Task DiagnoseRuntimeResourceNamesAsync() | ||
{ | ||
// Create client | ||
ManagedNotebookServiceClient managedNotebookServiceClient = await ManagedNotebookServiceClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"); | ||
DiagnosticConfig diagnosticConfig = new DiagnosticConfig(); | ||
// Make the request | ||
Operation<Runtime, OperationMetadata> response = await managedNotebookServiceClient.DiagnoseRuntimeAsync(name, diagnosticConfig); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<Runtime, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
Runtime result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<Runtime, OperationMetadata> retrievedResponse = await managedNotebookServiceClient.PollOnceDiagnoseRuntimeAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Runtime retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_async_flattened_resourceNames] | ||
} |
61 changes: 61 additions & 0 deletions
61
...1.GeneratedSnippets/ManagedNotebookServiceClient.DiagnoseRuntimeResourceNamesSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.Notebooks.V1.Snippets | ||
{ | ||
// [START notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync_flattened_resourceNames] | ||
using Google.Cloud.Notebooks.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedManagedNotebookServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DiagnoseRuntime</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void DiagnoseRuntimeResourceNames() | ||
{ | ||
// Create client | ||
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create(); | ||
// Initialize request argument(s) | ||
RuntimeName name = RuntimeName.FromProjectLocationRuntime("[PROJECT]", "[LOCATION]", "[RUNTIME]"); | ||
DiagnosticConfig diagnosticConfig = new DiagnosticConfig(); | ||
// Make the request | ||
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.DiagnoseRuntime(name, diagnosticConfig); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
Runtime result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceDiagnoseRuntime(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Runtime retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync_flattened_resourceNames] | ||
} |
61 changes: 61 additions & 0 deletions
61
...d.Notebooks.V1.GeneratedSnippets/ManagedNotebookServiceClient.DiagnoseRuntimeSnippet.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
// Generated code. DO NOT EDIT! | ||
|
||
namespace Google.Cloud.Notebooks.V1.Snippets | ||
{ | ||
// [START notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync_flattened] | ||
using Google.Cloud.Notebooks.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedManagedNotebookServiceClientSnippets | ||
{ | ||
/// <summary>Snippet for DiagnoseRuntime</summary> | ||
/// <remarks> | ||
/// This snippet has been automatically generated and should be regarded as a code template only. | ||
/// It will require modifications to work: | ||
/// - It may require correct/in-range values for request initialization. | ||
/// - It may require specifying regional endpoints when creating the service client as shown in | ||
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. | ||
/// </remarks> | ||
public void DiagnoseRuntime() | ||
{ | ||
// Create client | ||
ManagedNotebookServiceClient managedNotebookServiceClient = ManagedNotebookServiceClient.Create(); | ||
// Initialize request argument(s) | ||
string name = "projects/[PROJECT]/locations/[LOCATION]/runtimes/[RUNTIME]"; | ||
DiagnosticConfig diagnosticConfig = new DiagnosticConfig(); | ||
// Make the request | ||
Operation<Runtime, OperationMetadata> response = managedNotebookServiceClient.DiagnoseRuntime(name, diagnosticConfig); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<Runtime, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
Runtime result = completedResponse.Result; | ||
|
||
// Or get the name of the operation | ||
string operationName = response.Name; | ||
// This name can be stored, then the long-running operation retrieved later by name | ||
Operation<Runtime, OperationMetadata> retrievedResponse = managedNotebookServiceClient.PollOnceDiagnoseRuntime(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Runtime retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync_flattened] | ||
} |
Oops, something went wrong.