-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update Compute Engine API to revision 20241201 (#966)
Source-Link: googleapis/googleapis@5d5b1bf Source-Link: googleapis/googleapis-gen@c735b61 Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuQ29tcHV0ZS5WMS8uT3dsQm90LnlhbWwiLCJoIjoiYzczNWI2MTkzZGFlYmFhOWM0NWMyZTIzMTUzYWYxNmFlZTczMmZlNiJ9
- Loading branch information
1 parent
da4a57a
commit bf272aa
Showing
59 changed files
with
71,450 additions
and
50,598 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
...Compute.V1.GeneratedSnippets/InstanceGroupManagersClient.ResumeInstancesAsyncSnippet.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,66 @@ | ||
// Copyright 2024 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! | ||
|
||
#pragma warning disable CS8981 | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START compute_v1_generated_InstanceGroupManagers_ResumeInstances_async_flattened] | ||
using Google.Cloud.Compute.V1; | ||
using System.Threading.Tasks; | ||
using lro = Google.LongRunning; | ||
|
||
public sealed partial class GeneratedInstanceGroupManagersClientSnippets | ||
{ | ||
/// <summary>Snippet for ResumeInstancesAsync</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 ResumeInstancesAsync() | ||
{ | ||
// Create client | ||
InstanceGroupManagersClient instanceGroupManagersClient = await InstanceGroupManagersClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string project = ""; | ||
string zone = ""; | ||
string instanceGroupManager = ""; | ||
InstanceGroupManagersResumeInstancesRequest instanceGroupManagersResumeInstancesRequestResource = new InstanceGroupManagersResumeInstancesRequest(); | ||
// Make the request | ||
lro::Operation<Operation, Operation> response = await instanceGroupManagersClient.ResumeInstancesAsync(project, zone, instanceGroupManager, instanceGroupManagersResumeInstancesRequestResource); | ||
|
||
// Poll until the returned long-running operation is complete | ||
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
Operation 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 | ||
lro::Operation<Operation, Operation> retrievedResponse = await instanceGroupManagersClient.PollOnceResumeInstancesAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Operation retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END compute_v1_generated_InstanceGroupManagers_ResumeInstances_async_flattened] | ||
} |
70 changes: 70 additions & 0 deletions
70
...neratedSnippets/InstanceGroupManagersClient.ResumeInstancesRequestObjectAsyncSnippet.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,70 @@ | ||
// Copyright 2024 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! | ||
|
||
#pragma warning disable CS8981 | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START compute_v1_generated_InstanceGroupManagers_ResumeInstances_async] | ||
using Google.Cloud.Compute.V1; | ||
using System.Threading.Tasks; | ||
using lro = Google.LongRunning; | ||
|
||
public sealed partial class GeneratedInstanceGroupManagersClientSnippets | ||
{ | ||
/// <summary>Snippet for ResumeInstancesAsync</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 ResumeInstancesRequestObjectAsync() | ||
{ | ||
// Create client | ||
InstanceGroupManagersClient instanceGroupManagersClient = await InstanceGroupManagersClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
ResumeInstancesInstanceGroupManagerRequest request = new ResumeInstancesInstanceGroupManagerRequest | ||
{ | ||
Zone = "", | ||
RequestId = "", | ||
InstanceGroupManagersResumeInstancesRequestResource = new InstanceGroupManagersResumeInstancesRequest(), | ||
Project = "", | ||
InstanceGroupManager = "", | ||
}; | ||
// Make the request | ||
lro::Operation<Operation, Operation> response = await instanceGroupManagersClient.ResumeInstancesAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
Operation 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 | ||
lro::Operation<Operation, Operation> retrievedResponse = await instanceGroupManagersClient.PollOnceResumeInstancesAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Operation retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END compute_v1_generated_InstanceGroupManagers_ResumeInstances_async] | ||
} |
69 changes: 69 additions & 0 deletions
69
...V1.GeneratedSnippets/InstanceGroupManagersClient.ResumeInstancesRequestObjectSnippet.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,69 @@ | ||
// Copyright 2024 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! | ||
|
||
#pragma warning disable CS8981 | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START compute_v1_generated_InstanceGroupManagers_ResumeInstances_sync] | ||
using Google.Cloud.Compute.V1; | ||
using lro = Google.LongRunning; | ||
|
||
public sealed partial class GeneratedInstanceGroupManagersClientSnippets | ||
{ | ||
/// <summary>Snippet for ResumeInstances</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 ResumeInstancesRequestObject() | ||
{ | ||
// Create client | ||
InstanceGroupManagersClient instanceGroupManagersClient = InstanceGroupManagersClient.Create(); | ||
// Initialize request argument(s) | ||
ResumeInstancesInstanceGroupManagerRequest request = new ResumeInstancesInstanceGroupManagerRequest | ||
{ | ||
Zone = "", | ||
RequestId = "", | ||
InstanceGroupManagersResumeInstancesRequestResource = new InstanceGroupManagersResumeInstancesRequest(), | ||
Project = "", | ||
InstanceGroupManager = "", | ||
}; | ||
// Make the request | ||
lro::Operation<Operation, Operation> response = instanceGroupManagersClient.ResumeInstances(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
Operation 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 | ||
lro::Operation<Operation, Operation> retrievedResponse = instanceGroupManagersClient.PollOnceResumeInstances(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Operation retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END compute_v1_generated_InstanceGroupManagers_ResumeInstances_sync] | ||
} |
65 changes: 65 additions & 0 deletions
65
...loud.Compute.V1.GeneratedSnippets/InstanceGroupManagersClient.ResumeInstancesSnippet.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 2024 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! | ||
|
||
#pragma warning disable CS8981 | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START compute_v1_generated_InstanceGroupManagers_ResumeInstances_sync_flattened] | ||
using Google.Cloud.Compute.V1; | ||
using lro = Google.LongRunning; | ||
|
||
public sealed partial class GeneratedInstanceGroupManagersClientSnippets | ||
{ | ||
/// <summary>Snippet for ResumeInstances</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 ResumeInstances() | ||
{ | ||
// Create client | ||
InstanceGroupManagersClient instanceGroupManagersClient = InstanceGroupManagersClient.Create(); | ||
// Initialize request argument(s) | ||
string project = ""; | ||
string zone = ""; | ||
string instanceGroupManager = ""; | ||
InstanceGroupManagersResumeInstancesRequest instanceGroupManagersResumeInstancesRequestResource = new InstanceGroupManagersResumeInstancesRequest(); | ||
// Make the request | ||
lro::Operation<Operation, Operation> response = instanceGroupManagersClient.ResumeInstances(project, zone, instanceGroupManager, instanceGroupManagersResumeInstancesRequestResource); | ||
|
||
// Poll until the returned long-running operation is complete | ||
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
Operation 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 | ||
lro::Operation<Operation, Operation> retrievedResponse = instanceGroupManagersClient.PollOnceResumeInstances(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Operation retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END compute_v1_generated_InstanceGroupManagers_ResumeInstances_sync_flattened] | ||
} |
66 changes: 66 additions & 0 deletions
66
....Compute.V1.GeneratedSnippets/InstanceGroupManagersClient.StartInstancesAsyncSnippet.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,66 @@ | ||
// Copyright 2024 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! | ||
|
||
#pragma warning disable CS8981 | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START compute_v1_generated_InstanceGroupManagers_StartInstances_async_flattened] | ||
using Google.Cloud.Compute.V1; | ||
using System.Threading.Tasks; | ||
using lro = Google.LongRunning; | ||
|
||
public sealed partial class GeneratedInstanceGroupManagersClientSnippets | ||
{ | ||
/// <summary>Snippet for StartInstancesAsync</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 StartInstancesAsync() | ||
{ | ||
// Create client | ||
InstanceGroupManagersClient instanceGroupManagersClient = await InstanceGroupManagersClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string project = ""; | ||
string zone = ""; | ||
string instanceGroupManager = ""; | ||
InstanceGroupManagersStartInstancesRequest instanceGroupManagersStartInstancesRequestResource = new InstanceGroupManagersStartInstancesRequest(); | ||
// Make the request | ||
lro::Operation<Operation, Operation> response = await instanceGroupManagersClient.StartInstancesAsync(project, zone, instanceGroupManager, instanceGroupManagersStartInstancesRequestResource); | ||
|
||
// Poll until the returned long-running operation is complete | ||
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
Operation 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 | ||
lro::Operation<Operation, Operation> retrievedResponse = await instanceGroupManagersClient.PollOnceStartInstancesAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
Operation retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END compute_v1_generated_InstanceGroupManagers_StartInstances_async_flattened] | ||
} |
Oops, something went wrong.