Class SecurityCenterClient

java.lang.Object
com.google.cloud.securitycenter.v1.SecurityCenterClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class SecurityCenterClient extends Object implements BackgroundResource
Service Description: V1 APIs for Security Center service.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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/java/docs/setup#configure_endpoints_for_the_client_library
 try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
   SecurityHealthAnalyticsSettingsName parent =
       SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
   SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
       SecurityHealthAnalyticsCustomModule.newBuilder().build();
   SecurityHealthAnalyticsCustomModule response =
       securityCenterClient.createSecurityHealthAnalyticsCustomModule(
           parent, securityHealthAnalyticsCustomModule);
 }
 

Note: close() needs to be called on the SecurityCenterClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

BulkMuteFindings

Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • bulkMuteFindingsAsync(BulkMuteFindingsRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • bulkMuteFindingsAsync(ResourceName parent)

  • bulkMuteFindingsAsync(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • bulkMuteFindingsOperationCallable()

  • bulkMuteFindingsCallable()

CreateSecurityHealthAnalyticsCustomModule

Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createSecurityHealthAnalyticsCustomModule(CreateSecurityHealthAnalyticsCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsSettingsName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)

  • createSecurityHealthAnalyticsCustomModule(String parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createSecurityHealthAnalyticsCustomModuleCallable()

CreateSource

Creates a source.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createSource(CreateSourceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createSource(OrganizationName parent, Source source)

  • createSource(String parent, Source source)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createSourceCallable()

CreateFinding

Creates a finding. The corresponding source must exist for finding creation to succeed.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createFinding(CreateFindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createFinding(SourceName parent, String findingId, Finding finding)

  • createFinding(String parent, String findingId, Finding finding)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createFindingCallable()

CreateMuteConfig

Creates a mute config.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createMuteConfig(CreateMuteConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createMuteConfig(FolderLocationName parent, MuteConfig muteConfig)

  • createMuteConfig(FolderName parent, MuteConfig muteConfig)

  • createMuteConfig(LocationName parent, MuteConfig muteConfig)

  • createMuteConfig(OrganizationLocationName parent, MuteConfig muteConfig)

  • createMuteConfig(OrganizationName parent, MuteConfig muteConfig)

  • createMuteConfig(ProjectName parent, MuteConfig muteConfig)

  • createMuteConfig(String parent, MuteConfig muteConfig)

  • createMuteConfig(FolderLocationName parent, MuteConfig muteConfig, String muteConfigId)

  • createMuteConfig(FolderName parent, MuteConfig muteConfig, String muteConfigId)

  • createMuteConfig(LocationName parent, MuteConfig muteConfig, String muteConfigId)

  • createMuteConfig(OrganizationLocationName parent, MuteConfig muteConfig, String muteConfigId)

  • createMuteConfig(OrganizationName parent, MuteConfig muteConfig, String muteConfigId)

  • createMuteConfig(ProjectName parent, MuteConfig muteConfig, String muteConfigId)

  • createMuteConfig(String parent, MuteConfig muteConfig, String muteConfigId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMuteConfigCallable()

CreateNotificationConfig

Creates a notification config.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createNotificationConfig(CreateNotificationConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createNotificationConfig(FolderName parent, NotificationConfig notificationConfig)

  • createNotificationConfig(OrganizationName parent, NotificationConfig notificationConfig)

  • createNotificationConfig(ProjectName parent, NotificationConfig notificationConfig)

  • createNotificationConfig(String parent, NotificationConfig notificationConfig)

  • createNotificationConfig(FolderName parent, String configId, NotificationConfig notificationConfig)

  • createNotificationConfig(OrganizationName parent, String configId, NotificationConfig notificationConfig)

  • createNotificationConfig(ProjectName parent, String configId, NotificationConfig notificationConfig)

  • createNotificationConfig(String parent, String configId, NotificationConfig notificationConfig)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createNotificationConfigCallable()

DeleteMuteConfig

Deletes an existing mute config.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMuteConfig(DeleteMuteConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteMuteConfig(MuteConfigName name)

  • deleteMuteConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMuteConfigCallable()

DeleteNotificationConfig

Deletes a notification config.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteNotificationConfig(DeleteNotificationConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteNotificationConfig(NotificationConfigName name)

  • deleteNotificationConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteNotificationConfigCallable()

DeleteSecurityHealthAnalyticsCustomModule

Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteSecurityHealthAnalyticsCustomModule(DeleteSecurityHealthAnalyticsCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)

  • deleteSecurityHealthAnalyticsCustomModule(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteSecurityHealthAnalyticsCustomModuleCallable()

GetSimulation

Get the simulation by name or the latest simulation for the given organization.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getSimulation(GetSimulationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getSimulation(SimulationName name)

  • getSimulation(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getSimulationCallable()

GetValuedResource

Get the valued resource by name

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getValuedResource(GetValuedResourceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getValuedResource(ValuedResourceName name)

  • getValuedResource(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getValuedResourceCallable()

GetBigQueryExport

Gets a BigQuery export.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBigQueryExport(GetBigQueryExportRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBigQueryExport(BigQueryExportName name)

  • getBigQueryExport(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBigQueryExportCallable()

GetIamPolicy

Gets the access control policy on the specified Source.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getIamPolicy(ResourceName resource)

  • getIamPolicy(String resource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

GetMuteConfig

Gets a mute config.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMuteConfig(GetMuteConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMuteConfig(MuteConfigName name)

  • getMuteConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMuteConfigCallable()

GetNotificationConfig

Gets a notification config.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getNotificationConfig(GetNotificationConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getNotificationConfig(NotificationConfigName name)

  • getNotificationConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getNotificationConfigCallable()

GetOrganizationSettings

Gets the settings for an organization.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getOrganizationSettings(GetOrganizationSettingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getOrganizationSettings(OrganizationSettingsName name)

  • getOrganizationSettings(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getOrganizationSettingsCallable()

GetEffectiveSecurityHealthAnalyticsCustomModule

Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getEffectiveSecurityHealthAnalyticsCustomModule(GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getEffectiveSecurityHealthAnalyticsCustomModule(EffectiveSecurityHealthAnalyticsCustomModuleName name)

  • getEffectiveSecurityHealthAnalyticsCustomModule(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getEffectiveSecurityHealthAnalyticsCustomModuleCallable()

GetSecurityHealthAnalyticsCustomModule

Retrieves a SecurityHealthAnalyticsCustomModule.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getSecurityHealthAnalyticsCustomModule(GetSecurityHealthAnalyticsCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)

  • getSecurityHealthAnalyticsCustomModule(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getSecurityHealthAnalyticsCustomModuleCallable()

GetSource

Gets a source.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getSource(GetSourceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getSource(SourceName name)

  • getSource(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getSourceCallable()

GroupAssets

Filters an organization's assets and groups them by their specified properties.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • groupAssets(GroupAssetsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • groupAssetsPagedCallable()

  • groupAssetsCallable()

GroupFindings

Filters an organization or source's findings and groups them by their specified properties.

To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • groupFindings(GroupFindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • groupFindings(SourceName parent, String groupBy)

  • groupFindings(String parent, String groupBy)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • groupFindingsPagedCallable()

  • groupFindingsCallable()

ListAssets

Lists an organization's assets.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listAssets(ListAssetsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listAssetsPagedCallable()

  • listAssetsCallable()

ListDescendantSecurityHealthAnalyticsCustomModules

Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listDescendantSecurityHealthAnalyticsCustomModules(ListDescendantSecurityHealthAnalyticsCustomModulesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listDescendantSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent)

  • listDescendantSecurityHealthAnalyticsCustomModules(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable()

  • listDescendantSecurityHealthAnalyticsCustomModulesCallable()

ListFindings

Lists an organization or source's findings.

To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listFindings(ListFindingsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listFindingsPagedCallable()

  • listFindingsCallable()

ListMuteConfigs

Lists mute configs.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listMuteConfigs(ListMuteConfigsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMuteConfigs(FolderLocationName parent)

  • listMuteConfigs(FolderName parent)

  • listMuteConfigs(LocationName parent)

  • listMuteConfigs(OrganizationLocationName parent)

  • listMuteConfigs(OrganizationName parent)

  • listMuteConfigs(ProjectName parent)

  • listMuteConfigs(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMuteConfigsPagedCallable()

  • listMuteConfigsCallable()

ListNotificationConfigs

Lists notification configs.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listNotificationConfigs(ListNotificationConfigsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listNotificationConfigs(FolderName parent)

  • listNotificationConfigs(OrganizationName parent)

  • listNotificationConfigs(ProjectName parent)

  • listNotificationConfigs(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listNotificationConfigsPagedCallable()

  • listNotificationConfigsCallable()

ListEffectiveSecurityHealthAnalyticsCustomModules

Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listEffectiveSecurityHealthAnalyticsCustomModules(ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listEffectiveSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent)

  • listEffectiveSecurityHealthAnalyticsCustomModules(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable()

  • listEffectiveSecurityHealthAnalyticsCustomModulesCallable()

ListSecurityHealthAnalyticsCustomModules

Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listSecurityHealthAnalyticsCustomModules(ListSecurityHealthAnalyticsCustomModulesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listSecurityHealthAnalyticsCustomModules(SecurityHealthAnalyticsSettingsName parent)

  • listSecurityHealthAnalyticsCustomModules(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listSecurityHealthAnalyticsCustomModulesPagedCallable()

  • listSecurityHealthAnalyticsCustomModulesCallable()

ListSources

Lists all sources belonging to an organization.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listSources(ListSourcesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listSources(FolderName parent)

  • listSources(OrganizationName parent)

  • listSources(ProjectName parent)

  • listSources(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listSourcesPagedCallable()

  • listSourcesCallable()

RunAssetDiscovery

Runs asset discovery. The discovery is tracked with a long-running operation.

This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • runAssetDiscoveryAsync(RunAssetDiscoveryRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • runAssetDiscoveryAsync(OrganizationName parent)

  • runAssetDiscoveryAsync(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • runAssetDiscoveryOperationCallable()

  • runAssetDiscoveryCallable()

SetFindingState

Updates the state of a finding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setFindingState(SetFindingStateRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • setFindingState(FindingName name, Finding.State state, Timestamp startTime)

  • setFindingState(String name, Finding.State state, Timestamp startTime)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setFindingStateCallable()

SetMute

Updates the mute state of a finding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setMute(SetMuteRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • setMute(FindingName name, Finding.Mute mute)

  • setMute(String name, Finding.Mute mute)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setMuteCallable()

SetIamPolicy

Sets the access control policy on the specified Source.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • setIamPolicy(ResourceName resource, Policy policy)

  • setIamPolicy(String resource, Policy policy)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

TestIamPermissions

Returns the permissions that a caller has on the specified source.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • testIamPermissions(ResourceName resource, List<String> permissions)

  • testIamPermissions(String resource, List<String> permissions)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

SimulateSecurityHealthAnalyticsCustomModule

Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • simulateSecurityHealthAnalyticsCustomModule(SimulateSecurityHealthAnalyticsCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • simulateSecurityHealthAnalyticsCustomModule(String parent, CustomConfig customConfig, SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • simulateSecurityHealthAnalyticsCustomModuleCallable()

UpdateExternalSystem

Updates external system. This is for a given finding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateExternalSystem(UpdateExternalSystemRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateExternalSystem(ExternalSystem externalSystem, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateExternalSystemCallable()

UpdateFinding

Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateFinding(UpdateFindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateFinding(Finding finding)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateFindingCallable()

UpdateMuteConfig

Updates a mute config.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateMuteConfig(UpdateMuteConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateMuteConfig(MuteConfig muteConfig, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateMuteConfigCallable()

UpdateNotificationConfig

Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateNotificationConfig(UpdateNotificationConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateNotificationConfig(NotificationConfig notificationConfig)

  • updateNotificationConfig(NotificationConfig notificationConfig, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateNotificationConfigCallable()

UpdateOrganizationSettings

Updates an organization's settings.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateOrganizationSettings(UpdateOrganizationSettingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateOrganizationSettings(OrganizationSettings organizationSettings)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateOrganizationSettingsCallable()

UpdateSecurityHealthAnalyticsCustomModule

Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateSecurityHealthAnalyticsCustomModule(UpdateSecurityHealthAnalyticsCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateSecurityHealthAnalyticsCustomModuleCallable()

UpdateSource

Updates a source.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateSource(UpdateSourceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateSource(Source source)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateSourceCallable()

UpdateSecurityMarks

Updates security marks.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateSecurityMarks(UpdateSecurityMarksRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateSecurityMarks(SecurityMarks securityMarks)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateSecurityMarksCallable()

CreateBigQueryExport

Creates a BigQuery export.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createBigQueryExport(CreateBigQueryExportRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createBigQueryExport(FolderName parent, BigQueryExport bigQueryExport, String bigQueryExportId)

  • createBigQueryExport(OrganizationName parent, BigQueryExport bigQueryExport, String bigQueryExportId)

  • createBigQueryExport(ProjectName parent, BigQueryExport bigQueryExport, String bigQueryExportId)

  • createBigQueryExport(String parent, BigQueryExport bigQueryExport, String bigQueryExportId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createBigQueryExportCallable()

DeleteBigQueryExport

Deletes an existing BigQuery export.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBigQueryExport(DeleteBigQueryExportRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteBigQueryExport(BigQueryExportName name)

  • deleteBigQueryExport(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBigQueryExportCallable()

UpdateBigQueryExport

Updates a BigQuery export.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateBigQueryExport(UpdateBigQueryExportRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateBigQueryExport(BigQueryExport bigQueryExport, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateBigQueryExportCallable()

ListBigQueryExports

Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBigQueryExports(ListBigQueryExportsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBigQueryExports(FolderName parent)

  • listBigQueryExports(OrganizationName parent)

  • listBigQueryExports(ProjectName parent)

  • listBigQueryExports(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBigQueryExportsPagedCallable()

  • listBigQueryExportsCallable()

CreateEventThreatDetectionCustomModule

Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createEventThreatDetectionCustomModule(CreateEventThreatDetectionCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createEventThreatDetectionCustomModule(EventThreatDetectionSettingsName parent, EventThreatDetectionCustomModule eventThreatDetectionCustomModule)

  • createEventThreatDetectionCustomModule(String parent, EventThreatDetectionCustomModule eventThreatDetectionCustomModule)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createEventThreatDetectionCustomModuleCallable()

DeleteEventThreatDetectionCustomModule

Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteEventThreatDetectionCustomModule(DeleteEventThreatDetectionCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteEventThreatDetectionCustomModule(EventThreatDetectionCustomModuleName name)

  • deleteEventThreatDetectionCustomModule(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteEventThreatDetectionCustomModuleCallable()

GetEventThreatDetectionCustomModule

Gets an Event Threat Detection custom module.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getEventThreatDetectionCustomModule(GetEventThreatDetectionCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getEventThreatDetectionCustomModule(EventThreatDetectionCustomModuleName name)

  • getEventThreatDetectionCustomModule(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getEventThreatDetectionCustomModuleCallable()

ListDescendantEventThreatDetectionCustomModules

Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listDescendantEventThreatDetectionCustomModules(ListDescendantEventThreatDetectionCustomModulesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listDescendantEventThreatDetectionCustomModules(EventThreatDetectionSettingsName parent)

  • listDescendantEventThreatDetectionCustomModules(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listDescendantEventThreatDetectionCustomModulesPagedCallable()

  • listDescendantEventThreatDetectionCustomModulesCallable()

ListEventThreatDetectionCustomModules

Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listEventThreatDetectionCustomModules(ListEventThreatDetectionCustomModulesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listEventThreatDetectionCustomModules(EventThreatDetectionSettingsName parent)

  • listEventThreatDetectionCustomModules(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listEventThreatDetectionCustomModulesPagedCallable()

  • listEventThreatDetectionCustomModulesCallable()

UpdateEventThreatDetectionCustomModule

Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateEventThreatDetectionCustomModule(UpdateEventThreatDetectionCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateEventThreatDetectionCustomModule(EventThreatDetectionCustomModule eventThreatDetectionCustomModule, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateEventThreatDetectionCustomModuleCallable()

ValidateEventThreatDetectionCustomModule

Validates the given Event Threat Detection custom module.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • validateEventThreatDetectionCustomModule(ValidateEventThreatDetectionCustomModuleRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • validateEventThreatDetectionCustomModuleCallable()

GetEffectiveEventThreatDetectionCustomModule

Gets an effective Event Threat Detection custom module at the given level.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getEffectiveEventThreatDetectionCustomModule(GetEffectiveEventThreatDetectionCustomModuleRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getEffectiveEventThreatDetectionCustomModule(EffectiveEventThreatDetectionCustomModuleName name)

  • getEffectiveEventThreatDetectionCustomModule(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getEffectiveEventThreatDetectionCustomModuleCallable()

ListEffectiveEventThreatDetectionCustomModules

Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listEffectiveEventThreatDetectionCustomModules(ListEffectiveEventThreatDetectionCustomModulesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listEffectiveEventThreatDetectionCustomModules(EventThreatDetectionSettingsName parent)

  • listEffectiveEventThreatDetectionCustomModules(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listEffectiveEventThreatDetectionCustomModulesPagedCallable()

  • listEffectiveEventThreatDetectionCustomModulesCallable()

BatchCreateResourceValueConfigs

Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • batchCreateResourceValueConfigs(OrganizationName parent, List<CreateResourceValueConfigRequest> requests)

  • batchCreateResourceValueConfigs(String parent, List<CreateResourceValueConfigRequest> requests)

  • batchCreateResourceValueConfigs(BatchCreateResourceValueConfigsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • batchCreateResourceValueConfigsCallable()

DeleteResourceValueConfig

Deletes a ResourceValueConfig.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteResourceValueConfig(DeleteResourceValueConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • deleteResourceValueConfig(ResourceValueConfigName name)

  • deleteResourceValueConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteResourceValueConfigCallable()

GetResourceValueConfig

Gets a ResourceValueConfig.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getResourceValueConfig(GetResourceValueConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getResourceValueConfig(ResourceValueConfigName name)

  • getResourceValueConfig(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getResourceValueConfigCallable()

ListResourceValueConfigs

Lists all ResourceValueConfigs.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listResourceValueConfigs(ListResourceValueConfigsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listResourceValueConfigs(OrganizationName parent)

  • listResourceValueConfigs(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listResourceValueConfigsPagedCallable()

  • listResourceValueConfigsCallable()

UpdateResourceValueConfig

Updates an existing ResourceValueConfigs with new rules.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateResourceValueConfig(UpdateResourceValueConfigRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • updateResourceValueConfig(ResourceValueConfig resourceValueConfig, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateResourceValueConfigCallable()

ListValuedResources

Lists the valued resources for a set of simulation results and filter.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listValuedResources(ListValuedResourcesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listValuedResources(OrganizationSimulationName parent)

  • listValuedResources(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listValuedResourcesPagedCallable()

  • listValuedResourcesCallable()

ListAttackPaths

Lists the attack paths for a set of simulation results or valued resources and filter.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listAttackPaths(ListAttackPathsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listAttackPaths(ValuedResourceName parent)

  • listAttackPaths(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listAttackPathsPagedCallable()

  • listAttackPathsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of SecurityCenterSettings to create(). For example:

To customize credentials:


 // 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/java/docs/setup#configure_endpoints_for_the_client_library
 SecurityCenterSettings securityCenterSettings =
     SecurityCenterSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
 

To customize the endpoint:


 // 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/java/docs/setup#configure_endpoints_for_the_client_library
 SecurityCenterSettings securityCenterSettings =
     SecurityCenterSettings.newBuilder().setEndpoint(myEndpoint).build();
 SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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/java/docs/setup#configure_endpoints_for_the_client_library
 SecurityCenterSettings securityCenterSettings =
     SecurityCenterSettings.newHttpJsonBuilder().build();
 SecurityCenterClient securityCenterClient = SecurityCenterClient.create(securityCenterSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

  • Constructor Details

    • SecurityCenterClient

      protected SecurityCenterClient(SecurityCenterSettings settings) throws IOException
      Constructs an instance of SecurityCenterClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
      Throws:
      IOException
    • SecurityCenterClient

      protected SecurityCenterClient(SecurityCenterStub stub)
  • Method Details

    • create

      public static final SecurityCenterClient create() throws IOException
      Constructs an instance of SecurityCenterClient with default settings.
      Throws:
      IOException
    • create

      public static final SecurityCenterClient create(SecurityCenterSettings settings) throws IOException
      Constructs an instance of SecurityCenterClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
      Throws:
      IOException
    • create

      public static final SecurityCenterClient create(SecurityCenterStub stub)
      Constructs an instance of SecurityCenterClient, using the given stub for making calls. This is for advanced usage - prefer using create(SecurityCenterSettings).
    • getSettings

      public final SecurityCenterSettings getSettings()
    • getStub

      public SecurityCenterStub getStub()
    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • getHttpJsonOperationsClient

      @BetaApi public final OperationsClient getHttpJsonOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • bulkMuteFindingsAsync

      public final OperationFuture<BulkMuteFindingsResponse,com.google.protobuf.Empty> bulkMuteFindingsAsync(ResourceName parent)
      Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ResourceName parent = FolderName.of("[FOLDER]");
         BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get();
       }
       
      Parameters:
      parent - Required. The parent, at which bulk action needs to be applied. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • bulkMuteFindingsAsync

      public final OperationFuture<BulkMuteFindingsResponse,com.google.protobuf.Empty> bulkMuteFindingsAsync(String parent)
      Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = FolderName.of("[FOLDER]").toString();
         BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(parent).get();
       }
       
      Parameters:
      parent - Required. The parent, at which bulk action needs to be applied. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • bulkMuteFindingsAsync

      public final OperationFuture<BulkMuteFindingsResponse,com.google.protobuf.Empty> bulkMuteFindingsAsync(BulkMuteFindingsRequest request)
      Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         BulkMuteFindingsRequest request =
             BulkMuteFindingsRequest.newBuilder()
                 .setParent(FolderName.of("[FOLDER]").toString())
                 .setFilter("filter-1274492040")
                 .setMuteAnnotation("muteAnnotation-2111042008")
                 .build();
         BulkMuteFindingsResponse response = securityCenterClient.bulkMuteFindingsAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • bulkMuteFindingsOperationCallable

      public final OperationCallable<BulkMuteFindingsRequest,BulkMuteFindingsResponse,com.google.protobuf.Empty> bulkMuteFindingsOperationCallable()
      Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         BulkMuteFindingsRequest request =
             BulkMuteFindingsRequest.newBuilder()
                 .setParent(FolderName.of("[FOLDER]").toString())
                 .setFilter("filter-1274492040")
                 .setMuteAnnotation("muteAnnotation-2111042008")
                 .build();
         OperationFuture<BulkMuteFindingsResponse, Empty> future =
             securityCenterClient.bulkMuteFindingsOperationCallable().futureCall(request);
         // Do something.
         BulkMuteFindingsResponse response = future.get();
       }
       
    • bulkMuteFindingsCallable

      public final UnaryCallable<BulkMuteFindingsRequest,Operation> bulkMuteFindingsCallable()
      Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         BulkMuteFindingsRequest request =
             BulkMuteFindingsRequest.newBuilder()
                 .setParent(FolderName.of("[FOLDER]").toString())
                 .setFilter("filter-1274492040")
                 .setMuteAnnotation("muteAnnotation-2111042008")
                 .build();
         ApiFuture<Operation> future =
             securityCenterClient.bulkMuteFindingsCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • createSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsSettingsName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)
      Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SecurityHealthAnalyticsSettingsName parent =
             SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
         SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
             SecurityHealthAnalyticsCustomModule.newBuilder().build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterClient.createSecurityHealthAnalyticsCustomModule(
                 parent, securityHealthAnalyticsCustomModule);
       }
       
      Parameters:
      parent - Required. Resource name of the new custom module's parent. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings`
      securityHealthAnalyticsCustomModule - Required. SecurityHealthAnalytics custom module to create. The provided name is ignored and reset with provided parent information and server-generated ID.
      Throws:
      ApiException - if the remote call fails
    • createSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(String parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)
      Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent =
             SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
         SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
             SecurityHealthAnalyticsCustomModule.newBuilder().build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterClient.createSecurityHealthAnalyticsCustomModule(
                 parent, securityHealthAnalyticsCustomModule);
       }
       
      Parameters:
      parent - Required. Resource name of the new custom module's parent. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings`
      securityHealthAnalyticsCustomModule - Required. SecurityHealthAnalytics custom module to create. The provided name is ignored and reset with provided parent information and server-generated ID.
      Throws:
      ApiException - if the remote call fails
    • createSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(CreateSecurityHealthAnalyticsCustomModuleRequest request)
      Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateSecurityHealthAnalyticsCustomModuleRequest request =
             CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setSecurityHealthAnalyticsCustomModule(
                     SecurityHealthAnalyticsCustomModule.newBuilder().build())
                 .build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterClient.createSecurityHealthAnalyticsCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createSecurityHealthAnalyticsCustomModuleCallable

      public final UnaryCallable<CreateSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule> createSecurityHealthAnalyticsCustomModuleCallable()
      Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateSecurityHealthAnalyticsCustomModuleRequest request =
             CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setSecurityHealthAnalyticsCustomModule(
                     SecurityHealthAnalyticsCustomModule.newBuilder().build())
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterClient
                 .createSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         SecurityHealthAnalyticsCustomModule response = future.get();
       }
       
    • createSource

      public final Source createSource(OrganizationName parent, Source source)
      Creates a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         Source source = Source.newBuilder().build();
         Source response = securityCenterClient.createSource(parent, source);
       }
       
      Parameters:
      parent - Required. Resource name of the new source's parent. Its format should be `organizations/[organization_id]`.
      source - Required. The Source being created, only the display_name and description will be used. All other fields will be ignored.
      Throws:
      ApiException - if the remote call fails
    • createSource

      public final Source createSource(String parent, Source source)
      Creates a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         Source source = Source.newBuilder().build();
         Source response = securityCenterClient.createSource(parent, source);
       }
       
      Parameters:
      parent - Required. Resource name of the new source's parent. Its format should be `organizations/[organization_id]`.
      source - Required. The Source being created, only the display_name and description will be used. All other fields will be ignored.
      Throws:
      ApiException - if the remote call fails
    • createSource

      public final Source createSource(CreateSourceRequest request)
      Creates a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateSourceRequest request =
             CreateSourceRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setSource(Source.newBuilder().build())
                 .build();
         Source response = securityCenterClient.createSource(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createSourceCallable

      public final UnaryCallable<CreateSourceRequest,Source> createSourceCallable()
      Creates a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateSourceRequest request =
             CreateSourceRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setSource(Source.newBuilder().build())
                 .build();
         ApiFuture<Source> future = securityCenterClient.createSourceCallable().futureCall(request);
         // Do something.
         Source response = future.get();
       }
       
    • createFinding

      public final Finding createFinding(SourceName parent, String findingId, Finding finding)
      Creates a finding. The corresponding source must exist for finding creation to succeed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
         String findingId = "findingId439150212";
         Finding finding = Finding.newBuilder().build();
         Finding response = securityCenterClient.createFinding(parent, findingId, finding);
       }
       
      Parameters:
      parent - Required. Resource name of the new finding's parent. Its format should be `organizations/[organization_id]/sources/[source_id]`.
      findingId - Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.
      finding - Required. The Finding being created. The name and security_marks will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createFinding

      public final Finding createFinding(String parent, String findingId, Finding finding)
      Creates a finding. The corresponding source must exist for finding creation to succeed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
         String findingId = "findingId439150212";
         Finding finding = Finding.newBuilder().build();
         Finding response = securityCenterClient.createFinding(parent, findingId, finding);
       }
       
      Parameters:
      parent - Required. Resource name of the new finding's parent. Its format should be `organizations/[organization_id]/sources/[source_id]`.
      findingId - Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.
      finding - Required. The Finding being created. The name and security_marks will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createFinding

      public final Finding createFinding(CreateFindingRequest request)
      Creates a finding. The corresponding source must exist for finding creation to succeed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateFindingRequest request =
             CreateFindingRequest.newBuilder()
                 .setParent(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setFindingId("findingId439150212")
                 .setFinding(Finding.newBuilder().build())
                 .build();
         Finding response = securityCenterClient.createFinding(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createFindingCallable

      public final UnaryCallable<CreateFindingRequest,Finding> createFindingCallable()
      Creates a finding. The corresponding source must exist for finding creation to succeed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateFindingRequest request =
             CreateFindingRequest.newBuilder()
                 .setParent(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setFindingId("findingId439150212")
                 .setFinding(Finding.newBuilder().build())
                 .build();
         ApiFuture<Finding> future = securityCenterClient.createFindingCallable().futureCall(request);
         // Do something.
         Finding response = future.get();
       }
       
    • createMuteConfig

      public final MuteConfig createMuteConfig(FolderLocationName parent, MuteConfig muteConfig)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(FolderName parent, MuteConfig muteConfig)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderName parent = FolderName.of("[FOLDER]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(LocationName parent, MuteConfig muteConfig)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(OrganizationLocationName parent, MuteConfig muteConfig)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(OrganizationName parent, MuteConfig muteConfig)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(ProjectName parent, MuteConfig muteConfig)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ProjectName parent = ProjectName.of("[PROJECT]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(String parent, MuteConfig muteConfig)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(FolderLocationName parent, MuteConfig muteConfig, String muteConfigId)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         String muteConfigId = "muteConfigId1689669942";
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      muteConfigId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(FolderName parent, MuteConfig muteConfig, String muteConfigId)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderName parent = FolderName.of("[FOLDER]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         String muteConfigId = "muteConfigId1689669942";
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      muteConfigId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(LocationName parent, MuteConfig muteConfig, String muteConfigId)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         String muteConfigId = "muteConfigId1689669942";
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      muteConfigId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(OrganizationLocationName parent, MuteConfig muteConfig, String muteConfigId)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         String muteConfigId = "muteConfigId1689669942";
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      muteConfigId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(OrganizationName parent, MuteConfig muteConfig, String muteConfigId)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         String muteConfigId = "muteConfigId1689669942";
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      muteConfigId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(ProjectName parent, MuteConfig muteConfig, String muteConfigId)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ProjectName parent = ProjectName.of("[PROJECT]");
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         String muteConfigId = "muteConfigId1689669942";
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      muteConfigId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(String parent, MuteConfig muteConfig, String muteConfigId)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         String muteConfigId = "muteConfigId1689669942";
         MuteConfig response = securityCenterClient.createMuteConfig(parent, muteConfig, muteConfigId);
       }
       
      Parameters:
      parent - Required. Resource name of the new mute configs's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      muteConfig - Required. The mute config being created.
      muteConfigId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfig

      public final MuteConfig createMuteConfig(CreateMuteConfigRequest request)
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateMuteConfigRequest request =
             CreateMuteConfigRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setMuteConfig(MuteConfig.newBuilder().build())
                 .setMuteConfigId("muteConfigId1689669942")
                 .build();
         MuteConfig response = securityCenterClient.createMuteConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createMuteConfigCallable

      public final UnaryCallable<CreateMuteConfigRequest,MuteConfig> createMuteConfigCallable()
      Creates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateMuteConfigRequest request =
             CreateMuteConfigRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setMuteConfig(MuteConfig.newBuilder().build())
                 .setMuteConfigId("muteConfigId1689669942")
                 .build();
         ApiFuture<MuteConfig> future =
             securityCenterClient.createMuteConfigCallable().futureCall(request);
         // Do something.
         MuteConfig response = future.get();
       }
       
    • createNotificationConfig

      public final NotificationConfig createNotificationConfig(FolderName parent, NotificationConfig notificationConfig)
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderName parent = FolderName.of("[FOLDER]");
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.createNotificationConfig(parent, notificationConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      notificationConfig - Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createNotificationConfig

      public final NotificationConfig createNotificationConfig(OrganizationName parent, NotificationConfig notificationConfig)
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.createNotificationConfig(parent, notificationConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      notificationConfig - Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createNotificationConfig

      public final NotificationConfig createNotificationConfig(ProjectName parent, NotificationConfig notificationConfig)
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ProjectName parent = ProjectName.of("[PROJECT]");
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.createNotificationConfig(parent, notificationConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      notificationConfig - Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createNotificationConfig

      public final NotificationConfig createNotificationConfig(String parent, NotificationConfig notificationConfig)
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.createNotificationConfig(parent, notificationConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      notificationConfig - Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createNotificationConfig

      public final NotificationConfig createNotificationConfig(FolderName parent, String configId, NotificationConfig notificationConfig)
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderName parent = FolderName.of("[FOLDER]");
         String configId = "configId-580140035";
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      configId - Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.
      notificationConfig - Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createNotificationConfig

      public final NotificationConfig createNotificationConfig(OrganizationName parent, String configId, NotificationConfig notificationConfig)
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         String configId = "configId-580140035";
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      configId - Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.
      notificationConfig - Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createNotificationConfig

      public final NotificationConfig createNotificationConfig(ProjectName parent, String configId, NotificationConfig notificationConfig)
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ProjectName parent = ProjectName.of("[PROJECT]");
         String configId = "configId-580140035";
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      configId - Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.
      notificationConfig - Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createNotificationConfig

      public final NotificationConfig createNotificationConfig(String parent, String configId, NotificationConfig notificationConfig)
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         String configId = "configId-580140035";
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.createNotificationConfig(parent, configId, notificationConfig);
       }
       
      Parameters:
      parent - Required. Resource name of the new notification config's parent. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      configId - Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.
      notificationConfig - Required. The notification config being created. The name and the service account will be ignored as they are both output only fields on this resource.
      Throws:
      ApiException - if the remote call fails
    • createNotificationConfig

      public final NotificationConfig createNotificationConfig(CreateNotificationConfigRequest request)
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateNotificationConfigRequest request =
             CreateNotificationConfigRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setConfigId("configId-580140035")
                 .setNotificationConfig(NotificationConfig.newBuilder().build())
                 .build();
         NotificationConfig response = securityCenterClient.createNotificationConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createNotificationConfigCallable

      public final UnaryCallable<CreateNotificationConfigRequest,NotificationConfig> createNotificationConfigCallable()
      Creates a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateNotificationConfigRequest request =
             CreateNotificationConfigRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setConfigId("configId-580140035")
                 .setNotificationConfig(NotificationConfig.newBuilder().build())
                 .build();
         ApiFuture<NotificationConfig> future =
             securityCenterClient.createNotificationConfigCallable().futureCall(request);
         // Do something.
         NotificationConfig response = future.get();
       }
       
    • deleteMuteConfig

      public final void deleteMuteConfig(MuteConfigName name)
      Deletes an existing mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         MuteConfigName name =
             MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
         securityCenterClient.deleteMuteConfig(name);
       }
       
      Parameters:
      name - Required. Name of the mute config to delete. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteMuteConfig

      public final void deleteMuteConfig(String name)
      Deletes an existing mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString();
         securityCenterClient.deleteMuteConfig(name);
       }
       
      Parameters:
      name - Required. Name of the mute config to delete. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteMuteConfig

      public final void deleteMuteConfig(DeleteMuteConfigRequest request)
      Deletes an existing mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteMuteConfigRequest request =
             DeleteMuteConfigRequest.newBuilder()
                 .setName(
                     MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
                         .toString())
                 .build();
         securityCenterClient.deleteMuteConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteMuteConfigCallable

      public final UnaryCallable<DeleteMuteConfigRequest,com.google.protobuf.Empty> deleteMuteConfigCallable()
      Deletes an existing mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteMuteConfigRequest request =
             DeleteMuteConfigRequest.newBuilder()
                 .setName(
                     MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
                         .toString())
                 .build();
         ApiFuture<Empty> future = securityCenterClient.deleteMuteConfigCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteNotificationConfig

      public final void deleteNotificationConfig(NotificationConfigName name)
      Deletes a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         NotificationConfigName name =
             NotificationConfigName.ofOrganizationNotificationConfigName(
                 "[ORGANIZATION]", "[NOTIFICATION_CONFIG]");
         securityCenterClient.deleteNotificationConfig(name);
       }
       
      Parameters:
      name - Required. Name of the notification config to delete. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`.
      Throws:
      ApiException - if the remote call fails
    • deleteNotificationConfig

      public final void deleteNotificationConfig(String name)
      Deletes a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             NotificationConfigName.ofOrganizationNotificationConfigName(
                     "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                 .toString();
         securityCenterClient.deleteNotificationConfig(name);
       }
       
      Parameters:
      name - Required. Name of the notification config to delete. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`.
      Throws:
      ApiException - if the remote call fails
    • deleteNotificationConfig

      public final void deleteNotificationConfig(DeleteNotificationConfigRequest request)
      Deletes a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteNotificationConfigRequest request =
             DeleteNotificationConfigRequest.newBuilder()
                 .setName(
                     NotificationConfigName.ofOrganizationNotificationConfigName(
                             "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                         .toString())
                 .build();
         securityCenterClient.deleteNotificationConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteNotificationConfigCallable

      public final UnaryCallable<DeleteNotificationConfigRequest,com.google.protobuf.Empty> deleteNotificationConfigCallable()
      Deletes a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteNotificationConfigRequest request =
             DeleteNotificationConfigRequest.newBuilder()
                 .setName(
                     NotificationConfigName.ofOrganizationNotificationConfigName(
                             "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                         .toString())
                 .build();
         ApiFuture<Empty> future =
             securityCenterClient.deleteNotificationConfigCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteSecurityHealthAnalyticsCustomModule

      public final void deleteSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)
      Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SecurityHealthAnalyticsCustomModuleName name =
             SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                 "[ORGANIZATION]", "[CUSTOM_MODULE]");
         securityCenterClient.deleteSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the custom module to delete. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
      Throws:
      ApiException - if the remote call fails
    • deleteSecurityHealthAnalyticsCustomModule

      public final void deleteSecurityHealthAnalyticsCustomModule(String name)
      Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                     "[ORGANIZATION]", "[CUSTOM_MODULE]")
                 .toString();
         securityCenterClient.deleteSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the custom module to delete. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
      Throws:
      ApiException - if the remote call fails
    • deleteSecurityHealthAnalyticsCustomModule

      public final void deleteSecurityHealthAnalyticsCustomModule(DeleteSecurityHealthAnalyticsCustomModuleRequest request)
      Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteSecurityHealthAnalyticsCustomModuleRequest request =
             DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                             "[ORGANIZATION]", "[CUSTOM_MODULE]")
                         .toString())
                 .build();
         securityCenterClient.deleteSecurityHealthAnalyticsCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteSecurityHealthAnalyticsCustomModuleCallable

      public final UnaryCallable<DeleteSecurityHealthAnalyticsCustomModuleRequest,com.google.protobuf.Empty> deleteSecurityHealthAnalyticsCustomModuleCallable()
      Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteSecurityHealthAnalyticsCustomModuleRequest request =
             DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                             "[ORGANIZATION]", "[CUSTOM_MODULE]")
                         .toString())
                 .build();
         ApiFuture<Empty> future =
             securityCenterClient
                 .deleteSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • getSimulation

      public final Simulation getSimulation(SimulationName name)
      Get the simulation by name or the latest simulation for the given organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SimulationName name = SimulationName.of("[ORGANIZATION]", "[SIMULATION]");
         Simulation response = securityCenterClient.getSimulation(name);
       }
       
      Parameters:
      name - Required. The organization name or simulation name of this simulation

      Valid format: `organizations/{organization}/simulations/latest` `organizations/{organization}/simulations/{simulation}`

      Throws:
      ApiException - if the remote call fails
    • getSimulation

      public final Simulation getSimulation(String name)
      Get the simulation by name or the latest simulation for the given organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name = SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString();
         Simulation response = securityCenterClient.getSimulation(name);
       }
       
      Parameters:
      name - Required. The organization name or simulation name of this simulation

      Valid format: `organizations/{organization}/simulations/latest` `organizations/{organization}/simulations/{simulation}`

      Throws:
      ApiException - if the remote call fails
    • getSimulation

      public final Simulation getSimulation(GetSimulationRequest request)
      Get the simulation by name or the latest simulation for the given organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetSimulationRequest request =
             GetSimulationRequest.newBuilder()
                 .setName(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
                 .build();
         Simulation response = securityCenterClient.getSimulation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getSimulationCallable

      public final UnaryCallable<GetSimulationRequest,Simulation> getSimulationCallable()
      Get the simulation by name or the latest simulation for the given organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetSimulationRequest request =
             GetSimulationRequest.newBuilder()
                 .setName(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
                 .build();
         ApiFuture<Simulation> future =
             securityCenterClient.getSimulationCallable().futureCall(request);
         // Do something.
         Simulation response = future.get();
       }
       
    • getValuedResource

      public final ValuedResource getValuedResource(ValuedResourceName name)
      Get the valued resource by name

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ValuedResourceName name =
             ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]");
         ValuedResource response = securityCenterClient.getValuedResource(name);
       }
       
      Parameters:
      name - Required. The name of this valued resource

      Valid format: `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`

      Throws:
      ApiException - if the remote call fails
    • getValuedResource

      public final ValuedResource getValuedResource(String name)
      Get the valued resource by name

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]").toString();
         ValuedResource response = securityCenterClient.getValuedResource(name);
       }
       
      Parameters:
      name - Required. The name of this valued resource

      Valid format: `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`

      Throws:
      ApiException - if the remote call fails
    • getValuedResource

      public final ValuedResource getValuedResource(GetValuedResourceRequest request)
      Get the valued resource by name

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetValuedResourceRequest request =
             GetValuedResourceRequest.newBuilder()
                 .setName(
                     ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
                         .toString())
                 .build();
         ValuedResource response = securityCenterClient.getValuedResource(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getValuedResourceCallable

      public final UnaryCallable<GetValuedResourceRequest,ValuedResource> getValuedResourceCallable()
      Get the valued resource by name

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetValuedResourceRequest request =
             GetValuedResourceRequest.newBuilder()
                 .setName(
                     ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
                         .toString())
                 .build();
         ApiFuture<ValuedResource> future =
             securityCenterClient.getValuedResourceCallable().futureCall(request);
         // Do something.
         ValuedResource response = future.get();
       }
       
    • getBigQueryExport

      public final BigQueryExport getBigQueryExport(BigQueryExportName name)
      Gets a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         BigQueryExportName name =
             BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]");
         BigQueryExport response = securityCenterClient.getBigQueryExport(name);
       }
       
      Parameters:
      name - Required. Name of the BigQuery export to retrieve. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
      Throws:
      ApiException - if the remote call fails
    • getBigQueryExport

      public final BigQueryExport getBigQueryExport(String name)
      Gets a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]").toString();
         BigQueryExport response = securityCenterClient.getBigQueryExport(name);
       }
       
      Parameters:
      name - Required. Name of the BigQuery export to retrieve. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
      Throws:
      ApiException - if the remote call fails
    • getBigQueryExport

      public final BigQueryExport getBigQueryExport(GetBigQueryExportRequest request)
      Gets a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetBigQueryExportRequest request =
             GetBigQueryExportRequest.newBuilder()
                 .setName(
                     BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
                         .toString())
                 .build();
         BigQueryExport response = securityCenterClient.getBigQueryExport(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getBigQueryExportCallable

      public final UnaryCallable<GetBigQueryExportRequest,BigQueryExport> getBigQueryExportCallable()
      Gets a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetBigQueryExportRequest request =
             GetBigQueryExportRequest.newBuilder()
                 .setName(
                     BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
                         .toString())
                 .build();
         ApiFuture<BigQueryExport> future =
             securityCenterClient.getBigQueryExportCallable().futureCall(request);
         // Do something.
         BigQueryExport response = future.get();
       }
       
    • getIamPolicy

      public final Policy getIamPolicy(ResourceName resource)
      Gets the access control policy on the specified Source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
         Policy response = securityCenterClient.getIamPolicy(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicy

      public final Policy getIamPolicy(String resource)
      Gets the access control policy on the specified Source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String resource = FolderName.of("[FOLDER]").toString();
         Policy response = securityCenterClient.getIamPolicy(resource);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicy

      public final Policy getIamPolicy(GetIamPolicyRequest request)
      Gets the access control policy on the specified Source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = securityCenterClient.getIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyCallable

      public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
      Gets the access control policy on the specified Source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future = securityCenterClient.getIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • getMuteConfig

      public final MuteConfig getMuteConfig(MuteConfigName name)
      Gets a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         MuteConfigName name =
             MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]");
         MuteConfig response = securityCenterClient.getMuteConfig(name);
       }
       
      Parameters:
      name - Required. Name of the mute config to retrieve. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`.
      Throws:
      ApiException - if the remote call fails
    • getMuteConfig

      public final MuteConfig getMuteConfig(String name)
      Gets a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]").toString();
         MuteConfig response = securityCenterClient.getMuteConfig(name);
       }
       
      Parameters:
      name - Required. Name of the mute config to retrieve. Its format is `organizations/{organization}/muteConfigs/{config_id}`, `folders/{folder}/muteConfigs/{config_id}`, `projects/{project}/muteConfigs/{config_id}`, `organizations/{organization}/locations/global/muteConfigs/{config_id}`, `folders/{folder}/locations/global/muteConfigs/{config_id}`, or `projects/{project}/locations/global/muteConfigs/{config_id}`.
      Throws:
      ApiException - if the remote call fails
    • getMuteConfig

      public final MuteConfig getMuteConfig(GetMuteConfigRequest request)
      Gets a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetMuteConfigRequest request =
             GetMuteConfigRequest.newBuilder()
                 .setName(
                     MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
                         .toString())
                 .build();
         MuteConfig response = securityCenterClient.getMuteConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getMuteConfigCallable

      public final UnaryCallable<GetMuteConfigRequest,MuteConfig> getMuteConfigCallable()
      Gets a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetMuteConfigRequest request =
             GetMuteConfigRequest.newBuilder()
                 .setName(
                     MuteConfigName.ofOrganizationMuteConfigName("[ORGANIZATION]", "[MUTE_CONFIG]")
                         .toString())
                 .build();
         ApiFuture<MuteConfig> future =
             securityCenterClient.getMuteConfigCallable().futureCall(request);
         // Do something.
         MuteConfig response = future.get();
       }
       
    • getNotificationConfig

      public final NotificationConfig getNotificationConfig(NotificationConfigName name)
      Gets a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         NotificationConfigName name =
             NotificationConfigName.ofOrganizationNotificationConfigName(
                 "[ORGANIZATION]", "[NOTIFICATION_CONFIG]");
         NotificationConfig response = securityCenterClient.getNotificationConfig(name);
       }
       
      Parameters:
      name - Required. Name of the notification config to get. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`.
      Throws:
      ApiException - if the remote call fails
    • getNotificationConfig

      public final NotificationConfig getNotificationConfig(String name)
      Gets a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             NotificationConfigName.ofOrganizationNotificationConfigName(
                     "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                 .toString();
         NotificationConfig response = securityCenterClient.getNotificationConfig(name);
       }
       
      Parameters:
      name - Required. Name of the notification config to get. Its format is `organizations/[organization_id]/notificationConfigs/[config_id]`, `folders/[folder_id]/notificationConfigs/[config_id]`, or `projects/[project_id]/notificationConfigs/[config_id]`.
      Throws:
      ApiException - if the remote call fails
    • getNotificationConfig

      public final NotificationConfig getNotificationConfig(GetNotificationConfigRequest request)
      Gets a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetNotificationConfigRequest request =
             GetNotificationConfigRequest.newBuilder()
                 .setName(
                     NotificationConfigName.ofOrganizationNotificationConfigName(
                             "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                         .toString())
                 .build();
         NotificationConfig response = securityCenterClient.getNotificationConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getNotificationConfigCallable

      public final UnaryCallable<GetNotificationConfigRequest,NotificationConfig> getNotificationConfigCallable()
      Gets a notification config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetNotificationConfigRequest request =
             GetNotificationConfigRequest.newBuilder()
                 .setName(
                     NotificationConfigName.ofOrganizationNotificationConfigName(
                             "[ORGANIZATION]", "[NOTIFICATION_CONFIG]")
                         .toString())
                 .build();
         ApiFuture<NotificationConfig> future =
             securityCenterClient.getNotificationConfigCallable().futureCall(request);
         // Do something.
         NotificationConfig response = future.get();
       }
       
    • getOrganizationSettings

      public final OrganizationSettings getOrganizationSettings(OrganizationSettingsName name)
      Gets the settings for an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationSettingsName name = OrganizationSettingsName.of("[ORGANIZATION]");
         OrganizationSettings response = securityCenterClient.getOrganizationSettings(name);
       }
       
      Parameters:
      name - Required. Name of the organization to get organization settings for. Its format is `organizations/[organization_id]/organizationSettings`.
      Throws:
      ApiException - if the remote call fails
    • getOrganizationSettings

      public final OrganizationSettings getOrganizationSettings(String name)
      Gets the settings for an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name = OrganizationSettingsName.of("[ORGANIZATION]").toString();
         OrganizationSettings response = securityCenterClient.getOrganizationSettings(name);
       }
       
      Parameters:
      name - Required. Name of the organization to get organization settings for. Its format is `organizations/[organization_id]/organizationSettings`.
      Throws:
      ApiException - if the remote call fails
    • getOrganizationSettings

      public final OrganizationSettings getOrganizationSettings(GetOrganizationSettingsRequest request)
      Gets the settings for an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetOrganizationSettingsRequest request =
             GetOrganizationSettingsRequest.newBuilder()
                 .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString())
                 .build();
         OrganizationSettings response = securityCenterClient.getOrganizationSettings(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getOrganizationSettingsCallable

      public final UnaryCallable<GetOrganizationSettingsRequest,OrganizationSettings> getOrganizationSettingsCallable()
      Gets the settings for an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetOrganizationSettingsRequest request =
             GetOrganizationSettingsRequest.newBuilder()
                 .setName(OrganizationSettingsName.of("[ORGANIZATION]").toString())
                 .build();
         ApiFuture<OrganizationSettings> future =
             securityCenterClient.getOrganizationSettingsCallable().futureCall(request);
         // Do something.
         OrganizationSettings response = future.get();
       }
       
    • getEffectiveSecurityHealthAnalyticsCustomModule

      public final EffectiveSecurityHealthAnalyticsCustomModule getEffectiveSecurityHealthAnalyticsCustomModule(EffectiveSecurityHealthAnalyticsCustomModuleName name)
      Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         EffectiveSecurityHealthAnalyticsCustomModuleName name =
             EffectiveSecurityHealthAnalyticsCustomModuleName.ofOrganizationEffectiveCustomModuleName(
                 "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]");
         EffectiveSecurityHealthAnalyticsCustomModule response =
             securityCenterClient.getEffectiveSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the effective custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
      Throws:
      ApiException - if the remote call fails
    • getEffectiveSecurityHealthAnalyticsCustomModule

      public final EffectiveSecurityHealthAnalyticsCustomModule getEffectiveSecurityHealthAnalyticsCustomModule(String name)
      Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             EffectiveSecurityHealthAnalyticsCustomModuleName.ofOrganizationEffectiveCustomModuleName(
                     "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]")
                 .toString();
         EffectiveSecurityHealthAnalyticsCustomModule response =
             securityCenterClient.getEffectiveSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the effective custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}`
      Throws:
      ApiException - if the remote call fails
    • getEffectiveSecurityHealthAnalyticsCustomModule

      public final EffectiveSecurityHealthAnalyticsCustomModule getEffectiveSecurityHealthAnalyticsCustomModule(GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request)
      Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request =
             GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     EffectiveSecurityHealthAnalyticsCustomModuleName
                         .ofOrganizationEffectiveCustomModuleName(
                             "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]")
                         .toString())
                 .build();
         EffectiveSecurityHealthAnalyticsCustomModule response =
             securityCenterClient.getEffectiveSecurityHealthAnalyticsCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getEffectiveSecurityHealthAnalyticsCustomModuleCallable

      public final UnaryCallable<GetEffectiveSecurityHealthAnalyticsCustomModuleRequest,EffectiveSecurityHealthAnalyticsCustomModule> getEffectiveSecurityHealthAnalyticsCustomModuleCallable()
      Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request =
             GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     EffectiveSecurityHealthAnalyticsCustomModuleName
                         .ofOrganizationEffectiveCustomModuleName(
                             "[ORGANIZATION]", "[EFFECTIVE_CUSTOM_MODULE]")
                         .toString())
                 .build();
         ApiFuture<EffectiveSecurityHealthAnalyticsCustomModule> future =
             securityCenterClient
                 .getEffectiveSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         EffectiveSecurityHealthAnalyticsCustomModule response = future.get();
       }
       
    • getSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)
      Retrieves a SecurityHealthAnalyticsCustomModule.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SecurityHealthAnalyticsCustomModuleName name =
             SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                 "[ORGANIZATION]", "[CUSTOM_MODULE]");
         SecurityHealthAnalyticsCustomModule response =
             securityCenterClient.getSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
      Throws:
      ApiException - if the remote call fails
    • getSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(String name)
      Retrieves a SecurityHealthAnalyticsCustomModule.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                     "[ORGANIZATION]", "[CUSTOM_MODULE]")
                 .toString();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterClient.getSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the custom module to get. Its format is `organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}`, `folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}`, or `projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}`
      Throws:
      ApiException - if the remote call fails
    • getSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(GetSecurityHealthAnalyticsCustomModuleRequest request)
      Retrieves a SecurityHealthAnalyticsCustomModule.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetSecurityHealthAnalyticsCustomModuleRequest request =
             GetSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                             "[ORGANIZATION]", "[CUSTOM_MODULE]")
                         .toString())
                 .build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterClient.getSecurityHealthAnalyticsCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getSecurityHealthAnalyticsCustomModuleCallable

      public final UnaryCallable<GetSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule> getSecurityHealthAnalyticsCustomModuleCallable()
      Retrieves a SecurityHealthAnalyticsCustomModule.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetSecurityHealthAnalyticsCustomModuleRequest request =
             GetSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     SecurityHealthAnalyticsCustomModuleName.ofOrganizationCustomModuleName(
                             "[ORGANIZATION]", "[CUSTOM_MODULE]")
                         .toString())
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterClient.getSecurityHealthAnalyticsCustomModuleCallable().futureCall(request);
         // Do something.
         SecurityHealthAnalyticsCustomModule response = future.get();
       }
       
    • getSource

      public final Source getSource(SourceName name)
      Gets a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SourceName name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
         Source response = securityCenterClient.getSource(name);
       }
       
      Parameters:
      name - Required. Relative resource name of the source. Its format is `organizations/[organization_id]/source/[source_id]`.
      Throws:
      ApiException - if the remote call fails
    • getSource

      public final Source getSource(String name)
      Gets a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
         Source response = securityCenterClient.getSource(name);
       }
       
      Parameters:
      name - Required. Relative resource name of the source. Its format is `organizations/[organization_id]/source/[source_id]`.
      Throws:
      ApiException - if the remote call fails
    • getSource

      public final Source getSource(GetSourceRequest request)
      Gets a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetSourceRequest request =
             GetSourceRequest.newBuilder()
                 .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .build();
         Source response = securityCenterClient.getSource(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getSourceCallable

      public final UnaryCallable<GetSourceRequest,Source> getSourceCallable()
      Gets a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetSourceRequest request =
             GetSourceRequest.newBuilder()
                 .setName(SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .build();
         ApiFuture<Source> future = securityCenterClient.getSourceCallable().futureCall(request);
         // Do something.
         Source response = future.get();
       }
       
    • groupAssets

      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Filters an organization's assets and groups them by their specified properties.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GroupAssetsRequest request =
             GroupAssetsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setFilter("filter-1274492040")
                 .setGroupBy("groupBy293428022")
                 .setCompareDuration(Duration.newBuilder().build())
                 .setReadTime(Timestamp.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (GroupResult element : securityCenterClient.groupAssets(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • groupAssetsPagedCallable

      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Filters an organization's assets and groups them by their specified properties.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GroupAssetsRequest request =
             GroupAssetsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setFilter("filter-1274492040")
                 .setGroupBy("groupBy293428022")
                 .setCompareDuration(Duration.newBuilder().build())
                 .setReadTime(Timestamp.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<GroupResult> future =
             securityCenterClient.groupAssetsPagedCallable().futureCall(request);
         // Do something.
         for (GroupResult element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • groupAssetsCallable

      @Deprecated public final UnaryCallable<GroupAssetsRequest,GroupAssetsResponse> groupAssetsCallable()
      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Filters an organization's assets and groups them by their specified properties.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GroupAssetsRequest request =
             GroupAssetsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setFilter("filter-1274492040")
                 .setGroupBy("groupBy293428022")
                 .setCompareDuration(Duration.newBuilder().build())
                 .setReadTime(Timestamp.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           GroupAssetsResponse response = securityCenterClient.groupAssetsCallable().call(request);
           for (GroupResult element : response.getGroupByResultsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • groupFindings

      public final SecurityCenterClient.GroupFindingsPagedResponse groupFindings(SourceName parent, String groupBy)
      Filters an organization or source's findings and groups them by their specified properties.

      To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SourceName parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
         String groupBy = "groupBy293428022";
         for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the source to groupBy. Its format is `organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a source_id of `-`. For example: `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-`
      groupBy - Required. Expression that defines what assets fields to use for grouping (including `state_change`). The string value should follow SQL syntax: comma separated list of fields. For example: "parent,resource_name".

      The following fields are supported when compare_duration is set:

      • state_change
      Throws:
      ApiException - if the remote call fails
    • groupFindings

      public final SecurityCenterClient.GroupFindingsPagedResponse groupFindings(String parent, String groupBy)
      Filters an organization or source's findings and groups them by their specified properties.

      To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString();
         String groupBy = "groupBy293428022";
         for (GroupResult element : securityCenterClient.groupFindings(parent, groupBy).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the source to groupBy. Its format is `organizations/[organization_id]/sources/[source_id]`, `folders/[folder_id]/sources/[source_id]`, or `projects/[project_id]/sources/[source_id]`. To groupBy across all sources provide a source_id of `-`. For example: `organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-`, or `projects/{project_id}/sources/-`
      groupBy - Required. Expression that defines what assets fields to use for grouping (including `state_change`). The string value should follow SQL syntax: comma separated list of fields. For example: "parent,resource_name".

      The following fields are supported when compare_duration is set:

      • state_change
      Throws:
      ApiException - if the remote call fails
    • groupFindings

      Filters an organization or source's findings and groups them by their specified properties.

      To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GroupFindingsRequest request =
             GroupFindingsRequest.newBuilder()
                 .setParent(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setFilter("filter-1274492040")
                 .setGroupBy("groupBy293428022")
                 .setReadTime(Timestamp.newBuilder().build())
                 .setCompareDuration(Duration.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (GroupResult element : securityCenterClient.groupFindings(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • groupFindingsPagedCallable

      Filters an organization or source's findings and groups them by their specified properties.

      To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GroupFindingsRequest request =
             GroupFindingsRequest.newBuilder()
                 .setParent(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setFilter("filter-1274492040")
                 .setGroupBy("groupBy293428022")
                 .setReadTime(Timestamp.newBuilder().build())
                 .setCompareDuration(Duration.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<GroupResult> future =
             securityCenterClient.groupFindingsPagedCallable().futureCall(request);
         // Do something.
         for (GroupResult element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • groupFindingsCallable

      public final UnaryCallable<GroupFindingsRequest,GroupFindingsResponse> groupFindingsCallable()
      Filters an organization or source's findings and groups them by their specified properties.

      To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GroupFindingsRequest request =
             GroupFindingsRequest.newBuilder()
                 .setParent(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setFilter("filter-1274492040")
                 .setGroupBy("groupBy293428022")
                 .setReadTime(Timestamp.newBuilder().build())
                 .setCompareDuration(Duration.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           GroupFindingsResponse response = securityCenterClient.groupFindingsCallable().call(request);
           for (GroupResult element : response.getGroupByResultsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listAssets

      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Lists an organization's assets.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListAssetsRequest request =
             ListAssetsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReadTime(Timestamp.newBuilder().build())
                 .setCompareDuration(Duration.newBuilder().build())
                 .setFieldMask(FieldMask.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (ListAssetsResponse.ListAssetsResult element :
             securityCenterClient.listAssets(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listAssetsPagedCallable

      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Lists an organization's assets.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListAssetsRequest request =
             ListAssetsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReadTime(Timestamp.newBuilder().build())
                 .setCompareDuration(Duration.newBuilder().build())
                 .setFieldMask(FieldMask.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<ListAssetsResponse.ListAssetsResult> future =
             securityCenterClient.listAssetsPagedCallable().futureCall(request);
         // Do something.
         for (ListAssetsResponse.ListAssetsResult element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listAssetsCallable

      @Deprecated public final UnaryCallable<ListAssetsRequest,ListAssetsResponse> listAssetsCallable()
      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Lists an organization's assets.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListAssetsRequest request =
             ListAssetsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReadTime(Timestamp.newBuilder().build())
                 .setCompareDuration(Duration.newBuilder().build())
                 .setFieldMask(FieldMask.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           ListAssetsResponse response = securityCenterClient.listAssetsCallable().call(request);
           for (ListAssetsResponse.ListAssetsResult element : response.getListAssetsResultsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listDescendantSecurityHealthAnalyticsCustomModules

      Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SecurityHealthAnalyticsSettingsName parent =
             SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterClient
                 .listDescendantSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list descendant custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings`
      Throws:
      ApiException - if the remote call fails
    • listDescendantSecurityHealthAnalyticsCustomModules

      public final SecurityCenterClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse listDescendantSecurityHealthAnalyticsCustomModules(String parent)
      Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent =
             SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterClient
                 .listDescendantSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list descendant custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings`
      Throws:
      ApiException - if the remote call fails
    • listDescendantSecurityHealthAnalyticsCustomModules

      Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
             ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterClient
                 .listDescendantSecurityHealthAnalyticsCustomModules(request)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable

      Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
             ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterClient
                 .listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (SecurityHealthAnalyticsCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDescendantSecurityHealthAnalyticsCustomModulesCallable

      Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent’s CRM descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
             ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListDescendantSecurityHealthAnalyticsCustomModulesResponse response =
               securityCenterClient
                   .listDescendantSecurityHealthAnalyticsCustomModulesCallable()
                   .call(request);
           for (SecurityHealthAnalyticsCustomModule element :
               response.getSecurityHealthAnalyticsCustomModulesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listFindings

      Lists an organization or source's findings.

      To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListFindingsRequest request =
             ListFindingsRequest.newBuilder()
                 .setParent(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReadTime(Timestamp.newBuilder().build())
                 .setCompareDuration(Duration.newBuilder().build())
                 .setFieldMask(FieldMask.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (ListFindingsResponse.ListFindingsResult element :
             securityCenterClient.listFindings(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listFindingsPagedCallable

      Lists an organization or source's findings.

      To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListFindingsRequest request =
             ListFindingsRequest.newBuilder()
                 .setParent(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReadTime(Timestamp.newBuilder().build())
                 .setCompareDuration(Duration.newBuilder().build())
                 .setFieldMask(FieldMask.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<ListFindingsResponse.ListFindingsResult> future =
             securityCenterClient.listFindingsPagedCallable().futureCall(request);
         // Do something.
         for (ListFindingsResponse.ListFindingsResult element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listFindingsCallable

      public final UnaryCallable<ListFindingsRequest,ListFindingsResponse> listFindingsCallable()
      Lists an organization or source's findings.

      To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListFindingsRequest request =
             ListFindingsRequest.newBuilder()
                 .setParent(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .setReadTime(Timestamp.newBuilder().build())
                 .setCompareDuration(Duration.newBuilder().build())
                 .setFieldMask(FieldMask.newBuilder().build())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           ListFindingsResponse response = securityCenterClient.listFindingsCallable().call(request);
           for (ListFindingsResponse.ListFindingsResult element :
               response.getListFindingsResultsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listMuteConfigs

      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listMuteConfigs

      public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(FolderName parent)
      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderName parent = FolderName.of("[FOLDER]");
         for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listMuteConfigs

      public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(LocationName parent)
      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listMuteConfigs

      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listMuteConfigs

      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listMuteConfigs

      public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(ProjectName parent)
      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ProjectName parent = ProjectName.of("[PROJECT]");
         for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listMuteConfigs

      public final SecurityCenterClient.ListMuteConfigsPagedResponse listMuteConfigs(String parent)
      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         for (MuteConfig element : securityCenterClient.listMuteConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of mute configs. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listMuteConfigs

      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListMuteConfigsRequest request =
             ListMuteConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (MuteConfig element : securityCenterClient.listMuteConfigs(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listMuteConfigsPagedCallable

      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListMuteConfigsRequest request =
             ListMuteConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<MuteConfig> future =
             securityCenterClient.listMuteConfigsPagedCallable().futureCall(request);
         // Do something.
         for (MuteConfig element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listMuteConfigsCallable

      public final UnaryCallable<ListMuteConfigsRequest,ListMuteConfigsResponse> listMuteConfigsCallable()
      Lists mute configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListMuteConfigsRequest request =
             ListMuteConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListMuteConfigsResponse response =
               securityCenterClient.listMuteConfigsCallable().call(request);
           for (MuteConfig element : response.getMuteConfigsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listNotificationConfigs

      public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(FolderName parent)
      Lists notification configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderName parent = FolderName.of("[FOLDER]");
         for (NotificationConfig element :
             securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
      Throws:
      ApiException - if the remote call fails
    • listNotificationConfigs

      public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(OrganizationName parent)
      Lists notification configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         for (NotificationConfig element :
             securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
      Throws:
      ApiException - if the remote call fails
    • listNotificationConfigs

      public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(ProjectName parent)
      Lists notification configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ProjectName parent = ProjectName.of("[PROJECT]");
         for (NotificationConfig element :
             securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
      Throws:
      ApiException - if the remote call fails
    • listNotificationConfigs

      public final SecurityCenterClient.ListNotificationConfigsPagedResponse listNotificationConfigs(String parent)
      Lists notification configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         for (NotificationConfig element :
             securityCenterClient.listNotificationConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent in which to list the notification configurations. Its format is "organizations/[organization_id]", "folders/[folder_id]", or "projects/[project_id]".
      Throws:
      ApiException - if the remote call fails
    • listNotificationConfigs

      Lists notification configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListNotificationConfigsRequest request =
             ListNotificationConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (NotificationConfig element :
             securityCenterClient.listNotificationConfigs(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listNotificationConfigsPagedCallable

      Lists notification configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListNotificationConfigsRequest request =
             ListNotificationConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<NotificationConfig> future =
             securityCenterClient.listNotificationConfigsPagedCallable().futureCall(request);
         // Do something.
         for (NotificationConfig element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listNotificationConfigsCallable

      public final UnaryCallable<ListNotificationConfigsRequest,ListNotificationConfigsResponse> listNotificationConfigsCallable()
      Lists notification configs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListNotificationConfigsRequest request =
             ListNotificationConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           ListNotificationConfigsResponse response =
               securityCenterClient.listNotificationConfigsCallable().call(request);
           for (NotificationConfig element : response.getNotificationConfigsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listEffectiveSecurityHealthAnalyticsCustomModules

      Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SecurityHealthAnalyticsSettingsName parent =
             SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
         for (EffectiveSecurityHealthAnalyticsCustomModule element :
             securityCenterClient
                 .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings`
      Throws:
      ApiException - if the remote call fails
    • listEffectiveSecurityHealthAnalyticsCustomModules

      public final SecurityCenterClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse listEffectiveSecurityHealthAnalyticsCustomModules(String parent)
      Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent =
             SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
         for (EffectiveSecurityHealthAnalyticsCustomModule element :
             securityCenterClient
                 .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings`
      Throws:
      ApiException - if the remote call fails
    • listEffectiveSecurityHealthAnalyticsCustomModules

      Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
             ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (EffectiveSecurityHealthAnalyticsCustomModule element :
             securityCenterClient
                 .listEffectiveSecurityHealthAnalyticsCustomModules(request)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable

      Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
             ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<EffectiveSecurityHealthAnalyticsCustomModule> future =
             securityCenterClient
                 .listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (EffectiveSecurityHealthAnalyticsCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listEffectiveSecurityHealthAnalyticsCustomModulesCallable

      Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
             ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListEffectiveSecurityHealthAnalyticsCustomModulesResponse response =
               securityCenterClient
                   .listEffectiveSecurityHealthAnalyticsCustomModulesCallable()
                   .call(request);
           for (EffectiveSecurityHealthAnalyticsCustomModule element :
               response.getEffectiveSecurityHealthAnalyticsCustomModulesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listSecurityHealthAnalyticsCustomModules

      Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SecurityHealthAnalyticsSettingsName parent =
             SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]");
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterClient.listSecurityHealthAnalyticsCustomModules(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings`
      Throws:
      ApiException - if the remote call fails
    • listSecurityHealthAnalyticsCustomModules

      public final SecurityCenterClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse listSecurityHealthAnalyticsCustomModules(String parent)
      Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent =
             SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterClient.listSecurityHealthAnalyticsCustomModules(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules. Its format is `organizations/{organization}/securityHealthAnalyticsSettings`, `folders/{folder}/securityHealthAnalyticsSettings`, or `projects/{project}/securityHealthAnalyticsSettings`
      Throws:
      ApiException - if the remote call fails
    • listSecurityHealthAnalyticsCustomModules

      Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListSecurityHealthAnalyticsCustomModulesRequest request =
             ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterClient.listSecurityHealthAnalyticsCustomModules(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listSecurityHealthAnalyticsCustomModulesPagedCallable

      Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListSecurityHealthAnalyticsCustomModulesRequest request =
             ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterClient
                 .listSecurityHealthAnalyticsCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (SecurityHealthAnalyticsCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listSecurityHealthAnalyticsCustomModulesCallable

      Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListSecurityHealthAnalyticsCustomModulesRequest request =
             ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(
                     SecurityHealthAnalyticsSettingsName.ofOrganizationName("[ORGANIZATION]")
                         .toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListSecurityHealthAnalyticsCustomModulesResponse response =
               securityCenterClient.listSecurityHealthAnalyticsCustomModulesCallable().call(request);
           for (SecurityHealthAnalyticsCustomModule element :
               response.getSecurityHealthAnalyticsCustomModulesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listSources

      public final SecurityCenterClient.ListSourcesPagedResponse listSources(FolderName parent)
      Lists all sources belonging to an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderName parent = FolderName.of("[FOLDER]");
         for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listSources

      Lists all sources belonging to an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listSources

      Lists all sources belonging to an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ProjectName parent = ProjectName.of("[PROJECT]");
         for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listSources

      public final SecurityCenterClient.ListSourcesPagedResponse listSources(String parent)
      Lists all sources belonging to an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         for (Source element : securityCenterClient.listSources(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Resource name of the parent of sources to list. Its format should be `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listSources

      Lists all sources belonging to an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListSourcesRequest request =
             ListSourcesRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (Source element : securityCenterClient.listSources(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listSourcesPagedCallable

      Lists all sources belonging to an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListSourcesRequest request =
             ListSourcesRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<Source> future =
             securityCenterClient.listSourcesPagedCallable().futureCall(request);
         // Do something.
         for (Source element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listSourcesCallable

      public final UnaryCallable<ListSourcesRequest,ListSourcesResponse> listSourcesCallable()
      Lists all sources belonging to an organization.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListSourcesRequest request =
             ListSourcesRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           ListSourcesResponse response = securityCenterClient.listSourcesCallable().call(request);
           for (Source element : response.getSourcesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • runAssetDiscoveryAsync

      @Deprecated public final OperationFuture<RunAssetDiscoveryResponse,com.google.protobuf.Empty> runAssetDiscoveryAsync(OrganizationName parent)
      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Runs asset discovery. The discovery is tracked with a long-running operation.

      This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         RunAssetDiscoveryResponse response =
             securityCenterClient.runAssetDiscoveryAsync(parent).get();
       }
       
      Parameters:
      parent - Required. Name of the organization to run asset discovery for. Its format is `organizations/[organization_id]`.
      Throws:
      ApiException - if the remote call fails
    • runAssetDiscoveryAsync

      @Deprecated public final OperationFuture<RunAssetDiscoveryResponse,com.google.protobuf.Empty> runAssetDiscoveryAsync(String parent)
      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Runs asset discovery. The discovery is tracked with a long-running operation.

      This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         RunAssetDiscoveryResponse response =
             securityCenterClient.runAssetDiscoveryAsync(parent).get();
       }
       
      Parameters:
      parent - Required. Name of the organization to run asset discovery for. Its format is `organizations/[organization_id]`.
      Throws:
      ApiException - if the remote call fails
    • runAssetDiscoveryAsync

      @Deprecated public final OperationFuture<RunAssetDiscoveryResponse,com.google.protobuf.Empty> runAssetDiscoveryAsync(RunAssetDiscoveryRequest request)
      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Runs asset discovery. The discovery is tracked with a long-running operation.

      This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         RunAssetDiscoveryRequest request =
             RunAssetDiscoveryRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .build();
         RunAssetDiscoveryResponse response =
             securityCenterClient.runAssetDiscoveryAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • runAssetDiscoveryOperationCallable

      @Deprecated public final OperationCallable<RunAssetDiscoveryRequest,RunAssetDiscoveryResponse,com.google.protobuf.Empty> runAssetDiscoveryOperationCallable()
      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Runs asset discovery. The discovery is tracked with a long-running operation.

      This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         RunAssetDiscoveryRequest request =
             RunAssetDiscoveryRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .build();
         OperationFuture<RunAssetDiscoveryResponse, Empty> future =
             securityCenterClient.runAssetDiscoveryOperationCallable().futureCall(request);
         // Do something.
         RunAssetDiscoveryResponse response = future.get();
       }
       
    • runAssetDiscoveryCallable

      @Deprecated public final UnaryCallable<RunAssetDiscoveryRequest,Operation> runAssetDiscoveryCallable()
      Deprecated.
      This method is deprecated and will be removed in the next major version update.
      Runs asset discovery. The discovery is tracked with a long-running operation.

      This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         RunAssetDiscoveryRequest request =
             RunAssetDiscoveryRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .build();
         ApiFuture<Operation> future =
             securityCenterClient.runAssetDiscoveryCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • setFindingState

      public final Finding setFindingState(FindingName name, Finding.State state, com.google.protobuf.Timestamp startTime)
      Updates the state of a finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FindingName name =
             FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
         Finding.State state = Finding.State.forNumber(0);
         Timestamp startTime = Timestamp.newBuilder().build();
         Finding response = securityCenterClient.setFindingState(name, state, startTime);
       }
       
      Parameters:
      name - Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
      state - Required. The desired State of the finding.
      startTime - Required. The time at which the updated state takes effect.
      Throws:
      ApiException - if the remote call fails
    • setFindingState

      public final Finding setFindingState(String name, Finding.State state, com.google.protobuf.Timestamp startTime)
      Updates the state of a finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                 .toString();
         Finding.State state = Finding.State.forNumber(0);
         Timestamp startTime = Timestamp.newBuilder().build();
         Finding response = securityCenterClient.setFindingState(name, state, startTime);
       }
       
      Parameters:
      name - Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
      state - Required. The desired State of the finding.
      startTime - Required. The time at which the updated state takes effect.
      Throws:
      ApiException - if the remote call fails
    • setFindingState

      public final Finding setFindingState(SetFindingStateRequest request)
      Updates the state of a finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SetFindingStateRequest request =
             SetFindingStateRequest.newBuilder()
                 .setName(
                     FindingName.ofOrganizationSourceFindingName(
                             "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                         .toString())
                 .setStartTime(Timestamp.newBuilder().build())
                 .build();
         Finding response = securityCenterClient.setFindingState(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setFindingStateCallable

      public final UnaryCallable<SetFindingStateRequest,Finding> setFindingStateCallable()
      Updates the state of a finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SetFindingStateRequest request =
             SetFindingStateRequest.newBuilder()
                 .setName(
                     FindingName.ofOrganizationSourceFindingName(
                             "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                         .toString())
                 .setStartTime(Timestamp.newBuilder().build())
                 .build();
         ApiFuture<Finding> future =
             securityCenterClient.setFindingStateCallable().futureCall(request);
         // Do something.
         Finding response = future.get();
       }
       
    • setMute

      public final Finding setMute(FindingName name, Finding.Mute mute)
      Updates the mute state of a finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FindingName name =
             FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]");
         Finding.Mute mute = Finding.Mute.forNumber(0);
         Finding response = securityCenterClient.setMute(name, mute);
       }
       
      Parameters:
      name - Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
      mute - Required. The desired state of the Mute.
      Throws:
      ApiException - if the remote call fails
    • setMute

      public final Finding setMute(String name, Finding.Mute mute)
      Updates the mute state of a finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             FindingName.ofOrganizationSourceFindingName("[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                 .toString();
         Finding.Mute mute = Finding.Mute.forNumber(0);
         Finding response = securityCenterClient.setMute(name, mute);
       }
       
      Parameters:
      name - Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`, `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`, `projects/{project_id}/sources/{source_id}/findings/{finding_id}`.
      mute - Required. The desired state of the Mute.
      Throws:
      ApiException - if the remote call fails
    • setMute

      public final Finding setMute(SetMuteRequest request)
      Updates the mute state of a finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SetMuteRequest request =
             SetMuteRequest.newBuilder()
                 .setName(
                     FindingName.ofOrganizationSourceFindingName(
                             "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                         .toString())
                 .build();
         Finding response = securityCenterClient.setMute(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setMuteCallable

      public final UnaryCallable<SetMuteRequest,Finding> setMuteCallable()
      Updates the mute state of a finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SetMuteRequest request =
             SetMuteRequest.newBuilder()
                 .setName(
                     FindingName.ofOrganizationSourceFindingName(
                             "[ORGANIZATION]", "[SOURCE]", "[FINDING]")
                         .toString())
                 .build();
         ApiFuture<Finding> future = securityCenterClient.setMuteCallable().futureCall(request);
         // Do something.
         Finding response = future.get();
       }
       
    • setIamPolicy

      public final Policy setIamPolicy(ResourceName resource, Policy policy)
      Sets the access control policy on the specified Source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
         Policy policy = Policy.newBuilder().build();
         Policy response = securityCenterClient.setIamPolicy(resource, policy);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
      policy - REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicy

      public final Policy setIamPolicy(String resource, Policy policy)
      Sets the access control policy on the specified Source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String resource = FolderName.of("[FOLDER]").toString();
         Policy policy = Policy.newBuilder().build();
         Policy response = securityCenterClient.setIamPolicy(resource, policy);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
      policy - REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicy

      public final Policy setIamPolicy(SetIamPolicyRequest request)
      Sets the access control policy on the specified Source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = securityCenterClient.setIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyCallable

      public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
      Sets the access control policy on the specified Source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future = securityCenterClient.setIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(ResourceName resource, List<String> permissions)
      Returns the permissions that a caller has on the specified source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ResourceName resource = SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]");
         List<String> permissions = new ArrayList<>();
         TestIamPermissionsResponse response =
             securityCenterClient.testIamPermissions(resource, permissions);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
      permissions - The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
      Throws:
      ApiException - if the remote call fails
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(String resource, List<String> permissions)
      Returns the permissions that a caller has on the specified source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String resource = FolderName.of("[FOLDER]").toString();
         List<String> permissions = new ArrayList<>();
         TestIamPermissionsResponse response =
             securityCenterClient.testIamPermissions(resource, permissions);
       }
       
      Parameters:
      resource - REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
      permissions - The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
      Throws:
      ApiException - if the remote call fails
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
      Returns the permissions that a caller has on the specified source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response = securityCenterClient.testIamPermissions(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsCallable

      public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
      Returns the permissions that a caller has on the specified source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     SourceName.ofOrganizationSourceName("[ORGANIZATION]", "[SOURCE]").toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             securityCenterClient.testIamPermissionsCallable().futureCall(request);
         // Do something.
         TestIamPermissionsResponse response = future.get();
       }
       
    • simulateSecurityHealthAnalyticsCustomModule

      public final SimulateSecurityHealthAnalyticsCustomModuleResponse simulateSecurityHealthAnalyticsCustomModule(String parent, CustomConfig customConfig, SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource)
      Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = "parent-995424086";
         CustomConfig customConfig = CustomConfig.newBuilder().build();
         SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource =
             SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder().build();
         SimulateSecurityHealthAnalyticsCustomModuleResponse response =
             securityCenterClient.simulateSecurityHealthAnalyticsCustomModule(
                 parent, customConfig, resource);
       }
       
      Parameters:
      parent - Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}`
      customConfig - Required. The custom configuration that you need to test.
      resource - Required. Resource data to simulate custom module against.
      Throws:
      ApiException - if the remote call fails
    • simulateSecurityHealthAnalyticsCustomModule

      public final SimulateSecurityHealthAnalyticsCustomModuleResponse simulateSecurityHealthAnalyticsCustomModule(SimulateSecurityHealthAnalyticsCustomModuleRequest request)
      Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SimulateSecurityHealthAnalyticsCustomModuleRequest request =
             SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setCustomConfig(CustomConfig.newBuilder().build())
                 .setResource(
                     SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder()
                         .build())
                 .build();
         SimulateSecurityHealthAnalyticsCustomModuleResponse response =
             securityCenterClient.simulateSecurityHealthAnalyticsCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • simulateSecurityHealthAnalyticsCustomModuleCallable

      Simulates a given SecurityHealthAnalyticsCustomModule and Resource.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SimulateSecurityHealthAnalyticsCustomModuleRequest request =
             SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setCustomConfig(CustomConfig.newBuilder().build())
                 .setResource(
                     SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder()
                         .build())
                 .build();
         ApiFuture<SimulateSecurityHealthAnalyticsCustomModuleResponse> future =
             securityCenterClient
                 .simulateSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         SimulateSecurityHealthAnalyticsCustomModuleResponse response = future.get();
       }
       
    • updateExternalSystem

      public final ExternalSystem updateExternalSystem(ExternalSystem externalSystem, com.google.protobuf.FieldMask updateMask)
      Updates external system. This is for a given finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ExternalSystem externalSystem = ExternalSystem.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         ExternalSystem response =
             securityCenterClient.updateExternalSystem(externalSystem, updateMask);
       }
       
      Parameters:
      externalSystem - Required. The external system resource to update.
      updateMask - The FieldMask to use when updating the external system resource.

      If empty all mutable fields will be updated.

      Throws:
      ApiException - if the remote call fails
    • updateExternalSystem

      public final ExternalSystem updateExternalSystem(UpdateExternalSystemRequest request)
      Updates external system. This is for a given finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateExternalSystemRequest request =
             UpdateExternalSystemRequest.newBuilder()
                 .setExternalSystem(ExternalSystem.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ExternalSystem response = securityCenterClient.updateExternalSystem(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateExternalSystemCallable

      public final UnaryCallable<UpdateExternalSystemRequest,ExternalSystem> updateExternalSystemCallable()
      Updates external system. This is for a given finding.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateExternalSystemRequest request =
             UpdateExternalSystemRequest.newBuilder()
                 .setExternalSystem(ExternalSystem.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<ExternalSystem> future =
             securityCenterClient.updateExternalSystemCallable().futureCall(request);
         // Do something.
         ExternalSystem response = future.get();
       }
       
    • updateFinding

      public final Finding updateFinding(Finding finding)
      Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         Finding finding = Finding.newBuilder().build();
         Finding response = securityCenterClient.updateFinding(finding);
       }
       
      Parameters:
      finding - Required. The finding resource to update or create if it does not already exist. parent, security_marks, and update_time will be ignored.

      In the case of creation, the finding id portion of the name must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.

      Throws:
      ApiException - if the remote call fails
    • updateFinding

      public final Finding updateFinding(UpdateFindingRequest request)
      Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateFindingRequest request =
             UpdateFindingRequest.newBuilder()
                 .setFinding(Finding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Finding response = securityCenterClient.updateFinding(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateFindingCallable

      public final UnaryCallable<UpdateFindingRequest,Finding> updateFindingCallable()
      Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateFindingRequest request =
             UpdateFindingRequest.newBuilder()
                 .setFinding(Finding.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Finding> future = securityCenterClient.updateFindingCallable().futureCall(request);
         // Do something.
         Finding response = future.get();
       }
       
    • updateMuteConfig

      public final MuteConfig updateMuteConfig(MuteConfig muteConfig, com.google.protobuf.FieldMask updateMask)
      Updates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         MuteConfig muteConfig = MuteConfig.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         MuteConfig response = securityCenterClient.updateMuteConfig(muteConfig, updateMask);
       }
       
      Parameters:
      muteConfig - Required. The mute config being updated.
      updateMask - The list of fields to be updated. If empty all mutable fields will be updated.
      Throws:
      ApiException - if the remote call fails
    • updateMuteConfig

      public final MuteConfig updateMuteConfig(UpdateMuteConfigRequest request)
      Updates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateMuteConfigRequest request =
             UpdateMuteConfigRequest.newBuilder()
                 .setMuteConfig(MuteConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         MuteConfig response = securityCenterClient.updateMuteConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateMuteConfigCallable

      public final UnaryCallable<UpdateMuteConfigRequest,MuteConfig> updateMuteConfigCallable()
      Updates a mute config.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateMuteConfigRequest request =
             UpdateMuteConfigRequest.newBuilder()
                 .setMuteConfig(MuteConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<MuteConfig> future =
             securityCenterClient.updateMuteConfigCallable().futureCall(request);
         // Do something.
         MuteConfig response = future.get();
       }
       
    • updateNotificationConfig

      public final NotificationConfig updateNotificationConfig(NotificationConfig notificationConfig)
      Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.updateNotificationConfig(notificationConfig);
       }
       
      Parameters:
      notificationConfig - Required. The notification config to update.
      Throws:
      ApiException - if the remote call fails
    • updateNotificationConfig

      public final NotificationConfig updateNotificationConfig(NotificationConfig notificationConfig, com.google.protobuf.FieldMask updateMask)
      Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         NotificationConfig response =
             securityCenterClient.updateNotificationConfig(notificationConfig, updateMask);
       }
       
      Parameters:
      notificationConfig - Required. The notification config to update.
      updateMask - The FieldMask to use when updating the notification config.

      If empty all mutable fields will be updated.

      Throws:
      ApiException - if the remote call fails
    • updateNotificationConfig

      public final NotificationConfig updateNotificationConfig(UpdateNotificationConfigRequest request)
      Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateNotificationConfigRequest request =
             UpdateNotificationConfigRequest.newBuilder()
                 .setNotificationConfig(NotificationConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         NotificationConfig response = securityCenterClient.updateNotificationConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateNotificationConfigCallable

      public final UnaryCallable<UpdateNotificationConfigRequest,NotificationConfig> updateNotificationConfigCallable()
      Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateNotificationConfigRequest request =
             UpdateNotificationConfigRequest.newBuilder()
                 .setNotificationConfig(NotificationConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<NotificationConfig> future =
             securityCenterClient.updateNotificationConfigCallable().futureCall(request);
         // Do something.
         NotificationConfig response = future.get();
       }
       
    • updateOrganizationSettings

      public final OrganizationSettings updateOrganizationSettings(OrganizationSettings organizationSettings)
      Updates an organization's settings.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationSettings organizationSettings = OrganizationSettings.newBuilder().build();
         OrganizationSettings response =
             securityCenterClient.updateOrganizationSettings(organizationSettings);
       }
       
      Parameters:
      organizationSettings - Required. The organization settings resource to update.
      Throws:
      ApiException - if the remote call fails
    • updateOrganizationSettings

      public final OrganizationSettings updateOrganizationSettings(UpdateOrganizationSettingsRequest request)
      Updates an organization's settings.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateOrganizationSettingsRequest request =
             UpdateOrganizationSettingsRequest.newBuilder()
                 .setOrganizationSettings(OrganizationSettings.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         OrganizationSettings response = securityCenterClient.updateOrganizationSettings(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateOrganizationSettingsCallable

      public final UnaryCallable<UpdateOrganizationSettingsRequest,OrganizationSettings> updateOrganizationSettingsCallable()
      Updates an organization's settings.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateOrganizationSettingsRequest request =
             UpdateOrganizationSettingsRequest.newBuilder()
                 .setOrganizationSettings(OrganizationSettings.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<OrganizationSettings> future =
             securityCenterClient.updateOrganizationSettingsCallable().futureCall(request);
         // Do something.
         OrganizationSettings response = future.get();
       }
       
    • updateSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule updateSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule, com.google.protobuf.FieldMask updateMask)
      Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
             SecurityHealthAnalyticsCustomModule.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterClient.updateSecurityHealthAnalyticsCustomModule(
                 securityHealthAnalyticsCustomModule, updateMask);
       }
       
      Parameters:
      securityHealthAnalyticsCustomModule - Required. The SecurityHealthAnalytics custom module to update.
      updateMask - The list of fields to be updated. The only fields that can be updated are `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and `custom_config` are updated.
      Throws:
      ApiException - if the remote call fails
    • updateSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule updateSecurityHealthAnalyticsCustomModule(UpdateSecurityHealthAnalyticsCustomModuleRequest request)
      Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateSecurityHealthAnalyticsCustomModuleRequest request =
             UpdateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setSecurityHealthAnalyticsCustomModule(
                     SecurityHealthAnalyticsCustomModule.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterClient.updateSecurityHealthAnalyticsCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateSecurityHealthAnalyticsCustomModuleCallable

      public final UnaryCallable<UpdateSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule> updateSecurityHealthAnalyticsCustomModuleCallable()
      Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name and custom config of a module is supported on resident modules only.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateSecurityHealthAnalyticsCustomModuleRequest request =
             UpdateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setSecurityHealthAnalyticsCustomModule(
                     SecurityHealthAnalyticsCustomModule.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterClient
                 .updateSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         SecurityHealthAnalyticsCustomModule response = future.get();
       }
       
    • updateSource

      public final Source updateSource(Source source)
      Updates a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         Source source = Source.newBuilder().build();
         Source response = securityCenterClient.updateSource(source);
       }
       
      Parameters:
      source - Required. The source resource to update.
      Throws:
      ApiException - if the remote call fails
    • updateSource

      public final Source updateSource(UpdateSourceRequest request)
      Updates a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateSourceRequest request =
             UpdateSourceRequest.newBuilder()
                 .setSource(Source.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Source response = securityCenterClient.updateSource(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateSourceCallable

      public final UnaryCallable<UpdateSourceRequest,Source> updateSourceCallable()
      Updates a source.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateSourceRequest request =
             UpdateSourceRequest.newBuilder()
                 .setSource(Source.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Source> future = securityCenterClient.updateSourceCallable().futureCall(request);
         // Do something.
         Source response = future.get();
       }
       
    • updateSecurityMarks

      public final SecurityMarks updateSecurityMarks(SecurityMarks securityMarks)
      Updates security marks.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         SecurityMarks securityMarks = SecurityMarks.newBuilder().build();
         SecurityMarks response = securityCenterClient.updateSecurityMarks(securityMarks);
       }
       
      Parameters:
      securityMarks - Required. The security marks resource to update.
      Throws:
      ApiException - if the remote call fails
    • updateSecurityMarks

      public final SecurityMarks updateSecurityMarks(UpdateSecurityMarksRequest request)
      Updates security marks.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateSecurityMarksRequest request =
             UpdateSecurityMarksRequest.newBuilder()
                 .setSecurityMarks(SecurityMarks.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setStartTime(Timestamp.newBuilder().build())
                 .build();
         SecurityMarks response = securityCenterClient.updateSecurityMarks(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateSecurityMarksCallable

      public final UnaryCallable<UpdateSecurityMarksRequest,SecurityMarks> updateSecurityMarksCallable()
      Updates security marks.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateSecurityMarksRequest request =
             UpdateSecurityMarksRequest.newBuilder()
                 .setSecurityMarks(SecurityMarks.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setStartTime(Timestamp.newBuilder().build())
                 .build();
         ApiFuture<SecurityMarks> future =
             securityCenterClient.updateSecurityMarksCallable().futureCall(request);
         // Do something.
         SecurityMarks response = future.get();
       }
       
    • createBigQueryExport

      public final BigQueryExport createBigQueryExport(FolderName parent, BigQueryExport bigQueryExport, String bigQueryExportId)
      Creates a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderName parent = FolderName.of("[FOLDER]");
         BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
         String bigQueryExportId = "bigQueryExportId1024198583";
         BigQueryExport response =
             securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
       }
       
      Parameters:
      parent - Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      bigQueryExport - Required. The BigQuery export being created.
      bigQueryExportId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createBigQueryExport

      public final BigQueryExport createBigQueryExport(OrganizationName parent, BigQueryExport bigQueryExport, String bigQueryExportId)
      Creates a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
         String bigQueryExportId = "bigQueryExportId1024198583";
         BigQueryExport response =
             securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
       }
       
      Parameters:
      parent - Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      bigQueryExport - Required. The BigQuery export being created.
      bigQueryExportId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createBigQueryExport

      public final BigQueryExport createBigQueryExport(ProjectName parent, BigQueryExport bigQueryExport, String bigQueryExportId)
      Creates a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ProjectName parent = ProjectName.of("[PROJECT]");
         BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
         String bigQueryExportId = "bigQueryExportId1024198583";
         BigQueryExport response =
             securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
       }
       
      Parameters:
      parent - Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      bigQueryExport - Required. The BigQuery export being created.
      bigQueryExportId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createBigQueryExport

      public final BigQueryExport createBigQueryExport(String parent, BigQueryExport bigQueryExport, String bigQueryExportId)
      Creates a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
         String bigQueryExportId = "bigQueryExportId1024198583";
         BigQueryExport response =
             securityCenterClient.createBigQueryExport(parent, bigQueryExport, bigQueryExportId);
       }
       
      Parameters:
      parent - Required. The name of the parent resource of the new BigQuery export. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, or `projects/[project_id]`.
      bigQueryExport - Required. The BigQuery export being created.
      bigQueryExportId - Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.
      Throws:
      ApiException - if the remote call fails
    • createBigQueryExport

      public final BigQueryExport createBigQueryExport(CreateBigQueryExportRequest request)
      Creates a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateBigQueryExportRequest request =
             CreateBigQueryExportRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setBigQueryExport(BigQueryExport.newBuilder().build())
                 .setBigQueryExportId("bigQueryExportId1024198583")
                 .build();
         BigQueryExport response = securityCenterClient.createBigQueryExport(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createBigQueryExportCallable

      public final UnaryCallable<CreateBigQueryExportRequest,BigQueryExport> createBigQueryExportCallable()
      Creates a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateBigQueryExportRequest request =
             CreateBigQueryExportRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setBigQueryExport(BigQueryExport.newBuilder().build())
                 .setBigQueryExportId("bigQueryExportId1024198583")
                 .build();
         ApiFuture<BigQueryExport> future =
             securityCenterClient.createBigQueryExportCallable().futureCall(request);
         // Do something.
         BigQueryExport response = future.get();
       }
       
    • deleteBigQueryExport

      public final void deleteBigQueryExport(BigQueryExportName name)
      Deletes an existing BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         BigQueryExportName name =
             BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]");
         securityCenterClient.deleteBigQueryExport(name);
       }
       
      Parameters:
      name - Required. The name of the BigQuery export to delete. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
      Throws:
      ApiException - if the remote call fails
    • deleteBigQueryExport

      public final void deleteBigQueryExport(String name)
      Deletes an existing BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]").toString();
         securityCenterClient.deleteBigQueryExport(name);
       }
       
      Parameters:
      name - Required. The name of the BigQuery export to delete. Its format is `organizations/{organization}/bigQueryExports/{export_id}`, `folders/{folder}/bigQueryExports/{export_id}`, or `projects/{project}/bigQueryExports/{export_id}`
      Throws:
      ApiException - if the remote call fails
    • deleteBigQueryExport

      public final void deleteBigQueryExport(DeleteBigQueryExportRequest request)
      Deletes an existing BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteBigQueryExportRequest request =
             DeleteBigQueryExportRequest.newBuilder()
                 .setName(
                     BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
                         .toString())
                 .build();
         securityCenterClient.deleteBigQueryExport(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteBigQueryExportCallable

      public final UnaryCallable<DeleteBigQueryExportRequest,com.google.protobuf.Empty> deleteBigQueryExportCallable()
      Deletes an existing BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteBigQueryExportRequest request =
             DeleteBigQueryExportRequest.newBuilder()
                 .setName(
                     BigQueryExportName.ofOrganizationExportName("[ORGANIZATION]", "[EXPORT]")
                         .toString())
                 .build();
         ApiFuture<Empty> future =
             securityCenterClient.deleteBigQueryExportCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • updateBigQueryExport

      public final BigQueryExport updateBigQueryExport(BigQueryExport bigQueryExport, com.google.protobuf.FieldMask updateMask)
      Updates a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         BigQueryExport bigQueryExport = BigQueryExport.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         BigQueryExport response =
             securityCenterClient.updateBigQueryExport(bigQueryExport, updateMask);
       }
       
      Parameters:
      bigQueryExport - Required. The BigQuery export being updated.
      updateMask - The list of fields to be updated. If empty all mutable fields will be updated.
      Throws:
      ApiException - if the remote call fails
    • updateBigQueryExport

      public final BigQueryExport updateBigQueryExport(UpdateBigQueryExportRequest request)
      Updates a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateBigQueryExportRequest request =
             UpdateBigQueryExportRequest.newBuilder()
                 .setBigQueryExport(BigQueryExport.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         BigQueryExport response = securityCenterClient.updateBigQueryExport(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateBigQueryExportCallable

      public final UnaryCallable<UpdateBigQueryExportRequest,BigQueryExport> updateBigQueryExportCallable()
      Updates a BigQuery export.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateBigQueryExportRequest request =
             UpdateBigQueryExportRequest.newBuilder()
                 .setBigQueryExport(BigQueryExport.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<BigQueryExport> future =
             securityCenterClient.updateBigQueryExportCallable().futureCall(request);
         // Do something.
         BigQueryExport response = future.get();
       }
       
    • listBigQueryExports

      public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(FolderName parent)
      Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         FolderName parent = FolderName.of("[FOLDER]");
         for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listBigQueryExports

      Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listBigQueryExports

      public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(ProjectName parent)
      Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ProjectName parent = ProjectName.of("[PROJECT]");
         for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listBigQueryExports

      public final SecurityCenterClient.ListBigQueryExportsPagedResponse listBigQueryExports(String parent)
      Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         for (BigQueryExport element : securityCenterClient.listBigQueryExports(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of BigQuery exports. Its format is `organizations/[organization_id]`, `folders/[folder_id]`, `projects/[project_id]`.
      Throws:
      ApiException - if the remote call fails
    • listBigQueryExports

      Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListBigQueryExportsRequest request =
             ListBigQueryExportsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (BigQueryExport element :
             securityCenterClient.listBigQueryExports(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listBigQueryExportsPagedCallable

      Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListBigQueryExportsRequest request =
             ListBigQueryExportsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<BigQueryExport> future =
             securityCenterClient.listBigQueryExportsPagedCallable().futureCall(request);
         // Do something.
         for (BigQueryExport element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listBigQueryExportsCallable

      public final UnaryCallable<ListBigQueryExportsRequest,ListBigQueryExportsResponse> listBigQueryExportsCallable()
      Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListBigQueryExportsRequest request =
             ListBigQueryExportsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListBigQueryExportsResponse response =
               securityCenterClient.listBigQueryExportsCallable().call(request);
           for (BigQueryExport element : response.getBigQueryExportsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • createEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule createEventThreatDetectionCustomModule(EventThreatDetectionSettingsName parent, EventThreatDetectionCustomModule eventThreatDetectionCustomModule)
      Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         EventThreatDetectionSettingsName parent =
             EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]");
         EventThreatDetectionCustomModule eventThreatDetectionCustomModule =
             EventThreatDetectionCustomModule.newBuilder().build();
         EventThreatDetectionCustomModule response =
             securityCenterClient.createEventThreatDetectionCustomModule(
                 parent, eventThreatDetectionCustomModule);
       }
       
      Parameters:
      parent - Required. The new custom module's parent.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.

      eventThreatDetectionCustomModule - Required. The module to create. The event_threat_detection_custom_module.name will be ignored and server generated.
      Throws:
      ApiException - if the remote call fails
    • createEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule createEventThreatDetectionCustomModule(String parent, EventThreatDetectionCustomModule eventThreatDetectionCustomModule)
      Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent =
             EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
         EventThreatDetectionCustomModule eventThreatDetectionCustomModule =
             EventThreatDetectionCustomModule.newBuilder().build();
         EventThreatDetectionCustomModule response =
             securityCenterClient.createEventThreatDetectionCustomModule(
                 parent, eventThreatDetectionCustomModule);
       }
       
      Parameters:
      parent - Required. The new custom module's parent.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.

      eventThreatDetectionCustomModule - Required. The module to create. The event_threat_detection_custom_module.name will be ignored and server generated.
      Throws:
      ApiException - if the remote call fails
    • createEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule createEventThreatDetectionCustomModule(CreateEventThreatDetectionCustomModuleRequest request)
      Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateEventThreatDetectionCustomModuleRequest request =
             CreateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setEventThreatDetectionCustomModule(
                     EventThreatDetectionCustomModule.newBuilder().build())
                 .build();
         EventThreatDetectionCustomModule response =
             securityCenterClient.createEventThreatDetectionCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createEventThreatDetectionCustomModuleCallable

      public final UnaryCallable<CreateEventThreatDetectionCustomModuleRequest,EventThreatDetectionCustomModule> createEventThreatDetectionCustomModuleCallable()
      Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         CreateEventThreatDetectionCustomModuleRequest request =
             CreateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setEventThreatDetectionCustomModule(
                     EventThreatDetectionCustomModule.newBuilder().build())
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterClient.createEventThreatDetectionCustomModuleCallable().futureCall(request);
         // Do something.
         EventThreatDetectionCustomModule response = future.get();
       }
       
    • deleteEventThreatDetectionCustomModule

      public final void deleteEventThreatDetectionCustomModule(EventThreatDetectionCustomModuleName name)
      Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         EventThreatDetectionCustomModuleName name =
             EventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                 "[ORGANIZATION]", "[MODULE]");
         securityCenterClient.deleteEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the custom module to delete.

      Its format is:

      • `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
      • `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
      • `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
      Throws:
      ApiException - if the remote call fails
    • deleteEventThreatDetectionCustomModule

      public final void deleteEventThreatDetectionCustomModule(String name)
      Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             EventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                     "[ORGANIZATION]", "[MODULE]")
                 .toString();
         securityCenterClient.deleteEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the custom module to delete.

      Its format is:

      • `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
      • `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
      • `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
      Throws:
      ApiException - if the remote call fails
    • deleteEventThreatDetectionCustomModule

      public final void deleteEventThreatDetectionCustomModule(DeleteEventThreatDetectionCustomModuleRequest request)
      Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteEventThreatDetectionCustomModuleRequest request =
             DeleteEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                             "[ORGANIZATION]", "[MODULE]")
                         .toString())
                 .build();
         securityCenterClient.deleteEventThreatDetectionCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteEventThreatDetectionCustomModuleCallable

      public final UnaryCallable<DeleteEventThreatDetectionCustomModuleRequest,com.google.protobuf.Empty> deleteEventThreatDetectionCustomModuleCallable()
      Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteEventThreatDetectionCustomModuleRequest request =
             DeleteEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                             "[ORGANIZATION]", "[MODULE]")
                         .toString())
                 .build();
         ApiFuture<Empty> future =
             securityCenterClient.deleteEventThreatDetectionCustomModuleCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule getEventThreatDetectionCustomModule(EventThreatDetectionCustomModuleName name)
      Gets an Event Threat Detection custom module.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         EventThreatDetectionCustomModuleName name =
             EventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                 "[ORGANIZATION]", "[MODULE]");
         EventThreatDetectionCustomModule response =
             securityCenterClient.getEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the custom module to get.

      Its format is:

      • `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
      • `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
      • `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
      Throws:
      ApiException - if the remote call fails
    • getEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule getEventThreatDetectionCustomModule(String name)
      Gets an Event Threat Detection custom module.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             EventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                     "[ORGANIZATION]", "[MODULE]")
                 .toString();
         EventThreatDetectionCustomModule response =
             securityCenterClient.getEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the custom module to get.

      Its format is:

      • `organizations/{organization}/eventThreatDetectionSettings/customModules/{module}`.
      • `folders/{folder}/eventThreatDetectionSettings/customModules/{module}`.
      • `projects/{project}/eventThreatDetectionSettings/customModules/{module}`.
      Throws:
      ApiException - if the remote call fails
    • getEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule getEventThreatDetectionCustomModule(GetEventThreatDetectionCustomModuleRequest request)
      Gets an Event Threat Detection custom module.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetEventThreatDetectionCustomModuleRequest request =
             GetEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                             "[ORGANIZATION]", "[MODULE]")
                         .toString())
                 .build();
         EventThreatDetectionCustomModule response =
             securityCenterClient.getEventThreatDetectionCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getEventThreatDetectionCustomModuleCallable

      public final UnaryCallable<GetEventThreatDetectionCustomModuleRequest,EventThreatDetectionCustomModule> getEventThreatDetectionCustomModuleCallable()
      Gets an Event Threat Detection custom module.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetEventThreatDetectionCustomModuleRequest request =
             GetEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                             "[ORGANIZATION]", "[MODULE]")
                         .toString())
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterClient.getEventThreatDetectionCustomModuleCallable().futureCall(request);
         // Do something.
         EventThreatDetectionCustomModule response = future.get();
       }
       
    • listDescendantEventThreatDetectionCustomModules

      Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         EventThreatDetectionSettingsName parent =
             EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]");
         for (EventThreatDetectionCustomModule element :
             securityCenterClient
                 .listDescendantEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent to list custom modules under.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.

      Throws:
      ApiException - if the remote call fails
    • listDescendantEventThreatDetectionCustomModules

      public final SecurityCenterClient.ListDescendantEventThreatDetectionCustomModulesPagedResponse listDescendantEventThreatDetectionCustomModules(String parent)
      Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent =
             EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
         for (EventThreatDetectionCustomModule element :
             securityCenterClient
                 .listDescendantEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent to list custom modules under.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.

      Throws:
      ApiException - if the remote call fails
    • listDescendantEventThreatDetectionCustomModules

      Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListDescendantEventThreatDetectionCustomModulesRequest request =
             ListDescendantEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (EventThreatDetectionCustomModule element :
             securityCenterClient
                 .listDescendantEventThreatDetectionCustomModules(request)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listDescendantEventThreatDetectionCustomModulesPagedCallable

      Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListDescendantEventThreatDetectionCustomModulesRequest request =
             ListDescendantEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterClient
                 .listDescendantEventThreatDetectionCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (EventThreatDetectionCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDescendantEventThreatDetectionCustomModulesCallable

      Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListDescendantEventThreatDetectionCustomModulesRequest request =
             ListDescendantEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           ListDescendantEventThreatDetectionCustomModulesResponse response =
               securityCenterClient
                   .listDescendantEventThreatDetectionCustomModulesCallable()
                   .call(request);
           for (EventThreatDetectionCustomModule element :
               response.getEventThreatDetectionCustomModulesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listEventThreatDetectionCustomModules

      Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         EventThreatDetectionSettingsName parent =
             EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]");
         for (EventThreatDetectionCustomModule element :
             securityCenterClient.listEventThreatDetectionCustomModules(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent to list custom modules under.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.

      Throws:
      ApiException - if the remote call fails
    • listEventThreatDetectionCustomModules

      public final SecurityCenterClient.ListEventThreatDetectionCustomModulesPagedResponse listEventThreatDetectionCustomModules(String parent)
      Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent =
             EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
         for (EventThreatDetectionCustomModule element :
             securityCenterClient.listEventThreatDetectionCustomModules(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent to list custom modules under.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.

      Throws:
      ApiException - if the remote call fails
    • listEventThreatDetectionCustomModules

      Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListEventThreatDetectionCustomModulesRequest request =
             ListEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (EventThreatDetectionCustomModule element :
             securityCenterClient.listEventThreatDetectionCustomModules(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listEventThreatDetectionCustomModulesPagedCallable

      Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListEventThreatDetectionCustomModulesRequest request =
             ListEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterClient
                 .listEventThreatDetectionCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (EventThreatDetectionCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listEventThreatDetectionCustomModulesCallable

      Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListEventThreatDetectionCustomModulesRequest request =
             ListEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           ListEventThreatDetectionCustomModulesResponse response =
               securityCenterClient.listEventThreatDetectionCustomModulesCallable().call(request);
           for (EventThreatDetectionCustomModule element :
               response.getEventThreatDetectionCustomModulesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • updateEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule updateEventThreatDetectionCustomModule(EventThreatDetectionCustomModule eventThreatDetectionCustomModule, com.google.protobuf.FieldMask updateMask)
      Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         EventThreatDetectionCustomModule eventThreatDetectionCustomModule =
             EventThreatDetectionCustomModule.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         EventThreatDetectionCustomModule response =
             securityCenterClient.updateEventThreatDetectionCustomModule(
                 eventThreatDetectionCustomModule, updateMask);
       }
       
      Parameters:
      eventThreatDetectionCustomModule - Required. The module being updated.
      updateMask - The list of fields to be updated. If empty all mutable fields will be updated.
      Throws:
      ApiException - if the remote call fails
    • updateEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule updateEventThreatDetectionCustomModule(UpdateEventThreatDetectionCustomModuleRequest request)
      Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateEventThreatDetectionCustomModuleRequest request =
             UpdateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setEventThreatDetectionCustomModule(
                     EventThreatDetectionCustomModule.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         EventThreatDetectionCustomModule response =
             securityCenterClient.updateEventThreatDetectionCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateEventThreatDetectionCustomModuleCallable

      public final UnaryCallable<UpdateEventThreatDetectionCustomModuleRequest,EventThreatDetectionCustomModule> updateEventThreatDetectionCustomModuleCallable()
      Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of "inherited"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateEventThreatDetectionCustomModuleRequest request =
             UpdateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setEventThreatDetectionCustomModule(
                     EventThreatDetectionCustomModule.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterClient.updateEventThreatDetectionCustomModuleCallable().futureCall(request);
         // Do something.
         EventThreatDetectionCustomModule response = future.get();
       }
       
    • validateEventThreatDetectionCustomModule

      public final ValidateEventThreatDetectionCustomModuleResponse validateEventThreatDetectionCustomModule(ValidateEventThreatDetectionCustomModuleRequest request)
      Validates the given Event Threat Detection custom module.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ValidateEventThreatDetectionCustomModuleRequest request =
             ValidateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setRawText("rawText985734517")
                 .setType("type3575610")
                 .build();
         ValidateEventThreatDetectionCustomModuleResponse response =
             securityCenterClient.validateEventThreatDetectionCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • validateEventThreatDetectionCustomModuleCallable

      Validates the given Event Threat Detection custom module.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ValidateEventThreatDetectionCustomModuleRequest request =
             ValidateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setRawText("rawText985734517")
                 .setType("type3575610")
                 .build();
         ApiFuture<ValidateEventThreatDetectionCustomModuleResponse> future =
             securityCenterClient
                 .validateEventThreatDetectionCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         ValidateEventThreatDetectionCustomModuleResponse response = future.get();
       }
       
    • getEffectiveEventThreatDetectionCustomModule

      public final EffectiveEventThreatDetectionCustomModule getEffectiveEventThreatDetectionCustomModule(EffectiveEventThreatDetectionCustomModuleName name)
      Gets an effective Event Threat Detection custom module at the given level.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         EffectiveEventThreatDetectionCustomModuleName name =
             EffectiveEventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                 "[ORGANIZATION]", "[MODULE]");
         EffectiveEventThreatDetectionCustomModule response =
             securityCenterClient.getEffectiveEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the effective Event Threat Detection custom module.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.

      Throws:
      ApiException - if the remote call fails
    • getEffectiveEventThreatDetectionCustomModule

      public final EffectiveEventThreatDetectionCustomModule getEffectiveEventThreatDetectionCustomModule(String name)
      Gets an effective Event Threat Detection custom module at the given level.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             EffectiveEventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                     "[ORGANIZATION]", "[MODULE]")
                 .toString();
         EffectiveEventThreatDetectionCustomModule response =
             securityCenterClient.getEffectiveEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the effective Event Threat Detection custom module.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}`. * `projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}`.

      Throws:
      ApiException - if the remote call fails
    • getEffectiveEventThreatDetectionCustomModule

      public final EffectiveEventThreatDetectionCustomModule getEffectiveEventThreatDetectionCustomModule(GetEffectiveEventThreatDetectionCustomModuleRequest request)
      Gets an effective Event Threat Detection custom module at the given level.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetEffectiveEventThreatDetectionCustomModuleRequest request =
             GetEffectiveEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EffectiveEventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                             "[ORGANIZATION]", "[MODULE]")
                         .toString())
                 .build();
         EffectiveEventThreatDetectionCustomModule response =
             securityCenterClient.getEffectiveEventThreatDetectionCustomModule(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getEffectiveEventThreatDetectionCustomModuleCallable

      public final UnaryCallable<GetEffectiveEventThreatDetectionCustomModuleRequest,EffectiveEventThreatDetectionCustomModule> getEffectiveEventThreatDetectionCustomModuleCallable()
      Gets an effective Event Threat Detection custom module at the given level.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetEffectiveEventThreatDetectionCustomModuleRequest request =
             GetEffectiveEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EffectiveEventThreatDetectionCustomModuleName.ofOrganizationModuleName(
                             "[ORGANIZATION]", "[MODULE]")
                         .toString())
                 .build();
         ApiFuture<EffectiveEventThreatDetectionCustomModule> future =
             securityCenterClient
                 .getEffectiveEventThreatDetectionCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         EffectiveEventThreatDetectionCustomModule response = future.get();
       }
       
    • listEffectiveEventThreatDetectionCustomModules

      Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         EventThreatDetectionSettingsName parent =
             EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]");
         for (EffectiveEventThreatDetectionCustomModule element :
             securityCenterClient
                 .listEffectiveEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent to list custom modules for.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.

      Throws:
      ApiException - if the remote call fails
    • listEffectiveEventThreatDetectionCustomModules

      public final SecurityCenterClient.ListEffectiveEventThreatDetectionCustomModulesPagedResponse listEffectiveEventThreatDetectionCustomModules(String parent)
      Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent =
             EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString();
         for (EffectiveEventThreatDetectionCustomModule element :
             securityCenterClient
                 .listEffectiveEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent to list custom modules for.

      Its format is:

      * `organizations/{organization}/eventThreatDetectionSettings`. * `folders/{folder}/eventThreatDetectionSettings`. * `projects/{project}/eventThreatDetectionSettings`.

      Throws:
      ApiException - if the remote call fails
    • listEffectiveEventThreatDetectionCustomModules

      Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListEffectiveEventThreatDetectionCustomModulesRequest request =
             ListEffectiveEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (EffectiveEventThreatDetectionCustomModule element :
             securityCenterClient
                 .listEffectiveEventThreatDetectionCustomModules(request)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listEffectiveEventThreatDetectionCustomModulesPagedCallable

      Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListEffectiveEventThreatDetectionCustomModulesRequest request =
             ListEffectiveEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<EffectiveEventThreatDetectionCustomModule> future =
             securityCenterClient
                 .listEffectiveEventThreatDetectionCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (EffectiveEventThreatDetectionCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listEffectiveEventThreatDetectionCustomModulesCallable

      Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListEffectiveEventThreatDetectionCustomModulesRequest request =
             ListEffectiveEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(
                     EventThreatDetectionSettingsName.ofOrganizationName("[ORGANIZATION]").toString())
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           ListEffectiveEventThreatDetectionCustomModulesResponse response =
               securityCenterClient
                   .listEffectiveEventThreatDetectionCustomModulesCallable()
                   .call(request);
           for (EffectiveEventThreatDetectionCustomModule element :
               response.getEffectiveEventThreatDetectionCustomModulesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • batchCreateResourceValueConfigs

      public final BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs(OrganizationName parent, List<CreateResourceValueConfigRequest> requests)
      Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         List<CreateResourceValueConfigRequest> requests = new ArrayList<>();
         BatchCreateResourceValueConfigsResponse response =
             securityCenterClient.batchCreateResourceValueConfigs(parent, requests);
       }
       
      Parameters:
      parent - Required. Resource name of the new ResourceValueConfig's parent. The parent field in the CreateResourceValueConfigRequest messages must either be empty or match this field.
      requests - Required. The resource value configs to be created.
      Throws:
      ApiException - if the remote call fails
    • batchCreateResourceValueConfigs

      public final BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs(String parent, List<CreateResourceValueConfigRequest> requests)
      Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         List<CreateResourceValueConfigRequest> requests = new ArrayList<>();
         BatchCreateResourceValueConfigsResponse response =
             securityCenterClient.batchCreateResourceValueConfigs(parent, requests);
       }
       
      Parameters:
      parent - Required. Resource name of the new ResourceValueConfig's parent. The parent field in the CreateResourceValueConfigRequest messages must either be empty or match this field.
      requests - Required. The resource value configs to be created.
      Throws:
      ApiException - if the remote call fails
    • batchCreateResourceValueConfigs

      public final BatchCreateResourceValueConfigsResponse batchCreateResourceValueConfigs(BatchCreateResourceValueConfigsRequest request)
      Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         BatchCreateResourceValueConfigsRequest request =
             BatchCreateResourceValueConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .addAllRequests(new ArrayList<CreateResourceValueConfigRequest>())
                 .build();
         BatchCreateResourceValueConfigsResponse response =
             securityCenterClient.batchCreateResourceValueConfigs(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • batchCreateResourceValueConfigsCallable

      public final UnaryCallable<BatchCreateResourceValueConfigsRequest,BatchCreateResourceValueConfigsResponse> batchCreateResourceValueConfigsCallable()
      Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         BatchCreateResourceValueConfigsRequest request =
             BatchCreateResourceValueConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .addAllRequests(new ArrayList<CreateResourceValueConfigRequest>())
                 .build();
         ApiFuture<BatchCreateResourceValueConfigsResponse> future =
             securityCenterClient.batchCreateResourceValueConfigsCallable().futureCall(request);
         // Do something.
         BatchCreateResourceValueConfigsResponse response = future.get();
       }
       
    • deleteResourceValueConfig

      public final void deleteResourceValueConfig(ResourceValueConfigName name)
      Deletes a ResourceValueConfig.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ResourceValueConfigName name =
             ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]");
         securityCenterClient.deleteResourceValueConfig(name);
       }
       
      Parameters:
      name - Required. Name of the ResourceValueConfig to delete
      Throws:
      ApiException - if the remote call fails
    • deleteResourceValueConfig

      public final void deleteResourceValueConfig(String name)
      Deletes a ResourceValueConfig.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString();
         securityCenterClient.deleteResourceValueConfig(name);
       }
       
      Parameters:
      name - Required. Name of the ResourceValueConfig to delete
      Throws:
      ApiException - if the remote call fails
    • deleteResourceValueConfig

      public final void deleteResourceValueConfig(DeleteResourceValueConfigRequest request)
      Deletes a ResourceValueConfig.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteResourceValueConfigRequest request =
             DeleteResourceValueConfigRequest.newBuilder()
                 .setName(
                     ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]")
                         .toString())
                 .build();
         securityCenterClient.deleteResourceValueConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteResourceValueConfigCallable

      public final UnaryCallable<DeleteResourceValueConfigRequest,com.google.protobuf.Empty> deleteResourceValueConfigCallable()
      Deletes a ResourceValueConfig.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         DeleteResourceValueConfigRequest request =
             DeleteResourceValueConfigRequest.newBuilder()
                 .setName(
                     ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]")
                         .toString())
                 .build();
         ApiFuture<Empty> future =
             securityCenterClient.deleteResourceValueConfigCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • getResourceValueConfig

      public final ResourceValueConfig getResourceValueConfig(ResourceValueConfigName name)
      Gets a ResourceValueConfig.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ResourceValueConfigName name =
             ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]");
         ResourceValueConfig response = securityCenterClient.getResourceValueConfig(name);
       }
       
      Parameters:
      name - Required. Name of the resource value config to retrieve. Its format is `organizations/{organization}/resourceValueConfigs/{config_id}`.
      Throws:
      ApiException - if the remote call fails
    • getResourceValueConfig

      public final ResourceValueConfig getResourceValueConfig(String name)
      Gets a ResourceValueConfig.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String name =
             ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]").toString();
         ResourceValueConfig response = securityCenterClient.getResourceValueConfig(name);
       }
       
      Parameters:
      name - Required. Name of the resource value config to retrieve. Its format is `organizations/{organization}/resourceValueConfigs/{config_id}`.
      Throws:
      ApiException - if the remote call fails
    • getResourceValueConfig

      public final ResourceValueConfig getResourceValueConfig(GetResourceValueConfigRequest request)
      Gets a ResourceValueConfig.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetResourceValueConfigRequest request =
             GetResourceValueConfigRequest.newBuilder()
                 .setName(
                     ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]")
                         .toString())
                 .build();
         ResourceValueConfig response = securityCenterClient.getResourceValueConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getResourceValueConfigCallable

      public final UnaryCallable<GetResourceValueConfigRequest,ResourceValueConfig> getResourceValueConfigCallable()
      Gets a ResourceValueConfig.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         GetResourceValueConfigRequest request =
             GetResourceValueConfigRequest.newBuilder()
                 .setName(
                     ResourceValueConfigName.of("[ORGANIZATION]", "[RESOURCE_VALUE_CONFIG]")
                         .toString())
                 .build();
         ApiFuture<ResourceValueConfig> future =
             securityCenterClient.getResourceValueConfigCallable().futureCall(request);
         // Do something.
         ResourceValueConfig response = future.get();
       }
       
    • listResourceValueConfigs

      public final SecurityCenterClient.ListResourceValueConfigsPagedResponse listResourceValueConfigs(OrganizationName parent)
      Lists all ResourceValueConfigs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
         for (ResourceValueConfig element :
             securityCenterClient.listResourceValueConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of resource value configs. Its format is `organizations/[organization_id]`
      Throws:
      ApiException - if the remote call fails
    • listResourceValueConfigs

      public final SecurityCenterClient.ListResourceValueConfigsPagedResponse listResourceValueConfigs(String parent)
      Lists all ResourceValueConfigs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = OrganizationName.of("[ORGANIZATION]").toString();
         for (ResourceValueConfig element :
             securityCenterClient.listResourceValueConfigs(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The parent, which owns the collection of resource value configs. Its format is `organizations/[organization_id]`
      Throws:
      ApiException - if the remote call fails
    • listResourceValueConfigs

      Lists all ResourceValueConfigs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListResourceValueConfigsRequest request =
             ListResourceValueConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (ResourceValueConfig element :
             securityCenterClient.listResourceValueConfigs(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listResourceValueConfigsPagedCallable

      Lists all ResourceValueConfigs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListResourceValueConfigsRequest request =
             ListResourceValueConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<ResourceValueConfig> future =
             securityCenterClient.listResourceValueConfigsPagedCallable().futureCall(request);
         // Do something.
         for (ResourceValueConfig element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listResourceValueConfigsCallable

      public final UnaryCallable<ListResourceValueConfigsRequest,ListResourceValueConfigsResponse> listResourceValueConfigsCallable()
      Lists all ResourceValueConfigs.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListResourceValueConfigsRequest request =
             ListResourceValueConfigsRequest.newBuilder()
                 .setParent(OrganizationName.of("[ORGANIZATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListResourceValueConfigsResponse response =
               securityCenterClient.listResourceValueConfigsCallable().call(request);
           for (ResourceValueConfig element : response.getResourceValueConfigsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • updateResourceValueConfig

      public final ResourceValueConfig updateResourceValueConfig(ResourceValueConfig resourceValueConfig, com.google.protobuf.FieldMask updateMask)
      Updates an existing ResourceValueConfigs with new rules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ResourceValueConfig resourceValueConfig = ResourceValueConfig.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         ResourceValueConfig response =
             securityCenterClient.updateResourceValueConfig(resourceValueConfig, updateMask);
       }
       
      Parameters:
      resourceValueConfig - Required. The resource value config being updated.
      updateMask - The list of fields to be updated. If empty all mutable fields will be updated.
      Throws:
      ApiException - if the remote call fails
    • updateResourceValueConfig

      public final ResourceValueConfig updateResourceValueConfig(UpdateResourceValueConfigRequest request)
      Updates an existing ResourceValueConfigs with new rules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateResourceValueConfigRequest request =
             UpdateResourceValueConfigRequest.newBuilder()
                 .setResourceValueConfig(ResourceValueConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ResourceValueConfig response = securityCenterClient.updateResourceValueConfig(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateResourceValueConfigCallable

      public final UnaryCallable<UpdateResourceValueConfigRequest,ResourceValueConfig> updateResourceValueConfigCallable()
      Updates an existing ResourceValueConfigs with new rules.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         UpdateResourceValueConfigRequest request =
             UpdateResourceValueConfigRequest.newBuilder()
                 .setResourceValueConfig(ResourceValueConfig.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<ResourceValueConfig> future =
             securityCenterClient.updateResourceValueConfigCallable().futureCall(request);
         // Do something.
         ResourceValueConfig response = future.get();
       }
       
    • listValuedResources

      Lists the valued resources for a set of simulation results and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         OrganizationSimulationName parent =
             OrganizationSimulationName.of("[ORGANIZATION]", "[SIMULATION]");
         for (ValuedResource element : securityCenterClient.listValuedResources(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list valued resources.

      Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`

      Throws:
      ApiException - if the remote call fails
    • listValuedResources

      public final SecurityCenterClient.ListValuedResourcesPagedResponse listValuedResources(String parent)
      Lists the valued resources for a set of simulation results and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent = SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString();
         for (ValuedResource element : securityCenterClient.listValuedResources(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list valued resources.

      Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}`

      Throws:
      ApiException - if the remote call fails
    • listValuedResources

      Lists the valued resources for a set of simulation results and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListValuedResourcesRequest request =
             ListValuedResourcesRequest.newBuilder()
                 .setParent(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
                 .setFilter("filter-1274492040")
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (ValuedResource element :
             securityCenterClient.listValuedResources(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listValuedResourcesPagedCallable

      Lists the valued resources for a set of simulation results and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListValuedResourcesRequest request =
             ListValuedResourcesRequest.newBuilder()
                 .setParent(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
                 .setFilter("filter-1274492040")
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<ValuedResource> future =
             securityCenterClient.listValuedResourcesPagedCallable().futureCall(request);
         // Do something.
         for (ValuedResource element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listValuedResourcesCallable

      public final UnaryCallable<ListValuedResourcesRequest,ListValuedResourcesResponse> listValuedResourcesCallable()
      Lists the valued resources for a set of simulation results and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListValuedResourcesRequest request =
             ListValuedResourcesRequest.newBuilder()
                 .setParent(SimulationName.of("[ORGANIZATION]", "[SIMULATION]").toString())
                 .setFilter("filter-1274492040")
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListValuedResourcesResponse response =
               securityCenterClient.listValuedResourcesCallable().call(request);
           for (ValuedResource element : response.getValuedResourcesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • listAttackPaths

      Lists the attack paths for a set of simulation results or valued resources and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ValuedResourceName parent =
             ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]");
         for (AttackPath element : securityCenterClient.listAttackPaths(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list attack paths.

      Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`

      Throws:
      ApiException - if the remote call fails
    • listAttackPaths

      public final SecurityCenterClient.ListAttackPathsPagedResponse listAttackPaths(String parent)
      Lists the attack paths for a set of simulation results or valued resources and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         String parent =
             ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]").toString();
         for (AttackPath element : securityCenterClient.listAttackPaths(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list attack paths.

      Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`

      Throws:
      ApiException - if the remote call fails
    • listAttackPaths

      Lists the attack paths for a set of simulation results or valued resources and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListAttackPathsRequest request =
             ListAttackPathsRequest.newBuilder()
                 .setParent(
                     ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
                         .toString())
                 .setFilter("filter-1274492040")
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         for (AttackPath element : securityCenterClient.listAttackPaths(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listAttackPathsPagedCallable

      Lists the attack paths for a set of simulation results or valued resources and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListAttackPathsRequest request =
             ListAttackPathsRequest.newBuilder()
                 .setParent(
                     ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
                         .toString())
                 .setFilter("filter-1274492040")
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         ApiFuture<AttackPath> future =
             securityCenterClient.listAttackPathsPagedCallable().futureCall(request);
         // Do something.
         for (AttackPath element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listAttackPathsCallable

      public final UnaryCallable<ListAttackPathsRequest,ListAttackPathsResponse> listAttackPathsCallable()
      Lists the attack paths for a set of simulation results or valued resources and filter.

      Sample code:

      
       // 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/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
         ListAttackPathsRequest request =
             ListAttackPathsRequest.newBuilder()
                 .setParent(
                     ValuedResourceName.of("[ORGANIZATION]", "[SIMULATION]", "[VALUED_RESOURCE]")
                         .toString())
                 .setFilter("filter-1274492040")
                 .setPageToken("pageToken873572522")
                 .setPageSize(883849137)
                 .build();
         while (true) {
           ListAttackPathsResponse response =
               securityCenterClient.listAttackPathsCallable().call(request);
           for (AttackPath element : response.getAttackPathsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException