-
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: released securitycenter/v1 SHA custom modules cloud libraries: …
…Create, Get, List, Update, Delete The Security Health Analytics (SHA) custom modules API is now released for general availability track. Create, Get, GetEffective, List, ListEffective, ListDescendant, Update, and Delete are available in the cloud client library. PiperOrigin-RevId: 523462834 Source-Link: googleapis/googleapis@b7b3dfd Source-Link: googleapis/googleapis-gen@9b679ec Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjdXJpdHlDZW50ZXIuVjEvLk93bEJvdC55YW1sIiwiaCI6IjliNjc5ZWMwMmE3ZTE2ZGY5ZjBlN2Y2NmUwNzdlMzc5ZWZkMjVhZDQifQ==
- Loading branch information
1 parent
b723508
commit 96e3a2e
Showing
69 changed files
with
17,774 additions
and
2,888 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
...dSnippets/SecurityCenterClient.CreateSecurityHealthAnalyticsCustomModuleAsyncSnippet.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,45 @@ | ||
// Copyright 2023 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.SecurityCenter.V1.Snippets | ||
{ | ||
// [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_async_flattened] | ||
using Google.Cloud.SecurityCenter.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecurityCenterClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSecurityHealthAnalyticsCustomModuleAsync</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 CreateSecurityHealthAnalyticsCustomModuleAsync() | ||
{ | ||
// Create client | ||
SecurityCenterClient securityCenterClient = await SecurityCenterClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string parent = "organizations/[ORGANIZATION]/securityHealthAnalyticsSettings"; | ||
SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); | ||
// Make the request | ||
SecurityHealthAnalyticsCustomModule response = await securityCenterClient.CreateSecurityHealthAnalyticsCustomModuleAsync(parent, securityHealthAnalyticsCustomModule); | ||
} | ||
} | ||
// [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_async_flattened] | ||
} |
48 changes: 48 additions & 0 deletions
48
...urityCenterClient.CreateSecurityHealthAnalyticsCustomModuleRequestObjectAsyncSnippet.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,48 @@ | ||
// Copyright 2023 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.SecurityCenter.V1.Snippets | ||
{ | ||
// [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_async] | ||
using Google.Cloud.SecurityCenter.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecurityCenterClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSecurityHealthAnalyticsCustomModuleAsync</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 CreateSecurityHealthAnalyticsCustomModuleRequestObjectAsync() | ||
{ | ||
// Create client | ||
SecurityCenterClient securityCenterClient = await SecurityCenterClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
CreateSecurityHealthAnalyticsCustomModuleRequest request = new CreateSecurityHealthAnalyticsCustomModuleRequest | ||
{ | ||
ParentAsSecurityHealthAnalyticsSettingsName = SecurityHealthAnalyticsSettingsName.FromOrganization("[ORGANIZATION]"), | ||
SecurityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(), | ||
}; | ||
// Make the request | ||
SecurityHealthAnalyticsCustomModule response = await securityCenterClient.CreateSecurityHealthAnalyticsCustomModuleAsync(request); | ||
} | ||
} | ||
// [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_async] | ||
} |
47 changes: 47 additions & 0 deletions
47
...s/SecurityCenterClient.CreateSecurityHealthAnalyticsCustomModuleRequestObjectSnippet.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,47 @@ | ||
// Copyright 2023 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.SecurityCenter.V1.Snippets | ||
{ | ||
// [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] | ||
using Google.Cloud.SecurityCenter.V1; | ||
|
||
public sealed partial class GeneratedSecurityCenterClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSecurityHealthAnalyticsCustomModule</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 CreateSecurityHealthAnalyticsCustomModuleRequestObject() | ||
{ | ||
// Create client | ||
SecurityCenterClient securityCenterClient = SecurityCenterClient.Create(); | ||
// Initialize request argument(s) | ||
CreateSecurityHealthAnalyticsCustomModuleRequest request = new CreateSecurityHealthAnalyticsCustomModuleRequest | ||
{ | ||
ParentAsSecurityHealthAnalyticsSettingsName = SecurityHealthAnalyticsSettingsName.FromOrganization("[ORGANIZATION]"), | ||
SecurityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(), | ||
}; | ||
// Make the request | ||
SecurityHealthAnalyticsCustomModule response = securityCenterClient.CreateSecurityHealthAnalyticsCustomModule(request); | ||
} | ||
} | ||
// [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync] | ||
} |
45 changes: 45 additions & 0 deletions
45
...urityCenterClient.CreateSecurityHealthAnalyticsCustomModuleResourceNamesAsyncSnippet.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,45 @@ | ||
// Copyright 2023 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.SecurityCenter.V1.Snippets | ||
{ | ||
// [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_async_flattened_resourceNames] | ||
using Google.Cloud.SecurityCenter.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecurityCenterClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSecurityHealthAnalyticsCustomModuleAsync</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 CreateSecurityHealthAnalyticsCustomModuleResourceNamesAsync() | ||
{ | ||
// Create client | ||
SecurityCenterClient securityCenterClient = await SecurityCenterClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
SecurityHealthAnalyticsSettingsName parent = SecurityHealthAnalyticsSettingsName.FromOrganization("[ORGANIZATION]"); | ||
SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); | ||
// Make the request | ||
SecurityHealthAnalyticsCustomModule response = await securityCenterClient.CreateSecurityHealthAnalyticsCustomModuleAsync(parent, securityHealthAnalyticsCustomModule); | ||
} | ||
} | ||
// [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_async_flattened_resourceNames] | ||
} |
44 changes: 44 additions & 0 deletions
44
...s/SecurityCenterClient.CreateSecurityHealthAnalyticsCustomModuleResourceNamesSnippet.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,44 @@ | ||
// Copyright 2023 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.SecurityCenter.V1.Snippets | ||
{ | ||
// [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync_flattened_resourceNames] | ||
using Google.Cloud.SecurityCenter.V1; | ||
|
||
public sealed partial class GeneratedSecurityCenterClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSecurityHealthAnalyticsCustomModule</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 CreateSecurityHealthAnalyticsCustomModuleResourceNames() | ||
{ | ||
// Create client | ||
SecurityCenterClient securityCenterClient = SecurityCenterClient.Create(); | ||
// Initialize request argument(s) | ||
SecurityHealthAnalyticsSettingsName parent = SecurityHealthAnalyticsSettingsName.FromOrganization("[ORGANIZATION]"); | ||
SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); | ||
// Make the request | ||
SecurityHealthAnalyticsCustomModule response = securityCenterClient.CreateSecurityHealthAnalyticsCustomModule(parent, securityHealthAnalyticsCustomModule); | ||
} | ||
} | ||
// [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync_flattened_resourceNames] | ||
} |
44 changes: 44 additions & 0 deletions
44
...eratedSnippets/SecurityCenterClient.CreateSecurityHealthAnalyticsCustomModuleSnippet.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,44 @@ | ||
// Copyright 2023 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.SecurityCenter.V1.Snippets | ||
{ | ||
// [START securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync_flattened] | ||
using Google.Cloud.SecurityCenter.V1; | ||
|
||
public sealed partial class GeneratedSecurityCenterClientSnippets | ||
{ | ||
/// <summary>Snippet for CreateSecurityHealthAnalyticsCustomModule</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 CreateSecurityHealthAnalyticsCustomModule() | ||
{ | ||
// Create client | ||
SecurityCenterClient securityCenterClient = SecurityCenterClient.Create(); | ||
// Initialize request argument(s) | ||
string parent = "organizations/[ORGANIZATION]/securityHealthAnalyticsSettings"; | ||
SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule = new SecurityHealthAnalyticsCustomModule(); | ||
// Make the request | ||
SecurityHealthAnalyticsCustomModule response = securityCenterClient.CreateSecurityHealthAnalyticsCustomModule(parent, securityHealthAnalyticsCustomModule); | ||
} | ||
} | ||
// [END securitycenter_v1_generated_SecurityCenter_CreateSecurityHealthAnalyticsCustomModule_sync_flattened] | ||
} |
44 changes: 44 additions & 0 deletions
44
...dSnippets/SecurityCenterClient.DeleteSecurityHealthAnalyticsCustomModuleAsyncSnippet.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,44 @@ | ||
// Copyright 2023 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.SecurityCenter.V1.Snippets | ||
{ | ||
// [START securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_async_flattened] | ||
using Google.Cloud.SecurityCenter.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecurityCenterClientSnippets | ||
{ | ||
/// <summary>Snippet for DeleteSecurityHealthAnalyticsCustomModuleAsync</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 DeleteSecurityHealthAnalyticsCustomModuleAsync() | ||
{ | ||
// Create client | ||
SecurityCenterClient securityCenterClient = await SecurityCenterClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
string name = "organizations/[ORGANIZATION]/securityHealthAnalyticsSettings/customModules/[CUSTOM_MODULE]"; | ||
// Make the request | ||
await securityCenterClient.DeleteSecurityHealthAnalyticsCustomModuleAsync(name); | ||
} | ||
} | ||
// [END securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_async_flattened] | ||
} |
47 changes: 47 additions & 0 deletions
47
...urityCenterClient.DeleteSecurityHealthAnalyticsCustomModuleRequestObjectAsyncSnippet.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,47 @@ | ||
// Copyright 2023 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.SecurityCenter.V1.Snippets | ||
{ | ||
// [START securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_async] | ||
using Google.Cloud.SecurityCenter.V1; | ||
using System.Threading.Tasks; | ||
|
||
public sealed partial class GeneratedSecurityCenterClientSnippets | ||
{ | ||
/// <summary>Snippet for DeleteSecurityHealthAnalyticsCustomModuleAsync</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 DeleteSecurityHealthAnalyticsCustomModuleRequestObjectAsync() | ||
{ | ||
// Create client | ||
SecurityCenterClient securityCenterClient = await SecurityCenterClient.CreateAsync(); | ||
// Initialize request argument(s) | ||
DeleteSecurityHealthAnalyticsCustomModuleRequest request = new DeleteSecurityHealthAnalyticsCustomModuleRequest | ||
{ | ||
SecurityHealthAnalyticsCustomModuleName = SecurityHealthAnalyticsCustomModuleName.FromOrganizationCustomModule("[ORGANIZATION]", "[CUSTOM_MODULE]"), | ||
}; | ||
// Make the request | ||
await securityCenterClient.DeleteSecurityHealthAnalyticsCustomModuleAsync(request); | ||
} | ||
} | ||
// [END securitycenter_v1_generated_SecurityCenter_DeleteSecurityHealthAnalyticsCustomModule_async] | ||
} |
Oops, something went wrong.