-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added support for optionally disabling built-in GKE metrics
feat: added tag bindings support for Attached Clusters docs: updated comments of existing fields PiperOrigin-RevId: 708397945 Source-Link: googleapis/googleapis@09b3c83 Source-Link: googleapis/googleapis-gen@822c2ac Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuR2tlTXVsdGlDbG91ZC5WMS8uT3dsQm90LnlhbWwiLCJoIjoiODIyYzJhY2FmN2FmMDdkZmJiN2Y4NmNlMmUyZTBmMmU3NDRiNzJlNSJ9
- Loading branch information
1 parent
b5594d6
commit 82bff74
Showing
255 changed files
with
93,207 additions
and
0 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
...iCloud.V1.GeneratedSnippets/AttachedClustersClient.CreateAttachedClusterAsyncSnippet.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,63 @@ | ||
// 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! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async_flattened] | ||
using Google.Cloud.GkeMultiCloud.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedAttachedClustersClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateAttachedClusterAsync</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 CreateAttachedClusterAsync() | ||
{ | ||
// Create client | ||
AttachedClustersClient attachedClustersClient = await AttachedClustersClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]"; | ||
AttachedCluster attachedCluster = new AttachedCluster(); | ||
string attachedClusterId = ""; | ||
// Make the request | ||
Operation<AttachedCluster, OperationMetadata> response = await attachedClustersClient.CreateAttachedClusterAsync(parent, attachedCluster, attachedClusterId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<AttachedCluster, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
AttachedCluster 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<AttachedCluster, OperationMetadata> retrievedResponse = await attachedClustersClient.PollOnceCreateAttachedClusterAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
AttachedCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async_flattened] | ||
} |
68 changes: 68 additions & 0 deletions
68
...eratedSnippets/AttachedClustersClient.CreateAttachedClusterRequestObjectAsyncSnippet.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,68 @@ | ||
// 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! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.GkeMultiCloud.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedAttachedClustersClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateAttachedClusterAsync</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 CreateAttachedClusterRequestObjectAsync() | ||
{ | ||
// Create client | ||
AttachedClustersClient attachedClustersClient = await AttachedClustersClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
CreateAttachedClusterRequest request = new CreateAttachedClusterRequest | ||
{ | ||
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), | ||
AttachedCluster = new AttachedCluster(), | ||
AttachedClusterId = "", | ||
ValidateOnly = false, | ||
}; | ||
// Make the request | ||
Operation<AttachedCluster, OperationMetadata> response = await attachedClustersClient.CreateAttachedClusterAsync(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<AttachedCluster, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
AttachedCluster 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<AttachedCluster, OperationMetadata> retrievedResponse = await attachedClustersClient.PollOnceCreateAttachedClusterAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
AttachedCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async] | ||
} |
67 changes: 67 additions & 0 deletions
67
...1.GeneratedSnippets/AttachedClustersClient.CreateAttachedClusterRequestObjectSnippet.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,67 @@ | ||
// 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! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.GkeMultiCloud.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedAttachedClustersClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateAttachedCluster</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 CreateAttachedClusterRequestObject() | ||
{ | ||
// Create client | ||
AttachedClustersClient attachedClustersClient = AttachedClustersClient.Create(); | ||
// Initialize request argument(s) | ||
CreateAttachedClusterRequest request = new CreateAttachedClusterRequest | ||
{ | ||
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"), | ||
AttachedCluster = new AttachedCluster(), | ||
AttachedClusterId = "", | ||
ValidateOnly = false, | ||
}; | ||
// Make the request | ||
Operation<AttachedCluster, OperationMetadata> response = attachedClustersClient.CreateAttachedCluster(request); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<AttachedCluster, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
AttachedCluster 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<AttachedCluster, OperationMetadata> retrievedResponse = attachedClustersClient.PollOnceCreateAttachedCluster(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
AttachedCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync] | ||
} |
64 changes: 64 additions & 0 deletions
64
...eratedSnippets/AttachedClustersClient.CreateAttachedClusterResourceNamesAsyncSnippet.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 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! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async_flattened_resourceNames] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.GkeMultiCloud.V1; | ||
using Google.LongRunning; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedAttachedClustersClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateAttachedClusterAsync</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 CreateAttachedClusterResourceNamesAsync() | ||
{ | ||
// Create client | ||
AttachedClustersClient attachedClustersClient = await AttachedClustersClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); | ||
AttachedCluster attachedCluster = new AttachedCluster(); | ||
string attachedClusterId = ""; | ||
// Make the request | ||
Operation<AttachedCluster, OperationMetadata> response = await attachedClustersClient.CreateAttachedClusterAsync(parent, attachedCluster, attachedClusterId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<AttachedCluster, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync(); | ||
// Retrieve the operation result | ||
AttachedCluster 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<AttachedCluster, OperationMetadata> retrievedResponse = await attachedClustersClient.PollOnceCreateAttachedClusterAsync(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
AttachedCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_async_flattened_resourceNames] | ||
} |
63 changes: 63 additions & 0 deletions
63
...1.GeneratedSnippets/AttachedClustersClient.CreateAttachedClusterResourceNamesSnippet.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,63 @@ | ||
// 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! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync_flattened_resourceNames] | ||
using Google.Api.Gax.ResourceNames; | ||
using Google.Cloud.GkeMultiCloud.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedAttachedClustersClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateAttachedCluster</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 CreateAttachedClusterResourceNames() | ||
{ | ||
// Create client | ||
AttachedClustersClient attachedClustersClient = AttachedClustersClient.Create(); | ||
// Initialize request argument(s) | ||
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"); | ||
AttachedCluster attachedCluster = new AttachedCluster(); | ||
string attachedClusterId = ""; | ||
// Make the request | ||
Operation<AttachedCluster, OperationMetadata> response = attachedClustersClient.CreateAttachedCluster(parent, attachedCluster, attachedClusterId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<AttachedCluster, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
AttachedCluster 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<AttachedCluster, OperationMetadata> retrievedResponse = attachedClustersClient.PollOnceCreateAttachedCluster(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
AttachedCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync_flattened_resourceNames] | ||
} |
62 changes: 62 additions & 0 deletions
62
...eMultiCloud.V1.GeneratedSnippets/AttachedClustersClient.CreateAttachedClusterSnippet.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 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! | ||
|
||
namespace GoogleCSharpSnippets | ||
{ | ||
// [START gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync_flattened] | ||
using Google.Cloud.GkeMultiCloud.V1; | ||
using Google.LongRunning; | ||
|
||
public sealed partial class GeneratedAttachedClustersClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateAttachedCluster</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 CreateAttachedCluster() | ||
{ | ||
// Create client | ||
AttachedClustersClient attachedClustersClient = AttachedClustersClient.Create(); | ||
// Initialize request argument(s) | ||
string parent = "projects/[PROJECT]/locations/[LOCATION]"; | ||
AttachedCluster attachedCluster = new AttachedCluster(); | ||
string attachedClusterId = ""; | ||
// Make the request | ||
Operation<AttachedCluster, OperationMetadata> response = attachedClustersClient.CreateAttachedCluster(parent, attachedCluster, attachedClusterId); | ||
|
||
// Poll until the returned long-running operation is complete | ||
Operation<AttachedCluster, OperationMetadata> completedResponse = response.PollUntilCompleted(); | ||
// Retrieve the operation result | ||
AttachedCluster 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<AttachedCluster, OperationMetadata> retrievedResponse = attachedClustersClient.PollOnceCreateAttachedCluster(operationName); | ||
// Check if the retrieved long-running operation has completed | ||
if (retrievedResponse.IsCompleted) | ||
{ | ||
// If it has completed, then access the result | ||
AttachedCluster retrievedResult = retrievedResponse.Result; | ||
} | ||
} | ||
} | ||
// [END gkemulticloud_v1_generated_AttachedClusters_CreateAttachedCluster_sync_flattened] | ||
} |
Oops, something went wrong.