Skip to content

Commit 1183442

Browse files
regen: Regenerate Google.Cloud.Kms.V1 at API commit d9f058d
feat: add the SingleTenantHsm functionality including the management API and resource types docs: A comment for field `crypto_key_backend` in message `.google.cloud.kms.v1.CryptoKey` is expanded to include SingleTenantHsmInstances docs: A comment for enum value `MODIFIED_CUSTOMER_INITIATED_ACCESS` in enum `AccessReason` is changed docs: A comment for enum value `MODIFIED_GOOGLE_INITIATED_SYSTEM_OPERATION` in enum `AccessReason` is changed PiperOrigin-RevId: 858582271 Source-Link: googleapis/googleapis@d9f058d
1 parent cd80105 commit 1183442

File tree

68 files changed

+21109
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+21109
-185
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_async_flattened]
20+
using Google.Cloud.Kms.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedHsmManagementClientSnippets
24+
{
25+
/// <summary>Snippet for ApproveSingleTenantHsmInstanceProposalAsync</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public async Task ApproveSingleTenantHsmInstanceProposalAsync()
34+
{
35+
// Create client
36+
HsmManagementClient hsmManagementClient = await HsmManagementClient.CreateAsync();
37+
// Initialize request argument(s)
38+
string name = "projects/[PROJECT]/locations/[LOCATION]/singleTenantHsmInstances/[SINGLE_TENANT_HSM_INSTANCE]/proposals/[PROPOSAL]";
39+
ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply quorumReply = new ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply();
40+
// Make the request
41+
ApproveSingleTenantHsmInstanceProposalResponse response = await hsmManagementClient.ApproveSingleTenantHsmInstanceProposalAsync(name, quorumReply);
42+
}
43+
}
44+
// [END cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_async_flattened]
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_async]
20+
using Google.Cloud.Kms.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedHsmManagementClientSnippets
24+
{
25+
/// <summary>Snippet for ApproveSingleTenantHsmInstanceProposalAsync</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public async Task ApproveSingleTenantHsmInstanceProposalRequestObjectAsync()
34+
{
35+
// Create client
36+
HsmManagementClient hsmManagementClient = await HsmManagementClient.CreateAsync();
37+
// Initialize request argument(s)
38+
ApproveSingleTenantHsmInstanceProposalRequest request = new ApproveSingleTenantHsmInstanceProposalRequest
39+
{
40+
SingleTenantHsmInstanceProposalName = SingleTenantHsmInstanceProposalName.FromProjectLocationSingleTenantHsmInstanceProposal("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]"),
41+
QuorumReply = new ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply(),
42+
};
43+
// Make the request
44+
ApproveSingleTenantHsmInstanceProposalResponse response = await hsmManagementClient.ApproveSingleTenantHsmInstanceProposalAsync(request);
45+
}
46+
}
47+
// [END cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_async]
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_sync]
20+
using Google.Cloud.Kms.V1;
21+
22+
public sealed partial class GeneratedHsmManagementClientSnippets
23+
{
24+
/// <summary>Snippet for ApproveSingleTenantHsmInstanceProposal</summary>
25+
/// <remarks>
26+
/// This snippet has been automatically generated and should be regarded as a code template only.
27+
/// It will require modifications to work:
28+
/// - It may require correct/in-range values for request initialization.
29+
/// - It may require specifying regional endpoints when creating the service client as shown in
30+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
/// </remarks>
32+
public void ApproveSingleTenantHsmInstanceProposalRequestObject()
33+
{
34+
// Create client
35+
HsmManagementClient hsmManagementClient = HsmManagementClient.Create();
36+
// Initialize request argument(s)
37+
ApproveSingleTenantHsmInstanceProposalRequest request = new ApproveSingleTenantHsmInstanceProposalRequest
38+
{
39+
SingleTenantHsmInstanceProposalName = SingleTenantHsmInstanceProposalName.FromProjectLocationSingleTenantHsmInstanceProposal("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]"),
40+
QuorumReply = new ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply(),
41+
};
42+
// Make the request
43+
ApproveSingleTenantHsmInstanceProposalResponse response = hsmManagementClient.ApproveSingleTenantHsmInstanceProposal(request);
44+
}
45+
}
46+
// [END cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_sync]
47+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_async_flattened_resourceNames]
20+
using Google.Cloud.Kms.V1;
21+
using System.Threading.Tasks;
22+
23+
public sealed partial class GeneratedHsmManagementClientSnippets
24+
{
25+
/// <summary>Snippet for ApproveSingleTenantHsmInstanceProposalAsync</summary>
26+
/// <remarks>
27+
/// This snippet has been automatically generated and should be regarded as a code template only.
28+
/// It will require modifications to work:
29+
/// - It may require correct/in-range values for request initialization.
30+
/// - It may require specifying regional endpoints when creating the service client as shown in
31+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
32+
/// </remarks>
33+
public async Task ApproveSingleTenantHsmInstanceProposalResourceNamesAsync()
34+
{
35+
// Create client
36+
HsmManagementClient hsmManagementClient = await HsmManagementClient.CreateAsync();
37+
// Initialize request argument(s)
38+
SingleTenantHsmInstanceProposalName name = SingleTenantHsmInstanceProposalName.FromProjectLocationSingleTenantHsmInstanceProposal("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]");
39+
ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply quorumReply = new ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply();
40+
// Make the request
41+
ApproveSingleTenantHsmInstanceProposalResponse response = await hsmManagementClient.ApproveSingleTenantHsmInstanceProposalAsync(name, quorumReply);
42+
}
43+
}
44+
// [END cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_async_flattened_resourceNames]
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_sync_flattened_resourceNames]
20+
using Google.Cloud.Kms.V1;
21+
22+
public sealed partial class GeneratedHsmManagementClientSnippets
23+
{
24+
/// <summary>Snippet for ApproveSingleTenantHsmInstanceProposal</summary>
25+
/// <remarks>
26+
/// This snippet has been automatically generated and should be regarded as a code template only.
27+
/// It will require modifications to work:
28+
/// - It may require correct/in-range values for request initialization.
29+
/// - It may require specifying regional endpoints when creating the service client as shown in
30+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
/// </remarks>
32+
public void ApproveSingleTenantHsmInstanceProposalResourceNames()
33+
{
34+
// Create client
35+
HsmManagementClient hsmManagementClient = HsmManagementClient.Create();
36+
// Initialize request argument(s)
37+
SingleTenantHsmInstanceProposalName name = SingleTenantHsmInstanceProposalName.FromProjectLocationSingleTenantHsmInstanceProposal("[PROJECT]", "[LOCATION]", "[SINGLE_TENANT_HSM_INSTANCE]", "[PROPOSAL]");
38+
ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply quorumReply = new ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply();
39+
// Make the request
40+
ApproveSingleTenantHsmInstanceProposalResponse response = hsmManagementClient.ApproveSingleTenantHsmInstanceProposal(name, quorumReply);
41+
}
42+
}
43+
// [END cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_sync_flattened_resourceNames]
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_sync_flattened]
20+
using Google.Cloud.Kms.V1;
21+
22+
public sealed partial class GeneratedHsmManagementClientSnippets
23+
{
24+
/// <summary>Snippet for ApproveSingleTenantHsmInstanceProposal</summary>
25+
/// <remarks>
26+
/// This snippet has been automatically generated and should be regarded as a code template only.
27+
/// It will require modifications to work:
28+
/// - It may require correct/in-range values for request initialization.
29+
/// - It may require specifying regional endpoints when creating the service client as shown in
30+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
31+
/// </remarks>
32+
public void ApproveSingleTenantHsmInstanceProposal()
33+
{
34+
// Create client
35+
HsmManagementClient hsmManagementClient = HsmManagementClient.Create();
36+
// Initialize request argument(s)
37+
string name = "projects/[PROJECT]/locations/[LOCATION]/singleTenantHsmInstances/[SINGLE_TENANT_HSM_INSTANCE]/proposals/[PROPOSAL]";
38+
ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply quorumReply = new ApproveSingleTenantHsmInstanceProposalRequest.Types.QuorumReply();
39+
// Make the request
40+
ApproveSingleTenantHsmInstanceProposalResponse response = hsmManagementClient.ApproveSingleTenantHsmInstanceProposal(name, quorumReply);
41+
}
42+
}
43+
// [END cloudkms_v1_generated_HsmManagement_ApproveSingleTenantHsmInstanceProposal_sync_flattened]
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2026 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// Generated code. DO NOT EDIT!
16+
17+
namespace GoogleCSharpSnippets
18+
{
19+
// [START cloudkms_v1_generated_HsmManagement_CreateSingleTenantHsmInstance_async_flattened]
20+
using Google.Cloud.Kms.V1;
21+
using Google.LongRunning;
22+
using System.Threading.Tasks;
23+
24+
public sealed partial class GeneratedHsmManagementClientSnippets
25+
{
26+
/// <summary>Snippet for CreateSingleTenantHsmInstanceAsync</summary>
27+
/// <remarks>
28+
/// This snippet has been automatically generated and should be regarded as a code template only.
29+
/// It will require modifications to work:
30+
/// - It may require correct/in-range values for request initialization.
31+
/// - It may require specifying regional endpoints when creating the service client as shown in
32+
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
33+
/// </remarks>
34+
public async Task CreateSingleTenantHsmInstanceAsync()
35+
{
36+
// Create client
37+
HsmManagementClient hsmManagementClient = await HsmManagementClient.CreateAsync();
38+
// Initialize request argument(s)
39+
string parent = "projects/[PROJECT]/locations/[LOCATION]";
40+
SingleTenantHsmInstance singleTenantHsmInstance = new SingleTenantHsmInstance();
41+
string singleTenantHsmInstanceId = "";
42+
// Make the request
43+
Operation<SingleTenantHsmInstance, CreateSingleTenantHsmInstanceMetadata> response = await hsmManagementClient.CreateSingleTenantHsmInstanceAsync(parent, singleTenantHsmInstance, singleTenantHsmInstanceId);
44+
45+
// Poll until the returned long-running operation is complete
46+
Operation<SingleTenantHsmInstance, CreateSingleTenantHsmInstanceMetadata> completedResponse = await response.PollUntilCompletedAsync();
47+
// Retrieve the operation result
48+
SingleTenantHsmInstance result = completedResponse.Result;
49+
50+
// Or get the name of the operation
51+
string operationName = response.Name;
52+
// This name can be stored, then the long-running operation retrieved later by name
53+
Operation<SingleTenantHsmInstance, CreateSingleTenantHsmInstanceMetadata> retrievedResponse = await hsmManagementClient.PollOnceCreateSingleTenantHsmInstanceAsync(operationName);
54+
// Check if the retrieved long-running operation has completed
55+
if (retrievedResponse.IsCompleted)
56+
{
57+
// If it has completed, then access the result
58+
SingleTenantHsmInstance retrievedResult = retrievedResponse.Result;
59+
}
60+
}
61+
}
62+
// [END cloudkms_v1_generated_HsmManagement_CreateSingleTenantHsmInstance_async_flattened]
63+
}

0 commit comments

Comments
 (0)