Class SecurityCenterManagementClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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().
| 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classSecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesFixedSizeCollectionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of SecurityCenterManagementClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final SecurityCenterManagementClientcreate()Constructs an instance of SecurityCenterManagementClient with default settings.static final SecurityCenterManagementClientcreate(SecurityCenterManagementSettings settings) Constructs an instance of SecurityCenterManagementClient, using the given settings.static final SecurityCenterManagementClientConstructs an instance of SecurityCenterManagementClient, using the given stub for making calls.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.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.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.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.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.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.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.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.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.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.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.final UnaryCallable<CreateSecurityHealthAnalyticsCustomModuleRequest,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.final voidDeletes the specified Event Threat Detection custom module and all of its descendants in the resource hierarchy.final voidDeletes the specified Event Threat Detection custom module and all of its descendants in the resource hierarchy.final voidDeletes the specified Event Threat Detection custom module and all of its descendants in the resource hierarchy.final UnaryCallable<DeleteEventThreatDetectionCustomModuleRequest,com.google.protobuf.Empty> Deletes the specified Event Threat Detection custom module and all of its descendants in the resource hierarchy.final voidDeletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource hierarchy.final voidDeletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource hierarchy.final voidDeletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource hierarchy.final UnaryCallable<DeleteSecurityHealthAnalyticsCustomModuleRequest,com.google.protobuf.Empty> Deletes the specified [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] and all of its descendants in the resource hierarchy.Gets the effective Event Threat Detection custom module at the given level.getEffectiveEventThreatDetectionCustomModule(GetEffectiveEventThreatDetectionCustomModuleRequest request) Gets the effective Event Threat Detection custom module at the given level.Gets the effective Event Threat Detection custom module at the given level.final UnaryCallable<GetEffectiveEventThreatDetectionCustomModuleRequest,EffectiveEventThreatDetectionCustomModule> Gets the effective Event Threat Detection custom module at the given level.getEffectiveSecurityHealthAnalyticsCustomModule(EffectiveSecurityHealthAnalyticsCustomModuleName name) Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule].getEffectiveSecurityHealthAnalyticsCustomModule(GetEffectiveSecurityHealthAnalyticsCustomModuleRequest request) Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule].Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule].final UnaryCallable<GetEffectiveSecurityHealthAnalyticsCustomModuleRequest,EffectiveSecurityHealthAnalyticsCustomModule> Gets details of a single [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule].Gets an Event Threat Detection custom module.Gets an Event Threat Detection custom module.Gets an Event Threat Detection custom module.Gets an Event Threat Detection custom module.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final SecurityCenterServiceGets service settings for the specified Security Command Center service.final SecurityCenterServiceGets service settings for the specified Security Command Center service.final SecurityCenterServiceGets service settings for the specified Security Command Center service.Gets service settings for the specified Security Command Center service.Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule].Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule].Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule].final UnaryCallable<GetSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule> Retrieves a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule].getStub()booleanbooleanLists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.listDescendantEventThreatDetectionCustomModules(ListDescendantEventThreatDetectionCustomModulesRequest request) Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.final UnaryCallable<ListDescendantEventThreatDetectionCustomModulesRequest,ListDescendantEventThreatDetectionCustomModulesResponse> Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.final UnaryCallable<ListDescendantEventThreatDetectionCustomModulesRequest,SecurityCenterManagementClient.ListDescendantEventThreatDetectionCustomModulesPagedResponse> Lists all resident Event Threat Detection custom modules for the given organization, folder, or project and its descendants.final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponseReturns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of its descendants.final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponselistDescendantSecurityHealthAnalyticsCustomModules(ListDescendantSecurityHealthAnalyticsCustomModulesRequest request) 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.final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponseReturns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of its descendants.final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponseReturns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of its descendants.final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponseReturns a list of all resident [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources under the given organization, folder, or project and all of its descendants.final UnaryCallable<ListDescendantSecurityHealthAnalyticsCustomModulesRequest,ListDescendantSecurityHealthAnalyticsCustomModulesResponse> 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.final UnaryCallable<ListDescendantSecurityHealthAnalyticsCustomModulesRequest,SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse> 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.Lists all effective Event Threat Detection custom modules for the given parent.listEffectiveEventThreatDetectionCustomModules(ListEffectiveEventThreatDetectionCustomModulesRequest request) Lists all effective Event Threat Detection custom modules for the given parent.Lists all effective Event Threat Detection custom modules for the given parent.Lists all effective Event Threat Detection custom modules for the given parent.Lists all effective Event Threat Detection custom modules for the given parent.final UnaryCallable<ListEffectiveEventThreatDetectionCustomModulesRequest,ListEffectiveEventThreatDetectionCustomModulesResponse> Lists all effective Event Threat Detection custom modules for the given parent.final UnaryCallable<ListEffectiveEventThreatDetectionCustomModulesRequest,SecurityCenterManagementClient.ListEffectiveEventThreatDetectionCustomModulesPagedResponse> Lists all effective Event Threat Detection custom modules for the given parent.Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent.listEffectiveSecurityHealthAnalyticsCustomModules(ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request) Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent.Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent.Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent.Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent.final UnaryCallable<ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,ListEffectiveSecurityHealthAnalyticsCustomModulesResponse> Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent.final UnaryCallable<ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,SecurityCenterManagementClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse> Returns a list of all [EffectiveSecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.EffectiveSecurityHealthAnalyticsCustomModule] resources for the given parent.Lists all Event Threat Detection custom modules for the given organization, folder, or project.Lists all Event Threat Detection custom modules for the given organization, folder, or project.Lists all Event Threat Detection custom modules for the given organization, folder, or project.Lists all Event Threat Detection custom modules for the given organization, folder, or project.Lists all Event Threat Detection custom modules for the given organization, folder, or project.final UnaryCallable<ListEventThreatDetectionCustomModulesRequest,ListEventThreatDetectionCustomModulesResponse> Lists all Event Threat Detection custom modules for the given organization, folder, or project.final UnaryCallable<ListEventThreatDetectionCustomModulesRequest,SecurityCenterManagementClient.ListEventThreatDetectionCustomModulesPagedResponse> Lists all Event Threat Detection custom modules for the given organization, folder, or project.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.Returns a list of all Security Command Center services for the given parent.Returns a list of all Security Command Center services for the given parent.Returns a list of all Security Command Center services for the given parent.Returns a list of all Security Command Center services for the given parent.listSecurityCenterServices(String parent) Returns a list of all Security Command Center services for the given parent.Returns a list of all Security Command Center services for the given parent.final UnaryCallable<ListSecurityCenterServicesRequest,SecurityCenterManagementClient.ListSecurityCenterServicesPagedResponse> Returns a list of all Security Command Center services for the given parent.Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent.Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent.Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent.Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent.Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent.final UnaryCallable<ListSecurityHealthAnalyticsCustomModulesRequest,ListSecurityHealthAnalyticsCustomModulesResponse> Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent.final UnaryCallable<ListSecurityHealthAnalyticsCustomModulesRequest,SecurityCenterManagementClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse> Returns a list of all [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] resources for the given parent.voidshutdown()voidsimulateSecurityHealthAnalyticsCustomModule(SimulateSecurityHealthAnalyticsCustomModuleRequest request) Simulates the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a resource.simulateSecurityHealthAnalyticsCustomModule(String parent, CustomConfig customConfig, SimulateSecurityHealthAnalyticsCustomModuleRequest.SimulatedResource resource) Simulates the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a resource.final UnaryCallable<SimulateSecurityHealthAnalyticsCustomModuleRequest,SimulateSecurityHealthAnalyticsCustomModuleResponse> Simulates the result of using a [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] to check a resource.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.Updates the Event Threat Detection custom module with the given name based on the given update mask.Updates the Event Threat Detection custom module with the given name based on the given update mask.final SecurityCenterServiceupdateSecurityCenterService(SecurityCenterService securityCenterService, com.google.protobuf.FieldMask updateMask) Updates a Security Command Center service using the given update mask.final SecurityCenterServiceUpdates a Security Command Center service using the given update mask.Updates a Security Command Center service using the given update mask.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.Updates the [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] under the given name based on the given update mask.final UnaryCallable<UpdateSecurityHealthAnalyticsCustomModuleRequest,SecurityHealthAnalyticsCustomModule> Updates the [SecurityHealthAnalyticsCustomModule][google.cloud.securitycentermanagement.v1.SecurityHealthAnalyticsCustomModule] under the given name based on the given update mask.Validates the given Event Threat Detection custom module.final UnaryCallable<ValidateEventThreatDetectionCustomModuleRequest,ValidateEventThreatDetectionCustomModuleResponse> Validates the given Event Threat Detection custom module.
-
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
-
-
Method Details
-
create
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
-
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
public final SecurityCenterManagementClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse listEffectiveSecurityHealthAnalyticsCustomModules(OrganizationLocationName 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()) { 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
public final SecurityCenterManagementClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse listEffectiveSecurityHealthAnalyticsCustomModules(ListEffectiveSecurityHealthAnalyticsCustomModulesRequest request) 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
public final UnaryCallable<ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,SecurityCenterManagementClient.ListEffectiveSecurityHealthAnalyticsCustomModulesPagedResponse> 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
public final UnaryCallable<ListEffectiveSecurityHealthAnalyticsCustomModulesRequest,ListEffectiveSecurityHealthAnalyticsCustomModulesResponse> 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
public final SecurityCenterManagementClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse listSecurityHealthAnalyticsCustomModules(FolderLocationName 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()) { 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
public final SecurityCenterManagementClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse listSecurityHealthAnalyticsCustomModules(OrganizationLocationName 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()) { 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
public final SecurityCenterManagementClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse listSecurityHealthAnalyticsCustomModules(ListSecurityHealthAnalyticsCustomModulesRequest request) 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
public final UnaryCallable<ListSecurityHealthAnalyticsCustomModulesRequest,SecurityCenterManagementClient.ListSecurityHealthAnalyticsCustomModulesPagedResponse> 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
public final UnaryCallable<ListSecurityHealthAnalyticsCustomModulesRequest,ListSecurityHealthAnalyticsCustomModulesResponse> 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
public final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse listDescendantSecurityHealthAnalyticsCustomModules(OrganizationLocationName 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()) { 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
public final SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse listDescendantSecurityHealthAnalyticsCustomModules(ListDescendantSecurityHealthAnalyticsCustomModulesRequest request) 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
public final UnaryCallable<ListDescendantSecurityHealthAnalyticsCustomModulesRequest,SecurityCenterManagementClient.ListDescendantSecurityHealthAnalyticsCustomModulesPagedResponse> 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
public final UnaryCallable<ListDescendantSecurityHealthAnalyticsCustomModulesRequest,ListDescendantSecurityHealthAnalyticsCustomModulesResponse> 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
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
public final UnaryCallable<SimulateSecurityHealthAnalyticsCustomModuleRequest,SimulateSecurityHealthAnalyticsCustomModuleResponse> 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
public final SecurityCenterManagementClient.ListEffectiveEventThreatDetectionCustomModulesPagedResponse listEffectiveEventThreatDetectionCustomModules(OrganizationLocationName 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()) { 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
public final SecurityCenterManagementClient.ListEffectiveEventThreatDetectionCustomModulesPagedResponse listEffectiveEventThreatDetectionCustomModules(ListEffectiveEventThreatDetectionCustomModulesRequest request) 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
public final UnaryCallable<ListEffectiveEventThreatDetectionCustomModulesRequest,SecurityCenterManagementClient.ListEffectiveEventThreatDetectionCustomModulesPagedResponse> 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
public final UnaryCallable<ListEffectiveEventThreatDetectionCustomModulesRequest,ListEffectiveEventThreatDetectionCustomModulesResponse> 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
public final SecurityCenterManagementClient.ListEventThreatDetectionCustomModulesPagedResponse listEventThreatDetectionCustomModules(FolderLocationName 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()) { 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
public final SecurityCenterManagementClient.ListEventThreatDetectionCustomModulesPagedResponse listEventThreatDetectionCustomModules(OrganizationLocationName 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()) { 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
public final SecurityCenterManagementClient.ListEventThreatDetectionCustomModulesPagedResponse listEventThreatDetectionCustomModules(ListEventThreatDetectionCustomModulesRequest request) 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
public final UnaryCallable<ListEventThreatDetectionCustomModulesRequest,SecurityCenterManagementClient.ListEventThreatDetectionCustomModulesPagedResponse> 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
public final UnaryCallable<ListEventThreatDetectionCustomModulesRequest,ListEventThreatDetectionCustomModulesResponse> 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
public final SecurityCenterManagementClient.ListDescendantEventThreatDetectionCustomModulesPagedResponse listDescendantEventThreatDetectionCustomModules(OrganizationLocationName 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()) { 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
public final SecurityCenterManagementClient.ListDescendantEventThreatDetectionCustomModulesPagedResponse listDescendantEventThreatDetectionCustomModules(ListDescendantEventThreatDetectionCustomModulesRequest request) 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
public final UnaryCallable<ListDescendantEventThreatDetectionCustomModulesRequest,SecurityCenterManagementClient.ListDescendantEventThreatDetectionCustomModulesPagedResponse> 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
public final UnaryCallable<ListDescendantEventThreatDetectionCustomModulesRequest,ListDescendantEventThreatDetectionCustomModulesResponse> 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
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
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
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
public final UnaryCallable<ValidateEventThreatDetectionCustomModuleRequest,ValidateEventThreatDetectionCustomModuleResponse> 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
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
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
public final SecurityCenterManagementClient.ListSecurityCenterServicesPagedResponse listSecurityCenterServices(FolderLocationName 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()) { 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
public final SecurityCenterManagementClient.ListSecurityCenterServicesPagedResponse listSecurityCenterServices(LocationName 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()) { 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
public final SecurityCenterManagementClient.ListSecurityCenterServicesPagedResponse listSecurityCenterServices(OrganizationLocationName 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()) { 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
public final SecurityCenterManagementClient.ListSecurityCenterServicesPagedResponse listSecurityCenterServices(ListSecurityCenterServicesRequest request) 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
public final UnaryCallable<ListSecurityCenterServicesRequest,SecurityCenterManagementClient.ListSecurityCenterServicesPagedResponse> 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
public final SecurityCenterManagementClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) 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
public final UnaryCallable<ListLocationsRequest,SecurityCenterManagementClient.ListLocationsPagedResponse> 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
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
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
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:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-