Class SecurityCenterManagementClient

java.lang.Object
com.google.cloud.securitycentermanagement.v1.SecurityCenterManagementClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class SecurityCenterManagementClient extends Object implements BackgroundResource
Service Description: Service describing handlers for resources

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 (SecurityCenterManagementClient securityCenterManagementClient =
     SecurityCenterManagementClient.create()) {
   EffectiveSecurityHealthAnalyticsCustomModuleName name =
       EffectiveSecurityHealthAnalyticsCustomModuleName
           .ofProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(
               "[PROJECT]", "[LOCATION]", "[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]");
   EffectiveSecurityHealthAnalyticsCustomModule response =
       securityCenterManagementClient.getEffectiveSecurityHealthAnalyticsCustomModule(name);
 }
 

Note: close() needs to be called on the SecurityCenterManagementClient 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

ListEffectiveSecurityHealthAnalyticsCustomModules

Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).

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(FolderLocationName parent)

  • listEffectiveSecurityHealthAnalyticsCustomModules(LocationName parent)

  • listEffectiveSecurityHealthAnalyticsCustomModules(OrganizationLocationName 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()

GetEffectiveSecurityHealthAnalyticsCustomModule

Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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()

ListSecurityHealthAnalyticsCustomModules

Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no descendants).

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(FolderLocationName parent)

  • listSecurityHealthAnalyticsCustomModules(LocationName parent)

  • listSecurityHealthAnalyticsCustomModules(OrganizationLocationName 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()

ListDescendantSecurityHealthAnalyticsCustomModules

Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of its 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(FolderLocationName parent)

  • listDescendantSecurityHealthAnalyticsCustomModules(LocationName parent)

  • listDescendantSecurityHealthAnalyticsCustomModules(OrganizationLocationName 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()

GetSecurityHealthAnalyticsCustomModule

Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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()

CreateSecurityHealthAnalyticsCustomModule

Creates a resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are 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(FolderLocationName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)

  • createSecurityHealthAnalyticsCustomModule(LocationName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)

  • createSecurityHealthAnalyticsCustomModule(OrganizationLocationName 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()

UpdateSecurityHealthAnalyticsCustomModule

Updates the [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 configuration 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()

DeleteSecurityHealthAnalyticsCustomModule

Deletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource 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()

SimulateSecurityHealthAnalyticsCustomModule

Simulates the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a 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()

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(FolderLocationName parent)

  • listEffectiveEventThreatDetectionCustomModules(LocationName parent)

  • listEffectiveEventThreatDetectionCustomModules(OrganizationLocationName 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()

GetEffectiveEventThreatDetectionCustomModule

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

The difference between an [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] and an [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] is that the fields for an `EffectiveEventThreatDetectionCustomModule` are computed from ancestors if needed. For example, the enablement state for an `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or `INHERITED`. In contrast, the enablement state for an `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` or `DISABLED`.

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()

ListEventThreatDetectionCustomModules

Lists all Event Threat Detection custom modules for the given organization, folder, or project. 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(FolderLocationName parent)

  • listEventThreatDetectionCustomModules(LocationName parent)

  • listEventThreatDetectionCustomModules(OrganizationLocationName 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()

ListDescendantEventThreatDetectionCustomModules

Lists all resident Event Threat Detection custom modules for the given organization, folder, or project 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(FolderLocationName parent)

  • listDescendantEventThreatDetectionCustomModules(LocationName parent)

  • listDescendantEventThreatDetectionCustomModules(OrganizationLocationName 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()

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()

CreateEventThreatDetectionCustomModule

Creates a resident Event Threat Detection custom module at the scope of the given organization, folder, or project, and 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(FolderLocationName parent, EventThreatDetectionCustomModule eventThreatDetectionCustomModule)

  • createEventThreatDetectionCustomModule(LocationName parent, EventThreatDetectionCustomModule eventThreatDetectionCustomModule)

  • createEventThreatDetectionCustomModule(OrganizationLocationName 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()

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()

DeleteEventThreatDetectionCustomModule

Deletes the specified Event Threat Detection custom module and all of its descendants in the resource 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()

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()

GetSecurityCenterService

Gets service settings for the specified Security Command Center service.

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

  • getSecurityCenterService(GetSecurityCenterServiceRequest request)

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

  • getSecurityCenterService(SecurityCenterServiceName name)

  • getSecurityCenterService(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.

  • getSecurityCenterServiceCallable()

ListSecurityCenterServices

Returns a list of all Security Command Center services for the given parent.

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

  • listSecurityCenterServices(ListSecurityCenterServicesRequest request)

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

  • listSecurityCenterServices(FolderLocationName parent)

  • listSecurityCenterServices(LocationName parent)

  • listSecurityCenterServices(OrganizationLocationName parent)

  • listSecurityCenterServices(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.

  • listSecurityCenterServicesPagedCallable()

  • listSecurityCenterServicesCallable()

UpdateSecurityCenterService

Updates a Security Command Center service using the given update mask.

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

  • updateSecurityCenterService(UpdateSecurityCenterServiceRequest request)

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

  • updateSecurityCenterService(SecurityCenterService securityCenterService, 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.

  • updateSecurityCenterServiceCallable()

ListLocations

Lists information about the supported locations for this service.

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

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 SecurityCenterManagementSettings 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
 SecurityCenterManagementSettings securityCenterManagementSettings =
     SecurityCenterManagementSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 SecurityCenterManagementClient securityCenterManagementClient =
     SecurityCenterManagementClient.create(securityCenterManagementSettings);
 

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
 SecurityCenterManagementSettings securityCenterManagementSettings =
     SecurityCenterManagementSettings.newBuilder().setEndpoint(myEndpoint).build();
 SecurityCenterManagementClient securityCenterManagementClient =
     SecurityCenterManagementClient.create(securityCenterManagementSettings);
 

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
 SecurityCenterManagementSettings securityCenterManagementSettings =
     SecurityCenterManagementSettings.newHttpJsonBuilder().build();
 SecurityCenterManagementClient securityCenterManagementClient =
     SecurityCenterManagementClient.create(securityCenterManagementSettings);
 

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

  • Constructor Details

    • SecurityCenterManagementClient

      protected SecurityCenterManagementClient(SecurityCenterManagementSettings settings) throws IOException
      Constructs an instance of SecurityCenterManagementClient, 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
    • SecurityCenterManagementClient

      protected SecurityCenterManagementClient(SecurityCenterManagementStub stub)
  • Method Details

    • create

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

      public static final SecurityCenterManagementClient create(SecurityCenterManagementSettings settings) throws IOException
      Constructs an instance of SecurityCenterManagementClient, 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

      Constructs an instance of SecurityCenterManagementClient, using the given stub for making calls. This is for advanced usage - prefer using create(SecurityCenterManagementSettings).
    • getSettings

      public final SecurityCenterManagementSettings getSettings()
    • getStub

      public SecurityCenterManagementStub getStub()
    • listEffectiveSecurityHealthAnalyticsCustomModules

      public final SecurityCenterManagementClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse listEffectiveSecurityHealthAnalyticsCustomModules(FolderLocationName parent)
      Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         for (EffectiveSecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEffectiveSecurityHealthAnalyticsCustomModules

      public final SecurityCenterManagementClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse listEffectiveSecurityHealthAnalyticsCustomModules(LocationName parent)
      Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (EffectiveSecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEffectiveSecurityHealthAnalyticsCustomModules

      Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (EffectiveSecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEffectiveSecurityHealthAnalyticsCustomModules

      public final SecurityCenterManagementClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse listEffectiveSecurityHealthAnalyticsCustomModules(String parent)
      Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         for (EffectiveSecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listEffectiveSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEffectiveSecurityHealthAnalyticsCustomModules

      Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
             ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (EffectiveSecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .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 [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
             ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<EffectiveSecurityHealthAnalyticsCustomModule> future =
             securityCenterManagementClient
                 .listEffectiveSecurityHealthAnalyticsCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (EffectiveSecurityHealthAnalyticsCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listEffectiveSecurityHealthAnalyticsCustomModulesCallable

      Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request =
             ListEffectiveSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListEffectiveSecurityHealthAnalyticsCustomModulesResponse response =
               securityCenterManagementClient
                   .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;
           }
         }
       }
       
    • getEffectiveSecurityHealthAnalyticsCustomModule

      public final EffectiveSecurityHealthAnalyticsCustomModule getEffectiveSecurityHealthAnalyticsCustomModule(EffectiveSecurityHealthAnalyticsCustomModuleName name)
      Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         EffectiveSecurityHealthAnalyticsCustomModuleName name =
             EffectiveSecurityHealthAnalyticsCustomModuleName
                 .ofProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(
                     "[PROJECT]", "[LOCATION]", "[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]");
         EffectiveSecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.getEffectiveSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. The full resource name of the custom module, specified in one of the following formats:
      • `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
      • `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
      • `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
      Throws:
      ApiException - if the remote call fails
    • getEffectiveSecurityHealthAnalyticsCustomModule

      public final EffectiveSecurityHealthAnalyticsCustomModule getEffectiveSecurityHealthAnalyticsCustomModule(String name)
      Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String name =
             EffectiveSecurityHealthAnalyticsCustomModuleName
                 .ofOrganizationLocationEffectiveSecurityHealthAnalyticsCustomModuleName(
                     "[ORGANIZATION]",
                     "[LOCATION]",
                     "[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]")
                 .toString();
         EffectiveSecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.getEffectiveSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. The full resource name of the custom module, specified in one of the following formats:
      • `organizations/organization/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
      • `folders/folder/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
      • `projects/project/{location}/effectiveSecurityHealthAnalyticsCustomModules/{custom_module}`
      Throws:
      ApiException - if the remote call fails
    • getEffectiveSecurityHealthAnalyticsCustomModule

      public final EffectiveSecurityHealthAnalyticsCustomModule getEffectiveSecurityHealthAnalyticsCustomModule(GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request)
      Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request =
             GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     EffectiveSecurityHealthAnalyticsCustomModuleName
                         .ofProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]")
                         .toString())
                 .build();
         EffectiveSecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.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()
      Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request =
             GetEffectiveSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     EffectiveSecurityHealthAnalyticsCustomModuleName
                         .ofProjectLocationEffectiveSecurityHealthAnalyticsCustomModuleName(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[EFFECTIVE_SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]")
                         .toString())
                 .build();
         ApiFuture<EffectiveSecurityHealthAnalyticsCustomModule> future =
             securityCenterManagementClient
                 .getEffectiveSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         EffectiveSecurityHealthAnalyticsCustomModule response = future.get();
       }
       
    • listSecurityHealthAnalyticsCustomModules

      Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project in which to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listSecurityHealthAnalyticsCustomModules

      public final SecurityCenterManagementClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse listSecurityHealthAnalyticsCustomModules(LocationName parent)
      Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project in which to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listSecurityHealthAnalyticsCustomModules

      Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project in which to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listSecurityHealthAnalyticsCustomModules

      public final SecurityCenterManagementClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse listSecurityHealthAnalyticsCustomModules(String parent)
      Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project in which to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listSecurityHealthAnalyticsCustomModules

      Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListSecurityHealthAnalyticsCustomModulesRequest request =
             ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .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 [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListSecurityHealthAnalyticsCustomModulesRequest request =
             ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterManagementClient
                 .listSecurityHealthAnalyticsCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (SecurityHealthAnalyticsCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listSecurityHealthAnalyticsCustomModulesCallable

      Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from ancestor organizations, folders, and projects (no 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListSecurityHealthAnalyticsCustomModulesRequest request =
             ListSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListSecurityHealthAnalyticsCustomModulesResponse response =
               securityCenterManagementClient
                   .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;
           }
         }
       }
       
    • listDescendantSecurityHealthAnalyticsCustomModules

      public final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse listDescendantSecurityHealthAnalyticsCustomModules(FolderLocationName parent)
      Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listDescendantSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project in which to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listDescendantSecurityHealthAnalyticsCustomModules

      public final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse listDescendantSecurityHealthAnalyticsCustomModules(LocationName parent)
      Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listDescendantSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project in which to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listDescendantSecurityHealthAnalyticsCustomModules

      Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listDescendantSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project in which to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listDescendantSecurityHealthAnalyticsCustomModules

      public final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse listDescendantSecurityHealthAnalyticsCustomModules(String parent)
      Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .listDescendantSecurityHealthAnalyticsCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project in which to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listDescendantSecurityHealthAnalyticsCustomModules

      Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
             ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (SecurityHealthAnalyticsCustomModule element :
             securityCenterManagementClient
                 .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 [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
             ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterManagementClient
                 .listDescendantSecurityHealthAnalyticsCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (SecurityHealthAnalyticsCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDescendantSecurityHealthAnalyticsCustomModulesCallable

      Returns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListDescendantSecurityHealthAnalyticsCustomModulesRequest request =
             ListDescendantSecurityHealthAnalyticsCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListDescendantSecurityHealthAnalyticsCustomModulesResponse response =
               securityCenterManagementClient
                   .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;
           }
         }
       }
       
    • getSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)
      Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         SecurityHealthAnalyticsCustomModuleName name =
             SecurityHealthAnalyticsCustomModuleName
                 .ofProjectLocationSecurityHealthAnalyticsCustomModuleName(
                     "[PROJECT]", "[LOCATION]", "[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]");
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.getSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the resource, in the format `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`.
      Throws:
      ApiException - if the remote call fails
    • getSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(String name)
      Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String name =
             SecurityHealthAnalyticsCustomModuleName
                 .ofOrganizationLocationSecurityHealthAnalyticsCustomModuleName(
                     "[ORGANIZATION]", "[LOCATION]", "[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]")
                 .toString();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.getSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. Name of the resource, in the format `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`.
      Throws:
      ApiException - if the remote call fails
    • getSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule getSecurityHealthAnalyticsCustomModule(GetSecurityHealthAnalyticsCustomModuleRequest request)
      Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetSecurityHealthAnalyticsCustomModuleRequest request =
             GetSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     SecurityHealthAnalyticsCustomModuleName
                         .ofProjectLocationSecurityHealthAnalyticsCustomModuleName(
                             "[PROJECT]", "[LOCATION]", "[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]")
                         .toString())
                 .build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.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][google.cloud.securitycentermanagement.v1.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetSecurityHealthAnalyticsCustomModuleRequest request =
             GetSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     SecurityHealthAnalyticsCustomModuleName
                         .ofProjectLocationSecurityHealthAnalyticsCustomModuleName(
                             "[PROJECT]", "[LOCATION]", "[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]")
                         .toString())
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterManagementClient
                 .getSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         SecurityHealthAnalyticsCustomModule response = future.get();
       }
       
    • createSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(FolderLocationName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)
      Creates a resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
             SecurityHealthAnalyticsCustomModule.newBuilder().build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.createSecurityHealthAnalyticsCustomModule(
                 parent, securityHealthAnalyticsCustomModule);
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project of the module, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      securityHealthAnalyticsCustomModule - Required. The resource being created.
      Throws:
      ApiException - if the remote call fails
    • createSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(LocationName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)
      Creates a resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
             SecurityHealthAnalyticsCustomModule.newBuilder().build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.createSecurityHealthAnalyticsCustomModule(
                 parent, securityHealthAnalyticsCustomModule);
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project of the module, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      securityHealthAnalyticsCustomModule - Required. The resource being created.
      Throws:
      ApiException - if the remote call fails
    • createSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(OrganizationLocationName parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)
      Creates a resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
             SecurityHealthAnalyticsCustomModule.newBuilder().build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.createSecurityHealthAnalyticsCustomModule(
                 parent, securityHealthAnalyticsCustomModule);
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project of the module, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      securityHealthAnalyticsCustomModule - Required. The resource being created.
      Throws:
      ApiException - if the remote call fails
    • createSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(String parent, SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule)
      Creates a resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
             SecurityHealthAnalyticsCustomModule.newBuilder().build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.createSecurityHealthAnalyticsCustomModule(
                 parent, securityHealthAnalyticsCustomModule);
       }
       
      Parameters:
      parent - Required. Name of the parent organization, folder, or project of the module, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      securityHealthAnalyticsCustomModule - Required. The resource being created.
      Throws:
      ApiException - if the remote call fails
    • createSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule createSecurityHealthAnalyticsCustomModule(CreateSecurityHealthAnalyticsCustomModuleRequest request)
      Creates a resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         CreateSecurityHealthAnalyticsCustomModuleRequest request =
             CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setSecurityHealthAnalyticsCustomModule(
                     SecurityHealthAnalyticsCustomModule.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.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][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] at the scope of the given organization, folder, or project, and also creates inherited `SecurityHealthAnalyticsCustomModule` resources for all folders and projects that are 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         CreateSecurityHealthAnalyticsCustomModuleRequest request =
             CreateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setSecurityHealthAnalyticsCustomModule(
                     SecurityHealthAnalyticsCustomModule.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterManagementClient
                 .createSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         SecurityHealthAnalyticsCustomModule response = future.get();
       }
       
    • updateSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule updateSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule, com.google.protobuf.FieldMask updateMask)
      Updates the [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 configuration 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         SecurityHealthAnalyticsCustomModule securityHealthAnalyticsCustomModule =
             SecurityHealthAnalyticsCustomModule.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.updateSecurityHealthAnalyticsCustomModule(
                 securityHealthAnalyticsCustomModule, updateMask);
       }
       
      Parameters:
      securityHealthAnalyticsCustomModule - Required. The resource being updated.
      updateMask - Required. The fields to update. The following values are valid:
      • `custom_config`
      • `enablement_state`

      If you omit this field or set it to the wildcard value `*`, then all eligible fields are updated.

      Throws:
      ApiException - if the remote call fails
    • updateSecurityHealthAnalyticsCustomModule

      public final SecurityHealthAnalyticsCustomModule updateSecurityHealthAnalyticsCustomModule(UpdateSecurityHealthAnalyticsCustomModuleRequest request)
      Updates the [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.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 configuration 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         UpdateSecurityHealthAnalyticsCustomModuleRequest request =
             UpdateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setSecurityHealthAnalyticsCustomModule(
                     SecurityHealthAnalyticsCustomModule.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         SecurityHealthAnalyticsCustomModule response =
             securityCenterManagementClient.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][google.cloud.securitycentermanagement.v1.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 configuration 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         UpdateSecurityHealthAnalyticsCustomModuleRequest request =
             UpdateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setSecurityHealthAnalyticsCustomModule(
                     SecurityHealthAnalyticsCustomModule.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         ApiFuture<SecurityHealthAnalyticsCustomModule> future =
             securityCenterManagementClient
                 .updateSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         SecurityHealthAnalyticsCustomModule response = future.get();
       }
       
    • deleteSecurityHealthAnalyticsCustomModule

      public final void deleteSecurityHealthAnalyticsCustomModule(SecurityHealthAnalyticsCustomModuleName name)
      Deletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         SecurityHealthAnalyticsCustomModuleName name =
             SecurityHealthAnalyticsCustomModuleName
                 .ofProjectLocationSecurityHealthAnalyticsCustomModuleName(
                     "[PROJECT]", "[LOCATION]", "[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]");
         securityCenterManagementClient.deleteSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the SHA custom module, in one of the following formats:

      * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`

      Throws:
      ApiException - if the remote call fails
    • deleteSecurityHealthAnalyticsCustomModule

      public final void deleteSecurityHealthAnalyticsCustomModule(String name)
      Deletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String name =
             SecurityHealthAnalyticsCustomModuleName
                 .ofOrganizationLocationSecurityHealthAnalyticsCustomModuleName(
                     "[ORGANIZATION]", "[LOCATION]", "[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]")
                 .toString();
         securityCenterManagementClient.deleteSecurityHealthAnalyticsCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the SHA custom module, in one of the following formats:

      * `organizations/{organization}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` * `folders/{folder}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}` * `projects/{project}/locations/{location}/securityHealthAnalyticsCustomModules/{custom_module}`

      Throws:
      ApiException - if the remote call fails
    • deleteSecurityHealthAnalyticsCustomModule

      public final void deleteSecurityHealthAnalyticsCustomModule(DeleteSecurityHealthAnalyticsCustomModuleRequest request)
      Deletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         DeleteSecurityHealthAnalyticsCustomModuleRequest request =
             DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     SecurityHealthAnalyticsCustomModuleName
                         .ofProjectLocationSecurityHealthAnalyticsCustomModuleName(
                             "[PROJECT]", "[LOCATION]", "[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]")
                         .toString())
                 .setValidateOnly(true)
                 .build();
         securityCenterManagementClient.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][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         DeleteSecurityHealthAnalyticsCustomModuleRequest request =
             DeleteSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setName(
                     SecurityHealthAnalyticsCustomModuleName
                         .ofProjectLocationSecurityHealthAnalyticsCustomModuleName(
                             "[PROJECT]", "[LOCATION]", "[SECURITY_HEALTH_ANALYTICS_CUSTOM_MODULE]")
                         .toString())
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Empty> future =
             securityCenterManagementClient
                 .deleteSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • simulateSecurityHealthAnalyticsCustomModule

      public final SimulateSecurityHealthAnalyticsCustomModuleResponse simulateSecurityHealthAnalyticsCustomModule(String parent, CustomConfig customConfig, SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource)
      Simulates the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = "parent-995424086";
         CustomConfig customConfig = CustomConfig.newBuilder().build();
         SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource =
             SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder().build();
         SimulateSecurityHealthAnalyticsCustomModuleResponse response =
             securityCenterManagementClient.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 [AIP-122: Resource names](https://google.aip.dev/122). 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 the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         SimulateSecurityHealthAnalyticsCustomModuleRequest request =
             SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setCustomConfig(CustomConfig.newBuilder().build())
                 .setResource(
                     SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder()
                         .build())
                 .build();
         SimulateSecurityHealthAnalyticsCustomModuleResponse response =
             securityCenterManagementClient.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 the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         SimulateSecurityHealthAnalyticsCustomModuleRequest request =
             SimulateSecurityHealthAnalyticsCustomModuleRequest.newBuilder()
                 .setParent("parent-995424086")
                 .setCustomConfig(CustomConfig.newBuilder().build())
                 .setResource(
                     SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource.newBuilder()
                         .build())
                 .build();
         ApiFuture<SimulateSecurityHealthAnalyticsCustomModuleResponse> future =
             securityCenterManagementClient
                 .simulateSecurityHealthAnalyticsCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         SimulateSecurityHealthAnalyticsCustomModuleResponse response = future.get();
       }
       
    • listEffectiveEventThreatDetectionCustomModules

      public final SecurityCenterManagementClient.ListEffectiveEventThreatDetectionCustomModulesPagedResponse listEffectiveEventThreatDetectionCustomModules(FolderLocationName 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         for (EffectiveEventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listEffectiveEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEffectiveEventThreatDetectionCustomModules

      public final SecurityCenterManagementClient.ListEffectiveEventThreatDetectionCustomModulesPagedResponse listEffectiveEventThreatDetectionCustomModules(LocationName 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (EffectiveEventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listEffectiveEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (EffectiveEventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listEffectiveEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEffectiveEventThreatDetectionCustomModules

      public final SecurityCenterManagementClient.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         for (EffectiveEventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listEffectiveEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list effective custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListEffectiveEventThreatDetectionCustomModulesRequest request =
             ListEffectiveEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (EffectiveEventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListEffectiveEventThreatDetectionCustomModulesRequest request =
             ListEffectiveEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<EffectiveEventThreatDetectionCustomModule> future =
             securityCenterManagementClient
                 .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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListEffectiveEventThreatDetectionCustomModulesRequest request =
             ListEffectiveEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListEffectiveEventThreatDetectionCustomModulesResponse response =
               securityCenterManagementClient
                   .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;
           }
         }
       }
       
    • getEffectiveEventThreatDetectionCustomModule

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

      The difference between an [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] and an [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] is that the fields for an `EffectiveEventThreatDetectionCustomModule` are computed from ancestors if needed. For example, the enablement state for an `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or `INHERITED`. In contrast, the enablement state for an `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` or `DISABLED`.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         EffectiveEventThreatDetectionCustomModuleName name =
             EffectiveEventThreatDetectionCustomModuleName
                 .ofProjectLocationEffectiveEventThreatDetectionCustomModuleName(
                     "[PROJECT]", "[LOCATION]", "[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]");
         EffectiveEventThreatDetectionCustomModule response =
             securityCenterManagementClient.getEffectiveEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the Event Threat Detection custom module, in one of the following formats:
      • `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
      • `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
      • `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
      Throws:
      ApiException - if the remote call fails
    • getEffectiveEventThreatDetectionCustomModule

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

      The difference between an [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] and an [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] is that the fields for an `EffectiveEventThreatDetectionCustomModule` are computed from ancestors if needed. For example, the enablement state for an `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or `INHERITED`. In contrast, the enablement state for an `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` or `DISABLED`.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String name =
             EffectiveEventThreatDetectionCustomModuleName
                 .ofOrganizationLocationEffectiveEventThreatDetectionCustomModuleName(
                     "[ORGANIZATION]",
                     "[LOCATION]",
                     "[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]")
                 .toString();
         EffectiveEventThreatDetectionCustomModule response =
             securityCenterManagementClient.getEffectiveEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the Event Threat Detection custom module, in one of the following formats:
      • `organizations/{organization}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
      • `folders/{folder}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
      • `projects/{project}/locations/{location}/effectiveEventThreatDetectionCustomModules/{custom_module}`
      Throws:
      ApiException - if the remote call fails
    • getEffectiveEventThreatDetectionCustomModule

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

      The difference between an [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] and an [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] is that the fields for an `EffectiveEventThreatDetectionCustomModule` are computed from ancestors if needed. For example, the enablement state for an `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or `INHERITED`. In contrast, the enablement state for an `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` or `DISABLED`.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetEffectiveEventThreatDetectionCustomModuleRequest request =
             GetEffectiveEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EffectiveEventThreatDetectionCustomModuleName
                         .ofProjectLocationEffectiveEventThreatDetectionCustomModuleName(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]")
                         .toString())
                 .build();
         EffectiveEventThreatDetectionCustomModule response =
             securityCenterManagementClient.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 the effective Event Threat Detection custom module at the given level.

      The difference between an [EffectiveEventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EffectiveEventThreatDetectionCustomModule] and an [EventThreatDetectionCustomModule][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule] is that the fields for an `EffectiveEventThreatDetectionCustomModule` are computed from ancestors if needed. For example, the enablement state for an `EventThreatDetectionCustomModule` can be `ENABLED`, `DISABLED`, or `INHERITED`. In contrast, the enablement state for an `EffectiveEventThreatDetectionCustomModule` is always computed as `ENABLED` or `DISABLED`.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetEffectiveEventThreatDetectionCustomModuleRequest request =
             GetEffectiveEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EffectiveEventThreatDetectionCustomModuleName
                         .ofProjectLocationEffectiveEventThreatDetectionCustomModuleName(
                             "[PROJECT]",
                             "[LOCATION]",
                             "[EFFECTIVE_EVENT_THREAT_DETECTION_CUSTOM_MODULE]")
                         .toString())
                 .build();
         ApiFuture<EffectiveEventThreatDetectionCustomModule> future =
             securityCenterManagementClient
                 .getEffectiveEventThreatDetectionCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         EffectiveEventThreatDetectionCustomModule response = future.get();
       }
       
    • listEventThreatDetectionCustomModules

      Lists all Event Threat Detection custom modules for the given organization, folder, or project. 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEventThreatDetectionCustomModules

      public final SecurityCenterManagementClient.ListEventThreatDetectionCustomModulesPagedResponse listEventThreatDetectionCustomModules(LocationName parent)
      Lists all Event Threat Detection custom modules for the given organization, folder, or project. 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEventThreatDetectionCustomModules

      Lists all Event Threat Detection custom modules for the given organization, folder, or project. 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEventThreatDetectionCustomModules

      public final SecurityCenterManagementClient.ListEventThreatDetectionCustomModulesPagedResponse listEventThreatDetectionCustomModules(String parent)
      Lists all Event Threat Detection custom modules for the given organization, folder, or project. 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listEventThreatDetectionCustomModules

      Lists all Event Threat Detection custom modules for the given organization, folder, or project. 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListEventThreatDetectionCustomModulesRequest request =
             ListEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .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 organization, folder, or project. 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListEventThreatDetectionCustomModulesRequest request =
             ListEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterManagementClient
                 .listEventThreatDetectionCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (EventThreatDetectionCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listEventThreatDetectionCustomModulesCallable

      Lists all Event Threat Detection custom modules for the given organization, folder, or project. 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListEventThreatDetectionCustomModulesRequest request =
             ListEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListEventThreatDetectionCustomModulesResponse response =
               securityCenterManagementClient
                   .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;
           }
         }
       }
       
    • listDescendantEventThreatDetectionCustomModules

      public final SecurityCenterManagementClient.ListDescendantEventThreatDetectionCustomModulesPagedResponse listDescendantEventThreatDetectionCustomModules(FolderLocationName parent)
      Lists all resident Event Threat Detection custom modules for the given organization, folder, or project 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listDescendantEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listDescendantEventThreatDetectionCustomModules

      public final SecurityCenterManagementClient.ListDescendantEventThreatDetectionCustomModulesPagedResponse listDescendantEventThreatDetectionCustomModules(LocationName parent)
      Lists all resident Event Threat Detection custom modules for the given organization, folder, or project 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listDescendantEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listDescendantEventThreatDetectionCustomModules

      Lists all resident Event Threat Detection custom modules for the given organization, folder, or project 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listDescendantEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listDescendantEventThreatDetectionCustomModules

      public final SecurityCenterManagementClient.ListDescendantEventThreatDetectionCustomModulesPagedResponse listDescendantEventThreatDetectionCustomModules(String parent)
      Lists all resident Event Threat Detection custom modules for the given organization, folder, or project 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .listDescendantEventThreatDetectionCustomModules(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Name of parent to list custom modules, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listDescendantEventThreatDetectionCustomModules

      Lists all resident Event Threat Detection custom modules for the given organization, folder, or project 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListDescendantEventThreatDetectionCustomModulesRequest request =
             ListDescendantEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (EventThreatDetectionCustomModule element :
             securityCenterManagementClient
                 .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 for the given organization, folder, or project 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListDescendantEventThreatDetectionCustomModulesRequest request =
             ListDescendantEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterManagementClient
                 .listDescendantEventThreatDetectionCustomModulesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (EventThreatDetectionCustomModule element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listDescendantEventThreatDetectionCustomModulesCallable

      Lists all resident Event Threat Detection custom modules for the given organization, folder, or project 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListDescendantEventThreatDetectionCustomModulesRequest request =
             ListDescendantEventThreatDetectionCustomModulesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListDescendantEventThreatDetectionCustomModulesResponse response =
               securityCenterManagementClient
                   .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;
           }
         }
       }
       
    • 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         EventThreatDetectionCustomModuleName name =
             EventThreatDetectionCustomModuleName
                 .ofProjectLocationEventThreatDetectionCustomModuleName(
                     "[PROJECT]", "[LOCATION]", "[EVENT_THREAT_DETECTION_CUSTOM_MODULE]");
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.getEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the Event Threat Detection custom module, in one of the following formats:
      • `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
      • `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
      • `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String name =
             EventThreatDetectionCustomModuleName
                 .ofOrganizationLocationEventThreatDetectionCustomModuleName(
                     "[ORGANIZATION]", "[LOCATION]", "[EVENT_THREAT_DETECTION_CUSTOM_MODULE]")
                 .toString();
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.getEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the Event Threat Detection custom module, in one of the following formats:
      • `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
      • `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
      • `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetEventThreatDetectionCustomModuleRequest request =
             GetEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EventThreatDetectionCustomModuleName
                         .ofProjectLocationEventThreatDetectionCustomModuleName(
                             "[PROJECT]", "[LOCATION]", "[EVENT_THREAT_DETECTION_CUSTOM_MODULE]")
                         .toString())
                 .build();
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetEventThreatDetectionCustomModuleRequest request =
             GetEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EventThreatDetectionCustomModuleName
                         .ofProjectLocationEventThreatDetectionCustomModuleName(
                             "[PROJECT]", "[LOCATION]", "[EVENT_THREAT_DETECTION_CUSTOM_MODULE]")
                         .toString())
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterManagementClient
                 .getEventThreatDetectionCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         EventThreatDetectionCustomModule response = future.get();
       }
       
    • createEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule createEventThreatDetectionCustomModule(FolderLocationName parent, EventThreatDetectionCustomModule eventThreatDetectionCustomModule)
      Creates a resident Event Threat Detection custom module at the scope of the given organization, folder, or project, and 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         EventThreatDetectionCustomModule eventThreatDetectionCustomModule =
             EventThreatDetectionCustomModule.newBuilder().build();
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.createEventThreatDetectionCustomModule(
                 parent, eventThreatDetectionCustomModule);
       }
       
      Parameters:
      parent - Required. Name of parent for the module, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      eventThreatDetectionCustomModule - Required. The module to create. The [EventThreatDetectionCustomModule.name][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name] field is ignored; Security Command Center generates the name.
      Throws:
      ApiException - if the remote call fails
    • createEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule createEventThreatDetectionCustomModule(LocationName parent, EventThreatDetectionCustomModule eventThreatDetectionCustomModule)
      Creates a resident Event Threat Detection custom module at the scope of the given organization, folder, or project, and 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         EventThreatDetectionCustomModule eventThreatDetectionCustomModule =
             EventThreatDetectionCustomModule.newBuilder().build();
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.createEventThreatDetectionCustomModule(
                 parent, eventThreatDetectionCustomModule);
       }
       
      Parameters:
      parent - Required. Name of parent for the module, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      eventThreatDetectionCustomModule - Required. The module to create. The [EventThreatDetectionCustomModule.name][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name] field is ignored; Security Command Center generates the name.
      Throws:
      ApiException - if the remote call fails
    • createEventThreatDetectionCustomModule

      public final EventThreatDetectionCustomModule createEventThreatDetectionCustomModule(OrganizationLocationName parent, EventThreatDetectionCustomModule eventThreatDetectionCustomModule)
      Creates a resident Event Threat Detection custom module at the scope of the given organization, folder, or project, and 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         EventThreatDetectionCustomModule eventThreatDetectionCustomModule =
             EventThreatDetectionCustomModule.newBuilder().build();
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.createEventThreatDetectionCustomModule(
                 parent, eventThreatDetectionCustomModule);
       }
       
      Parameters:
      parent - Required. Name of parent for the module, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      eventThreatDetectionCustomModule - Required. The module to create. The [EventThreatDetectionCustomModule.name][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name] field is ignored; Security Command Center generates the name.
      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 organization, folder, or project, and 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         EventThreatDetectionCustomModule eventThreatDetectionCustomModule =
             EventThreatDetectionCustomModule.newBuilder().build();
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.createEventThreatDetectionCustomModule(
                 parent, eventThreatDetectionCustomModule);
       }
       
      Parameters:
      parent - Required. Name of parent for the module, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      eventThreatDetectionCustomModule - Required. The module to create. The [EventThreatDetectionCustomModule.name][google.cloud.securitycentermanagement.v1.EventThreatDetectionCustomModule.name] field is ignored; Security Command Center generates the name.
      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 organization, folder, or project, and 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         CreateEventThreatDetectionCustomModuleRequest request =
             CreateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setEventThreatDetectionCustomModule(
                     EventThreatDetectionCustomModule.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.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 organization, folder, or project, and 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         CreateEventThreatDetectionCustomModuleRequest request =
             CreateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setEventThreatDetectionCustomModule(
                     EventThreatDetectionCustomModule.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterManagementClient
                 .createEventThreatDetectionCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         EventThreatDetectionCustomModule response = future.get();
       }
       
    • 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         EventThreatDetectionCustomModule eventThreatDetectionCustomModule =
             EventThreatDetectionCustomModule.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.updateEventThreatDetectionCustomModule(
                 eventThreatDetectionCustomModule, updateMask);
       }
       
      Parameters:
      eventThreatDetectionCustomModule - Required. The module being updated.
      updateMask - Required. The fields to update. If omitted, then all fields are 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         UpdateEventThreatDetectionCustomModuleRequest request =
             UpdateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setEventThreatDetectionCustomModule(
                     EventThreatDetectionCustomModule.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         EventThreatDetectionCustomModule response =
             securityCenterManagementClient.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         UpdateEventThreatDetectionCustomModuleRequest request =
             UpdateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setEventThreatDetectionCustomModule(
                     EventThreatDetectionCustomModule.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         ApiFuture<EventThreatDetectionCustomModule> future =
             securityCenterManagementClient
                 .updateEventThreatDetectionCustomModuleCallable()
                 .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 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         EventThreatDetectionCustomModuleName name =
             EventThreatDetectionCustomModuleName
                 .ofProjectLocationEventThreatDetectionCustomModuleName(
                     "[PROJECT]", "[LOCATION]", "[EVENT_THREAT_DETECTION_CUSTOM_MODULE]");
         securityCenterManagementClient.deleteEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the Event Threat Detection custom module, in one of the following formats:
      • `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
      • `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
      • `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_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 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String name =
             EventThreatDetectionCustomModuleName
                 .ofOrganizationLocationEventThreatDetectionCustomModuleName(
                     "[ORGANIZATION]", "[LOCATION]", "[EVENT_THREAT_DETECTION_CUSTOM_MODULE]")
                 .toString();
         securityCenterManagementClient.deleteEventThreatDetectionCustomModule(name);
       }
       
      Parameters:
      name - Required. The resource name of the Event Threat Detection custom module, in one of the following formats:
      • `organizations/{organization}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
      • `folders/{folder}/locations/{location}/eventThreatDetectionCustomModules/{custom_module}`
      • `projects/{project}/locations/{location}/eventThreatDetectionCustomModules/{custom_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 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         DeleteEventThreatDetectionCustomModuleRequest request =
             DeleteEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EventThreatDetectionCustomModuleName
                         .ofProjectLocationEventThreatDetectionCustomModuleName(
                             "[PROJECT]", "[LOCATION]", "[EVENT_THREAT_DETECTION_CUSTOM_MODULE]")
                         .toString())
                 .setValidateOnly(true)
                 .build();
         securityCenterManagementClient.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 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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         DeleteEventThreatDetectionCustomModuleRequest request =
             DeleteEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setName(
                     EventThreatDetectionCustomModuleName
                         .ofProjectLocationEventThreatDetectionCustomModuleName(
                             "[PROJECT]", "[LOCATION]", "[EVENT_THREAT_DETECTION_CUSTOM_MODULE]")
                         .toString())
                 .setValidateOnly(true)
                 .build();
         ApiFuture<Empty> future =
             securityCenterManagementClient
                 .deleteEventThreatDetectionCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ValidateEventThreatDetectionCustomModuleRequest request =
             ValidateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setRawText("rawText985734517")
                 .setType("type3575610")
                 .build();
         ValidateEventThreatDetectionCustomModuleResponse response =
             securityCenterManagementClient.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 (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ValidateEventThreatDetectionCustomModuleRequest request =
             ValidateEventThreatDetectionCustomModuleRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setRawText("rawText985734517")
                 .setType("type3575610")
                 .build();
         ApiFuture<ValidateEventThreatDetectionCustomModuleResponse> future =
             securityCenterManagementClient
                 .validateEventThreatDetectionCustomModuleCallable()
                 .futureCall(request);
         // Do something.
         ValidateEventThreatDetectionCustomModuleResponse response = future.get();
       }
       
    • getSecurityCenterService

      public final SecurityCenterService getSecurityCenterService(SecurityCenterServiceName name)
      Gets service settings for the specified Security Command Center service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         SecurityCenterServiceName name =
             SecurityCenterServiceName.ofProjectLocationServiceName(
                 "[PROJECT]", "[LOCATION]", "[SERVICE]");
         SecurityCenterService response =
             securityCenterManagementClient.getSecurityCenterService(name);
       }
       
      Parameters:
      name - Required. The Security Command Center service to retrieve, in one of the following formats:
      • organizations/{organization}/locations/{location}/securityCenterServices/{service}
      • folders/{folder}/locations/{location}/securityCenterServices/{service}
      • projects/{project}/locations/{location}/securityCenterServices/{service}

      The following values are valid for `{service}`:

      • `container-threat-detection`
      • `event-threat-detection`
      • `security-health-analytics`
      • `vm-threat-detection`
      • `web-security-scanner`
      Throws:
      ApiException - if the remote call fails
    • getSecurityCenterService

      public final SecurityCenterService getSecurityCenterService(String name)
      Gets service settings for the specified Security Command Center service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String name =
             SecurityCenterServiceName.ofProjectLocationServiceName(
                     "[PROJECT]", "[LOCATION]", "[SERVICE]")
                 .toString();
         SecurityCenterService response =
             securityCenterManagementClient.getSecurityCenterService(name);
       }
       
      Parameters:
      name - Required. The Security Command Center service to retrieve, in one of the following formats:
      • organizations/{organization}/locations/{location}/securityCenterServices/{service}
      • folders/{folder}/locations/{location}/securityCenterServices/{service}
      • projects/{project}/locations/{location}/securityCenterServices/{service}

      The following values are valid for `{service}`:

      • `container-threat-detection`
      • `event-threat-detection`
      • `security-health-analytics`
      • `vm-threat-detection`
      • `web-security-scanner`
      Throws:
      ApiException - if the remote call fails
    • getSecurityCenterService

      public final SecurityCenterService getSecurityCenterService(GetSecurityCenterServiceRequest request)
      Gets service settings for the specified Security Command Center service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetSecurityCenterServiceRequest request =
             GetSecurityCenterServiceRequest.newBuilder()
                 .setName(
                     SecurityCenterServiceName.ofProjectLocationServiceName(
                             "[PROJECT]", "[LOCATION]", "[SERVICE]")
                         .toString())
                 .setShowEligibleModulesOnly(true)
                 .build();
         SecurityCenterService response =
             securityCenterManagementClient.getSecurityCenterService(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getSecurityCenterServiceCallable

      public final UnaryCallable<GetSecurityCenterServiceRequest,SecurityCenterService> getSecurityCenterServiceCallable()
      Gets service settings for the specified Security Command Center service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetSecurityCenterServiceRequest request =
             GetSecurityCenterServiceRequest.newBuilder()
                 .setName(
                     SecurityCenterServiceName.ofProjectLocationServiceName(
                             "[PROJECT]", "[LOCATION]", "[SERVICE]")
                         .toString())
                 .setShowEligibleModulesOnly(true)
                 .build();
         ApiFuture<SecurityCenterService> future =
             securityCenterManagementClient.getSecurityCenterServiceCallable().futureCall(request);
         // Do something.
         SecurityCenterService response = future.get();
       }
       
    • listSecurityCenterServices

      Returns a list of all Security Command Center services for the given parent.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         FolderLocationName parent = FolderLocationName.of("[FOLDER]", "[LOCATION]");
         for (SecurityCenterService element :
             securityCenterManagementClient.listSecurityCenterServices(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent to list Security Command Center services, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listSecurityCenterServices

      Returns a list of all Security Command Center services for the given parent.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (SecurityCenterService element :
             securityCenterManagementClient.listSecurityCenterServices(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent to list Security Command Center services, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listSecurityCenterServices

      Returns a list of all Security Command Center services for the given parent.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (SecurityCenterService element :
             securityCenterManagementClient.listSecurityCenterServices(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent to list Security Command Center services, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listSecurityCenterServices

      public final SecurityCenterManagementClient.ListSecurityCenterServicesPagedResponse listSecurityCenterServices(String parent)
      Returns a list of all Security Command Center services for the given parent.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (SecurityCenterService element :
             securityCenterManagementClient.listSecurityCenterServices(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The name of the parent to list Security Command Center services, in one of the following formats:
      • `organizations/{organization}/locations/{location}`
      • `folders/{folder}/locations/{location}`
      • `projects/{project}/locations/{location}`
      Throws:
      ApiException - if the remote call fails
    • listSecurityCenterServices

      Returns a list of all Security Command Center services for the given parent.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListSecurityCenterServicesRequest request =
             ListSecurityCenterServicesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setShowEligibleModulesOnly(true)
                 .build();
         for (SecurityCenterService element :
             securityCenterManagementClient.listSecurityCenterServices(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
    • listSecurityCenterServicesPagedCallable

      Returns a list of all Security Command Center services for the given parent.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListSecurityCenterServicesRequest request =
             ListSecurityCenterServicesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setShowEligibleModulesOnly(true)
                 .build();
         ApiFuture<SecurityCenterService> future =
             securityCenterManagementClient
                 .listSecurityCenterServicesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (SecurityCenterService element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listSecurityCenterServicesCallable

      public final UnaryCallable<ListSecurityCenterServicesRequest,ListSecurityCenterServicesResponse> listSecurityCenterServicesCallable()
      Returns a list of all Security Command Center services for the given parent.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListSecurityCenterServicesRequest request =
             ListSecurityCenterServicesRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setShowEligibleModulesOnly(true)
                 .build();
         while (true) {
           ListSecurityCenterServicesResponse response =
               securityCenterManagementClient.listSecurityCenterServicesCallable().call(request);
           for (SecurityCenterService element : response.getSecurityCenterServicesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • updateSecurityCenterService

      public final SecurityCenterService updateSecurityCenterService(SecurityCenterService securityCenterService, com.google.protobuf.FieldMask updateMask)
      Updates a Security Command Center service using the given update mask.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         SecurityCenterService securityCenterService = SecurityCenterService.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         SecurityCenterService response =
             securityCenterManagementClient.updateSecurityCenterService(
                 securityCenterService, updateMask);
       }
       
      Parameters:
      securityCenterService - Required. The updated service.
      updateMask - Required. The fields to update. Accepts the following values:
      • `intended_enablement_state`
      • `modules`

      If omitted, then all eligible fields are updated.

      Throws:
      ApiException - if the remote call fails
    • updateSecurityCenterService

      public final SecurityCenterService updateSecurityCenterService(UpdateSecurityCenterServiceRequest request)
      Updates a Security Command Center service using the given update mask.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         UpdateSecurityCenterServiceRequest request =
             UpdateSecurityCenterServiceRequest.newBuilder()
                 .setSecurityCenterService(SecurityCenterService.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         SecurityCenterService response =
             securityCenterManagementClient.updateSecurityCenterService(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateSecurityCenterServiceCallable

      public final UnaryCallable<UpdateSecurityCenterServiceRequest,SecurityCenterService> updateSecurityCenterServiceCallable()
      Updates a Security Command Center service using the given update mask.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         UpdateSecurityCenterServiceRequest request =
             UpdateSecurityCenterServiceRequest.newBuilder()
                 .setSecurityCenterService(SecurityCenterService.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setValidateOnly(true)
                 .build();
         ApiFuture<SecurityCenterService> future =
             securityCenterManagementClient.updateSecurityCenterServiceCallable().futureCall(request);
         // Do something.
         SecurityCenterService response = future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : securityCenterManagementClient.listLocations(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
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             securityCenterManagementClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               securityCenterManagementClient.listLocationsCallable().call(request);
           for (Location element : response.getLocationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = securityCenterManagementClient.getLocation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      Sample code:

      
       // This snippet has been automatically generated and should be regarded as a code template only.
       // It will require modifications to work:
       // - It may require correct/in-range values for request initialization.
       // - It may require specifying regional endpoints when creating the service client as shown in
       // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
       try (SecurityCenterManagementClient securityCenterManagementClient =
           SecurityCenterManagementClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             securityCenterManagementClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • 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